org.kuali.rice.krms.api.repository.action
Class ActionDefinition.Builder

java.lang.Object
  extended by org.kuali.rice.krms.api.repository.action.ActionDefinition.Builder
All Implemented Interfaces:
Serializable, Identifiable, Versioned, ModelBuilder, ActionDefinitionContract
Enclosing class:
ActionDefinition

public static class ActionDefinition.Builder
extends Object
implements ActionDefinitionContract, ModelBuilder, Serializable

This builder is used to construct instances of KRMS Repository Action. It enforces the constraints of the ActionDefinitionContract.

See Also:
Serialized Form

Method Summary
 ActionDefinition build()
          Builds an instance of a Action based on the current state of the builder.
static ActionDefinition.Builder create(ActionDefinitionContract contract)
          Creates a builder by populating it with data from the given ActionDefinitionContract.
static ActionDefinition.Builder create(String actionId, String name, String namespace, String typeId, String ruleId, Integer sequenceNumber)
           
 Map<String,String> getAttributes()
          This method returns a set of attributes associated with the Action.
 String getDescription()
          This is the description for what the parameter is used for.
 String getId()
          The unique identifier for an object.
 String getName()
          This is the name of the Action
 String getNamespace()
          This is the namespace of the Action
 String getRuleId()
          This method returns the id of the rule associated with the action
 Integer getSequenceNumber()
          This method returns the id of the rule associated with the action
 String getTypeId()
          This is the KrmsType of the Action
 Long getVersionNumber()
          Returns the version number for this object.
 void setAttributes(Map<String,String> attributes)
           
 void setDescription(String desc)
           
 void setId(String actionId)
          Sets the value of the id on this builder to the given value.
 void setName(String name)
           
 void setNamespace(String namespace)
           
 void setRuleId(String ruleId)
           
 void setSequenceNumber(Integer sequenceNumber)
           
 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 ActionDefinition.Builder create(String actionId,
                                              String name,
                                              String namespace,
                                              String typeId,
                                              String ruleId,
                                              Integer sequenceNumber)

create

public static ActionDefinition.Builder create(ActionDefinitionContract contract)
Creates a builder by populating it with data from the given ActionDefinitionContract.

Parameters:
contract - the contract from which to populate this builder
Returns:
an instance of the builder populated with data from the contract

setId

public void setId(String actionId)
Sets the value of the id on this builder to the given value.

Parameters:
id - the id value to set, must be null or non-blank
Throws:
IllegalArgumentException - if the id is non-null and blank

setName

public void setName(String name)

setNamespace

public void setNamespace(String namespace)

setDescription

public void setDescription(String desc)

setTypeId

public void setTypeId(String typeId)

setRuleId

public void setRuleId(String ruleId)

setSequenceNumber

public void setSequenceNumber(Integer sequenceNumber)

setAttributes

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

setVersionNumber

public void setVersionNumber(Long versionNumber)

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

getName

public String getName()
Description copied from interface: ActionDefinitionContract
This is the name of the Action

name - the name of the Action

Specified by:
getName in interface ActionDefinitionContract
Returns:
the name of the Action

getNamespace

public String getNamespace()
Description copied from interface: ActionDefinitionContract
This is the namespace of the Action

The namespace of the Action

Specified by:
getNamespace in interface ActionDefinitionContract
Returns:
the namespace of the Action

getDescription

public String getDescription()
Description copied from interface: ActionDefinitionContract
This is the description for what the parameter is used for. This can be null or a blank string.

Specified by:
getDescription in interface ActionDefinitionContract
Returns:
description

getTypeId

public String getTypeId()
Description copied from interface: ActionDefinitionContract
This is the KrmsType of the Action

Specified by:
getTypeId in interface ActionDefinitionContract
Returns:
id for KRMS type related of the Action

getRuleId

public String getRuleId()
Description copied from interface: ActionDefinitionContract
This method returns the id of the rule associated with the action

Specified by:
getRuleId in interface ActionDefinitionContract
Returns:
id for the Rule associated with the action.

getSequenceNumber

public Integer getSequenceNumber()
Description copied from interface: ActionDefinitionContract
This method returns the id of the rule associated with the action

Specified by:
getSequenceNumber in interface ActionDefinitionContract
Returns:
id for the Rule associated with the action.

getAttributes

public Map<String,String> getAttributes()
Description copied from interface: ActionDefinitionContract
This method returns a set of attributes associated with the Action. The attributes are represented as name/value pairs.

Specified by:
getAttributes in interface ActionDefinitionContract
Returns:
a set of ActionAttribute objects.

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

build

public ActionDefinition build()
Builds an instance of a Action based on the current state of the builder.

Specified by:
build in interface ModelBuilder
Returns:
the fully-constructed Action


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