org.apache.jetspeed.container.url.impl
Class AbstractPortalURL

java.lang.Object
  extended by org.apache.jetspeed.container.url.impl.AbstractPortalURL
All Implemented Interfaces:
org.apache.jetspeed.container.url.PortalURL
Direct Known Subclasses:
DesktopEncodingPortalURL, PathInfoEncodingPortalURL, QueryStringEncodingPortalURL

public abstract class AbstractPortalURL
extends Object
implements org.apache.jetspeed.container.url.PortalURL

AbstractPortalURL delivers the base implemention for parsing Jetspeed Portal URLs and creating new Portlet URLs. Not implemented is the encoding and decoding of the NavigationState parameter in the URL, allowing concrete implementations to supply different algorithms for it like encoding it as pathInfo or as query string parameter.

Version:
$Id: AbstractPortalURL.java 605989 2007-12-20 18:26:54Z ate $
Author:
Ate Douma

Field Summary
protected  org.apache.jetspeed.container.url.BasePortalURL base
           
protected  String basePath
           
protected  String characterEncoding
           
protected  String contextPath
           
static String DEFAULT_NAV_STATE_PARAMETER
           
protected  String encodedNavState
           
protected  org.apache.jetspeed.container.state.NavigationalState navState
           
protected static String navStateParameter
           
protected  String nonSecureBaseURL
           
protected  String path
           
protected static Boolean relativeOnly
           
protected  String secureBaseURL
           
 
Fields inherited from interface org.apache.jetspeed.container.url.PortalURL
HTTP, HTTPS
 
Constructor Summary
AbstractPortalURL(javax.servlet.http.HttpServletRequest request, String characterEncoding, org.apache.jetspeed.container.state.NavigationalState navState, org.apache.jetspeed.PortalContext portalContext)
           
AbstractPortalURL(org.apache.jetspeed.container.state.NavigationalState navState, org.apache.jetspeed.PortalContext portalContext)
           
AbstractPortalURL(org.apache.jetspeed.container.state.NavigationalState navState, org.apache.jetspeed.PortalContext portalContext, org.apache.jetspeed.container.url.BasePortalURL base)
           
AbstractPortalURL(String characterEncoding, org.apache.jetspeed.container.state.NavigationalState navState, org.apache.jetspeed.PortalContext portalContext)
           
 
Method Summary
 String createNavigationalEncoding(org.apache.pluto.om.window.PortletWindow window, Map parameters, javax.portlet.PortletMode mode, javax.portlet.WindowState state, boolean action)
           
 String createNavigationalEncoding(org.apache.pluto.om.window.PortletWindow window, javax.portlet.PortletMode mode, javax.portlet.WindowState state)
           
 String createPortletURL(org.apache.pluto.om.window.PortletWindow window, Map parameters, javax.portlet.PortletMode mode, javax.portlet.WindowState state, boolean action, boolean secure)
           
 String createPortletURL(org.apache.pluto.om.window.PortletWindow window, javax.portlet.PortletMode mode, javax.portlet.WindowState state, boolean secure)
           
protected abstract  String createPortletURL(String encodedNavState, boolean secure)
           
protected  void decodeBasePath(javax.servlet.http.HttpServletRequest request)
           
protected  void decodeBaseURL(javax.servlet.http.HttpServletRequest request)
           
protected abstract  void decodePathAndNavigationalState(javax.servlet.http.HttpServletRequest request)
           
 String getBasePath()
           
 String getBaseURL()
           
 String getBaseURL(boolean secure)
           
 org.apache.jetspeed.container.state.NavigationalState getNavigationalState()
           
static String getNavigationalStateParameterName()
           
 String getPageBasePath()
           
 String getPath()
           
 String getPortalURL()
           
 boolean hasEncodedNavState()
           
 boolean isPathInfoEncodingNavState()
           
 boolean isRelativeOnly()
           
 boolean isSecure()
           
 void setCharacterEncoding(String characterEncoding)
           
protected  void setEncodedNavigationalState(String encodedNavigationalState)
           
