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

static final int INITIALIZATION_FAILED
defines an error state

See Also:
Constant Field Values
Method Detail

get

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

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

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

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

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

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

getAsPropertyList

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

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

getAsPropertyList

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

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

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

setAsString

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

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

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

Parameters:
portletHandle - String representing a portlet handle

getModelDescription

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