Package com.commercetools.sync.products
Class AttributeMetaData
- java.lang.Object
-
- com.commercetools.sync.products.AttributeMetaData
-
public final class AttributeMetaData extends java.lang.Object
Custom container for product variant attribute information: its name and whether it has the constraint "SameForAll" or not.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Gets the name of the attribute.boolean
isSameForAll()
Does the attribute have a "SameForAll" constraint or not.static AttributeMetaData
of(io.sphere.sdk.products.attributes.AttributeDefinition attributeDefinition)
Uses the suppliedAttributeDefinition
instance to infer the name and whether it has the constraint "SameForAll" or not, to instantiate a newAttributeMetaData
containing the aforementioned information.
-
-
-
Method Detail
-
of
public static AttributeMetaData of(@Nonnull io.sphere.sdk.products.attributes.AttributeDefinition attributeDefinition)
Uses the suppliedAttributeDefinition
instance to infer the name and whether it has the constraint "SameForAll" or not, to instantiate a newAttributeMetaData
containing the aforementioned information.- Parameters:
attributeDefinition
- the instance for which the needed information is used.- Returns:
- a new instance of
AttributeMetaData
.
-
getName
public java.lang.String getName()
Gets the name of the attribute.- Returns:
- the name of the attribute.
-
isSameForAll
public boolean isSameForAll()
Does the attribute have a "SameForAll" constraint or not.- Returns:
- boolean flag specifying whether the attribute has a "SameForAll" constraint or not.
-
-