001    /**
002     * Copyright 2005-2012 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     */
016    package org.kuali.rice.kcb.service;
017    
018    import java.util.Collection;
019    
020    import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
021    import org.kuali.rice.kcb.api.service.MessageDelivererRegistryAPI;
022    import org.kuali.rice.kcb.bo.MessageDelivery;
023    import org.kuali.rice.kcb.deliverer.MessageDeliverer;
024    
025    /**
026     * This class is responsible for providing services for Message Deliverers (delivery types)
027     * @author Kuali Rice Team (rice.collab@kuali.org)
028     */
029    public interface MessageDelivererRegistryService extends MessageDelivererRegistryAPI {
030        /**
031         * This service method is responsible for retrieving all MessageDeliverer Types.  
032         * @return Collection of MessageDeliverer objects
033         */
034        Collection<MessageDeliverer> getAllDeliverers();
035    
036        /**
037         * This service method is responsible for retrieving all MessageDeliverer Types names.  
038         * @return Collection of deliverer type names
039         */
040        Collection<String> getAllDelivererTypes();
041    
042        /**
043         * This method returns the associated deliverer class instance for the given MessageDelivery instance.
044         * @param messageDelivery
045         * @return MessageDeliverer or null if not found
046         * @throws RiceIllegalArgumentException if messageDelivery is null
047         */
048        MessageDeliverer getDeliverer(MessageDelivery messageDelivery) throws RiceIllegalArgumentException;
049        
050        /**
051         * This method returns the associated deliverer class instance for the given deliverer name.
052         * @param messageDelivererName
053         * @return MessageDeliverer or null if not found
054         * @throws RiceIllegalArgumentException if messageDelivererName is null
055         */
056        MessageDeliverer getDelivererByName(String messageDelivererName) throws RiceIllegalArgumentException;
057    }