View Javadoc

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  
22  /**
23   * The MessageService class is responsible various functions regarding the 
24   * Message records that exist within the system.
25   *
26   * @author Kuali Rice Team (rice.collab@kuali.org)
27   */
28  public interface MessageService {
29      /**
30       * Saves a message
31       * @param message a Message
32       */
33      public void saveMessage(Message message);
34      
35      /**
36       * Deletes a message
37       * @param message a Message
38       */
39      public void deleteMessage(Message message);
40  
41      /**
42       * Finds a message by id
43       * @param id the message id
44       * @return the message object if found
45       */
46      public Message getMessage(Long id);
47      
48      /**
49       * Finds a message by origin id
50       * @param id the origin message id
51       * @return the message object if found
52       */
53      public Message getMessageByOriginId(String originId);
54  
55      /**
56       * Returns all messages in the system
57       * @return all messages in the system
58       */
59      public Collection<Message> getAllMessages();
60  }