Interface ProductTypeChangeAttributeNameAction

All Superinterfaces:
ProductTypeUpdateAction, ResourceUpdateAction<ProductTypeUpdateAction>

public interface ProductTypeChangeAttributeNameAction extends ProductTypeUpdateAction

Renames an AttributeDefinition and also renames all corresponding Attributes on all Products with this ProductType. The renaming of the Attributes is eventually consistent.

If the AttributeDefinition name to be changed does not exist, an AttributeNameDoesNotExist error is returned.


Example to create an instance using the builder pattern

     ProductTypeChangeAttributeNameAction productTypeChangeAttributeNameAction = ProductTypeChangeAttributeNameAction.builder()
             .attributeName("{attributeName}")
             .newAttributeName("{newAttributeName}")
             .build()
 
  • Field Details

    • CHANGE_ATTRIBUTE_NAME

      static final String CHANGE_ATTRIBUTE_NAME
      discriminator value for ProductTypeChangeAttributeNameAction
      See Also:
  • Method Details

    • getAttributeName

      @NotNull @NotNull String getAttributeName()

      Name of the AttributeDefinition to update.

      Returns:
      attributeName
    • getNewAttributeName

      @NotNull @NotNull String getNewAttributeName()

      New user-defined name of the Attribute that is unique with the Project.

      When using the same name for an Attribute in two or more ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes. If not, an AttributeDefinitionAlreadyExists error is returned. An exception to this are the values of an enum or lenum type and sets thereof.

      Returns:
      newAttributeName
    • setAttributeName

      void setAttributeName(String attributeName)

      Name of the AttributeDefinition to update.

      Parameters:
      attributeName - value to be set
    • setNewAttributeName

      void setNewAttributeName(String newAttributeName)

      New user-defined name of the Attribute that is unique with the Project.

      When using the same name for an Attribute in two or more ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes. If not, an AttributeDefinitionAlreadyExists error is returned. An exception to this are the values of an enum or lenum type and sets thereof.

      Parameters:
      newAttributeName - value to be set
    • of

      factory method
      Returns:
      instance of ProductTypeChangeAttributeNameAction
    • of

      factory method to create a shallow copy ProductTypeChangeAttributeNameAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ProductTypeChangeAttributeNameAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ProductTypeChangeAttributeNameAction
      Returns:
      builder
    • builder

      create builder for ProductTypeChangeAttributeNameAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductTypeChangeAttributeNameAction

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