org.apache.jetspeed.container.url
Interface PortalURL


public interface PortalURL

PortalURL defines the interface for manipulating Jetspeed Portal URLs. These URLs are used internally by the portal and are not available to Portlet Applications.

Version:
$Id: PortalURL.java 889253 2009-12-10 13:16:15Z woonsan $
Author:
Scott T. Weaver, David Sean Taylor

Nested Class Summary
static class PortalURL.URLType
           
 
Field Summary
static java.lang.String HTTP
          HTTP protocol.
static java.lang.String HTTPS
          HTTPS protocol.
static java.lang.String PATH_INFO_HEADER
          Portal Path Info HTTP Header name.
static java.lang.String PATH_INFO_QUERY
          Portal Path Info Query parameter.
 
Method Summary
 java.lang.String createNavigationalEncoding(PortletWindow window, java.util.Map<java.lang.String,java.lang.String[]> parameters, javax.portlet.PortletMode mode, javax.portlet.WindowState state, boolean action)
          Deprecated.  
 java.lang.String createNavigationalEncoding(PortletWindow window, java.util.Map<java.lang.String,java.lang.String[]> parameters, javax.portlet.PortletMode mode, javax.portlet.WindowState state, PortalURL.URLType urlType)
          Deprecated.  
 java.lang.String createNavigationalEncoding(PortletWindow window, java.util.Map<java.lang.String,java.lang.String[]> parameters, java.lang.String actionScopeId, boolean actionScopeRendered, java.lang.String cacheLevel, java.lang.String resourceId, java.util.Map<java.lang.String,java.lang.String[]> privateRenderParameters, java.util.Map<java.lang.String,java.lang.String[]> publicRenderParameters, javax.portlet.PortletMode mode, javax.portlet.WindowState state, PortalURL.URLType urlType)
          Creates the navigational encoding for a given window Similiar to createPortletURL above
 java.lang.String createNavigationalEncoding(PortletWindow window, javax.portlet.PortletMode mode, javax.portlet.WindowState state)
          Creates the navigational encoding for a given window Similiar to createPortletURL above
 java.lang.String createPortletURL(PortletWindow window, java.util.Map<java.lang.String,java.lang.String[]> parameters, javax.portlet.PortletMode mode, javax.portlet.WindowState state, boolean action, boolean secure)
          Deprecated.  
 java.lang.String createPortletURL(PortletWindow window, java.util.Map<java.lang.String,java.lang.String[]> parameters, javax.portlet.PortletMode mode, javax.portlet.WindowState state, PortalURL.URLType urlType, boolean secure)
          Deprecated.  
 java.lang.String createPortletURL(PortletWindow window, java.util.Map<java.lang.String,java.lang.String[]> parameters, java.lang.String actionScopeId, boolean actionScopeRendered, java.lang.String cacheLevel, java.lang.String resourceId, java.util.Map<java.lang.String,java.lang.String[]> privateRenderParameters, java.util.Map<java.lang.String,java.lang.String[]> publicRenderParameters, javax.portlet.PortletMode mode, javax.portlet.WindowState state, PortalURL.URLType urlType, boolean secure)
          Create a new PortletURL for a PortletWindow including request or action parameters.
 java.lang.String createPortletURL(PortletWindow window, javax.portlet.PortletMode mode, javax.portlet.WindowState state, boolean secure)
          Create a new PortletURL for a PortletWindow retaining its (request) parameters.
 java.lang.String getBasePath()
          Returns the current Portal base path.
 java.lang.String getBaseURL()
          Gets the Base URL for this portal.
 java.lang.String getBaseURL(boolean secure)
          Gets a secure version of the Base URL for this portal.
 NavigationalState getNavigationalState()
          Gets the NavigationalState for access to the current request portal control parameters
 java.lang.String getPageBasePath()
          Returns the current Portal Page base path without possible encoded NavigationalState parameter.
 java.lang.String getPath()
          Gets the global navigational path of the current request.
 java.lang.String getPortalURL()
           
 boolean hasEncodedNavState()
           
 boolean isPathInfoEncodingNavState()
           
 boolean isRelativeOnly()
           
 boolean isSecure()
           
 void setCharacterEncoding(java.lang.String characterEncoding)
           
 void setRequest(javax.servlet.http.HttpServletRequest request)
          Sets the @link{javax.servlet.http.HttpServletRequest} that will be used to generate urls.
 

Field Detail

HTTP

static final java.lang.String HTTP
HTTP protocol.

See Also:
Constant Field Values

HTTPS

