Coverage Report - org.kuali.rice.kcb.service.MessageDeliveryService
 
Classes in this File Line Coverage Branch Coverage Complexity
MessageDeliveryService
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright 2005-2011 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.kcb.service;
 17  
 
 18  
 import java.util.Collection;
 19  
 
 20  
 import org.kuali.rice.kcb.bo.Message;
 21  
 import org.kuali.rice.kcb.bo.MessageDelivery;
 22  
 import org.kuali.rice.kcb.bo.MessageDeliveryStatus;
 23  
 
 24  
 /**
 25  
  * The MessageDeliveryService class is responsible various functions regarding the 
 26  
  * MessageDelivery records that exist within the system.
 27  
  *
 28  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 29  
  */
 30  
 public interface MessageDeliveryService {
 31  
     /**
 32  
      * Saves a MessageDelivery
 33  
      * @param delivery the MessageDelivery to save
 34  
      */
 35  
     public void saveMessageDelivery(MessageDelivery delivery);
 36  
 
 37  
     /**
 38  
      * Deletes a MessageDelivery
 39  
      * @param delivery the MessageDelivery to delete 
 40  
      */
 41  
     public void deleteMessageDelivery(MessageDelivery delivery);
 42  
 
 43  
     /**
 44  
      * This method will retrieve a MessageDelivery object from the system, given the id of the 
 45  
      * actual record.
 46  
      * @param id
 47  
      * @return MessageDelivery
 48  
      */
 49  
     public MessageDelivery getMessageDelivery(Long id);
 50  
 
 51  
     /**
 52  
      * This method will retrieve a MessageDelivery object from the system, given the external deliverer system id
 53  
      * registered with the MessageDelivery.
 54  
      * @param id the external deliverer system id
 55  
      * @return MessageDelivery
 56  
      */
 57  
     public MessageDelivery getMessageDeliveryByDelivererSystemId(Long id);
 58  
 
 59  
     /**
 60  
      * This method will return all MessageDelivery objects in the system 
 61  
      * @return Collection<MessageDelivery> list of MessageDelivery objects in the system
 62  
      */
 63  
     public Collection<MessageDelivery> getAllMessageDeliveries();
 64  
     
 65  
     /**
 66  
      * This method will return all MessageDelievery objects generated for the given Message
 67  
      * @param message the message which generated the message deliveries
 68  
      * @return collection of NotificationMessageDelivery objects generated for the given Notification for the given user
 69  
      */
 70  
     public Collection<MessageDelivery> getMessageDeliveries(Message message);
 71  
     
 72  
     /**
 73  
      * Locks and takes all message deliveries of a given message in the system with any of the specified statuses
 74  
      * @param messageId the id of the message whose deliveries to take 
 75  
      * @param status the statuses of message deliveries to take
 76  
      * @return a collection of message deliveries
 77  
      */
 78  
     public Collection<MessageDelivery> lockAndTakeMessageDeliveries(Long messageId, MessageDeliveryStatus[] status);
 79  
 
 80  
     /**
 81  
      * Locks and takes all message deliveries in the system with any of the specified statuses
 82  
      * @param status the statuses of message deliveries to take
 83  
      * @return a collection of message deliveries
 84  
      */
 85  
     public Collection<MessageDelivery> lockAndTakeMessageDeliveries(MessageDeliveryStatus[] status);
 86  
 }