Class 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 supplied AttributeDefinition instance to infer the name and whether it has the constraint "SameForAll" or not, to instantiate a new AttributeMetaData containing the aforementioned information.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • of

        public static AttributeMetaData of​(@Nonnull
                                           io.sphere.sdk.products.attributes.AttributeDefinition attributeDefinition)
        Uses the supplied AttributeDefinition instance to infer the name and whether it has the constraint "SameForAll" or not, to instantiate a new AttributeMetaData 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.