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