|
The Spring Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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. the classpath root as WAR root). |
|
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. |
|
| Method Summary | |
|---|---|
void |
addInitParameter(String name,
String value)
|
Object |
getAttribute(String name)
|
Enumeration |
getAttributeNames()
|
String |
getInitParameter(String name)
|
Enumeration |
getInitParameterNames()
|
int |
getMajorVersion()
|
String |
getMimeType(String filePath)
|
int |
getMinorVersion()
|
PortletRequestDispatcher |
getNamedDispatcher(String path)
|
String |
getPortletContextName()
|
String |
getRealPath(String path)
|
PortletRequestDispatcher |
getRequestDispatcher(String path)
|
URL |
getResource(String path)
|
InputStream |
getResourceAsStream(String path)
|
protected String |
getResourceLocation(String path)
Build a full resource location for the given path, prepending the resource base path of this MockPortletContext. |
Set |
getResourcePaths(String path)
|
String |
getServerInfo()
|
void |
log(String message)
|
void |
log(String message,
Throwable t)
|
void |
removeAttribute(String name)
|
void |
setAttribute(String name,
Object value)
|
void |
setPortletContextName(String portletContextName)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockPortletContext()
DefaultResourceLoaderpublic MockPortletContext(String resourceBasePath)
resourceBasePath - the WAR root directory (should not end with a slash)DefaultResourceLoaderpublic 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 PortletContextpublic PortletRequestDispatcher getRequestDispatcher(String path)
getRequestDispatcher in interface PortletContextpublic PortletRequestDispatcher getNamedDispatcher(String path)
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 filePath)
getMimeType in interface PortletContextpublic String getRealPath(String path)
getRealPath in interface PortletContextpublic Set 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 getAttributeNames()
getAttributeNames in interface PortletContextpublic void setAttribute(String name, Object value)
setAttribute in interface PortletContextpublic void removeAttribute(String name)
removeAttribute in interface PortletContextpublic void addInitParameter(String name, String value)
public String getInitParameter(String name)
getInitParameter in interface PortletContextpublic Enumeration getInitParameterNames()
getInitParameterNames in interface PortletContextpublic void log(String message)
log in interface PortletContextpublic void log(String message, Throwable t)
log in interface PortletContextpublic void setPortletContextName(String portletContextName)
public String getPortletContextName()
getPortletContextName in interface PortletContext
|
The Spring Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||