|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.portal.portlet.impl.jsr168.PortletURLImpl
Constructor Summary | |
PortletURLImpl(PortletInvocation invocation,
PortletRequest preq,
org.jboss.portal.portlet.impl.jsr168.PortletURLImpl.InternalPortletURL url)
|
Method Summary | |
static PortletURL |
createActionURL(PortletInvocation invocation,
PortletRequest preq)
Creates an action URL. |
static PortletURL |
createRenderURL(PortletInvocation invocation,
PortletRequest preq)
Creates an render URL. |
static PortletMode |
decodePortletMode(java.lang.String portletModeName)
Creates a PortletMode object based on the specified name. |
static WindowState |
decodeWindowState(java.lang.String windowStateName)
Creates a WindowState object based on the specified name. |
void |
setParameter(java.lang.String name,
java.lang.String value)
Sets the given String parameter to this URL. |
void |
setParameter(java.lang.String name,
java.lang.String[] values)
Sets the given String array parameter to this URL. |
void |
setParameters(java.util.Map parameters)
Sets a parameter map for this URL. |
void |
setPortletMode(PortletMode portletMode)
Indicates the portlet mode the portlet must be in, if this portlet URL triggers a request. |
void |
setSecure(boolean secure)
Indicated the security setting for this URL. |
void |
setWindowState(WindowState windowState)
Indicates the window state the portlet should be in, if this portlet URL triggers a request. |
java.lang.String |
toString()
Returns the portlet URL string representation to be embedded in the markup. Note that the returned String may not be a valid URL, as it may be rewritten by the portal/portlet-container before returning the markup to the client. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PortletURLImpl(PortletInvocation invocation, PortletRequest preq, org.jboss.portal.portlet.impl.jsr168.PortletURLImpl.InternalPortletURL url)
Method Detail |
public void setWindowState(WindowState windowState) throws WindowStateException
PortletURL
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.
setWindowState
in interface PortletURL
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.PortletRequest.isWindowStateAllowed(javax.portlet.WindowState)
public void setPortletMode(PortletMode portletMode) throws PortletModeException
PortletURL
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.
setPortletMode
in interface PortletURL
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.PortletRequest.isPortletModeAllowed(javax.portlet.PortletMode)
public void setParameter(java.lang.String name, java.lang.String value)
PortletURL
This method replaces all parameters with the given key.
The PortletURL
implementation 'x-www-form-urlencoded' encodes
all parameter names and values. Developers should not encode them.
A portlet container may prefix the attribute names internally in order to preserve a unique namespace for the portlet.
setParameter
in interface PortletURL
name
- the parameter namevalue
- the parameter value
java.lang.IllegalArgumentException
- if the name is nullpublic void setParameter(java.lang.String name, java.lang.String[] values)
PortletURL
This method replaces all parameters with the given key.
The PortletURL
implementation 'x-www-form-urlencoded' encodes
all parameter names and values. Developers should not encode them.
A portlet container may prefix the attribute names internally in order to preserve a unique namespace for the portlet.
setParameter
in interface PortletURL
name
- the parameter namevalues
- the parameter valuespublic void setParameters(java.util.Map parameters)
PortletURL
All previously set parameters are cleared.
The PortletURL
implementation 'x-www-form-urlencoded' encodes
all parameter names and values. Developers should not encode them.
A portlet container may prefix the attribute names internally, in order to preserve a unique namespace for the portlet.
setParameters
in interface PortletURL
parameters
- Map containing parameter names for
the render phase as
keys and parameter values as map
values. The keys in the parameter
map must be of type String. The values
in the parameter map must be of type
String array (String[]
).public void setSecure(boolean secure) throws PortletSecurityException
PortletURL
Secure set to true
indicates that the portlet requests
a secure connection between the client and the portlet window for
this URL. Secure set to false
indicates that the portlet
does not need a secure connection for this URL. If the security is not
set for a URL, it will stay the same as the current request.
setSecure
in interface PortletURL
secure
- true, if portlet requests to have a secure connection
between its portlet window and the client; false, if
the portlet does not require a secure connection.
PortletSecurityException
- if the run-time environment does
not support the indicated settingpublic java.lang.String toString()
PortletURL
toString
in interface PortletURL
public static PortletURL createActionURL(PortletInvocation invocation, PortletRequest preq)
public static PortletURL createRenderURL(PortletInvocation invocation, PortletRequest preq)
public static WindowState decodeWindowState(java.lang.String windowStateName)
WindowState
object based on the specified name.
windowStateName
- the name of the window state
WindowState
public static PortletMode decodePortletMode(java.lang.String portletModeName)
PortletMode
object based on the specified name.
portletModeName
- the name of the portlet mode
PortletMode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |