View Javadoc

1   /**
2    * Copyright 2005-2013 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  import org.kuali.rice.ken.bo.UserChannelSubscriptionBo;
21  
22  /**
23   * Service for accessing user preferences in the KEN system.{@link UserPreference}
24   * @author Kuali Rice Team (rice.collab@kuali.org)
25   */
26  public interface UserPreferenceService {
27      /**
28       * This method retrieves all of the current channel subscriptions for a user.
29       * @param userid
30       * @return Collection
31       */
32      public Collection<UserChannelSubscriptionBo> getCurrentSubscriptions(String userid);
33      
34      /**
35       * This method retrieves the UserChannelSubscription instance given the two unique keys that are 
36       * passed in.
37       * @param channelid
38       * @param userid
39       * @return UserChannelSubscription
40       */
41      public UserChannelSubscriptionBo getSubscription(String channelid, String userid);
42  
43      /**
44       * This method will add a channel subscription into the system.
45       * @param userChannelSubscription
46       */
47      public void subscribeToChannel(UserChannelSubscriptionBo userChannelSubscription);
48  
49      /**
50       * This method will remove a channel subscription from the system.
51       * @param userChannelSubscription
52       */
53      public void unsubscribeFromChannel(UserChannelSubscriptionBo userChannelSubscription);
54  }