public class ServletWrappingPortletContext extends Object implements PortletContext
PortletContext interface,
wrapping an underlying ServletContext.MockPortletContext| Constructor and Description |
|---|
ServletWrappingPortletContext(ServletContext servletContext)
Create a new PortletContext wrapping the given ServletContext.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
public ServletWrappingPortletContext(ServletContext servletContext)
servletContext - the ServletContext to wrappublic final ServletContext getServletContext()
public String getServerInfo()
getServerInfo in interface PortletContextpublic PortletRequestDispatcher getRequestDispatcher(String path)
getRequestDispatcher in interface PortletContextpublic PortletRequestDispatcher getNamedDispatcher(String name)
getNamedDispatcher in interface PortletContextpublic InputStream getResourceAsStream(String path)
getResourceAsStream in interface PortletContextpublic int getMajorVersion()
getMajorVersion in interface PortletContextpublic int getMinorVersion()
getMinorVersion in interface PortletContextpublic String getMimeType(String file)
getMimeType in interface PortletContextpublic String getRealPath(String path)
getRealPath in interface PortletContextpublic Set<String> getResourcePaths(String path)
getResourcePaths in interface PortletContextpublic URL getResource(String path) throws MalformedURLException
getResource in interface PortletContextMalformedURLExceptionpublic Object getAttribute(String name)
getAttribute in interface PortletContextpublic Enumeration<String> getAttributeNames()
getAttributeNames in interface PortletContextpublic String getInitParameter(String name)
getInitParameter in interface PortletContextpublic Enumeration<String> getInitParameterNames()
getInitParameterNames in interface PortletContextpublic void log(String msg)
log in interface PortletContextpublic void log(String message, Throwable throwable)
log in interface PortletContextpublic void removeAttribute(String name)
removeAttribute in interface PortletContextpublic void setAttribute(String name, Object object)
setAttribute in interface PortletContextpublic String getPortletContextName()
getPortletContextName in interface PortletContextpublic Enumeration<String> getContainerRuntimeOptions()
getContainerRuntimeOptions in interface PortletContext