|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.mock.web.portlet.MockPortletContext
public class MockPortletContext
Mock implementation of the PortletContext
interface.
Constructor Summary | |
---|---|
MockPortletContext()
Create a new MockPortletContext with no base path and a DefaultResourceLoader (i.e. |
|
MockPortletContext(ResourceLoader resourceLoader)
Create a new MockPortletContext, using the specified ResourceLoader and no base path. |
|
MockPortletContext(String resourceBasePath)
Create a new MockPortletContext using a DefaultResourceLoader. |
|
MockPortletContext(String resourceBasePath,
ResourceLoader resourceLoader)
Create a new MockPortletContext. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockPortletContext()
DefaultResourceLoader
public MockPortletContext(String resourceBasePath)
resourceBasePath
- the WAR root directory (should not end with a slash)DefaultResourceLoader
public MockPortletContext(ResourceLoader resourceLoader)
resourceLoader
- the ResourceLoader to use (or null for the default)public MockPortletContext(String resourceBasePath, ResourceLoader resourceLoader)
resourceBasePath
- the WAR root directory (should not end with a slash)resourceLoader
- the ResourceLoader to use (or null for the default)Method Detail |
---|
protected String getResourceLocation(String path)
path
- the path as specified
public String getServerInfo()
getServerInfo
in interface PortletContext
public PortletRequestDispatcher getRequestDispatcher(String path)
getRequestDispatcher
in interface PortletContext
public PortletRequestDispatcher getNamedDispatcher(String path)
getNamedDispatcher
in interface PortletContext
public InputStream getResourceAsStream(String path)
getResourceAsStream
in interface PortletContext
public int getMajorVersion()
getMajorVersion
in interface PortletContext
public int getMinorVersion()
getMinorVersion
in interface PortletContext
public String getMimeType(String filePath)
getMimeType
in interface PortletContext
public String getRealPath(String path)
getRealPath
in interface PortletContext
public Set<String> getResourcePaths(String path)
getResourcePaths
in interface PortletContext
public URL getResource(String path) throws MalformedURLException
getResource
in interface PortletContext
MalformedURLException
public Object getAttribute(String name)
getAttribute
in interface PortletContext
public Enumeration<String> getAttributeNames()
getAttributeNames
in interface PortletContext
public void setAttribute(String name, Object value)
setAttribute
in interface PortletContext
public void removeAttribute(String name)
removeAttribute
in interface PortletContext
public void addInitParameter(String name, String value)
public String getInitParameter(String name)
getInitParameter
in interface PortletContext
public Enumeration<String> getInitParameterNames()
getInitParameterNames
in interface PortletContext
public void log(String message)
log
in interface PortletContext
public void log(String message, Throwable t)
log
in interface PortletContext
public void setPortletContextName(String portletContextName)
public String getPortletContextName()
getPortletContextName
in interface PortletContext
public void addContainerRuntimeOption(String key)
public Enumeration<String> getContainerRuntimeOptions()
getContainerRuntimeOptions
in interface PortletContext
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |