Class MockPortletContext
Object
com.liferay.portal.kernel.test.portlet.MockPortletContext
- All Implemented Interfaces:
jakarta.portlet.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) intjakarta.portlet.PortletRequestDispatchergetNamedDispatcher(String path) getRealPath(String path) jakarta.portlet.PortletRequestDispatchergetRequestDispatcher(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 interfacejakarta.portlet.PortletContext
-
getAttributeNames
- Specified by:
getAttributeNamesin interfacejakarta.portlet.PortletContext
-
getClassLoader
- Specified by:
getClassLoaderin interfacejakarta.portlet.PortletContext
-
getContainerRuntimeOptions
- Specified by:
getContainerRuntimeOptionsin interfacejakarta.portlet.PortletContext
-
getContextPath
- Specified by:
getContextPathin interfacejakarta.portlet.PortletContext
-
getEffectiveMajorVersion
public int getEffectiveMajorVersion()- Specified by:
getEffectiveMajorVersionin interfacejakarta.portlet.PortletContext
-
getEffectiveMinorVersion
public int getEffectiveMinorVersion()- Specified by:
getEffectiveMinorVersionin interfacejakarta.portlet.PortletContext
-
getInitParameter
- Specified by:
getInitParameterin interfacejakarta.portlet.PortletContext
-
getInitParameterNames
- Specified by:
getInitParameterNamesin interfacejakarta.portlet.PortletContext
-
getMajorVersion
public int getMajorVersion()- Specified by:
getMajorVersionin interfacejakarta.portlet.PortletContext
-
getMimeType
- Specified by:
getMimeTypein interfacejakarta.portlet.PortletContext
-
getMinorVersion
public int getMinorVersion()- Specified by:
getMinorVersionin interfacejakarta.portlet.PortletContext
-
getNamedDispatcher
- Specified by:
getNamedDispatcherin interfacejakarta.portlet.PortletContext
-
getPortletContextName
- Specified by:
getPortletContextNamein interfacejakarta.portlet.PortletContext
-
getRealPath
- Specified by:
getRealPathin interfacejakarta.portlet.PortletContext
-
getRequestDispatcher
- Specified by:
getRequestDispatcherin interfacejakarta.portlet.PortletContext
-
getResource
- Specified by:
getResourcein interfacejakarta.portlet.PortletContext- Throws:
MalformedURLException
-
getResourceAsStream
- Specified by:
getResourceAsStreamin interfacejakarta.portlet.PortletContext
-
getResourcePaths
- Specified by:
getResourcePathsin interfacejakarta.portlet.PortletContext
-
getServerInfo
- Specified by:
getServerInfoin interfacejakarta.portlet.PortletContext
-
log
- Specified by:
login interfacejakarta.portlet.PortletContext
-
log
- Specified by:
login interfacejakarta.portlet.PortletContext
-
removeAttribute
- Specified by:
removeAttributein interfacejakarta.portlet.PortletContext
-
setAttribute
- Specified by:
setAttributein interfacejakarta.portlet.PortletContext
-
setPortletContextName
-
getResourceLocation
-