001/**
002 * Copyright 2005-2018 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.krad.service;
017
018import java.util.List;
019
020import org.kuali.rice.krad.bo.AdHocRoutePerson;
021import org.kuali.rice.krad.bo.AdHocRouteRecipient;
022import org.kuali.rice.krad.bo.AdHocRouteWorkgroup;
023import org.kuali.rice.krad.document.Document;
024
025/**
026 * This service populates {@link Document}s with {@link AdHocRoutePerson}s and {@link AdHocRouteWorkgroup}s
027 *
028 * @author Kuali Rice Team (rice.collab@kuali.org)
029 */
030public interface DocumentAdHocService {
031
032        /**
033         * This method populates the given {@link Document} with the {@link AdHocRoutePerson}s and {@link AdHocRouteWorkgroup}s
034         * that are associated with it.
035         *
036         * @param doc
037         */
038        void addAdHocs(Document doc);
039
040        /**
041         * This method replaces the current ad-hoc recipients for a given document with the provided list.
042         *
043         * @param documentNumber Document Number to which to attach the route log recipients.  All existing stored ad-hoc recipients will be deleted.
044         * @param adHocRoutingRecipients New list of ad-hoc recipients (Persons and Workgroups) which will be attached to the document.
045         */
046        void replaceAdHocsForDocument( String documentNumber, List<AdHocRouteRecipient> adHocRoutingRecipients );
047}