static final java.lang.String HTTPS
HTTPS protocol.

See Also:
Constant Field Values

PATH_INFO_QUERY

static final java.lang.String PATH_INFO_QUERY
Portal Path Info Query parameter.

See Also:
Constant Field Values

PATH_INFO_HEADER

static final java.lang.String PATH_INFO_HEADER
Portal Path Info HTTP Header name.

See Also:
Constant Field Values
Method Detail

isRelativeOnly

boolean isRelativeOnly()
Returns:
true if only relative urls should be generated (without scheme, servername, port)

getBaseURL

java.lang.String getBaseURL()
Gets the Base URL for this portal.

Returns:
The Base URL of the portal.

getBaseURL

java.lang.String getBaseURL(boolean secure)
Gets a secure version of the Base URL for this portal.

Returns:
The secure Base URL of the portal.

getPath

java.lang.String getPath()
Gets the global navigational path of the current request.
The path does not contain the NavigationalState parameter

Returns:
The the global navigational path of the current request.

getBasePath

java.lang.String getBasePath()
Returns the current Portal base path.
This path can be used as base for root relative pages and resources which don't need the NavigationalState.

Returns:
the current Portal base path without NavigationalState

getPageBasePath

java.lang.String getPageBasePath()
Returns the current Portal Page base path without possible encoded NavigationalState parameter.
This path can be used as base for page relative resources which don't need the NavigationalState.

Returns:
the current Portal Page base path without NavigationalState

isSecure

boolean isSecure()
Returns:
true if the current request is secure

getNavigationalState

NavigationalState getNavigationalState()
Gets the NavigationalState for access to the current request portal control parameters

Returns:
the NavigationalState of the PortalURL

createPortletURL

java.lang.String createPortletURL(PortletWindow window,
                                  java.util.Map<java.lang.String,java.lang.String[]> parameters,
                                  javax.portlet.PortletMode mode,
                                  javax.portlet.WindowState state,
                                  boolean action,
                                  boolean secure)
Deprecated. 

Create a new PortletURL for a PortletWindow including request or action parameters.
The Portal Navigational State is encoded within the URL

Parameters:
window - the PortalWindow
parameters - the new request or action parameters for the PortalWindow
mode - the new PortletMode for the PortalWindow
state - the new WindowState for the PortalWindow
action - indicates if an actionURL or renderURL is created
secure - indicates if a secure url is required
Returns:
a new actionURL or renderURL as String

createPortletURL

java.lang.String createPortletURL(PortletWindow window,
                                  java.util.Map<java.lang.String,java.lang.String[]> parameters,
                                  javax.portlet.PortletMode mode,
                                  javax.portlet.WindowState state,
                                  PortalURL.URLType urlType,
                                  boolean secure)
Deprecated. 

Create a new PortletURL for a PortletWindow including request or action parameters.
The Portal Navigational State is encoded within the URL

Parameters:
window - the PortalWindow
parameters - the new request or action parameters for the PortalWindow
mode - the new PortletMode for the PortalWindow
state - the new WindowState for the PortalWindow
urlType - indicates if an actionURL, Resource or renderURL is to created
secure - indicates if a secure url is required
Returns:
a new actionURL or renderURL as String

createPortletURL

java.lang.String createPortletURL(PortletWindow window,
                                  java.util.Map<java.lang.String,java.lang.String[]> parameters,
                                  java.lang.String actionScopeId,
                                  boolean actionScopeRendered,
                                  java.lang.String cacheLevel,
                                  java.lang.String resourceId,
                                  java.util.Map<java.lang.String,java.lang.String[]> privateRenderParameters,
                                  java.util.Map<java.lang.String,java.lang.String[]> publicRenderParameters,
                                  javax.portlet.PortletMode mode,
                                  javax.portlet.WindowState state,
                                  PortalURL.URLType urlType,
                                  boolean secure)
Create a new PortletURL for a PortletWindow including request or action parameters.
The Portal Navigational State is encoded within the URL

Parameters:
window - the PortalWindow
parameters - the new request or action parameters for the PortalWindow
actionScopeId - the new action scope for the PortalWindow
actionScopeRendered - the new action scope rendered flag for the PortalWindow
cacheLevel - the new cache level for the PortalWindow resource
resourceId - the new resource id for the PortalWindow resource
privateRenderParameters - the new private render parameters for the PortalWindow resource
publicRenderParameters - the new request, action, or resource public render parameters for the PortalWindow
mode - the new PortletMode for the PortalWindow
state - the new WindowState for the PortalWindow
urlType - indicates if an actionURL, Resource or renderURL is to created
secure - indicates if a secure url is required
Returns:
a new actionURL or renderURL as String

