类 ServletWrappingPortletContext
- java.lang.Object
- org.springframework.mock.web.portlet.ServletWrappingPortletContext
- 所有已实现的接口:
PortletContext
public class ServletWrappingPortletContext extends Object implements PortletContext
Mock implementation of thePortletContextinterface, wrapping an underlyingServletContext.- 从以下版本开始:
- 3.0
- 作者:
- Juergen Hoeller
- 另请参阅:
MockPortletContext
构造器概要
构造器 构造器 说明 ServletWrappingPortletContext(ServletContext servletContext)Create a new PortletContext wrapping the given ServletContext.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ObjectgetAttribute(String name)Enumeration<String>getAttributeNames()Enumeration<String>getContainerRuntimeOptions()StringgetInitParameter(String name)Enumeration<String>getInitParameterNames()intgetMajorVersion()StringgetMimeType(String file)intgetMinorVersion()PortletRequestDispatchergetNamedDispatcher(String name)StringgetPortletContextName()StringgetRealPath(String path)PortletRequestDispatchergetRequestDispatcher(String path)URLgetResource(String path)InputStreamgetResourceAsStream(String path)Set<String>getResourcePaths(String path)StringgetServerInfo()ServletContextgetServletContext()Return the underlying ServletContext that this PortletContext wraps.voidlog(String msg)voidlog(String message, Throwable throwable)voidremoveAttribute(String name)voidsetAttribute(String name, Object object)
构造器详细资料
ServletWrappingPortletContext
public ServletWrappingPortletContext(ServletContext servletContext)
Create a new PortletContext wrapping the given ServletContext.- 参数:
servletContext- the ServletContext to wrap
方法详细资料
getServletContext
public final ServletContext getServletContext()
Return the underlying ServletContext that this PortletContext wraps.
getServerInfo
public String getServerInfo()
- 指定者:
getServerInfo在接口中PortletContext
getRequestDispatcher
public PortletRequestDispatcher getRequestDispatcher(String path)
- 指定者:
getRequestDispatcher在接口中PortletContext
getNamedDispatcher
public PortletRequestDispatcher getNamedDispatcher(String name)
- 指定者:
getNamedDispatcher在接口中PortletContext
getResourceAsStream
public InputStream getResourceAsStream(String path)
- 指定者:
getResourceAsStream在接口中PortletContext
getMajorVersion
public int getMajorVersion()
- 指定者:
getMajorVersion在接口中PortletContext
getMinorVersion
public int getMinorVersion()
- 指定者:
getMinorVersion在接口中PortletContext
getMimeType
public String getMimeType(String file)
- 指定者:
getMimeType在接口中PortletContext
getRealPath
public String getRealPath(String path)
- 指定者:
getRealPath在接口中PortletContext
getResourcePaths
public Set<String> getResourcePaths(String path)
- 指定者:
getResourcePaths在接口中PortletContext
getResource
public URL getResource(String path) throws MalformedURLException
- 指定者:
getResource在接口中PortletContext- 抛出:
MalformedURLException
getAttribute
public Object getAttribute(String name)
- 指定者:
getAttribute在接口中PortletContext
getAttributeNames
public Enumeration<String> getAttributeNames()
- 指定者:
getAttributeNames在接口中PortletContext
getInitParameter
public String getInitParameter(String name)
- 指定者:
getInitParameter在接口中PortletContext
getInitParameterNames
public Enumeration<String> getInitParameterNames()
- 指定者:
getInitParameterNames在接口中PortletContext
log
public void log(String msg)
- 指定者:
log在接口中PortletContext
log
public void log(String message, Throwable throwable)
- 指定者:
log在接口中PortletContext
removeAttribute
public void removeAttribute(String name)
- 指定者:
removeAttribute在接口中PortletContext
setAttribute
public void setAttribute(String name, Object object)
- 指定者:
setAttribute在接口中PortletContext
getPortletContextName
public String getPortletContextName()
- 指定者:
getPortletContextName在接口中PortletContext
getContainerRuntimeOptions
public Enumeration<String> getContainerRuntimeOptions()
- 指定者:
getContainerRuntimeOptions在接口中PortletContext