1 /**
2 * Copyright 2005-2012 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.Collection;
19
20 import org.kuali.rice.ken.bo.NotificationMessageDelivery;
21 import org.kuali.rice.ken.exception.NotificationAutoRemoveException;
22 import org.kuali.rice.ken.exception.NotificationMessageDeliveryException;
23
24 /**
25 * A NotificationMessageDeliverer interface specialization that should be implemented
26 * by deliverers which can deliver messages in bulk. This interface needs to exist
27 * distinct from NotificationMessageDeliverer because processing in the two cases
28 * will be different. In the bulk case, the deliveries will be performed in a single
29 * transaction.
30 * @author Kuali Rice Team (rice.collab@kuali.org)
31 */
32 public interface BulkNotificationMessageDeliverer extends NotificationMessageDeliverer {
33 /**
34 * This method is responsible for delivering a series of messageDelivery records
35 * @param messageDeliveries The messageDeliveries to process
36 * @throws NotificationMessageDeliveryException
37 */
38 public void deliverMessage(Collection<NotificationMessageDelivery> messageDeliveries) throws NotificationMessageDeliveryException;
39
40 /**
41 * This method handles auto removing message deliveries
42 * @param messageDelivery The messageDeliveries to auto remove
43 * @throws NotificationAutoRemoveException
44 */
45 public void autoRemoveMessageDelivery(Collection<NotificationMessageDelivery> messageDeliveries) throws NotificationAutoRemoveException;
46 }