Class NaturalLanguageTemplate.Builder

java.lang.Object
org.kuali.rice.krms.api.repository.language.NaturalLanguageTemplate.Builder
All Implemented Interfaces:
Serializable, Inactivatable, Identifiable, Versioned, ModelBuilder, NaturalLanguageTemplateContract
Enclosing class:
NaturalLanguageTemplate

public static final class NaturalLanguageTemplate.Builder extends Object implements Serializable, ModelBuilder, NaturalLanguageTemplateContract
A builder which can be used to construct NaturalLanguageTemplate instances. Enforces the constraints of the NaturalLanguageTemplateContract.
See Also:
  • Method Details

    • create

      public static NaturalLanguageTemplate.Builder create(String languageCode, String naturalLanguageUsageId, String template, String typeId)
    • create

    • build

      public NaturalLanguageTemplate build()
      Builds an instance of a NaturalLanguageTemplate based on the current state of the builder.
      Specified by:
      build in interface ModelBuilder
      Returns:
      the fully-constructed NaturalLanguageTemplate.
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface Inactivatable
    • getAttributes

      public Map<String,String> getAttributes()
      Description copied from interface: NaturalLanguageTemplateContract
      This method returns a list of custom/remote attributes associated with the agenda.

      The attributes of the NaturalLanguageUsage

      Specified by:
      getAttributes in interface NaturalLanguageTemplateContract
      Returns:
      a list of custom/remote attribute of the agenda.
    • getId

      public String getId()
      Specified by:
      getId in interface Identifiable
    • getLanguageCode

      public String getLanguageCode()
      Description copied from interface: NaturalLanguageTemplateContract
      This is the Language Code of the NaturalLanguageTemplate

      The Language Code of the NaturalLanguageTemplate

      Specified by:
      getLanguageCode in interface NaturalLanguageTemplateContract
      Returns:
      the Language Code of the NaturalLanguageTemplate
    • getNaturalLanguageUsageId

      public String getNaturalLanguageUsageId()
      Description copied from interface: NaturalLanguageTemplateContract
      This is the NaturalLanguageUsageId of the NaturalLanguageTemplate

      The NaturalLanguageUsageId of the NaturalLanguageTemplate

      Specified by:
      getNaturalLanguageUsageId in interface NaturalLanguageTemplateContract
      Returns:
      the NaturalLanguageUsageId of the NaturalLanguageTemplate
    • getTemplate

      public String getTemplate()
      Description copied from interface: NaturalLanguageTemplateContract
      This is the Template of the NaturalLanguageTemplate

      The Template of the NaturalLanguageTemplate

      Specified by:
      getTemplate in interface NaturalLanguageTemplateContract
      Returns:
      the Template of the NaturalLanguageTemplate
    • getTypeId

      public String getTypeId()
      Description copied from interface: NaturalLanguageTemplateContract
      This is the TypeId of the NaturalLanguageTemplate

      The TypeId of the NaturalLanguageTemplate

      Specified by:
      getTypeId in interface NaturalLanguageTemplateContract
      Returns:
      the TypeId of the NaturalLanguageTemplate
    • getVersionNumber

      public Long getVersionNumber()
      Specified by:
      getVersionNumber in interface Versioned
    • setActive

      public void setActive(boolean active)
      Sets the value of active on this builder to the given value.
      Parameters:
      active - the active value to set.
    • setAttributes

      public void setAttributes(Map<String,String> attributes)
      Sets the Map of attributes as name / value pairs.
      Parameters:
      attributes - a Map of name value String pairs representing the attributes.
    • setId

      public void setId(String id)
      Sets the value of id on this builder to the given value.
      Parameters:
      id - the id value to set., may be null, representing the Object has not been persisted, but must not be blank.
      Throws:
      IllegalArgumentException - if the id is blank
    • setLanguageCode

      public void setLanguageCode(String languageCode)
      Sets the value of languageCode on this builder to the given value.
      Parameters:
      languageCode - the languageCode value to set., must not be null or blank
      Throws:
      IllegalArgumentException - if the languageCode is null or blank
    • setNaturalLanguageUsageId

      public void setNaturalLanguageUsageId(String naturalLanguageUsageId)
      Sets the value of naturalLanguageUsageId on this builder to the given value.
      Parameters:
      naturalLanguageUsageId - the naturalLanguageUsageId value to set., must not be null or blank
      Throws:
      IllegalArgumentException - if the naturalLanguageUsageId is null or blank
    • setTemplate

      public void setTemplate(String template)
      Sets the value of template on this builder to the given value.
      Parameters:
      template - the template value to set., must not be null or blank
      Throws:
      IllegalArgumentException - if the template is null or blank
    • setTypeId

      public void setTypeId(String typeId)
      Sets the value of typeId on this builder to the given value.
      Parameters:
      typeId - the typeId value to set., must not be null or blank
      Throws:
      IllegalArgumentException - if the typeId is null or blank
    • setVersionNumber

      public void setVersionNumber(Long versionNumber)
      Sets the value of versionNumber on this builder to the given value.
      Parameters:
      versionNumber - the versionNumber value to set.