org.kuali.rice.krms.api.repository
Class RuleAttribute.Builder

java.lang.Object
  extended by org.kuali.rice.krms.api.repository.RuleAttribute.Builder
All Implemented Interfaces:
Serializable, org.kuali.rice.core.api.mo.ModelBuilder, RuleAttributeContract
Enclosing class:
RuleAttribute

public static class RuleAttribute.Builder
extends Object
implements RuleAttributeContract, org.kuali.rice.core.api.mo.ModelBuilder, Serializable

This builder is used to construct instances of RuleAttribute.

See Also:
Serialized Form

Method Summary
 RuleAttribute.Builder attributeDefinition(KrmsAttributeDefinition.Builder attributeDefinition)
           
 RuleAttribute build()
          Builds an instance of a RuleAttribute based on the current state of the builder.
static RuleAttribute.Builder create(RuleAttributeContract contract)
           
static RuleAttribute.Builder create(String id, String ruleId, String attributeDefinitionId, String value)
          Creates a builder from the given parameters.
 KrmsAttributeDefinition.Builder getAttributeDefinition()
          This is the definition of the attribute
 String getAttributeDefinitionId()
          This is the id of the definition of the attribute.
 String getId()
          This is the ID for the RuleAttribute
 String getRuleId()
          This is the id of the Rule to which the attribute applies
 String getValue()
          This is the value of the attribute
 void setAttributeDefinition(KrmsAttributeDefinition.Builder attributeDefinition)
           
 void setAttributeDefinitionId(String attributeDefinitionId)
           
 void setId(String id)
          Sets the value of the id on this builder to the given value.
 void setRuleId(String ruleId)
           
 void setValue(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

attributeDefinition

public RuleAttribute.Builder attributeDefinition(KrmsAttributeDefinition.Builder attributeDefinition)

create

public static RuleAttribute.Builder create(String id,
                                           String ruleId,
                                           String attributeDefinitionId,
                                           String value)
Creates a builder from the given parameters.

Parameters:
id - the RuleAtribute id
ruleId - the Rule Id
attributeDefinitionId - The attributeDefinitionId
value -
Returns:
an instance of the builder with the fields already populated
Throws:
IllegalArgumentException - if the either the id, name or namespace is null or blank

create

public static RuleAttribute.Builder create(RuleAttributeContract contract)

setId

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

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

setRuleId

public void setRuleId(String ruleId)

setAttributeDefinitionId

public void setAttributeDefinitionId(String attributeDefinitionId)

setValue

public void setValue(String value)

setAttributeDefinition

public void setAttributeDefinition(KrmsAttributeDefinition.Builder attributeDefinition)

getId

public String getId()
Description copied from interface: RuleAttributeContract
This is the ID for the RuleAttribute

It is a ID of a RuleAttribute

Specified by:
getId in interface RuleAttributeContract
Returns:
ID for RuleAttribute

getRuleId

public String getRuleId()
Description copied from interface: RuleAttributeContract
This is the id of the Rule to which the attribute applies

It is a id of a Rule related to the attribute.

Specified by:
getRuleId in interface RuleAttributeContract
Returns:
id for Rule related to the attribute.

getAttributeDefinitionId

public String getAttributeDefinitionId()
Description copied from interface: RuleAttributeContract
This is the id of the definition of the attribute.

It identifies the attribute definition

Specified by:
getAttributeDefinitionId in interface RuleAttributeContract
Returns:
the attribute definition id.

getValue

public String getValue()
Description copied from interface: RuleAttributeContract
This is the value of the attribute

Specified by:
getValue in interface RuleAttributeContract
Returns:
the value of the AAttribute

getAttributeDefinition

public KrmsAttributeDefinition.Builder getAttributeDefinition()
Description copied from interface: RuleAttributeContract
This is the definition of the attribute

Specified by:
getAttributeDefinition in interface RuleAttributeContract

build

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

Specified by:
build in interface org.kuali.rice.core.api.mo.ModelBuilder
Returns:
the fully-constructed RuleAttribute


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