org.exoplatform.services.wsrp.utils
Class Modes

java.lang.Object
  extended by org.exoplatform.services.wsrp.utils.Modes
All Implemented Interfaces:
Serializable

public class Modes
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
static String _edit_wsrp
           
static String _help_wsrp
           
static String _preview_wsrp
           
static String _view_wsrp
           
static Modes EDIT
           
static Modes HELP
           
static Modes PREVIEW
           
static Modes VIEW
           
 
Constructor Summary
Modes(String value)
           
 
Method Summary
static String addPrefixWSRP(String forAddWSRP)
           
static String delAllPrefixesWSRP(String forDelWSRP)
           
 boolean equals(Object obj)
           
static Modes fromString(String value)
          Returns the WSRP mode build from a string representation If a not supported Mode is requested, null is returned
static Modes fromValue(String value)
          Returns the WSRP mode build from a string representation If a not supported Mode is requested, null is returned
static javax.portlet.PortletMode getJsrPortletMode(String mode)
          This helper method maps portlet modes defined in wsrp to portlet modes defined in the java portlet standard (JSR-168).
 String getValue()
           
static String getWSRPModeString(javax.portlet.PortletMode jsrPortletMode)
           
 int hashCode()
           
 Object readResolve()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_view_wsrp

public static final String _view_wsrp

_edit_wsrp

public static final String _edit_wsrp

_help_wsrp

public static final String _help_wsrp

_preview_wsrp

public static final String _preview_wsrp
See Also:
Constant Field Values

VIEW

public static final Modes VIEW

EDIT

public static final Modes EDIT

HELP

public static final Modes HELP

PREVIEW

public static final Modes PREVIEW
Constructor Detail

Modes

public Modes(String value)
Method Detail

getValue

public String getValue()

fromValue

public static Modes fromValue(String value)
Returns the WSRP mode build from a string representation If a not supported Mode is requested, null is returned

Parameters:
String - representation of the WSRP mode
Returns:
The WSRP Mode represented by the passed string

fromString

public static Modes fromString(String value)
Returns the WSRP mode build from a string representation If a not supported Mode is requested, null is returned

Parameters:
String - representation of the WSRP mode
Returns:
The WSRP Mode represented by the passed string

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

readResolve

public Object readResolve()
                   throws ObjectStreamException
Throws:
ObjectStreamException

getJsrPortletMode

public static javax.portlet.PortletMode getJsrPortletMode(String mode)
This helper method maps portlet modes defined in wsrp to portlet modes defined in the java portlet standard (JSR-168). If the passed wsrp mode is null or can not be mapped the VIEW mode is returned.

Returns:
The javax.portlet.PortletMode which corresponds to the given wsrp mode.

addPrefixWSRP

public static String addPrefixWSRP(String forAddWSRP)

getWSRPModeString

public static String getWSRPModeString(javax.portlet.PortletMode jsrPortletMode)

delAllPrefixesWSRP

public static String delAllPrefixesWSRP(String forDelWSRP)


Copyright © 2009 eXo Platform SAS. All Rights Reserved.