1 /**
2 * Copyright 2011 The Kuali Foundation Licensed under the
3 * Educational Community License, Version 2.0 (the "License"); you may
4 * not use this file except in compliance with the License. You may
5 * obtain a copy of the License at
6 *
7 * http://www.osedu.org/licenses/ECL-2.0
8 *
9 * Unless required by applicable law or agreed to in writing,
10 * software distributed under the License is distributed on an "AS IS"
11 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12 * or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16 package org.kuali.mobility.push.service;
17
18 import java.util.List;
19
20 import org.kuali.mobility.push.entity.Push;
21 import org.kuali.mobility.push.entity.PushDeviceTuple;
22
23 /**
24 * Interface for managing <code>PushDeviceTuple</code> instances.
25 *
26 * @author Kuali Mobility Team (mobility.dev@kuali.org)
27 * @since 2.1.0
28 */
29 public interface PushDeviceTupleService{
30
31 /**
32 * Service Method to mark a specific <code>PushDeviceTuple<code> as sent.
33 * @param tuple
34 */
35 void markTupleAsSent(PushDeviceTuple tuple);
36
37 /**
38 * Service Method to save a given <code>PushDeviceTuple<code>.
39 * @param tuple
40 * @return Long id of the saved <code>PushDeviceTuple<code>.
41 */
42 void saveTuple(PushDeviceTuple tuple);
43
44 /**
45 * Service Method to find all unsent <code>PushDeviceTuple<code> and return them as a List<PushDeviceTuple>
46 * @return List list of <code>PushDeviceTuple<code>
47 */
48 List<PushDeviceTuple> findUnsentTuples();
49
50 /**
51 * Service Method to find all <code>PushDeviceTuple<code> associated with a given <code>Push</code>
52 * @return List list of <code>PushDeviceTuple<code>
53 */
54 List<PushDeviceTuple> findTuplesForPush(Push push);
55
56 /**
57 * Service Method to remove <code>PushDeviceTuple<code> associated with a given <code>Push</code>
58 * @param push
59 * @return int Number for tuples removed. -1 if there was a minor error.
60 */
61 int removeTuplesForPush(Push push);
62
63 }