LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.app.behavior
Class LySendFileBehavior

java.lang.Object
  extended by leon.app.behavior.LyBehavior
      extended by leon.app.behavior.LyActionBehavior
          extended by leon.app.behavior.LyUserInputBehavior
              extended by leon.app.behavior.LySendFileBehavior
All Implemented Interfaces:
LyActionBehaviorInterface, LyBehaviorInterface, LyUserInputBehaviorInterface, LyGetSessionInterface

public class LySendFileBehavior
extends LyUserInputBehavior

Implements the send file action. This class handles the build of the userInput and sends a file to the selected users.


Field Summary
 
Fields inherited from class leon.app.behavior.LyUserInputBehavior
__VERSION
 
Constructor Summary
LySendFileBehavior()
          Default constructor.
 
Method Summary
 void free()
          Free this behavior.
 java.lang.String getTitle(LyAreaController areaController, LyAction action)
          Gets title corresponding to the given action.
 void sendFile(LyAreaController controller, LySession targetSession, LyAction targetAction)
          Sends a file to a user
 boolean startAction(LyAreaController areaController, LyAction action)
          This method build dynamically the content of the message view.
 boolean validate(LyController controller, LyParameterValues values)
          Handle form validation
 
Methods inherited from class leon.app.behavior.LyUserInputBehavior
cancel, close, userInputDemand
 
Methods inherited from class leon.app.behavior.LyActionBehavior
endAction, getClientContext, getContextTitle, getHelpFile, getImage, getImageTooltip, getKeyValue, getMenuItemImage, reset
 
Methods inherited from class leon.app.behavior.LyBehavior
getSession, handleDemand, init
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface leon.app.behaviorinterface.LyActionBehaviorInterface
endAction, getClientContext, getContextTitle, getHelpFile, getImage, getImageTooltip, getKeyValue, getMenuItemImage, reset
 
Methods inherited from interface leon.app.behaviorinterface.LyBehaviorInterface
handleDemand, init
 

Constructor Detail

LySendFileBehavior

public LySendFileBehavior()
Default constructor.

Method Detail

validate

public boolean validate(LyController controller,
                        LyParameterValues values)
Handle form validation

Overrides:
validate in class LyUserInputBehavior
Parameters:
controller - the current LyUserInputController instance
values - values set by the user.
Returns:
True if validation is successfull, false otherwise.

free

public void free()
Description copied from class: LyBehavior
Free this behavior. This method is provided to allow behavior to unregister itself from object sources or workspaces if needed. It should be called only by the controller that built this behavior.
The default implementation does nothing.

Specified by:
free in interface LyBehaviorInterface
Overrides:
free in class LyBehavior

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 instance
action - the action that was executed
Returns:
the given action name

sendFile

public void sendFile(LyAreaController controller,
                     LySession targetSession,
                     LyAction targetAction)
Sends a file to a user

Parameters:
controller - the controller
targetSession - the session that will show the message
targetAction - the action to invoke

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 instance
action - the action that will be executed
Returns:
true

(c) January 2013 - W4 S.A.

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