Coverage Report - org.kuali.rice.kcb.service.MessagingService
 
Classes in this File Line Coverage Branch Coverage Complexity
MessagingService
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007-2008 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 org.kuali.rice.kcb.dto.MessageDTO;
 19  
 import org.kuali.rice.kcb.exception.MessageDeliveryException;
 20  
 import org.kuali.rice.kcb.exception.MessageDismissalException;
 21  
 
 22  
 /**
 23  
  * The KCB MessagingService provides an API to deliver messages
 24  
  * to arbitrary multiple endpoints. 
 25  
  * 
 26  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 27  
  */
 28  
 public interface MessagingService {
 29  
     /**
 30  
      * Delivers a message
 31  
      * 
 32  
      * @param message message to deliver
 33  
      * @return identifier for the message
 34  
      */
 35  
     public Long deliver(MessageDTO message) throws MessageDeliveryException;
 36  
     /**
 37  
      * Removes a specific message and all deliveries
 38  
      * 
 39  
      * @param messageId id of the message to remove
 40  
      * @param user the user under which the action was taken
 41  
      * @param cause the cause or action taken to remove the message 
 42  
      */
 43  
     public void remove(long messageId, String user, String cause) throws MessageDismissalException;
 44  
     
 45  
     /**
 46  
      * Removes a specific message and all deliveries.  Does not throw an exception if no message with the origin
 47  
      * id is found.
 48  
      * 
 49  
      * @param originId origin id of the message to remove
 50  
      * @param user the user under which the action was taken
 51  
      * @param cause the cause or action taken to remove the message
 52  
      * @return Long the message id of the message removed, if any 
 53  
      */
 54  
     public Long removeByOriginId(String originId, String user, String cause) throws MessageDismissalException;
 55  
 }