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 225603 2005-07-27 20:21:10Z weaver $
Author:
Scott T. Weaver, David Sean Taylor

Field Summary
static String HTTP
          HTTP protocol.
static String HTTPS
          HTTPS protocol.
 
Method Summary
 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.
 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

public static final String HTTP
HTTP protocol.

See Also:
Constant Field Values

HTTPS

public static final String HTTPS
HTTPS protocol.

See Also:
Constant Field Values
Method Detail

getBaseURL

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

Returns:
The Base URL of the portal.

getBaseURL

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

Returns:
The secure Base URL of the portal.

getPath

public 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

public 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

public 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

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

getNavigationalState

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

Returns:
the NavigationalState of the PortalURL

createPortletURL

public 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

public 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 -
Returns:
a new renderURL as String

setRequest

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

Parameters:
request -

setCharacterEncoding

public void setCharacterEncoding(String characterEncoding)


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.