org.displaytag.portlet
Class PortletHref
java.lang.Object
org.displaytag.portlet.PortletHref
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Href
public class PortletHref
- extends java.lang.Object
- implements Href
Implementation of the Href interface that generates URLs using the javax.portlet APIs. As the portlet API supports
the concept of WindowStates, PorletModes, secure URLs and actions versus render the implementation supports these
concepts as well through the standard Href APIs.
The features are manipulated using special parameter names and values:
| Feature |
Parameter Name |
Parameter Value |
| Render vs Action URL |
PARAM_TYPE (portlet:type) |
"render" for RenderURLs, "action" for ActionURLs |
| WindowState |
PARAM_STATE (portlet:state) |
The value is used directly for the WindowState name |
| PorltetMode |
PARAM_MODE (portlet:mode) |
The value is used directly for the PortletMode name |
| Secure URL |
PARAM_SECURE (portlet:secure) |
"true" requests a secure URL, anything else requests a standard URL |
- Version:
- $Id: PortletHref.java 999 2006-01-22 20:01:46Z fgiust $
- Author:
- Eric Dalquist dalquist@gmail.com
- See Also:
- Serialized Form
|
Constructor Summary |
PortletHref(javax.portlet.PortletRequest portletRequest,
javax.portlet.RenderResponse renderResponse)
Creates a new PortletHref. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
PARAM_MODE
public static final java.lang.String PARAM_MODE
- See Also:
- Constant Field Values
PARAM_STATE
public static final java.lang.String PARAM_STATE
- See Also:
- Constant Field Values
PARAM_SECURE
public static final java.lang.String PARAM_SECURE
- See Also:
- Constant Field Values
PARAM_TYPE
public static final java.lang.String PARAM_TYPE
- See Also:
- Constant Field Values
TYPE_RENDER
public static final java.lang.String TYPE_RENDER
- See Also:
- Constant Field Values
TYPE_ACTION
public static final java.lang.String TYPE_ACTION
- See Also:
- Constant Field Values
PortletHref
public PortletHref(javax.portlet.PortletRequest portletRequest,
javax.portlet.RenderResponse renderResponse)
- Creates a new PortletHref. The actual PortletURL object is not generated until the toString method is called.
- Parameters:
portletRequest - request to to feature checking with, may not be null.renderResponse - response to generate the URLs from, may not be null.
setFullUrl
public void setFullUrl(java.lang.String baseUrl)
- Specified by:
setFullUrl in interface Href
- See Also:
Href.setFullUrl(java.lang.String)
isAction
public boolean isAction()
- Returns:
- Returns the isAction.
setAction
public void setAction(boolean isAction)
- Parameters:
isAction - The isAction to set.
getRequestedMode
public javax.portlet.PortletMode getRequestedMode()
- Returns:
- Returns the requestedMode.
setRequestedMode
public void setRequestedMode(javax.portlet.PortletMode requestedMode)
- Parameters:
requestedMode - The requestedMode to set.
isRequestedSecure
public boolean isRequestedSecure()
- Returns:
- Returns the requestedSecure.
setRequestedSecure
public void setRequestedSecure(boolean requestedSecure)
- Parameters:
requestedSecure - The requestedSecure to set.
getRequestedState
public javax.portlet.WindowState getRequestedState()
- Returns:
- Returns the requestedState.
setRequestedState
public void setRequestedState(javax.portlet.WindowState requestedState)
- Parameters:
requestedState - The requestedState to set.
addParameter
public Href addParameter(java.lang.String name,
int value)
- Specified by:
addParameter in interface Href
- See Also:
Href.addParameter(java.lang.String, int)
addParameter
public Href addParameter(java.lang.String name,
java.lang.Object objValue)
- Specified by:
addParameter in interface Href
- See Also:
Href.addParameter(String, Object)
addParameterMap
public void addParameterMap(java.util.Map parametersMap)
- Specified by:
addParameterMap in interface Href
- See Also:
Href.addParameterMap(java.util.Map)
setParameterMap
public void setParameterMap(java.util.Map parametersMap)
- Specified by:
setParameterMap in interface Href
- See Also:
Href.setParameterMap(java.util.Map)
getParameterMap
public java.util.Map getParameterMap()
- Warning, parameters added to the Map directly will not be parsed by the PortletUrl feature support portions of
this class.
- Specified by:
getParameterMap in interface Href
- See Also:
Href.getParameterMap()
removeParameter
public void removeParameter(java.lang.String name)
- Specified by:
removeParameter in interface Href
- See Also:
Href.removeParameter(java.lang.String)
setAnchor
public void setAnchor(java.lang.String name)
- Specified by:
setAnchor in interface Href
- See Also:
Href.setAnchor(java.lang.String)
getAnchor
public java.lang.String getAnchor()
- Specified by:
getAnchor in interface Href
- See Also:
Href.getAnchor()
getBaseUrl
public java.lang.String getBaseUrl()
- Generates a render or action URL depending on the use of the PortletUrl specific features of this class.
- Specified by:
getBaseUrl in interface Href
- See Also:
Href.getBaseUrl()
clone
public java.lang.Object clone()
- Specified by:
clone in interface Href- Overrides:
clone in class java.lang.Object
- See Also:
Href.clone()
equals
public boolean equals(java.lang.Object object)
- Specified by:
equals in interface Href- Overrides:
equals in class java.lang.Object
- See Also:
Href.equals(java.lang.Object)
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
- See Also:
org.displaytag.util.Href#hashCode()
toString
public java.lang.String toString()
- Specified by:
toString in interface Href- Overrides:
toString in class java.lang.Object
- See Also:
Href.toString()
Copyright © 2002-2010 the Displaytag team. All Rights Reserved.