org.jboss.portal.portlet.impl.jsr168
Class PortletUtils

java.lang.Object
  extended by org.jboss.portal.portlet.impl.jsr168.PortletUtils

public class PortletUtils
extends java.lang.Object

Version:
$Revision: 1.1 $
Author:
Julien Viet

Field Summary
static java.lang.String PREFIX
           
static java.lang.String SUFFIX
           
 
Constructor Summary
PortletUtils()
           
 
Method Summary
static void checkPortletParameterMapValidity(java.util.Map map)
          Check that provided map follow the constraints : Not null Keys are non null string Values are non null string arrays If a constraint is not respected then an IllegalArgumentException is thrown.
static void checkPortletParameterValidity(java.lang.String name, java.lang.String value)
          Check that the passed argument are non null otherwise throw an IllegalArgumentException.
static void checkPortletParameterValidity(java.lang.String name, java.lang.String[] values)
          Check that the passed argument are non null otherwise throw an IllegalArgumentException.
static PortletURL createActionURL(PortletInvocation invocation, PortletRequest preq)
          Creates an action URL.
static PortletURL createRenderURL(PortletInvocation invocation, PortletRequest preq)
          Creates an render URL.
static PortletMode decodePortletMode(java.lang.String portletModeName)
          Creates a PortletMode object based on the specified name.
static WindowState decodeWindowState(java.lang.String windowStateName)
          Creates a WindowState object based on the specified name.
static java.lang.String generateNamespaceFrom(java.lang.String windowId)
          Generates a namespace suitable for Portlet prefixing of tokens that need to be unique in an aggregated page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

public static final java.lang.String PREFIX
See Also:
Constant Field Values

SUFFIX

public static final java.lang.String SUFFIX
See Also:
Constant Field Values
Constructor Detail

PortletUtils

public PortletUtils()
Method Detail

checkPortletParameterMapValidity

public static void checkPortletParameterMapValidity(java.util.Map map)
                                             throws java.lang.IllegalArgumentException
Check that provided map follow the constraints : If a constraint is not respected then an IllegalArgumentException is thrown.

Parameters:
map - the map to check
Throws:
java.lang.IllegalArgumentException

checkPortletParameterValidity

public static void checkPortletParameterValidity(java.lang.String name,
                                                 java.lang.String value)
                                          throws java.lang.IllegalArgumentException
Check that the passed argument are non null otherwise throw an IllegalArgumentException.

Throws:
java.lang.IllegalArgumentException

checkPortletParameterValidity

public static void checkPortletParameterValidity(java.lang.String name,
                                                 java.lang.String[] values)
                                          throws java.lang.IllegalArgumentException
Check that the passed argument are non null otherwise throw an IllegalArgumentException.

Throws:
java.lang.IllegalArgumentException

createActionURL

public static PortletURL createActionURL(PortletInvocation invocation,
                                         PortletRequest preq)
Creates an action URL.


createRenderURL

public static PortletURL createRenderURL(PortletInvocation invocation,
                                         PortletRequest preq)
Creates an render URL.


decodeWindowState

public static WindowState decodeWindowState(java.lang.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 PortletMode decodePortletMode(java.lang.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 java.lang.String generateNamespaceFrom(java.lang.String windowId)
Generates a namespace suitable for Portlet prefixing of tokens that need to be unique in an aggregated page.

Parameters:
windowId -
Since:
2.6