protected  void setPath(String path)
           
 void setRequest(javax.servlet.http.HttpServletRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NAV_STATE_PARAMETER

public static final String DEFAULT_NAV_STATE_PARAMETER
See Also:
Constant Field Values

navStateParameter

protected static String navStateParameter

navState

protected org.apache.jetspeed.container.state.NavigationalState navState

base

protected org.apache.jetspeed.container.url.BasePortalURL base

relativeOnly

protected static Boolean relativeOnly

contextPath

protected String contextPath

basePath

protected String basePath

path

protected String path

encodedNavState

protected String encodedNavState

secureBaseURL

protected String secureBaseURL

nonSecureBaseURL

protected String nonSecureBaseURL

characterEncoding

protected String characterEncoding
Constructor Detail

AbstractPortalURL

public AbstractPortalURL(org.apache.jetspeed.container.state.NavigationalState navState,
                         org.apache.jetspeed.PortalContext portalContext,
                         org.apache.jetspeed.container.url.BasePortalURL base)

AbstractPortalURL

public AbstractPortalURL(org.apache.jetspeed.container.state.NavigationalState navState,
                         org.apache.jetspeed.PortalContext portalContext)

AbstractPortalURL

public AbstractPortalURL(String characterEncoding,
                         org.apache.jetspeed.container.state.NavigationalState navState,
                         org.apache.jetspeed.PortalContext portalContext)

AbstractPortalURL

public AbstractPortalURL(javax.servlet.http.HttpServletRequest request,
                         String characterEncoding,
                         org.apache.jetspeed.container.state.NavigationalState navState,
                         org.apache.jetspeed.PortalContext portalContext)
Method Detail

isRelativeOnly

public boolean isRelativeOnly()
Specified by:
isRelativeOnly in interface org.apache.jetspeed.container.url.PortalURL

getNavigationalStateParameterName

public static String getNavigationalStateParameterName()

createNavigationalEncoding

public String createNavigationalEncoding(org.apache.pluto.om.window.PortletWindow window,
                                         Map parameters,
                                         javax.portlet.PortletMode mode,
                                         javax.portlet.WindowState state,
                                         boolean action)
Specified by:
createNavigationalEncoding in interface org.apache.jetspeed.container.url.PortalURL

createNavigationalEncoding

public String createNavigationalEncoding(org.apache.pluto.om.window.PortletWindow window,
                                         javax.portlet.PortletMode mode,
                                         javax.portlet.WindowState state)
Specified by:
createNavigationalEncoding in interface org.apache.jetspeed.container.url.PortalURL

decodeBaseURL

protected void decodeBaseURL(javax.servlet.http.HttpServletRequest request)

decodeBasePath

protected void decodeBasePath(javax.servlet.http.HttpServletRequest request)

setEncodedNavigationalState

protected void setEncodedNavigationalState(String encodedNavigationalState)

setPath

protected void setPath(String path)

getBaseURL

public String getBaseURL()
Specified by:
getBaseURL in interface org.apache.jetspeed.container.url.PortalURL

getBaseURL

public String getBaseURL(boolean secure)
Specified by:
getBaseURL in interface org.apache.jetspeed.container.url.PortalURL

getBasePath

public String getBasePath()
Specified by:
getBasePath in interface org.apache.jetspeed.container.url.PortalURL

getPath

public String getPath()
Specified by:
getPath in interface org.apache.jetspeed.container.url.PortalURL

getPageBasePath

public String getPageBasePath()
Specified by:
getPageBasePath in interface org.apache.jetspeed.container.url.PortalURL

isSecure

public boolean isSecure()
Specified by:
isSecure in interface org.apache.jetspeed.container.url.PortalURL

getNavigationalState

public org.apache.jetspeed.container.state.NavigationalState getNavigationalState()
Specified by:
getNavigationalState in interface org.apache.jetspeed.container.url.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)
Specified by:
createPortletURL in interface org.apache.jetspeed.container.url.PortalURL

createPortletURL

public String createPortletURL(org.apache.pluto.om.window.PortletWindow window,
                               javax.portlet.PortletMode mode,
                               javax.portlet.WindowState state,
                               boolean secure)
Specified by:
createPortletURL in interface org.apache.jetspeed.container.url.PortalURL

decodePathAndNavigationalState

protected abstract void decodePathAndNavigationalState(javax.servlet.http.HttpServletRequest request)

createPortletURL

protected abstract String createPortletURL(String encodedNavState,
                                           boolean secure)

setRequest

public void setRequest(javax.servlet.http.HttpServletRequest request)
Specified by:
setRequest in interface org.apache.jetspeed.container.url.PortalURL

setCharacterEncoding

public void setCharacterEncoding(String characterEncoding)
Specified by:
setCharacterEncoding in interface org.apache.jetspeed.container.url.PortalURL

getPortalURL

public String getPortalURL()
Specified by:
getPortalURL in interface org.apache.jetspeed.container.url.PortalURL

hasEncodedNavState

public boolean hasEncodedNavState()
Specified by:
hasEncodedNavState in interface org.apache.jetspeed.container.url.PortalURL

isPathInfoEncodingNavState

public boolean isPathInfoEncodingNavState()
Specified by:
isPathInfoEncodingNavState in interface org.apache.jetspeed.container.url.PortalURL


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