001 /**
002 * Copyright 2005-2012 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.rice.kcb.service;
017
018 import java.util.Collection;
019
020 import org.kuali.rice.kcb.bo.Message;
021
022 /**
023 * The MessageService class is responsible various functions regarding the
024 * Message records that exist within the system.
025 *
026 * @author Kuali Rice Team (rice.collab@kuali.org)
027 */
028 public interface MessageService {
029 /**
030 * Saves a message
031 * @param message a Message
032 */
033 public void saveMessage(Message message);
034
035 /**
036 * Deletes a message
037 * @param message a Message
038 */
039 public void deleteMessage(Message message);
040
041 /**
042 * Finds a message by id
043 * @param id the message id
044 * @return the message object if found
045 */
046 public Message getMessage(Long id);
047
048 /**
049 * Finds a message by origin id
050 * @param id the origin message id
051 * @return the message object if found
052 */
053 public Message getMessageByOriginId(String originId);
054
055 /**
056 * Returns all messages in the system
057 * @return all messages in the system
058 */
059 public Collection<Message> getAllMessages();
060 }