createPortletURL

java.lang.String createPortletURL(PortletWindow window,
                                  javax.portlet.PortletMode mode,
                                  javax.portlet.WindowState state,
                                  boolean secure)
Create a new PortletURL for a PortletWindow retaining its (request) parameters.
The Portal Navigational State is encoded within the URL

Parameters:
window - the PortalWindow
mode - the new PortletMode for the PortalWindow
state - the new WindowState for the PortalWindow
secure -
secure - indicates if a secure url is required
Returns:
a new renderURL as String

setRequest

void setRequest(javax.servlet.http.HttpServletRequest request)
Sets the @link{javax.servlet.http.HttpServletRequest} that will be used to generate urls.

Parameters:
request -

setCharacterEncoding

void setCharacterEncoding(java.lang.String characterEncoding)

createNavigationalEncoding

java.lang.String createNavigationalEncoding(PortletWindow window,
                                            java.util.Map<java.lang.String,java.lang.String[]> parameters,
                                            javax.portlet.PortletMode mode,
                                            javax.portlet.WindowState state,
                                            boolean action)
Deprecated. 

Creates the navigational encoding for a given window Similiar to createPortletURL above

Parameters:
window - the PortalWindow
parameters - the new request or action parameters for the PortalWindow
mode - the new PortletMode for the PortalWindow
state - the new WindowState for the PortalWindow
action - indicates if an actionURL or renderURL is created
secure - indicates if a secure url is required
Returns:
a new navigational state as String

createNavigationalEncoding

java.lang.String createNavigationalEncoding(PortletWindow window,
                                            java.util.Map<java.lang.String,java.lang.String[]> parameters,
                                            javax.portlet.PortletMode mode,
                                            javax.portlet.WindowState state,
                                            PortalURL.URLType urlType)
Deprecated. 

Creates the navigational encoding for a given window Similiar to createPortletURL above

Parameters:
window - the PortalWindow
parameters - the new request or action parameters for the PortalWindow
mode - the new PortletMode for the PortalWindow
state - the new WindowState for the PortalWindow
urlType - indicates if an actionURL, Resource or renderURL is to created
secure - indicates if a secure url is required
Returns:
a new navigational state as String

createNavigationalEncoding

java.lang.String createNavigationalEncoding(PortletWindow window,
                                            java.util.Map<java.lang.String,java.lang.String[]> parameters,
                                            java.lang.String actionScopeId,
                                            boolean actionScopeRendered,
                                            java.lang.String cacheLevel,
                                            java.lang.String resourceId,
                                            java.util.Map<java.lang.String,java.lang.String[]> privateRenderParameters,
                                            java.util.Map<java.lang.String,java.lang.String[]> publicRenderParameters,
                                            javax.portlet.PortletMode mode,
                                            javax.portlet.WindowState state,
                                            PortalURL.URLType urlType)
Creates the navigational encoding for a given window Similiar to createPortletURL above

Parameters:
window - the PortalWindow
parameters - the new request or action parameters for the PortalWindow
actionScopeId - the new action scope for the PortalWindow
actionScopeRendered - the new action scope rendered flag for the PortalWindow
cacheLevel - the new cache level for the PortalWindow resource
resourceId - the new resource id for the PortalWindow resource
privateRenderParameters - the new private render parameters for the PortalWindow resource
publicRenderParameters - the new request, action, or resource public render parameters for the PortalWindow
mode - the new PortletMode for the PortalWindow
state - the new WindowState for the PortalWindow
urlType - indicates if an actionURL, Resource or renderURL is to created
secure - indicates if a secure url is required
Returns:
a new navigational state as String

createNavigationalEncoding

java.lang.String createNavigationalEncoding(PortletWindow window,
                                            javax.portlet.PortletMode mode,
                                            javax.portlet.WindowState state)
Creates the navigational encoding for a given window Similiar to createPortletURL above

Parameters:
window - the PortalWindow
mode - the new PortletMode for the PortalWindow
state - the new WindowState for the PortalWindow
secure -
secure - indicates if a secure url is required
Returns:
a new renderURL as String

getPortalURL

java.lang.String getPortalURL()
Returns:
a Portal URL with encoded current navigational state

hasEncodedNavState

boolean hasEncodedNavState()
Returns:
true if navigational state was provided on the url

isPathInfoEncodingNavState

boolean isPathInfoEncodingNavState()
Returns:
true if navigational state is encoded as pathInfo


Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.