LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.app.behavior
Class LyMailBehavior

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

public class LyMailBehavior
extends LyActionBehavior
implements LyMailBehaviorInterface

This class implements the default behavior for actions that sends mail with a mail controller.


Field Summary
static java.lang.String __VERSION
          File version
static java.lang.String MAIL_JNDI
          Accessor to the String MAIL_JNDI
 
Constructor Summary
LyMailBehavior()
           
 
Method Summary
static int indexOfAny(java.lang.String s, java.lang.String any)
          Returns the index of the first occurence of a character in the any string that appears in the s string.
 boolean sendMail(LyMailController controller, LyClassInfo toClass, LyFieldInfo toField, LyObjectList selectedObjects)
          Send a mail
 boolean sendMail(LyMailController controller, LyObjectList selectedUsers, LyFieldInfo toField)
          Send the email
 void userInputDemand(LyController controller, LyDemand demand)
          Handle the given demand
 
Methods inherited from class leon.app.behavior.LyActionBehavior
endAction, getClientContext, getContextTitle, getHelpFile, getImage, getImageTooltip, getKeyValue, getMenuItemImage, getTitle, reset, startAction
 
Methods inherited from class leon.app.behavior.LyBehavior
free, 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, getTitle, reset, startAction
 
Methods inherited from interface leon.app.behaviorinterface.LyBehaviorInterface
free, handleDemand, init
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values

MAIL_JNDI

public static final java.lang.String MAIL_JNDI
Accessor to the String MAIL_JNDI

See Also:
Constant Field Values
Constructor Detail

LyMailBehavior

public LyMailBehavior()
Method Detail

userInputDemand

public void userInputDemand(LyController controller,
                            LyDemand demand)
Handle the given demand

Specified by:
userInputDemand in interface LyUserInputBehaviorInterface
Parameters:
controller - the controller
demand - the demand

indexOfAny

public static int indexOfAny(java.lang.String s,
                             java.lang.String any)
Returns the index of the first occurence of a character in the any string that appears in the s string.

Parameters:
s - an arbitrary string that is tested
any - the list of characters to find in the first given string
Returns:
the index of a character from the second string in the first, or -1 if no characters were found.

sendMail

public boolean sendMail(LyMailController controller,
                        LyClassInfo toClass,
                        LyFieldInfo toField,
                        LyObjectList selectedObjects)
Send a mail

Specified by:
sendMail in interface LyMailBehaviorInterface
Parameters:
controller - the controller
toClass - the classInfo the classinfo corresponding to the recipient
toField - the email field
selectedObjects - a list of selected objects
Returns:
true if the mail was successfully send

sendMail

public boolean sendMail(LyMailController controller,
                        LyObjectList selectedUsers,
                        LyFieldInfo toField)
Send the email

Specified by:
sendMail in interface LyMailBehaviorInterface
Parameters:
controller - the mail controller
selectedUsers - the list of recipient
toField - the field corresponding to the email address
Returns:
true if the mail was succesfully send

(c) January 2013 - W4 S.A.

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