View Javadoc

1   /*
2    * Copyright 2007 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.service;
17  
18  import java.util.Collection;
19  
20  /**
21   * The NotificationRecipientService class is responsible for housing user/group related services.
22   * @author Kuali Rice Team (rice.collab@kuali.org)
23   */
24  public interface NotificationRecipientService {
25      /**
26       * This method handles figuring out which recipient type that you are deling with and calls
27       * the appropriate validation method.
28       * @param recipientId
29       * @param recipientType
30       * @return boolean
31       */
32      public boolean isRecipientValid(String recipientId, String recipientType);
33  
34      /**
35       * This service method checks to make sure that the user recipient is a valid user in the system.
36       * @param userRecipientId
37       * @return boolean
38       */
39      public boolean isUserRecipientValid(String userRecipientId);
40  
41      /**
42       * This service method checks to make sure that the group recipient is a valid group in the system.
43       * @param groupRecipientId
44       * @return boolean
45       */
46      public boolean isGroupRecipientValid(String groupRecipientId);
47  
48      /**
49       * This service method will retrieve all of the user recipients ids that belong to a group.
50       * @param groupRecipientId
51       * @return A String array of user recipient ids that belong to the specified recipient group id.
52       */
53      public String[] getGroupMembers(String groupRecipientId);
54  
55  
56      /**
57       * This method retrieves the display name for a user.
58       * @param userId
59       * @return String
60       */
61      public String getUserDisplayName(String userId);
62  }