Class MockPortletContext
Object
com.liferay.portal.kernel.test.portlet.MockPortletContext
- All Implemented Interfaces:
PortletContext
- Author:
- Dante Wang
-
Constructor Summary
ConstructorsConstructorDescriptionMockPortletContext
(String resourceBasePath) MockPortletContext
(String resourceBasePath, org.springframework.core.io.ResourceLoader resourceLoader) MockPortletContext
(org.springframework.core.io.ResourceLoader resourceLoader) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addInitParameter
(String name, String value) getAttribute
(String name) int
int
getInitParameter
(String name) int
getMimeType
(String filePath) int
getNamedDispatcher
(String path) getRealPath
(String path) getRequestDispatcher
(String path) getResource
(String path) getResourceAsStream
(String path) protected String
getResourceLocation
(String path) getResourcePaths
(String path) void
void
void
removeAttribute
(String name) void
setAttribute
(String name, Object value) void
setPortletContextName
(String portletContextName)
-
Constructor Details
-
MockPortletContext
public MockPortletContext() -
MockPortletContext
public MockPortletContext(org.springframework.core.io.ResourceLoader resourceLoader) -
MockPortletContext
-
MockPortletContext
public MockPortletContext(String resourceBasePath, org.springframework.core.io.ResourceLoader resourceLoader)
-
-
Method Details
-
addContainerRuntimeOption
-
addInitParameter
-
getAttribute
- Specified by:
getAttribute
in interfacePortletContext
-
getAttributeNames
- Specified by:
getAttributeNames
in interfacePortletContext
-
getClassLoader
- Specified by:
getClassLoader
in interfacePortletContext
-
getContainerRuntimeOptions
- Specified by:
getContainerRuntimeOptions
in interfacePortletContext
-
getContextPath
- Specified by:
getContextPath
in interfacePortletContext
-
getEffectiveMajorVersion
public int getEffectiveMajorVersion()- Specified by:
getEffectiveMajorVersion
in interfacePortletContext
-
getEffectiveMinorVersion
public int getEffectiveMinorVersion()- Specified by:
getEffectiveMinorVersion
in interfacePortletContext
-
getInitParameter
- Specified by:
getInitParameter
in interfacePortletContext
-
getInitParameterNames
- Specified by:
getInitParameterNames
in interfacePortletContext
-
getMajorVersion
public int getMajorVersion()- Specified by:
getMajorVersion
in interfacePortletContext
-
getMimeType
- Specified by:
getMimeType
in interfacePortletContext
-
getMinorVersion
public int getMinorVersion()- Specified by:
getMinorVersion
in interfacePortletContext
-
getNamedDispatcher
- Specified by:
getNamedDispatcher
in interfacePortletContext
-
getPortletContextName
- Specified by:
getPortletContextName
in interfacePortletContext
-
getRealPath
- Specified by:
getRealPath
in interfacePortletContext
-
getRequestDispatcher
- Specified by:
getRequestDispatcher
in interfacePortletContext
-
getResource
- Specified by:
getResource
in interfacePortletContext
- Throws:
MalformedURLException
-
getResourceAsStream
- Specified by:
getResourceAsStream
in interfacePortletContext
-
getResourcePaths
- Specified by:
getResourcePaths
in interfacePortletContext
-
getServerInfo
- Specified by:
getServerInfo
in interfacePortletContext
-
log
- Specified by:
log
in interfacePortletContext
-
log
- Specified by:
log
in interfacePortletContext
-
removeAttribute
- Specified by:
removeAttribute
in interfacePortletContext
-
setAttribute
- Specified by:
setAttribute
in interfacePortletContext
-
setPortletContextName
-
getResourceLocation
-