org.kuali.rice.kcb.deliverer.impl
Class EmailMessageDeliverer

java.lang.Object
  extended by org.kuali.rice.kcb.deliverer.impl.EmailMessageDeliverer
All Implemented Interfaces:
MessageDeliverer

public class EmailMessageDeliverer
extends Object
implements MessageDeliverer

This class is responsible for describing the email delivery mechanism for the system.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
static String EMAIL_ADDR_PREF_KEY
           
static String EMAIL_DELIV_FRMT_PREF_KEY
           
static String NAME
           
 
Constructor Summary
EmailMessageDeliverer()
          Constructs a EmailMessageDeliverer.java.
 
Method Summary
 void autoRemoveMessageDelivery(MessageDelivery messageDelivery)
          This implementation does an auto-remove by "canceling" the workflow email with the message delivery record.
 void deliver(MessageDelivery messageDelivery)
          This implementation uses the email service to deliver a notification.
 void dismiss(MessageDelivery messageDelivery, String user, String cause)
          This method dismisses/removes the NotificationMessageDelivery so that it is no longer being presented to the user via this deliverer.
 String getDescription()
          This method returns the human readable description for this plugin.
 String getName()
          This method returns the human readable name of the plugin.
 LinkedHashMap<String,String> getPreferenceKeys()
          This implementation returns an address field.
 String getTitle()
          This method returns the human readable Title of the plugin.
 void validatePreferenceValues(HashMap<String,String> prefs)
          This method is responsible for validating preference values when a person saves their preferences for the particular NotificationMessageDeliverer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values

EMAIL_ADDR_PREF_KEY

public static final String EMAIL_ADDR_PREF_KEY
See Also:
Constant Field Values

EMAIL_DELIV_FRMT_PREF_KEY

public static final String EMAIL_DELIV_FRMT_PREF_KEY
See Also:
Constant Field Values
Constructor Detail

EmailMessageDeliverer

public EmailMessageDeliverer()
Constructs a EmailMessageDeliverer.java.

Method Detail

deliver

public void deliver(MessageDelivery messageDelivery)
             throws MessageDeliveryException
This implementation uses the email service to deliver a notification.

Specified by:
deliver in interface MessageDeliverer
Parameters:
messageDelivery - The messageDelivery to process
Throws:
MessageDeliveryException
See Also:
MessageDeliverer.deliver(MessageDelivery)

autoRemoveMessageDelivery

public void autoRemoveMessageDelivery(MessageDelivery messageDelivery)
This implementation does an auto-remove by "canceling" the workflow email with the message delivery record. In the case of email, it's a noop

See Also:
org.kuali.rice.kcb.deliverer.MessageDeliverer#autoRemoveMessageDelivery(org.kuali.rice.ken.bo.NotificationMessageDelivery)

dismiss

public void dismiss(MessageDelivery messageDelivery,
                    String user,
                    String cause)
             throws MessageDismissalException
Description copied from interface: MessageDeliverer
This method dismisses/removes the NotificationMessageDelivery so that it is no longer being presented to the user via this deliverer. Note, whether this action is meaningful is dependent on the deliverer implementation. If the deliverer cannot control the presentation of the message, then this method need not do anything.

Specified by:
dismiss in interface MessageDeliverer
Parameters:
messageDelivery - the messageDelivery to dismiss
cause - the reason the message was dismissed
Throws:
MessageDismissalException
See Also:
MessageDeliverer.dismiss(org.kuali.rice.kcb.bo.MessageDelivery, java.lang.String, java.lang.String)

getDescription

public String getDescription()
Description copied from interface: MessageDeliverer
This method returns the human readable description for this plugin.

Specified by:
getDescription in interface MessageDeliverer
Returns:
String
See Also:
MessageDeliverer.getDescription()

getName

public String getName()
Description copied from interface: MessageDeliverer
This method returns the human readable name of the plugin. This name is the key for this message delivery type. It must be unique and not contain any spaces.

Specified by:
getName in interface MessageDeliverer
Returns:
String
See Also:
MessageDeliverer.getName()

getTitle

public String getTitle()
Description copied from interface: MessageDeliverer
This method returns the human readable Title of the plugin. This name is the string used for identifying the plugin in the UI. It may contain spaces characters.

Specified by:
getTitle in interface MessageDeliverer
Returns:
String
See Also:
MessageDeliverer.getTitle()

getPreferenceKeys

public LinkedHashMap<String,String> getPreferenceKeys()
This implementation returns an address field.

Specified by:
getPreferenceKeys in interface MessageDeliverer
Returns:
LinkedHashMap
See Also:
MessageDeliverer.getPreferenceKeys()

validatePreferenceValues

public void validatePreferenceValues(HashMap<String,String> prefs)
                              throws ErrorList
Description copied from interface: MessageDeliverer
This method is responsible for validating preference values when a person saves their preferences for the particular NotificationMessageDeliverer. For example, if "phoneNumber" is one of the preferences for an SMS deliverer, then this method would be responsible for validating the value entered by a particular user such that it was properly constructed with hyphens or not, etc. Errors would be constructed and added to the ErrorList instance and be thrown from the method if any occurred.

Specified by:
validatePreferenceValues in interface MessageDeliverer
Throws:
ErrorList
See Also:
MessageDeliverer.validatePreferenceValues(java.util.HashMap)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.