Class KewTypeDefinition.Builder

java.lang.Object
org.kuali.rice.kew.api.repository.type.KewTypeDefinition.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, KewTypeDefinitionContract
Enclosing class:
KewTypeDefinition

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

    • serviceName

      public KewTypeDefinition.Builder serviceName(String serviceName)
    • attributes

      public KewTypeDefinition.Builder attributes(List<KewTypeAttribute.Builder> attributes)
    • create

      public static KewTypeDefinition.Builder create(String id, String name, String namespace)
      Creates a builder from the given parameters.
      Parameters:
      id - the KEW type id
      name - the KEW type name
      namespace - the KEW type namespace
      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 KewTypeDefinition.Builder create(KewTypeDefinitionContract contract)
      Creates a builder by populating it with data from the given KewTypeDefinitionContract.
      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 id)
      Sets the value of the id on this builder to the given value.
      Parameters:
      id - the id value to set, must not be blank
      Throws:
      IllegalArgumentException - if the id is blank
    • setName

      public void setName(String name)
    • setNamespace

      public void setNamespace(String namespace)
    • setServiceName

      public void setServiceName(String serviceName)
    • setAttributes

      public void setAttributes(List<KewTypeAttribute.Builder> attributes)
    • setActive

      public void setActive(boolean active)
    • setVersionNumber

      public void setVersionNumber(Long versionNumber)
    • 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: KewTypeDefinitionContract
      This is the name for the KEWType

      It is a name of a KEW type.

      Specified by:
      getName in interface KewTypeDefinitionContract
      Returns:
      name for KEW type.
    • getNamespace

      public String getNamespace()
      Description copied from interface: KewTypeDefinitionContract
      This is the namespace code.

      It provides scope of the KEW type.

      Specified by:
      getNamespace in interface KewTypeDefinitionContract
      Returns:
      the namespace code of the KEW type.
    • getServiceName

      public String getServiceName()
      Description copied from interface: KewTypeDefinitionContract
      This is the name of the KEW KewType service
      Specified by:
      getServiceName in interface KewTypeDefinitionContract
      Returns:
      the service name of the KEW type
    • getAttributes

      public List<KewTypeAttribute.Builder> getAttributes()
      Description copied from interface: KewTypeDefinitionContract
      This method returns a list of attributes associated with the KewType
      Specified by:
      getAttributes in interface KewTypeDefinitionContract
      Returns:
      a list of KewTypeAttribute objects.
    • 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 KewTypeDefinition build()
      Builds an instance of a KewType based on the current state of the builder.
      Specified by:
      build in interface org.kuali.rice.core.api.mo.ModelBuilder
      Returns:
      the fully-constructed KewType