LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.event
Class LyDemand

java.lang.Object
  extended by leon.view.event.LyDemand
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LyActionDemand, LyActivateViewDemand, LyDragDropDemand, LyHelpDemand, LyMenuDemand, LySelectionDemand

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

This class implements an event from the presentation layer and sent to its controller using RMI This class is specialised into several event types.

See Also:
LySelectionDemand, LyActionDemand, LyHelpDemand, LyMenuDemand, Serialized Form

Field Summary
static java.lang.String __VERSION
           
static char SEPARATOR
           
 
Constructor Summary
LyDemand(int demandType, java.lang.String sourceId)
          Constructor.
 
Method Summary
 void addIndex(int idx)
          Add a new index for a (un-)selected object.
 java.lang.Object getAttribute(java.lang.String key)
          Retrieves a value from a registered key.
 java.lang.String getDemandType()
          Convert the demand type to a string.
 int getId()
          Accessor to the identifier of the demand.
 int getIndex(int pos)
          Accessor to the index the (un-)selected object.
 LyParameterValues getParameterValues()
          Accessor to info description associated to this demand The ParameterValues contains pairs id / values for the current view.
 java.lang.String getSource()
          Accessor to the identifier of the source of this demand.
 int getSubIndex()
          Sub-index associated to this event (optional).
 int getType()
          Accessor to the type of the demand Types are described in specific implementations : selectDemand, actionDemand ...
 void setAttribute(java.lang.String key, java.lang.Object value)
          Adds a pair key-value to the session.
 void setParameterValues(LyParameterValues parameterValues)
          Accessor to info description associated to this demand The ParameterValues contains pairs id / values for the current view.
 void setSubIndex(int sub_index)
          Value associated to this event (optional).
 java.lang.String toShortString()
          Export.
 java.lang.String toString()
          Export.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

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

SEPARATOR

public static char SEPARATOR
Constructor Detail

LyDemand

public LyDemand(int demandType,
                java.lang.String sourceId)
Constructor.

Parameters:
id - or -1 for automatic generation.
Method Detail

getId

public int getId()
Accessor to the identifier of the demand.

Returns:
the demand id

getType

public int getType()
Accessor to the type of the demand Types are described in specific implementations : selectDemand, actionDemand ...

Returns:
the demand type

getSource

public java.lang.String getSource()
Accessor to the identifier of the source of this demand.

Returns:
the source id

getIndex

public int getIndex(int pos)
Accessor to the index the (un-)selected object.

Parameters:
pos - index of the selection
Returns:
the index, or -1 if not found

addIndex

public void addIndex(int idx)
Add a new index for a (un-)selected object.

Parameters:
pos - index of the selection

getParameterValues

public LyParameterValues getParameterValues()
Accessor to info description associated to this demand The ParameterValues contains pairs id / values for the current view.

Returns:
the demand info if any, null otherwise

setParameterValues

public void setParameterValues(LyParameterValues parameterValues)
Accessor to info description associated to this demand The ParameterValues contains pairs id / values for the current view.


getSubIndex

public int getSubIndex()
Sub-index associated to this event (optional).


setSubIndex

public void setSubIndex(int sub_index)
Value associated to this event (optional).


toString

public java.lang.String toString()
Export.

Overrides:
toString in class java.lang.Object

toShortString

public java.lang.String toShortString()
Export.


getDemandType

public java.lang.String getDemandType()
Convert the demand type to a string.


setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object value)
Adds a pair key-value to the session. May be used for example to store the login used to create the session.

Parameters:
key - The key that must be stored.
value - The value that must be stored with the key.
See Also:
#getValue

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
Retrieves a value from a registered key.

Parameters:
key - The key that must be used.
Returns:
The value stored with the key or null if the key is not registered.
See Also:
#addValue

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com