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.ken.service;
017
018 import java.util.Collection;
019
020 /**
021 * The NotificationRecipientService class is responsible for housing user/group related services.
022 * @author Kuali Rice Team (rice.collab@kuali.org)
023 */
024 public interface NotificationRecipientService {
025 /**
026 * This method handles figuring out which recipient type that you are deling with and calls
027 * the appropriate validation method.
028 * @param recipientId
029 * @param recipientType
030 * @return boolean
031 */
032 public boolean isRecipientValid(String recipientId, String recipientType);
033
034 /**
035 * This service method checks to make sure that the user recipient is a valid user in the system.
036 * @param userRecipientId
037 * @return boolean
038 */
039 public boolean isUserRecipientValid(String userRecipientId);
040
041 /**
042 * This service method checks to make sure that the group recipient is a valid group in the system.
043 * @param groupRecipientId
044 * @return boolean
045 */
046 public boolean isGroupRecipientValid(String groupRecipientId);
047
048 /**
049 * This service method will retrieve all of the user recipients ids that belong to a group.
050 * @param groupRecipientId
051 * @return A String array of user recipient ids that belong to the specified recipient group id.
052 */
053 public String[] getGroupMembers(String groupRecipientId);
054
055
056 /**
057 * This method retrieves the display name for a user.
058 * @param userId
059 * @return String
060 */
061 public String getUserDisplayName(String userId);
062 }