org.apache.wsrp4j.util
Class WindowStates

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

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

See Also:
Serialized Form

Field Summary
static java.lang.String _maximized
           
static java.lang.String _minimized
           
static java.lang.String _normal
           
static java.lang.String _solo
           
static WindowStates maximized
           
static WindowStates minimized
           
static WindowStates normal
           
static WindowStates solo
           
 
Constructor Summary
protected WindowStates(java.lang.String value)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
static WindowStates fromString(java.lang.String value)
          Returns the WSRP window state build from a string representation If a not supported window state is requested, null is returned
static WindowStates fromValue(java.lang.String value)
          Returns the WSRP window state build from a string representation If a not supported window state is requested, null is returned
static javax.portlet.WindowState getJsrPortletStateFromWsrpState(WindowStates wsrpState)
          This helper method maps portlet window states defined in wsrp to portlet window states defined in the java portlet standard (JSR-168).
 java.lang.String getValue()
           
static java.lang.String[] getWindowStatesAsStringArray()
           
static WindowStates getWsrpStateFromJsrPortletState(javax.portlet.WindowState portletState)
          This helper method maps portlet window states defined in tha java portlet standard (JSR-168) to window states 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

_normal

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

_minimized

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

_maximized

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

_solo

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

normal

public static final WindowStates normal

minimized

public static final WindowStates minimized

maximized

public static final WindowStates maximized

solo

public static final WindowStates solo
Constructor Detail

WindowStates

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

getValue

public java.lang.String getValue()

fromValue

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

Parameters:
value - String representation of the WSRP window state
Returns:
The WSRP WindowStates represented by the passed string

fromString

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

Parameters:
value - String representation of the WSRP window state
Returns:
The WSRP WindowStates 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

getJsrPortletStateFromWsrpState

public static javax.portlet.WindowState getJsrPortletStateFromWsrpState(WindowStates wsrpState)
This helper method maps portlet window states defined in wsrp to portlet window states defined in the java portlet standard (JSR-168). If the passed wsrp window state is null or can not be mapped directly the normal state is returned.

Returns:
The javax.portlet.WindowState which corresponds to the given wsrp state.

getWsrpStateFromJsrPortletState

public static WindowStates getWsrpStateFromJsrPortletState(javax.portlet.WindowState portletState)
This helper method maps portlet window states defined in tha java portlet standard (JSR-168) to window states defined in wsrp. If the passed state can not be resolved wsrp:normal state is returned.

Parameters:
portletState - The javax.portlet.WindowState which should be resolved as as portlet window state defined in wsrp.
Returns:

getWindowStatesAsStringArray

public static java.lang.String[] getWindowStatesAsStringArray()