Class PortletUtils
java.lang.Object
org.gatein.pc.portlet.impl.jsr168.PortletUtils
- Version:
- $Revision: 1.1 $
- Author:
- Julien Viet
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic javax.portlet.PortletModedecodePortletMode(String portletModeName) Creates aPortletModeobject based on the specified name.static javax.portlet.WindowStatedecodeWindowState(String windowStateName) Creates aWindowStateobject based on the specified name.static StringgenerateNamespaceFrom(String windowId) Generates a namespace suitable for Portlet prefixing of tokens that need to be unique in an aggregated page.static StringgetPortalContextPath(jakarta.servlet.http.HttpServletRequest request) Returns the original context path before dispatch is made This will ensure to get the original root path in all Servlet Containers (Tomcat / JBoss / Wildfly)static <U extends javax.portlet.PortletRequest>
Ustatic <U extends javax.portlet.PortletResponse>
U
-
Field Details
-
PREFIX
- See Also:
-
SUFFIX
- See Also:
-
-
Constructor Details
-
PortletUtils
public PortletUtils()
-
-
Method Details
-
decodeWindowState
Creates aWindowStateobject based on the specified name.- Parameters:
windowStateName- the name of the window state- Returns:
- one of the standard WindowStates if the specified name matches one of them or a new WindowState.
- See Also:
-
decodePortletMode
Creates aPortletModeobject based on the specified name.- Parameters:
portletModeName- the name of the portlet mode- Returns:
- one of the standard PortletModes if the specified name matches one of them or a new PortletMode.
- See Also:
-
generateNamespaceFrom
Generates a namespace suitable for Portlet prefixing of tokens that need to be unique in an aggregated page.- Parameters:
windowId- the window id- Returns:
- the namespace value
- Since:
- 2.6
-
getPortalContextPath
Returns the original context path before dispatch is made This will ensure to get the original root path in all Servlet Containers (Tomcat / JBoss / Wildfly)- Parameters:
request- HTTP Request- Returns:
- the root path retrieved from HTTP request URI
-
unwrap
public static <U extends javax.portlet.PortletRequest> U unwrap(javax.portlet.PortletRequest wrapped, Class<U> unwrapped) -
unwrap
public static <U extends javax.portlet.PortletResponse> U unwrap(javax.portlet.PortletResponse wrapped, Class<U> unwrapped)
-