public interface PortletURL extends BaseURL
PortletURLinterface represents a URL that reference the portlet itself.
A PortletURL is created through the
Parameters, a portlet mode, a window state and a security level
can be added to
There are two types of PortletURLs:
createActionURL, and trigger an action request followed by a render request.
createRenderURL, and trigger a render request.
The string representation of a PortletURL does not need to be a valid URL at the time the portlet is generating its content. It may contain special tokens that will be converted to a valid URL, by the portal, before the content is returned to the client.
|Modifier and Type||Method and Description|
Returns the currently set portlet mode on this PortletURL.
Returns the currently set window state on this PortletURL.
Removes the specified public render parameter.
Indicates the portlet mode the portlet must be in, if this portlet URL triggers a request.
Indicates the window state the portlet should be in, if this portlet URL triggers a request.
void setWindowState(WindowState windowState) throws WindowStateException
A URL can not have more than one window state attached to it. If more than one window state is set only the last one set is attached to the URL.
windowState- the portlet window state
WindowStateException- if the portlet cannot switch to this state, because the portal does not support this state, the portlet has not declared in its deployment descriptor that it supports this state, or the current user is not allowed to switch to this state. The
PortletRequest.isWindowStateAllowed()method can be used to check if the portlet can set a given window state.
void setPortletMode(PortletMode portletMode) throws PortletModeException
A URL can not have more than one portlet mode attached to it. If more than one portlet mode is set only the last one set is attached to the URL.
portletMode- the portlet mode
PortletModeException- if the portlet cannot switch to this mode, because the portal does not support this mode, the portlet has not declared in its deployment descriptor that it supports this mode for the current markup, or the current user is not allowed to switch to this mode. The
PortletRequest.isPortletModeAllowed()method can be used to check if the portlet can set a given portlet mode.
nullif none is set
nullif none is set
void removePublicRenderParameter(String name)
public-render-parameterelement with the
identifiermapping to the parameter name.
Note that calling this method on a PortletURL of type Action URL does not have any effect.
Stringspecifying the name of the public render parameter to be removed
IllegalArgumentException- if name is
Copyright © 2004–2015 The Apache Software Foundation. All rights reserved.