org.kuali.rice.kew.api.peopleflow
Class PeopleFlowMember.Builder

java.lang.Object
  extended by org.kuali.rice.kew.api.peopleflow.PeopleFlowMember.Builder
All Implemented Interfaces:
Serializable, ModelBuilder, PeopleFlowMemberContract
Enclosing class:
PeopleFlowMember

public static final class PeopleFlowMember.Builder
extends Object
implements Serializable, ModelBuilder, PeopleFlowMemberContract

A builder which can be used to construct PeopleFlowMember instances. Enforces the constraints of the PeopleFlowMemberContract.

See Also:
Serialized Form

Method Summary
 PeopleFlowMember build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static PeopleFlowMember.Builder create(PeopleFlowMemberContract contract)
           
static PeopleFlowMember.Builder create(String memberId, MemberType memberType)
           
 ActionRequestPolicy getActionRequestPolicy()
          Returns the action request policy to use for this people flow member.
 List<PeopleFlowDelegate.Builder> getDelegates()
           
 String getMemberId()
           
 MemberType getMemberType()
           
 int getPriority()
           
 String getResponsibilityId()
          Returns the responsibility id of this member.
 void setActionRequestPolicy(ActionRequestPolicy actionRequestPolicy)
           
 void setDelegates(List<PeopleFlowDelegate.Builder> delegates)
           
 void setMemberId(String memberId)
           
 void setMemberType(MemberType memberType)
           
 void setPriority(int priority)
           
 void setResponsibilityId(String responsibilityId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static PeopleFlowMember.Builder create(String memberId,
                                              MemberType memberType)

create

public static PeopleFlowMember.Builder create(PeopleFlowMemberContract contract)

build

public PeopleFlowMember build()
Description copied from interface: ModelBuilder
Returns an instance of the object being built by this builder based on the current state of the builder. It should be possible to invoke this method more than once on the same builder. It should never return null;

Specified by:
build in interface ModelBuilder
Returns:
an instance of the object being built by this builder, should never return null

getMemberId

public String getMemberId()
Specified by:
getMemberId in interface PeopleFlowMemberContract
Returns:
the id of the member. This will key in to different types depending on the MemberType of the instance.

getMemberType

public MemberType getMemberType()
Specified by:
getMemberType in interface PeopleFlowMemberContract
Returns:
the MemberType of this member. Never null.

getActionRequestPolicy

public ActionRequestPolicy getActionRequestPolicy()
Description copied from interface: PeopleFlowMemberContract
Returns the action request policy to use for this people flow member. This value is only applicable in the case where the MemberType is ROLE. If the member type is anything else, this value will not be considered and should ideally be set to null

Specified by:
getActionRequestPolicy in interface PeopleFlowMemberContract
Returns:
the action request policy to use for this people flow member if it is a role member, null if this member has no request policy

getResponsibilityId

public String getResponsibilityId()
Description copied from interface: PeopleFlowMemberContract
Returns the responsibility id of this member. This is a unique id which KEW can use to help identify and track the responsibility represented by this people flow member. It will be associated with any action requests that are generated from this people flow membership.

Specified by:
getResponsibilityId in interface PeopleFlowMemberContract
Returns:
the responsibility id for this people flow membership

getPriority

public int getPriority()
Specified by:
getPriority in interface PeopleFlowMemberContract
Returns:
the priority of the member. This is equivalent to the sequential stop in the PeopleFlowDefinition, which means lower integer value equates to higher priority. The minimum priority is 1.

getDelegates

public List<PeopleFlowDelegate.Builder> getDelegates()
Specified by:
getDelegates in interface PeopleFlowMemberContract
Returns:
the list of delegates for this member. Should never be null but may be an empty list in the case where this member has no delegates

setMemberId

public void setMemberId(String memberId)

setMemberType

public void setMemberType(MemberType memberType)

setActionRequestPolicy

public void setActionRequestPolicy(ActionRequestPolicy actionRequestPolicy)

setResponsibilityId

public void setResponsibilityId(String responsibilityId)

setPriority

public void setPriority(int priority)

setDelegates

public void setDelegates(List<PeopleFlowDelegate.Builder> delegates)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.