com.mf.roundhouse.portal.util
Class PortletURLImpl

java.lang.Object
  extended bycom.mf.roundhouse.portal.util.PortletURLImpl
All Implemented Interfaces:
PortletURL

public class PortletURLImpl
extends java.lang.Object
implements PortletURL


Field Summary
static int LAYOUT_MOVE_DOWN
           
static int LAYOUT_MOVE_LEFT
           
static int LAYOUT_MOVE_RIGHT
           
static int LAYOUT_MOVE_UP
           
static int LAYOUT_NONE
           
static int LAYOUT_REMOVE
           
 
Constructor Summary
PortletURLImpl()
           
 
Method Summary
 int getLayoutAction()
           
 java.util.Map getParameters()
           
 PortletMode getPortletMode()
           
 java.lang.String getPortletPageId()
           
 UUID getUrlCacheId()
           
 PortletWindowInstance getWindowInstance()
           
 WindowState getWindowState()
           
 boolean isAction()
           
 void setAction(boolean b)
           
 void setLayoutAction(int i)
           
 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 setPortletPageId(java.lang.String string)
           
 void setSecure(boolean secure)
          Indicated the security setting for this URL.
 void setUrlCacheId(UUID uuid)
           
 void setWindowInstance(PortletWindowInstance instance)
           
 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
 

Field Detail

LAYOUT_NONE

public static final int LAYOUT_NONE
See Also:
Constant Field Values

LAYOUT_REMOVE

public static final int LAYOUT_REMOVE
See Also:
Constant Field Values

LAYOUT_MOVE_LEFT

public static final int LAYOUT_MOVE_LEFT
See Also:
Constant Field Values

LAYOUT_MOVE_RIGHT

public static final int LAYOUT_MOVE_RIGHT
See Also:
Constant Field Values

LAYOUT_MOVE_UP

public static final int LAYOUT_MOVE_UP
See Also:
Constant Field Values

LAYOUT_MOVE_DOWN

public static final int LAYOUT_MOVE_DOWN
See Also:
Constant Field Values
Constructor Detail

PortletURLImpl

public PortletURLImpl()
Method Detail

setWindowState

public void setWindowState(WindowState windowState)
                    throws WindowStateException
Description copied from interface: PortletURL
Indicates the window state the portlet should be in, if this portlet URL triggers a request.

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.

Specified by:
setWindowState in interface PortletURL
Parameters:
windowState - the portlet window state
Throws:
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.
See Also:
PortletRequest.isWindowStateAllowed(javax.portlet.WindowState)

setPortletMode

public void setPortletMode(PortletMode portletMode)
                    throws PortletModeException
Description copied from interface: PortletURL
Indicates the portlet mode the portlet must be in, if this portlet URL triggers a request.

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.

Specified by:
setPortletMode in interface PortletURL
Parameters:
portletMode - the portlet mode
Throws:
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.
See Also:
PortletRequest.isPortletModeAllowed(javax.portlet.PortletMode)

setParameter

public void setParameter(java.lang.String name,
                         java.lang.String value)
Description copied from interface: PortletURL
Sets the given String parameter to this URL.

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.

Specified by:
setParameter in interface PortletURL
Parameters:
name - the parameter name
value - the parameter value

setParameter

public void setParameter(java.lang.String name,
                         java.lang.String[] values)
Description copied from interface: PortletURL
Sets the given String array parameter to this URL.

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.

Specified by:
setParameter in interface PortletURL
Parameters:
name - the parameter name
values - the parameter values

setParameters

public void setParameters(java.util.Map parameters)
Description copied from interface: PortletURL
Sets a parameter map for this URL.

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.

Specified by:
setParameters in interface PortletURL
Parameters:
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[]).

setSecure

public void setSecure(boolean secure)
               throws PortletSecurityException
Description copied from interface: PortletURL
Indicated the security setting for this URL.

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.

Specified by:
setSecure in interface PortletURL
Parameters:
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.
Throws:
PortletSecurityException - if the run-time environment does not support the indicated setting

toString

public java.lang.String toString()
Description copied from interface: PortletURL
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.

Specified by:
toString in interface PortletURL

getPortletPageId

public java.lang.String getPortletPageId()
Returns:

setPortletPageId

public void setPortletPageId(java.lang.String string)
Parameters:
string -

getParameters

public java.util.Map getParameters()
Returns:

getPortletMode

public PortletMode getPortletMode()
Returns:

getUrlCacheId

public UUID getUrlCacheId()
Returns:

getWindowState

public WindowState getWindowState()
Returns:

setUrlCacheId

public void setUrlCacheId(UUID uuid)
Parameters:
uuid -

isAction

public boolean isAction()
Returns:

setAction

public void setAction(boolean b)
Parameters:
b -

getWindowInstance

public PortletWindowInstance getWindowInstance()
Returns:

setWindowInstance

public void setWindowInstance(PortletWindowInstance instance)
Parameters:
instance -

getLayoutAction

public int getLayoutAction()
Returns:

setLayoutAction

public void setLayoutAction(int i)
Parameters:
i -


Copyright © 2004 Media Fortress, LLC. Licensed for commercial use under the Apache 2.0 License.