Interface TypeImport

All Superinterfaces:
ImportResource

public interface TypeImport extends ImportResource

The data representation for a Type to be imported that is persisted as a Type in the Project.


Example to create an instance using the builder pattern

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

    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier for the Type. If a Type with this key exists, it will be updated with the imported data.

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

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

      Maps to Type.name.

      Returns:
      name
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Maps to Type.description.

      Returns:
      description
    • getResourceTypeIds

      @NotNull @NotNull List<ResourceTypeId> getResourceTypeIds()

      Maps to Type.resourceTypeIds. This value cannot be changed after the Type is imported.

      Returns:
      resourceTypeIds
    • getFieldDefinitions

      @Valid @Valid List<FieldDefinition> getFieldDefinitions()

      Maps to Type.fieldDefinitions.

      Returns:
      fieldDefinitions
    • setKey

      void setKey(String key)

      User-defined unique identifier for the Type. If a Type with this key exists, it will be updated with the imported data.

      Specified by:
      setKey in interface ImportResource
      Parameters:
      key - value to be set
    • setName

      void setName(LocalizedString name)

      Maps to Type.name.

      Parameters:
      name - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Maps to Type.description.

      Parameters:
      description - value to be set
    • setResourceTypeIds

      void setResourceTypeIds(ResourceTypeId... resourceTypeIds)

      Maps to Type.resourceTypeIds. This value cannot be changed after the Type is imported.

      Parameters:
      resourceTypeIds - values to be set
    • setResourceTypeIds

      void setResourceTypeIds(List<ResourceTypeId> resourceTypeIds)

      Maps to Type.resourceTypeIds. This value cannot be changed after the Type is imported.

      Parameters:
      resourceTypeIds - values to be set
    • setFieldDefinitions

      void setFieldDefinitions(FieldDefinition... fieldDefinitions)

      Maps to Type.fieldDefinitions.

      Parameters:
      fieldDefinitions - values to be set
    • setFieldDefinitions

      void setFieldDefinitions(List<FieldDefinition> fieldDefinitions)

      Maps to Type.fieldDefinitions.

      Parameters:
      fieldDefinitions - values to be set
    • of

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

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

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

      static TypeImportBuilder builder()
      builder factory method for TypeImport
      Returns:
      builder
    • builder

      static TypeImportBuilder builder(TypeImport template)
      create builder for TypeImport instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withTypeImport

      default <T> T withTypeImport(Function<TypeImport,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<TypeImport> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference