com.bea.portlet
Class WindowURL

java.lang.Object
  extended by com.bea.portlet.GenericURL
      extended by com.bea.portlet.PostbackURL
          extended by com.bea.portlet.WindowURL
All Implemented Interfaces
Cloneable
Direct Known Subclasses:
JspContentURL, StandalonePortletURL

public class WindowURL
extends PostbackURL

The WindowURL helps portal applications create URLs to portlet windows, portal pages and books.

See Also
GenericURL

Field Summary
 
Fields inherited from class com.bea.portlet.GenericURL
COMMUNITY_ADMIN_FLAG_PARAM, COMMUNITY_DESKTOP, CONTROL_STATE_PARAM, CURRENT_PAGE, domain, DOMAIN, EVENT_NAME_PARAM, httpRequest, httpResponse, httpsDomain, LOADSTATE_PARAM, MODE_PARAM, PAGE_LABEL_PARAM, params, PATH, PORT, PORTLET_SUB_INSTANCE_ID, POSTBACK_PARAM, PREFIX, QUERY_STRING, SCHEME, SECURE_PORT, STATE_PARAM, TREE_OPTIMIZATION_PARAM, URL_COMPRESSION, WINDOW_LABEL_PARAM
 
Constructor Summary
protected WindowURL(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
          Constructs a WindowURL.
protected WindowURL(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, String windowLabel)
          Constructs a WindowURL.
 
Method Summary
 Object clone()
          Returns a deep copy of this WindowURL.
static WindowURL createWindowURL(javax.servlet.http.HttpServletRequest _httpRequest, javax.servlet.http.HttpServletResponse _httpResponse)
          Returns a WindowURL to the current portlet.
static WindowURL createWindowURL(javax.servlet.http.HttpServletRequest _httpRequest, javax.servlet.http.HttpServletResponse _httpResponse, String windowLabel)
          Returns a WindowURL to the specified portlet.
 String getWindowLabel()
          Returns the window label this URL is currently targeting.
 String getWindowMode()
          Returns a window mode for the portlet targeted by this URL, if a window mode has been set.
 String getWindowState()
          Returns the window state for the portlet targeted by this URL, if a window state has been specified.
 void removeSharedParameter(String sharedParameterName)
          Specifies a portlet shared parameter which should be removed if this URL is invoked.
 void setWindowLabel(String windowLabel)
          Sets the window label this WindowURL targets.
 void setWindowMode(String windowMode)
          Sets a portlet window mode for the portlet targeted by this URL.
 void setWindowState(String windowState)
          Sets window state for the portlet targeted by this URL.
 
Methods inherited from class com.bea.portlet.PostbackURL
createPostbackURL, toString
 
Methods inherited from class com.bea.portlet.GenericURL
addAjaxNoRewriteParam, addParameter, addParameter, addParameter, appendEnsureSeparator, appendEnsureSeparator, createGenericURL, createQueryString, createQueryStringBuilder, getAmpForm, getContextualPath, getDomain, getEncodeSession, getParameter, getParameters, getPath, getPathPrefix, getPort, getResolvedTemplate, getScheme, getSecurePort, getTemplate, getUrlType, removeParameter, setContextualPath, setDomain, setEncodeSession, setForcedAmpForm, setPath, setPathPrefix, setPort, setScheme, setSecurePort, setTemplate, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WindowURL

protected WindowURL(javax.servlet.http.HttpServletRequest httpRequest,
                    javax.servlet.http.HttpServletResponse httpResponse)

Constructs a WindowURL.

Parameters
httpRequest - HTTP request
httpResponse - HTTP response

WindowURL

protected WindowURL(javax.servlet.http.HttpServletRequest httpRequest,
                    javax.servlet.http.HttpServletResponse httpResponse,
                    String windowLabel)

Constructs a WindowURL.

Parameters
httpRequest - HTTP request
httpResponse - HTTP response
windowLabel - window label
Method Detail

createWindowURL

public static WindowURL createWindowURL(javax.servlet.http.HttpServletRequest _httpRequest,
                                        javax.servlet.http.HttpServletResponse _httpResponse)

Returns a WindowURL to the current portlet.

Parameters
_httpRequest - HTTP request
_httpResponse - HTTP response
Returns
a new WindowURL targeting the current portlet

createWindowURL

public static WindowURL createWindowURL(javax.servlet.http.HttpServletRequest _httpRequest,
                                        javax.servlet.http.HttpServletResponse _httpResponse,
                                        String windowLabel)

Returns a WindowURL to the specified portlet.

Parameters
_httpRequest - HTTP request
_httpResponse - HTTP response
windowLabel - window label of the portlet, page or book to be targeted by this URL.
Returns
a new WindowURL targeting the specified portlet, page or book

setWindowLabel

public void setWindowLabel(String windowLabel)
Sets the window label this WindowURL targets.

Parameters
windowLabel - the window label of the window this URL should target.

getWindowLabel

public String getWindowLabel()

Returns the window label this URL is currently targeting.

Returns
Value of window label, null if not set

setWindowMode

public void setWindowMode(String windowMode)

Sets a portlet window mode for the portlet targeted by this URL.

Parameters
windowMode - the window mode to put the portlet targeted by this URL in

getWindowMode

public String getWindowMode()

Returns a window mode for the portlet targeted by this URL, if a window mode has been set.

Returns
the window mode of the portlet targeted by this URL, if set, null if not set.

setWindowState

public void setWindowState(String windowState)

Sets window state for the portlet targeted by this URL.

Parameters
windowState - the window state of the portlet targeted by this URL

getWindowState

public String getWindowState()

Returns the window state for the portlet targeted by this URL, if a window state has been specified.

Returns
the window state of the portlet targeted by this URL if set, null if not set.

removeSharedParameter

public void removeSharedParameter(String sharedParameterName)
Specifies a portlet shared parameter which should be removed if this URL is invoked. Since shared parameter values are persisted across requests, they must be explicitly removed to go away.

If this URL is not targeting a portlet, removing shared parameters will not have any affect.

This method should only be used to remove a shared parameter completely- if you wish to set a shared parameter to a new value, simply set the shared parameter to the new value using addParameter().

Parameters
sharedParameterName - the name of the shared parameter to remove. If this is not a valid shared parameter for the portlet targeted by this URL, the parameter will not be removed when this URL is invoked.

clone

public Object clone()

Returns a deep copy of this WindowURL.

Overrides:
clone in class PostbackURL
Returns
a deep copy of this WindowURL


Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.