Reference Packaging attribute
| Attribute type id | Type specific restriction parameters |
|---|---|
| reference | No restrictions. Quantity sub-attribute can have it’s own restrictions. |
Reference Packaging attribute is one of the “special” attributes used to build packaging hierarchies.Packaging attribute and quantity attribute has to be also defined in
"primaryAttributes"section as"package"and"quantity"attributes.
Code Examples:
referenceAttribute(...).withQuantityAttribute(...) registers both the package and quantity entries in the root-level primaryAttributes map (pointing at the reference attribute and its quantity sub-attribute respectively), in addition to defining the attribute in the root-level attributes array of the datastandard version file:
{
"primaryAttributes" : {
"package" : "PACKAGING_REF",
"quantity" : "PACKAGING_QTY"
},
"attributes" : [ {
"id" : "PACKAGING_REF",
"name" : "Packaging",
"type" : {
"id" : "reference",
"restriction" : { }
},
"attributeLinks" : [ {
"id" : "PACKAGING_QTY",
"appliesTo" : "ALL"
} ]
} ]
}Attribute packagingAttribute = AttributeBuilder.referenceAttribute("PACKAGING_REF", "Packaging")
.withQuantityAttribute(AttributeBuilder.integerAttribute("PACKAGING_QTY", "Quantity").build())
.build();Updated 8 days ago
Did this page help you?
