public class ServletWrappingPortletContext
extends java.lang.Object
javax.portlet.PortletContext
interface,
wrapping an underlying javax.servlet.ServletContext
.MockPortletContext
Modifier and Type | Field and Description |
---|---|
private ServletContext |
servletContext |
Constructor and Description |
---|
ServletWrappingPortletContext(ServletContext servletContext)
Create a new PortletContext wrapping the given ServletContext.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAttribute(java.lang.String name) |
java.util.Enumeration<java.lang.String> |
getAttributeNames() |
java.util.Enumeration<java.lang.String> |
getContainerRuntimeOptions() |
java.lang.String |
getInitParameter(java.lang.String name) |
java.util.Enumeration<java.lang.String> |
getInitParameterNames() |
int |
getMajorVersion() |
java.lang.String |
getMimeType(java.lang.String file) |
int |
getMinorVersion() |
PortletRequestDispatcher |
getNamedDispatcher(java.lang.String name) |
java.lang.String |
getPortletContextName() |
java.lang.String |
getRealPath(java.lang.String path) |
PortletRequestDispatcher |
getRequestDispatcher(java.lang.String path) |
java.net.URL |
getResource(java.lang.String path) |
java.io.InputStream |
getResourceAsStream(java.lang.String path) |
java.util.Set<java.lang.String> |
getResourcePaths(java.lang.String path) |
java.lang.String |
getServerInfo() |
ServletContext |
getServletContext()
Return the underlying ServletContext that this PortletContext wraps.
|
void |
log(java.lang.String msg) |
void |
log(java.lang.String message,
java.lang.Throwable throwable) |
void |
removeAttribute(java.lang.String name) |
void |
setAttribute(java.lang.String name,
java.lang.Object object) |
public ServletWrappingPortletContext(ServletContext servletContext)
servletContext
- the ServletContext to wrappublic final ServletContext getServletContext()
public java.lang.String getServerInfo()
public PortletRequestDispatcher getRequestDispatcher(java.lang.String path)
public PortletRequestDispatcher getNamedDispatcher(java.lang.String name)
public java.io.InputStream getResourceAsStream(java.lang.String path)
public int getMajorVersion()
public int getMinorVersion()
public java.lang.String getMimeType(java.lang.String file)
public java.lang.String getRealPath(java.lang.String path)
public java.util.Set<java.lang.String> getResourcePaths(java.lang.String path)
public java.net.URL getResource(java.lang.String path) throws java.net.MalformedURLException
java.net.MalformedURLException
public java.lang.Object getAttribute(java.lang.String name)
public java.util.Enumeration<java.lang.String> getAttributeNames()
public java.lang.String getInitParameter(java.lang.String name)
public java.util.Enumeration<java.lang.String> getInitParameterNames()
public void log(java.lang.String msg)
public void log(java.lang.String message, java.lang.Throwable throwable)
public void removeAttribute(java.lang.String name)
public void setAttribute(java.lang.String name, java.lang.Object object)
public java.lang.String getPortletContextName()
public java.util.Enumeration<java.lang.String> getContainerRuntimeOptions()