org.infoglue.deliver.portal
Class PathParser

java.lang.Object
  extended by org.infoglue.deliver.portal.PathParser

public class PathParser
extends java.lang.Object

Author:
robert

Field Summary
static java.lang.String MULTI_VALUE
           
 
Constructor Summary
PathParser(java.lang.String pPath)
           
 
Method Summary
static java.util.Map copyParameters(java.util.Map parameters)
          Copy all parameters of a map into another
static java.lang.String encodeValues(java.lang.String[] values)
          Encode control-param values.
 java.lang.String getAction()
           
 java.lang.String getActionControl()
          Return the action control parameter if it exists, otherwise it's null.
 java.util.Collection getGlobalNavigation()
           
 java.util.Collection getParsedPath()
           
 java.lang.String getPath()
           
 java.lang.String getPid()
          Return pid if the pid parameter exists in the path otherwise null is returned.
static java.lang.String getRealPath(java.lang.String path)
          Get the path excluding control-params
 java.util.Map getStateFullParameterMap()
           
 java.util.Map getStateLessParameterMap()
           
 boolean isTargetedRequest()
           
static java.util.Map parsePathParameters(java.lang.String prefix, java.lang.String encodedParameters, boolean preserveNamespace)
          Extract control-params from path
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MULTI_VALUE

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

PathParser

public PathParser(java.lang.String pPath)
Method Detail

getStateFullParameterMap

public java.util.Map getStateFullParameterMap()

getStateLessParameterMap

public java.util.Map getStateLessParameterMap()

getParsedPath

public java.util.Collection getParsedPath()

getGlobalNavigation

public java.util.Collection getGlobalNavigation()

getPath

public java.lang.String getPath()

getAction

public java.lang.String getAction()

copyParameters

public static java.util.Map copyParameters(java.util.Map parameters)
Copy all parameters of a map into another

Parameters:
parameters - Map
Returns:

getRealPath

public static java.lang.String getRealPath(java.lang.String path)
Get the path excluding control-params

Parameters:
path - The path excluding contextPath
Returns:
"real" path never null

parsePathParameters

public static java.util.Map parsePathParameters(java.lang.String prefix,
                                                java.lang.String encodedParameters,
                                                boolean preserveNamespace)
Extract control-params from path

Parameters:
prefix - Prefix of control-param
encodedParameters - Path
preserveNamespace - Keep prefix in key
Returns:

encodeValues

public static java.lang.String encodeValues(java.lang.String[] values)
Encode control-param values. Multi-value params will be prefixed: "__value1/__value2"

Parameters:
values -
Returns:

getPid

public java.lang.String getPid()
Return pid if the pid parameter exists in the path otherwise null is returned.

Returns:
Returns the pid.

getActionControl

public java.lang.String getActionControl()
Return the action control parameter if it exists, otherwise it's null.

Returns:
Returns the actionControl.

isTargetedRequest

public boolean isTargetedRequest()


Copyright © 2005 InfoGlue.org All Rights Reserved.