org.apache.wsrp4j.producer.provider
Interface PortletStateManager


public interface PortletStateManager

Manages the portlet states. Provides convenience mehtods usefull for state handling

Author:
Stefan Behl

Field Summary
static int INITIALIZATION_FAILED
          defines an error state
 
Method Summary
 void destroy(java.lang.String portletHandle)
          Destroys a portlet state
 PortletState get(java.lang.String portletHandle)
          Returns the portlet's state for a given portlet handle
 PropertyList getAsPropertyList(PortletState state)
          Converts a portlet's state to a PropertyList
 PropertyList getAsPropertyList(java.lang.String portletHandle)
          Returns the portlet's state as PropertyList
 PropertyList getAsPropertyList(java.lang.String portletHandle, java.lang.String[] names)
          Converts a subset of the portlet state to a PropertyList.
 java.lang.String getAsString(PortletState state)
          Converts a PortletState object to java.lang.String
 java.lang.String getAsString(java.lang.String portletHandle)
          Returns the portlet's state as String for a given portlet handle
 java.lang.String getAsString(java.lang.String portletHandle, java.lang.String[] names)
          Converts a subset of the portlet stateto java.lang.String.
 ModelDescription getModelDescription(java.lang.String portletHandle, java.lang.String[] desiredLocales, boolean sendAllLocales)
          Returns the WSRP model description for a portlet's state.
 void set(java.lang.String portletHandle, PortletState state)
          Set the portlet's state
 void setAsPropertyList(java.lang.String portletHandle, PropertyList state)
          Set the portlet state
 void setAsString(java.lang.String portletHandle, java.lang.String state)
          Set the portlet state
 

Field Detail

INITIALIZATION_FAILED

public static final int INITIALIZATION_FAILED
defines an error state

See Also:
Constant Field Values
Method Detail

get

public PortletState get(java.lang.String portletHandle)
Returns the portlet's state for a given portlet handle

Parameters:
portletHandle - String representing a portlet handle
Returns:
PortletState

getAsString

public java.lang.String getAsString(java.lang.String portletHandle)
Returns the portlet's state as String for a given portlet handle

Parameters:
portletHandle - String representing a portlet handle
Returns:
String representing the portlet's state

getAsString

public java.lang.String getAsString(PortletState state)
Converts a PortletState object to java.lang.String

Parameters:
state - PortletState
Returns:
java.lang.String representing a portlet state

getAsString

public java.lang.String getAsString(java.lang.String portletHandle,
                                    java.lang.String[] names)
Converts a subset of the portlet stateto java.lang.String. The subset of the state is represented by an array of names.

Parameters:
portletHandle - String representing a portlet handle
names - array of String
Returns:
String representing a subset of a portlte state

getAsPropertyList

public PropertyList getAsPropertyList(java.lang.String portletHandle)
Returns the portlet's state as PropertyList

Parameters:
portletHandle - String representing a portlte handle
Returns:
PropertyList

getAsPropertyList

public PropertyList getAsPropertyList(PortletState state)
Converts a portlet's state to a PropertyList

Parameters:
state - the portlet's state
Returns:
PropertyList

getAsPropertyList

public PropertyList getAsPropertyList(java.lang.String portletHandle,
                                      java.lang.String[] names)
Converts a subset of the portlet state to a PropertyList. The subset of the state is represented by an array of names.

Parameters:
portletHandle - String representing a portlet handle
names - array of String
Returns:
PropertyList

set

public void set(java.lang.String portletHandle,
                PortletState state)
Set the portlet's state

Parameters:
portletHandle - String representing a portlet handle
state - PortletState

setAsString

public void setAsString(java.lang.String portletHandle,
                        java.lang.String state)
Set the portlet state

Parameters:
portletHandle - String representing a portlet handle
state - String representing the portlet's state

setAsPropertyList

public void setAsPropertyList(java.lang.String portletHandle,
                              PropertyList state)
Set the portlet state

Parameters:
portletHandle - String representing a portlet handle
state - PropretyList representing the portlte's state

destroy

public void destroy(java.lang.String portletHandle)
Destroys a portlet state

Parameters:
portletHandle - String representing a portlet handle

getModelDescription

public ModelDescription getModelDescription(java.lang.String portletHandle,
                                            java.lang.String[] desiredLocales,
                                            boolean sendAllLocales)
Returns the WSRP model description for a portlet's state.

Parameters:
portletHandle - String representing a portlet handle
desiredLocales - determine the desired locales
sendAllLocales - indicates if all locales are desired
Returns:
ModelDescription