Interface TypeDraft

All Superinterfaces:
Draft<TypeDraft>, WithKey

public interface TypeDraft extends WithKey, Draft<TypeDraft>
TypeDraft
Example to create an instance using the builder pattern

     TypeDraft typeDraft = TypeDraft.builder()
             .key("{key}")
             .name(nameBuilder -> nameBuilder)
             .plusResourceTypeIds(resourceTypeIdsBuilder -> resourceTypeIdsBuilder)
             .build()
 
  • Method Details

    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier for the Type.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getName

      @NotNull @Valid @NotNull @Valid LocalizedString getName()

      Name of the Type.

      Returns:
      name
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Description of the Type.

      Returns:
      description
    • getResourceTypeIds

      @NotNull @NotNull List<ResourceTypeId> getResourceTypeIds()

      Resources and/or data types for which the Type is defined.

      Returns:
      resourceTypeIds
    • getFieldDefinitions

      @Valid @Valid List<FieldDefinition> getFieldDefinitions()

      Defines Custom Fields.

      Returns:
      fieldDefinitions
    • setKey

      void setKey(String key)

      User-defined unique identifier for the Type.

      Parameters:
      key - value to be set
    • setName

      void setName(LocalizedString name)

      Name of the Type.

      Parameters:
      name - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Description of the Type.

      Parameters:
      description - value to be set
    • setResourceTypeIds

      void setResourceTypeIds(ResourceTypeId... resourceTypeIds)

      Resources and/or data types for which the Type is defined.

      Parameters:
      resourceTypeIds - values to be set
    • setResourceTypeIds

      void setResourceTypeIds(List<ResourceTypeId> resourceTypeIds)

      Resources and/or data types for which the Type is defined.

      Parameters:
      resourceTypeIds - values to be set
    • setFieldDefinitions

      void setFieldDefinitions(FieldDefinition... fieldDefinitions)

      Defines Custom Fields.

      Parameters:
      fieldDefinitions - values to be set
    • setFieldDefinitions

      void setFieldDefinitions(List<FieldDefinition> fieldDefinitions)

      Defines Custom Fields.

      Parameters:
      fieldDefinitions - values to be set
    • of

      static TypeDraft of()
      factory method
      Returns:
      instance of TypeDraft
    • of

      static TypeDraft of(TypeDraft template)
      factory method to create a shallow copy TypeDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static TypeDraft deepCopy(@Nullable TypeDraft template)
      factory method to create a deep copy of TypeDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static TypeDraftBuilder builder()
      builder factory method for TypeDraft
      Returns:
      builder
    • builder

      static TypeDraftBuilder builder(TypeDraft template)
      create builder for TypeDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withTypeDraft

      default <T> T withTypeDraft(Function<TypeDraft,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<TypeDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference