Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2013 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.opensource.org/licenses/ecl2.php Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.kuali.rice.ken.service.impl;
 
 
KEN API service implementation

Author(s):
Kuali Rice Team (rice.collab@kuali.org)
 
 public class KENAPIServiceImpl implements KENAPIService {
     private UserPreferenceService prefsService;

    
Sets the NotificationChannelService

Parameters:
ncs the NotificationChannelService
 
     @Required
         this. = ncs;
     }

    
Sets the UserPreferenceService

Parameters:
ups the UserPreferenceService
 
     @Required
     public void setUserPreferenceService(UserPreferenceService ups) {
         this. = ups;
     }

    

See also:
org.kuali.rice.ken.service.KENAPIService#getAllChannels()
 
     @Override
     public Collection<StringgetAllChannelNames() {
         Collection<StringchanNames = new ArrayList<String>(chans.size());
         for (NotificationChannelBo cchans) {
             chanNames.add(c.getName());
         }
         return chanNames;
     }

    

See also:
org.kuali.rice.ken.service.KENAPIService#getDeliverersForRecipientAndChannel(java.lang.String , java.lang.String )
 
     @Override
     public Collection<StringgetDeliverersForRecipientAndChannel(String recipientString channel) {
         if (StringUtils.isBlank(recipient)) {
             throw new RiceIllegalArgumentException("recipient is null or blank");
         }
 
         if (StringUtils.isBlank(channel)) {
             throw new RiceIllegalArgumentException("channel is null or blank");
         }
 
         /*NotificationChannel nc = channelService.getNotificationChannelByName(channel);
         if (nc == null) {
             throw new RiceIllegalArgumentException("Invalid channel: '" + channel + "'");
         }
         Collection<UserDelivererConfig> configs = prefsService.getMessageDelivererConfigurationsForUserAndChannel(recipient, nc);
         Collection<String> deliverers = new ArrayList<String>(configs.size());
         for (UserDelivererConfig cfg: configs) {
             deliverers.add(cfg.getDelivererName());
         }
         return deliverers;*/
         return null;
     }

    

See also:
org.kuali.rice.ken.service.KENAPIService#getRecipientPreference(java.lang.String , java.lang.String )
 
     @Override
     public String getRecipientPreference(String recipientString prefKey) {
        if (StringUtils.isBlank(recipient)) {
            throw new RiceIllegalArgumentException("recipient is null or blank");
        }
        if (StringUtils.isBlank(prefKey)) {
            throw new RiceIllegalArgumentException("prefKey is null or blank");
        }
        /*RecipientPreference rp = prefsService.getUserRecipientPreferences(recipient, prefKey);
        if (rp == null) return null;
        return rp.getValue();
        */
        return null;
    }
New to GrepCode? Check out our FAQ X