org.apache.cocoon.portal.pluto
Class PortletURLConverter

java.lang.Object
  extended by org.apache.cocoon.portal.pluto.PortletURLConverter

public class PortletURLConverter
extends Object

Create the URL for a portlet

Version:
SVN $Id: PortletURLConverter.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Ralph Goers

Field Summary
static String ACTION
           
static String MODE
           
static String PARAM
           
static String PORTLET_ID
           
static String PREFIX
           
static String STATE
           
 
Constructor Summary
PortletURLConverter(CopletInstanceData cid)
          Constructor used when the URL will be marshalled.
PortletURLConverter(String eventData)
          Constructor used when the URL will be unmarshalled.
 
Method Summary
 javax.portlet.PortletMode getMode()
          Return the PortletMode
 Map getParameters()
          Returns the request parameters for this portlet URL.
 String getPortletId()
          Returns the portlet id.
 javax.portlet.WindowState getState()
          Return the WindowState
 boolean isAction()
          Return the indicator if this is an action.
 void setAction()
          Indicates that the URL is an action.
 void setMode(javax.portlet.PortletMode mode)
          Sets the PortletMode.
 void setParam(String name, String[] values)
          Adds the parameter, replacing a parameter with the same name.
 void setState(javax.portlet.WindowState state)
          Sets the WindowState
 String toString()
          Returns the marshalled URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACTION

public static final String ACTION
See Also:
Constant Field Values

MODE

public static final String MODE
See Also:
Constant Field Values

PORTLET_ID

public static final String PORTLET_ID
See Also:
Constant Field Values

PREFIX

public static final String PREFIX
See Also:
Constant Field Values

PARAM

public static final String PARAM
See Also:
Constant Field Values

STATE

public static final String STATE
See Also:
Constant Field Values
Constructor Detail

PortletURLConverter

public PortletURLConverter(CopletInstanceData cid)
Constructor used when the URL will be marshalled.

Parameters:
cid - The coplet id.

PortletURLConverter

public PortletURLConverter(String eventData)
Constructor used when the URL will be unmarshalled.

Parameters:
eventData - The url data.
Method Detail

getMode

public javax.portlet.PortletMode getMode()
Return the PortletMode

Returns:
The PortletMode

getState

public javax.portlet.WindowState getState()
Return the WindowState

Returns:
The WindowState

isAction

public boolean isAction()
Return the indicator if this is an action.

Returns:
true if this is an action URL, false if a render URL.

setAction

public void setAction()
Indicates that the URL is an action.


setMode

public void setMode(javax.portlet.PortletMode mode)
Sets the PortletMode.

Parameters:
mode - The PortletMode

setState

public void setState(javax.portlet.WindowState state)
Sets the WindowState

Parameters:
state - The WindowState

getPortletId

public String getPortletId()
Returns the portlet id.

Returns:
The portlet id.

getParameters

public Map getParameters()
Returns the request parameters for this portlet URL.

Returns:
A Map containing the parameters for this URL.

setParam

public void setParam(String name,
                     String[] values)
Adds the parameter, replacing a parameter with the same name.

Parameters:
name - The parameter name
values - An array of Strings.

toString

public String toString()
Returns the marshalled URL.

Overrides:
toString in class Object
Returns:
A String containing the marshalled URL.


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.