001/**
002 * Copyright 2005-2015 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 */
016package org.kuali.rice.ken.api.service;
017
018import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
019
020import java.util.Collection;
021
022/**
023 * KEN API service internal to Rice, for use by KCB 
024 * 
025 * @author Kuali Rice Team (rice.collab@kuali.org)
026 */
027public interface KENAPIService {
028    /**
029     * Returns names of all channels defined in KEN
030     * @return names of all channels defined in KEN
031     */
032    Collection<String> getAllChannelNames();
033    
034    /**
035     * Returns the names of all deliverers the recipient has configured for a given channel
036     * @return the names of all deliverers the recipient has configured for a given channel
037     * @throws RiceIllegalArgumentException if the recipient,  channel is null or blank.
038     */
039    Collection<String> getDeliverersForRecipientAndChannel(String recipient, String channel) throws RiceIllegalArgumentException;
040
041    /**
042     * Returns the specified recipient preference for the user
043     * @param recipient the recipient
044     * @param prefKey the preference key
045     * @return the specified recipient preference for the user
046     * @throws RiceIllegalArgumentException if the recipient,  prefKey is null or blank
047     */
048    String getRecipientPreference(String recipient, String prefKey) throws RiceIllegalArgumentException;
049}