Class KrmsAttributeDefinition.Builder

java.lang.Object
org.kuali.rice.krms.api.repository.type.KrmsAttributeDefinition.Builder
All Implemented Interfaces:
Serializable, org.kuali.rice.core.api.mo.common.active.Inactivatable, org.kuali.rice.core.api.mo.common.Identifiable, org.kuali.rice.core.api.mo.common.Versioned, org.kuali.rice.core.api.mo.ModelBuilder, KrmsAttributeDefinitionContract
Enclosing class:
KrmsAttributeDefinition

public static class KrmsAttributeDefinition.Builder extends Object implements KrmsAttributeDefinitionContract, org.kuali.rice.core.api.mo.ModelBuilder, Serializable
This builder is used to construct instances of KrmsAttributeDefinition. It enforces the constraints of the KrmsAttributeDefinitionContract.
See Also:
  • Method Details

    • label

      fluent interface that sets the label of the KrmsAttributeDefinition.
      Parameters:
      label - the label used when the attribute is displayed; may be null or blank
      Returns:
      a Builder object with the label attribute set
    • componentName

      public KrmsAttributeDefinition.Builder componentName(String componentName)
      fluent interface that sets the componentName of the KrmsAttributeDefinition.
      Parameters:
      componentName - the name of the component used to display the attribute; can be null or blank
      Returns:
      a Builder object with the componentName set
    • create

      public static KrmsAttributeDefinition.Builder create(String id, String name, String namespace)
      Creates a builder from the given parameters.
      Parameters:
      id - the KrmsAttributeDefinition id
      name - the KrmsAttributeDefinition name
      namespace - the KrmsAttributeDefinition namespace
      Returns:
      an instance of the builder with the fields already populated
      Throws:
      IllegalArgumentException - if either the id, name or namespace is null or blank
    • create

      Creates a builder by populating it with data from the given KrmsAttributeDefinitionContract.
      Parameters:
      contract - the contract from which to populate this builder
      Returns:
      an instance of the builder populated with data from the contract
      Throws:
      IllegalArgumentException - if the contract is null or blank
    • 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 be null or non-blank
      Throws:
      IllegalArgumentException - if the id is non-null and blank
    • setName

      public void setName(String name)
      sets the name of the attribute. must not be null or blank.
      Parameters:
      name - the name of the attribute;
      Throws:
      IllegalArgumentException - if the name is non-null and blank
    • setNamespace

      public void setNamespace(String namespace)
      sets the namespace of the attribute. must not be null or blank.
      Parameters:
      namespace - the namespace of the attribute;
      Throws:
      IllegalArgumentException - if the namespace is non-null and blank
    • setLabel

      public void setLabel(String label)
      sets the label to be displayed with the attribute.
      Parameters:
      label - string to display as label; May be null or empty
    • setDescription

      public void setDescription(String description)
      sets the description of the attribute
      Parameters:
      description - string; Optional, may be null or empty
    • setComponentName

      public void setComponentName(String componentName)
      sets the name of the component used to display the attribute
      Parameters:
      componentName - ; May be null or empty
    • setActive

      public void setActive(boolean active)
      sets the active indicator value
      Parameters:
      active - boolean value to set
    • setVersionNumber

      public void setVersionNumber(Long versionNumber)
      Sets 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.
      Parameters:
      versionNumber - the version number, or null if one has not been assigned yet.
    • getId

      public String getId()
      Specified by:
      getId in interface org.kuali.rice.core.api.mo.common.Identifiable
    • getName

      public String getName()
      Description copied from interface: KrmsAttributeDefinitionContract
      Returns the name of this attribute definition.

      All attribute definitions have a name and namespace, so this value can not be null or blank. The combination of name and namespace must be unique within the entire KRMS system.

      Specified by:
      getName in interface KrmsAttributeDefinitionContract
      Returns:
      name for this attribute definition
    • getNamespace

      public String getNamespace()
      Description copied from interface: KrmsAttributeDefinitionContract
      Returns the namespace of this attribute definition.

      The namespace provides scope of the the attribute definition. All attribute definition have a name and namespace, so this field may not be null or blank. The combination of name and namespace must be unique within the entire KRMS system.

      Specified by:
      getNamespace in interface KrmsAttributeDefinitionContract
      Returns:
      the namespace of this attribute definition
    • getComponentName

      public String getComponentName()
      Description copied from interface: KrmsAttributeDefinitionContract
      Returns the name of the component used to display the attribute.
      Specified by:
      getComponentName in interface KrmsAttributeDefinitionContract
      Returns:
      the component name of the of the attribute
    • getLabel

      public String getLabel()
      Description copied from interface: KrmsAttributeDefinitionContract
      Returns the label of this attribute definition.

      This is an optional field and may be null or blank.

      Specified by:
      getLabel in interface KrmsAttributeDefinitionContract
      Returns:
      the label to be used when displaying the attribute
    • getDescription

      public String getDescription()
      Description copied from interface: KrmsAttributeDefinitionContract
      Returns the description of the attribute.

      This is an option field and may be null or blank.

      Specified by:
      getDescription in interface KrmsAttributeDefinitionContract
      Returns:
      a text description of the attribute
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface org.kuali.rice.core.api.mo.common.active.Inactivatable
    • getVersionNumber

      public Long getVersionNumber()
      Specified by:
      getVersionNumber in interface org.kuali.rice.core.api.mo.common.Versioned
    • build

      public KrmsAttributeDefinition build()
      Builds an instance of a CampusType based on the current state of the builder.
      Specified by:
      build in interface org.kuali.rice.core.api.mo.ModelBuilder
      Returns:
      the fully-constructed CampusType