org.apache.wsrp4j.util
Class Modes

java.lang.Object
  extended byorg.apache.wsrp4j.util.Modes
All Implemented Interfaces:
java.io.Serializable

public class Modes
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static java.lang.String _edit
           
static java.lang.String _help
           
static java.lang.String _preview
           
static java.lang.String _view
           
static Modes edit
           
static Modes help
           
static Modes preview
           
static Modes view
           
 
Constructor Summary
protected Modes(java.lang.String value)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
static Modes fromString(java.lang.String value)
          Returns the WSRP mode build from a string representation If a not supported Mode is requested, null is returned
static Modes fromValue(java.lang.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 getJsrPortletModeFromWsrpMode(Modes wsrpMode)
          This helper method maps portlet modes defined in wsrp to portlet modes defined in the java portlet standard (JSR-168).
 java.lang.String getValue()
           
static Modes getWsrpModeFromJsrPortletMode(javax.portlet.PortletMode portletMode)
          This helper method maps portlet modes defined in tha java portlet standard (JSR-168) to modes defined in wsrp.
 int hashCode()
           
 java.lang.Object readResolve()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_view

public static final java.lang.String _view
See Also:
Constant Field Values

_edit

public static final java.lang.String _edit
See Also:
Constant Field Values

_help

public static final java.lang.String _help
See Also:
Constant Field Values

_preview

public static final java.lang.String _preview
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

protected Modes(java.lang.String value)
Method Detail

getValue

public java.lang.String getValue()

fromValue

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

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

fromString

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

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

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()

toString

public java.lang.String toString()

readResolve

public java.lang.Object readResolve()
                             throws java.io.ObjectStreamException
Throws:
java.io.ObjectStreamException

getJsrPortletModeFromWsrpMode

public static javax.portlet.PortletMode getJsrPortletModeFromWsrpMode(Modes wsrpMode)
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.

getWsrpModeFromJsrPortletMode

public static Modes getWsrpModeFromJsrPortletMode(javax.portlet.PortletMode portletMode)
This helper method maps portlet modes defined in tha java portlet standard (JSR-168) to modes defined in wsrp. If the passed portlet mode can not be resolved wsrp:view mode is returned.

Parameters:
portletMode - The javax.portlet.PortletMode which should be resolved as as portlet mode defined in wsrp.
Returns: