Attributes

Generic Properties

PropertyDescription
idAttribute id - used internally by PDX. Attribute id can not be blank and can only contain alphanumeric characters, plus specific special characters: “ -_#:” (including space).
externalIdAttribute external id - can be used in adapter in order when the “real” attribute id is required (i.e. when original attribute id has to be escaped due to the main id restrictions).
nameAttribute name visible in the PDX UI. Can not be blank.
descriptionAttribute description visible in attribute details in PDX UI. Not mandatory.
multiValueDefines attribute as a multivalue attributes, meaning it can have multiple values.
disableSubmitInStatesControls when attribute should be disabled - described in more details here: Datastandard implementation | Attributes with disableSubmitInStates
readOnlyConditionControls when attribute is read only - described in more details here: Datastandard implementation | Attributes with readOnlyCondition
groupIdsIds of the attribute groups where attribute belongs to. Attribute groups are visible in the PDX UI and are used to organize attributes. Attribute groups have to be defined in attributeGroups section of datastandard. Attribute groups are described in more details here: Categories and Attribute groups | Attribute groups. Notice that SDK is using AttributeGroup object.
accessDefines if attribute should be hidden from the PDX UI (set with withHidden builder method). By default all attributes are public.
displaySequenceControls attributes order in the UI - both in the grid and product details page.

Code Examples:

{
  "id" : "PRODUCT_DESCRIPTION",
  "externalId" : "PRODUCT.DESCRIPTION/1",
  "name" : "Product description",
  "description" : "Detailed attribute description.",
  "type" : {
    "id" : "string",
    "restriction" : { },
    "isFamily" : true,
    "multiValue" : true,
    "languages" : {
      "enabled" : true
    }
  },
  "access" : "HIDDEN",
  "groupIds" : [ "__LISTVIEW", "__ATTRIBUTE_FILTER", "OTHER" ],
  "disableSubmitInStates" : [ "one", "two", "three" ],
  "readOnlyCondition" : "true",
  "displaySequence" : 1.2
}

Attribute attribute = AttributeBuilder
        .stringAttribute("PRODUCT_DESCRIPTION", "Product description")
        .withDescription("Detailed attribute description.")
        .withDisableInSubmitStates(List.of("one", "two"))
        .withDisableInSubmitState("three")
        .withExternalId("PRODUCT.DESCRIPTION/1")
        .withGroups(List.of(AttributeGroupBuilder.listViewAttributeGroup().build(),
                AttributeGroupBuilder.attributeFilterAttributeGroup().build()))
        .withGroup(AttributeGroupBuilder.regularAttributeGroup("OTHER", "Other").build())
        .withHidden(true)
        .withIsFamily(true)
        .withLanguagesEnabled()
        .withMultiValue(true)
        .withReadOnly()
        .withDisplaySequence(1.2)
        .build();