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 TypeMethodDescriptionvoidvoidaddInitParameter(String name, String value) getAttribute(String name) intintgetInitParameter(String name) intgetMimeType(String filePath) intgetNamedDispatcher(String path) getRealPath(String path) getRequestDispatcher(String path) getResource(String path) getResourceAsStream(String path) protected StringgetResourceLocation(String path) getResourcePaths(String path) voidvoidvoidremoveAttribute(String name) voidsetAttribute(String name, Object value) voidsetPortletContextName(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:
getAttributein interfacePortletContext
-
getAttributeNames
- Specified by:
getAttributeNamesin interfacePortletContext
-
getClassLoader
- Specified by:
getClassLoaderin interfacePortletContext
-
getContainerRuntimeOptions
- Specified by:
getContainerRuntimeOptionsin interfacePortletContext
-
getContextPath
- Specified by:
getContextPathin interfacePortletContext
-
getEffectiveMajorVersion
public int getEffectiveMajorVersion()- Specified by:
getEffectiveMajorVersionin interfacePortletContext
-
getEffectiveMinorVersion
public int getEffectiveMinorVersion()- Specified by:
getEffectiveMinorVersionin interfacePortletContext
-
getInitParameter
- Specified by:
getInitParameterin interfacePortletContext
-
getInitParameterNames
- Specified by:
getInitParameterNamesin interfacePortletContext
-
getMajorVersion
public int getMajorVersion()- Specified by:
getMajorVersionin interfacePortletContext
-
getMimeType
- Specified by:
getMimeTypein interfacePortletContext
-
getMinorVersion
public int getMinorVersion()- Specified by:
getMinorVersionin interfacePortletContext
-
getNamedDispatcher
- Specified by:
getNamedDispatcherin interfacePortletContext
-
getPortletContextName
- Specified by:
getPortletContextNamein interfacePortletContext
-
getRealPath
- Specified by:
getRealPathin interfacePortletContext
-
getRequestDispatcher
- Specified by:
getRequestDispatcherin interfacePortletContext
-
getResource
- Specified by:
getResourcein interfacePortletContext- Throws:
MalformedURLException
-
getResourceAsStream
- Specified by:
getResourceAsStreamin interfacePortletContext
-
getResourcePaths
- Specified by:
getResourcePathsin interfacePortletContext
-
getServerInfo
- Specified by:
getServerInfoin interfacePortletContext
-
log
- Specified by:
login interfacePortletContext
-
log
- Specified by:
login interfacePortletContext
-
removeAttribute
- Specified by:
removeAttributein interfacePortletContext
-
setAttribute
- Specified by:
setAttributein interfacePortletContext
-
setPortletContextName
-
getResourceLocation
-