Class PortletUtils

java.lang.Object
org.gatein.pc.portlet.impl.jsr168.PortletUtils

public class PortletUtils extends Object
Version:
$Revision: 1.1 $
Author:
Julien Viet
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static javax.portlet.PortletMode
    decodePortletMode(String portletModeName)
    Creates a PortletMode object based on the specified name.
    static javax.portlet.WindowState
    decodeWindowState(String windowStateName)
    Creates a WindowState object based on the specified name.
    static String
    Generates a namespace suitable for Portlet prefixing of tokens that need to be unique in an aggregated page.
    static String
    getPortalContextPath(javax.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>
    U
    unwrap(javax.portlet.PortletRequest wrapped, Class<U> unwrapped)
     
    static <U extends javax.portlet.PortletResponse>
    U
    unwrap(javax.portlet.PortletResponse wrapped, Class<U> unwrapped)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • PortletUtils

      public PortletUtils()
  • Method Details

    • decodeWindowState

      public static javax.portlet.WindowState decodeWindowState(String windowStateName)
      Creates a WindowState object 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:
      • WindowState
    • decodePortletMode

      public static javax.portlet.PortletMode decodePortletMode(String portletModeName)
      Creates a PortletMode object 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:
      • PortletMode
    • generateNamespaceFrom

      public static String generateNamespaceFrom(String windowId)
      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

      public static String getPortalContextPath(javax.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)
      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)