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 605989 2007-12-20 18:26:54Z ate $
Author:
Scott T. Weaver, David Sean Taylor

Field Summary
static String HTTP
          HTTP protocol.
static String HTTPS
          HTTPS protocol.
 
Method Summary
 String createNavigationalEncoding(org.apache.pluto.om.window.PortletWindow window, Map parameters, javax.portlet.PortletMode mode, javax.portlet.WindowState state, boolean action)
          Creates the navigational encoding for a given window Similiar to createPortletURL above
 String createNavigationalEncoding(org.apache.pluto.om.window.PortletWindow window, javax.portlet.PortletMode mode, javax.portlet.WindowState state)
          Creates the navigational encoding for a given window Similiar to createPortletURL above
 String createPortletURL(org.apache.pluto.om.window.PortletWindow window, Map parameters, javax.portlet.PortletMode mode, javax.portlet.WindowState state, boolean action, boolean secure)
          Create a new PortletURL for a PortletWindow including request or action parameters.
 String createPortletURL(org.apache.pluto.om.window.PortletWindow window, javax.portlet.PortletMode mode, javax.portlet.WindowState state, boolean secure)
          Create a new PortletURL for a PortletWindow retaining its (request) parameters.
 String getBasePath()
          Returns the current Portal base path.
 String getBaseURL()
          Gets the Base URL for this portal.
 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
 String getPageBasePath()
          Returns the current Portal Page base path without possible encoded NavigationalState parameter.
 String getPath()
          Gets the global navigational path of the current request.
 String getPortalURL()
           
 boolean hasEncodedNavState()
           
 boolean isPathInfoEncodingNavState()
           
 boolean isRelativeOnly()
           
 boolean isSecure()
           
 void setCharacterEncoding(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 String HTTP
HTTP protocol.

See Also:
Constant Field Values

HTTPS

static final String HTTPS
HTTPS protocol.

See Also:
Constant Field Values
Method Detail

isRelativeOnly

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

getBaseURL

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

Returns:
The Base URL of the portal.

getBaseURL

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

Returns:
The secure Base URL of the portal.

getPath

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

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

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

String createPortletURL(org.apache.pluto.om.window.PortletWindow window,
                        Map parameters,
                        javax.portlet.PortletMode mode,
                        javax.portlet.WindowState state,
                        boolean action,
                        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
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

String createPortletURL(org.apache.pluto.om.window.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(String characterEncoding)

createNavigationalEncoding

String createNavigationalEncoding(org.apache.pluto.om.window.PortletWindow window,
                                  Map parameters,
                                  javax.portlet.PortletMode mode,
                                  javax.portlet.WindowState state,
                                  boolean action)
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

String createNavigationalEncoding(org.apache.pluto.om.window.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

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-2007 Apache Software Foundation. All Rights Reserved.