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

java.lang.Object
  extended by org.kuali.rice.kew.api.peopleflow.PeopleFlowDefinition.Builder
All Implemented Interfaces:
Serializable, Inactivatable, Identifiable, Versioned, ModelBuilder, PeopleFlowContract
Enclosing class:
PeopleFlowDefinition

public static final class PeopleFlowDefinition.Builder
extends Object
implements Serializable, ModelBuilder, PeopleFlowContract

A builder which can be used to construct PeopleFlowDefinition instances. Enforces the constraints of the PeopleFlowContract.

See Also:
Serialized Form

Method Summary
 PeopleFlowMember.Builder addGroup(String groupId)
           
 PeopleFlowMember.Builder addPrincipal(String principalId)
           
 PeopleFlowMember.Builder addRole(String roleId)
           
 PeopleFlowDefinition build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static PeopleFlowDefinition.Builder create(PeopleFlowContract contract)
           
static PeopleFlowDefinition.Builder create(String namespaceCode, String name)
           
 Map<String,String> getAttributes()
           
 String getDescription()
           
 String getId()
          The unique identifier for an object.
 List<PeopleFlowMember.Builder> getMembers()
          Returns the list of members for this flow, sorted from lowest to highest priority number.
 String getName()
           
 String getNamespaceCode()
           
 String getTypeId()
           
 Long getVersionNumber()
          Returns the version number for this object.
 boolean isActive()
          The active indicator for an object.
 void setActive(boolean active)
           
 void setAttributes(Map<String,String> attributes)
           
 void setDescription(String description)
           
 void setId(String id)
           
 void setMembers(List<PeopleFlowMember.Builder> members)
           
 void setName(String name)
           
 void setNamespaceCode(String namespaceCode)
           
 void setTypeId(String typeId)
           
 void setVersionNumber(Long versionNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static PeopleFlowDefinition.Builder create(String namespaceCode,
                                                  String name)

create

public static PeopleFlowDefinition.Builder create(PeopleFlowContract contract)

build

public PeopleFlowDefinition 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

getName

public String getName()
Specified by:
getName in interface PeopleFlowContract
Returns:
the name for this PeopleFlowContract. Will never be null.

getAttributes

public Map<String,String> getAttributes()
Specified by:
getAttributes in interface PeopleFlowContract
Returns:
the attributes for this PeopleFlowContract. Will never return null.

getNamespaceCode

public String getNamespaceCode()
Specified by:
getNamespaceCode in interface PeopleFlowContract
Returns:
the namespace for this PeopleFlowContract. Will never be null.

getTypeId

public String getTypeId()
Specified by:
getTypeId in interface PeopleFlowContract
Returns:
the type id for this PeopleFlowContract. Will never be null.

getDescription

public String getDescription()
Specified by:
getDescription in interface PeopleFlowContract
Returns:
the name for this PeopleFlowContract. May be null, but not empty.

getMembers

public List<PeopleFlowMember.Builder> getMembers()
Description copied from interface: PeopleFlowContract
Returns the list of members for this flow, sorted from lowest to highest priority number.

Specified by:
getMembers in interface PeopleFlowContract
Returns:
the PeopleFlowMemberContracts for this PeopleFlowContract. Will never return null.

getId

public String getId()
Description copied from interface: Identifiable
The unique identifier for an object. This can be null.

Specified by:
getId in interface Identifiable
Returns:
the id

isActive

public boolean isActive()
Description copied from interface: Inactivatable
The active indicator for an object.

Specified by:
isActive in interface Inactivatable
Returns:
true if active false if not.

getVersionNumber

public Long getVersionNumber()
Description copied from interface: Versioned
Returns the version number for this object. In general, this value should only be null if the object has not yet been stored to a persistent data store. This version number is generally used for the purposes of optimistic locking.

Specified by:
getVersionNumber in interface Versioned
Returns:
the version number, or null if one has not been assigned yet

setName

public void setName(String name)

setAttributes

public void setAttributes(Map<String,String> attributes)

setNamespaceCode

public void setNamespaceCode(String namespaceCode)

setTypeId

public void setTypeId(String typeId)

setDescription

public void setDescription(String description)

setMembers

public void setMembers(List<PeopleFlowMember.Builder> members)

setId

public void setId(String id)

setActive

public void setActive(boolean active)

setVersionNumber

public void setVersionNumber(Long versionNumber)

addPrincipal

public PeopleFlowMember.Builder addPrincipal(String principalId)

addGroup

public PeopleFlowMember.Builder addGroup(String groupId)

addRole

public PeopleFlowMember.Builder addRole(String roleId)


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