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.kew.api.peopleflow;
017
018 import org.kuali.rice.core.api.membership.MemberType;
019 import org.kuali.rice.kew.api.action.ActionRequestPolicy;
020
021 import java.util.List;
022
023 /**
024 * Interface contract for PeopleFlowDefinition members.
025 *
026 * @author Kuali Rice Team (rice.collab@kuali.org)
027 */
028 public interface PeopleFlowMemberContract {
029
030 /**
031 * @return the id of the member. This will key in to different types depending on the {@link MemberType} of the
032 * instance.
033 */
034 String getMemberId();
035
036 /**
037 * @return the {@link MemberType} of this member. Never null.
038 */
039 MemberType getMemberType();
040
041 /**
042 * Returns the action request policy to use for this people flow member. This value is only applicable in the
043 * case where the {@code MemberType} is {@code ROLE}. If the member type is anything else, this value will not
044 * be considered and should ideally be set to null
045 *
046 * @return the action request policy to use for this people flow member if it is a role member, null if this
047 * member has no request policy
048 */
049 ActionRequestPolicy getActionRequestPolicy();
050
051 /**
052 * @return the priority of the member. This is equivalent to the sequential stop in the PeopleFlowDefinition, which means
053 * lower integer value equates to higher priority. The minimum priority is 1.
054 */
055 int getPriority();
056
057 /**
058 * Returns the responsibility id of this member. This is a unique id which KEW can use to help identify and track
059 * the responsibility represented by this people flow member. It will be associated with any action requests that
060 * are generated from this people flow membership.
061 *
062 * @return the responsibility id for this people flow membership
063 */
064 String getResponsibilityId();
065
066 /**
067 * @return the list of delegates for this member. Should never be null but may be an empty list in the case where
068 * this member has no delegates
069 */
070 List<? extends PeopleFlowDelegateContract> getDelegates();
071
072 }