类 ServletWrappingPortletContext
- java.lang.Object
- org.springframework.mock.web.portlet.ServletWrappingPortletContext
- 所有已实现的接口:
PortletContext
public class ServletWrappingPortletContext extends Object implements PortletContext
Mock implementation of thePortletContext
interface, wrapping an underlyingServletContext
.- 从以下版本开始:
- 3.0
- 作者:
- Juergen Hoeller
- 另请参阅:
MockPortletContext
构造器概要
构造器 构造器 说明 ServletWrappingPortletContext(ServletContext servletContext)
Create a new PortletContext wrapping the given ServletContext.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Object
getAttribute(String name)
Enumeration<String>
getAttributeNames()
Enumeration<String>
getContainerRuntimeOptions()
String
getInitParameter(String name)
Enumeration<String>
getInitParameterNames()
int
getMajorVersion()
String
getMimeType(String file)
int
getMinorVersion()
PortletRequestDispatcher
getNamedDispatcher(String name)
String
getPortletContextName()
String
getRealPath(String path)
PortletRequestDispatcher
getRequestDispatcher(String path)
URL
getResource(String path)
InputStream
getResourceAsStream(String path)
Set<String>
getResourcePaths(String path)
String
getServerInfo()
ServletContext
getServletContext()
Return the underlying ServletContext that this PortletContext wraps.void
log(String msg)
void
log(String message, Throwable throwable)
void
removeAttribute(String name)
void
setAttribute(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