1 /** 2 * Copyright 2005-2011 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.kew.api.peopleflow; 17 18 import org.kuali.rice.core.api.mo.common.Identifiable; 19 import org.kuali.rice.core.api.mo.common.Versioned; 20 import org.kuali.rice.core.api.mo.common.active.Inactivatable; 21 22 import java.util.List; 23 import java.util.Map; 24 25 /** 26 * Contract interface for a PeopleFlowDefinition. A PeopleFlowDefinition is simply a collections of members and their (optional) delegates. 27 * Each member of a PeopleFlowDefinition has a priority number assigned to it, which indicates the order in which members should 28 * be processed during execution of the flow. 29 * 30 * <p>Priority is ordered by the lowest priority number being the "beginning" of the flow. It is possible for one or 31 * more members to have the same priority number, in which case they should be processed in parallel.</p> 32 * 33 * <p>Members of a flow can be one of either a principal, group, or role which is defined by the 34 * {@link PeopleFlowMemberContract}.</p> 35 * 36 * @author Kuali Rice Team (rice.collab@kuali.org) 37 */ 38 public interface PeopleFlowContract extends Identifiable, Inactivatable, Versioned { 39 40 /** 41 * @return the name for this {@link PeopleFlowContract}. Will never be null. 42 */ 43 String getName(); 44 45 /** 46 * @return the namespace for this {@link PeopleFlowContract}. Will never be null. 47 */ 48 String getNamespaceCode(); 49 50 /** 51 * @return the type id for this {@link PeopleFlowContract}. Will never be null. 52 */ 53 String getTypeId(); 54 55 /** 56 * @return the name for this {@link PeopleFlowContract}. May be null, but not empty. 57 */ 58 String getDescription(); 59 60 /** 61 * Returns the list of members for this flow, sorted from lowest to highest priority number. 62 * 63 * @return the {@link PeopleFlowMemberContract}s for this {@link PeopleFlowContract}. Will never return null. 64 */ 65 List<? extends PeopleFlowMemberContract> getMembers(); 66 67 /** 68 * @return the attributes for this {@link PeopleFlowContract}. Will never return null. 69 */ 70 Map<String, String> getAttributes(); 71 72 }