leon.app.behavior
Class LyMessageBehavior
java.lang.Object
leon.app.behavior.LyBehavior
leon.app.behavior.LyActionBehavior
leon.app.behavior.LyUserInputBehavior
leon.app.behavior.LyMessageBehavior
- All Implemented Interfaces:
- LyActionBehaviorInterface, LyBehaviorInterface, LyUserInputBehaviorInterface, LyGetSessionInterface
public class LyMessageBehavior
- extends LyUserInputBehavior
Implements the message action.
This class handles the build of the userInput and show a message to the selected users.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LyMessageBehavior
public LyMessageBehavior()
- Default constructor.
validate
public boolean validate(LyController controller,
LyParameterValues values)
- Handle form validation
- Overrides:
validate
in class LyUserInputBehavior
- Parameters:
controller
- the current LyUserInputController instancevalues
- values set by the user.
- Returns:
- True if validation is successfull, false otherwise.
getTitle
public java.lang.String getTitle(LyAreaController areaController,
LyAction action)
- Description copied from class:
LyActionBehavior
- Gets title corresponding to the given action.
The default implementation returns the action name.
- Specified by:
getTitle
in interface LyActionBehaviorInterface
- Overrides:
getTitle
in class LyActionBehavior
- Parameters:
areaController
- the current LyAreaController instanceaction
- the action that was executed
- Returns:
- the given action name
showMessage
public void showMessage(LyAreaController controller,
LySession targetSession,
LyAction targetAction)
- Format and show a message to a user
- Parameters:
controller
- the controllertargetSession
- the session that will show the messagemessage
- the message to show
startAction
public boolean startAction(LyAreaController areaController,
LyAction action)
- This method build dynamically the content of the message view.
It always add a content text field
If we cannot find users in the context of the controller, we add a relation field displaying currently
connected users.
- Specified by:
startAction
in interface LyActionBehaviorInterface
- Overrides:
startAction
in class LyActionBehavior
- Parameters:
areaController
- the current LyAreaController instanceaction
- the action that will be executed
- Returns:
- true
Website: W4 S.A., contact us: support@w4global.com