| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| RecipientPreferenceService |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2007-2008 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 | import java.util.HashMap; | |
| 20 | ||
| 21 | import org.kuali.rice.kcb.bo.RecipientDelivererConfig; | |
| 22 | import org.kuali.rice.kcb.bo.RecipientPreference; | |
| 23 | import org.kuali.rice.kcb.deliverer.MessageDeliverer; | |
| 24 | import org.kuali.rice.kcb.exception.ErrorList; | |
| 25 | ||
| 26 | /** | |
| 27 | * Service for accessing user preferences in the KEN system.{@link UserPreference} | |
| 28 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 29 | */ | |
| 30 | public interface RecipientPreferenceService { | |
| 31 | /** | |
| 32 | * This method will get all user recipient preference from the system. | |
| 33 | * @param recipientId | |
| 34 | */ | |
| 35 | public HashMap<String, String> getRecipientPreferences(String recipientId); | |
| 36 | ||
| 37 | /** | |
| 38 | * This method will save a user recipient preference in the system. | |
| 39 | * @param userid | |
| 40 | * @param prefs a hashmap of key/values | |
| 41 | * @param deliveryTypeName name of deliverer | |
| 42 | */ | |
| 43 | public void saveRecipientPreferences(String userid, HashMap<String, String> prefs, MessageDeliverer deliverer) throws ErrorList; | |
| 44 | ||
| 45 | /** | |
| 46 | * This method will get a specific user recipient preference from the system. | |
| 47 | * @param recipientId | |
| 48 | * @param key | |
| 49 | */ | |
| 50 | public RecipientPreference getRecipientPreference(String recipientId, String key); | |
| 51 | ||
| 52 | /** | |
| 53 | * This method will save a specific user recipient preference in the system. | |
| 54 | * @param pref the preference | |
| 55 | */ | |
| 56 | public void saveRecipientPreference(RecipientPreference pref); | |
| 57 | ||
| 58 | /** | |
| 59 | * This method will delete a specific user recipient preference from the system. | |
| 60 | * @param pref the preference | |
| 61 | */ | |
| 62 | public void deleteRecipientPreference(RecipientPreference pref); | |
| 63 | ||
| 64 | // deliverer configuration | |
| 65 | ||
| 66 | /** | |
| 67 | * This method will remove all user deliverer configuration preference in the system. | |
| 68 | * @param recipientId the recipient id | |
| 69 | */ | |
| 70 | public void removeRecipientDelivererConfigs(String recipientId); | |
| 71 | ||
| 72 | /** | |
| 73 | * This method will save a user deliverer configuration preference in the system. | |
| 74 | * @param recipientId the recipient id | |
| 75 | * @param delivererName the deliverer name | |
| 76 | * @param channels the channels for which to enable the deliverer | |
| 77 | */ | |
| 78 | public void saveRecipientDelivererConfig(String recipientId, String delivererName, String[] channels); | |
| 79 | ||
| 80 | /** | |
| 81 | * This method will retrieve all of the message deliverer configurations for a given user, associated with a | |
| 82 | * particular channel. | |
| 83 | * @param recipientId | |
| 84 | * @param channel | |
| 85 | */ | |
| 86 | public Collection<RecipientDelivererConfig> getDeliverersForRecipientAndChannel(String recipientId, String channel); | |
| 87 | ||
| 88 | /** | |
| 89 | * This method will retrieve all of the message deliverer configurations for a given user | |
| 90 | * @param recipientId | |
| 91 | */ | |
| 92 | public Collection<RecipientDelivererConfig> getDeliverersForRecipient(String recipientId); | |
| 93 | } |