Coverage Report - org.kuali.rice.ken.deliverer.NotificationMessageDeliverer
 
Classes in this File Line Coverage Branch Coverage Complexity
NotificationMessageDeliverer
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007 The Kuali Foundation
 3  
  * 
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  * 
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  * 
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.ken.deliverer;
 17  
 
 18  
 import java.util.HashMap;
 19  
 import java.util.LinkedHashMap;
 20  
 
 21  
 import org.kuali.rice.ken.bo.NotificationMessageDelivery;
 22  
 import org.kuali.rice.ken.exception.ErrorList;
 23  
 import org.kuali.rice.ken.exception.NotificationAutoRemoveException;
 24  
 import org.kuali.rice.ken.exception.NotificationMessageDeliveryException;
 25  
 import org.kuali.rice.ken.exception.NotificationMessageDismissalException;
 26  
 
 27  
 /**
 28  
  * This class represents the different types of Notification Delivery Types that the system can handle.  
 29  
  * For example, an instance of delivery type could be "ActionList" or "Email" or "SMS".  Any deliverer implementation 
 30  
  * adhering to this interface can be plugged into the system and will be automatically available for use.
 31  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 32  
  */
 33  
 public interface NotificationMessageDeliverer {
 34  
     /**
 35  
      * This method is responsible for delivering the passed in messageDelivery record.
 36  
      * @param messageDelivery The messageDelivery to process
 37  
      * @throws NotificationMessageDeliveryException
 38  
      */
 39  
     public void deliverMessage(NotificationMessageDelivery messageDelivery) throws NotificationMessageDeliveryException;
 40  
     
 41  
     /**
 42  
      * This method handles auto removing a message delivery from a person's list of notifications.
 43  
      * @param messageDelivery The messageDelivery to auto remove
 44  
      * @throws NotificationAutoRemoveException
 45  
      */
 46  
     public void autoRemoveMessageDelivery(NotificationMessageDelivery messageDelivery) throws NotificationAutoRemoveException;
 47  
     
 48  
     /**
 49  
      * This method dismisses/removes the NotificationMessageDelivery so that it is no longer being presented to the user
 50  
      * via this deliverer.  Note, whether this action is meaningful is dependent on the deliverer implementation.  If the
 51  
      * deliverer cannot control the presentation of the message, then this method need not do anything. 
 52  
      * @param messageDelivery the messageDelivery to dismiss
 53  
      * @param the user that caused the dismissal; in the case of end-user actions, this will most likely be the user to
 54  
      *        which the message was delivered (user recipient in the NotificationMessageDelivery object)
 55  
      * @param cause the reason the message was dismissed
 56  
      */
 57  
     public void dismissMessageDelivery(NotificationMessageDelivery messageDelivery, String user, String cause) throws NotificationMessageDismissalException;
 58  
 }