public class MockLiferayPortletContext
extends Object
implements com.liferay.portal.kernel.portlet.LiferayPortletContext
PortletContextImpl| Constructor and Description |
|---|
MockLiferayPortletContext(String path) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(String name) |
Enumeration<String> |
getAttributeNames() |
ClassLoader |
getClassLoader() |
Enumeration<String> |
getContainerRuntimeOptions() |
String |
getContextPath() |
int |
getEffectiveMajorVersion() |
int |
getEffectiveMinorVersion() |
String |
getInitParameter(String name) |
Enumeration<String> |
getInitParameterNames() |
int |
getMajorVersion() |
String |
getMimeType(String path) |
int |
getMinorVersion() |
PortletRequestDispatcher |
getNamedDispatcher(String name) |
com.liferay.portal.kernel.model.Portlet |
getPortlet() |
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() |
javax.servlet.ServletContext |
getServletContext() |
void |
log(String message) |
void |
log(String message,
Throwable throwable) |
void |
removeAttribute(String name) |
void |
setAttribute(String name,
Object object) |
public Object getAttribute(String name)
getAttribute in interface PortletContextpublic Enumeration<String> getAttributeNames()
getAttributeNames in interface PortletContextpublic ClassLoader getClassLoader()
getClassLoader in interface PortletContextpublic Enumeration<String> getContainerRuntimeOptions()
getContainerRuntimeOptions in interface PortletContextpublic String getContextPath()
getContextPath in interface PortletContextpublic int getEffectiveMajorVersion()
getEffectiveMajorVersion in interface PortletContextpublic int getEffectiveMinorVersion()
getEffectiveMinorVersion in interface PortletContextpublic String getInitParameter(String name)
getInitParameter in interface PortletContextpublic Enumeration<String> getInitParameterNames()
getInitParameterNames in interface PortletContextpublic int getMajorVersion()
getMajorVersion in interface PortletContextpublic String getMimeType(String path)
getMimeType in interface PortletContextpublic int getMinorVersion()
getMinorVersion in interface PortletContextpublic PortletRequestDispatcher getNamedDispatcher(String name)
getNamedDispatcher in interface PortletContextpublic com.liferay.portal.kernel.model.Portlet getPortlet()
getPortlet in interface com.liferay.portal.kernel.portlet.LiferayPortletContextpublic String getPortletContextName()
getPortletContextName in interface PortletContextpublic String getRealPath(String path)
getRealPath in interface PortletContextpublic PortletRequestDispatcher getRequestDispatcher(String path)
getRequestDispatcher in interface PortletContextpublic URL getResource(String path)
throws MalformedURLException
getResource in interface PortletContextMalformedURLExceptionpublic InputStream getResourceAsStream(String path)
getResourceAsStream in interface PortletContextpublic Set<String> getResourcePaths(String path)
getResourcePaths in interface PortletContextpublic String getServerInfo()
getServerInfo in interface PortletContextpublic javax.servlet.ServletContext getServletContext()
getServletContext in interface com.liferay.portal.kernel.portlet.LiferayPortletContextpublic void log(String message)
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 PortletContext