Class AdvancedTag

  • All Implemented Interfaces:
    Serializable

    public class AdvancedTag
    extends Object
    implements Serializable
    A "tag" represents a unique purchasing attribute for a product such "new", "on sale", "fairtrade", etc. Tags may also be configured as tags with a rich text message and some controls for how or where they should be displayed on the storefront. By default, tags are facetable and can be configured to be searchable.
    Author:
    Nathan Moore (nathandmoore)
    See Also:
    Serialized Form
    • Constructor Detail

      • AdvancedTag

        public AdvancedTag()
    • Method Detail

      • addAttribute

        public void addAttribute​(String name,
                                 Object value)
        Takes in any additional attributes passed in the request not matching any defined properties.
        Parameters:
        name - Name of the additional attribute
        value - Value of the additional attribute
      • getAttribute

        public Map<String,​Object> getAttribute()
        Return any additional attributes passed in the request not matching any defined properties.
        Returns:
        any additional attributes passed in the request not matching any defined properties.
      • getId

        public String getId()
        A unique system identifier.
        Returns:
        A unique system identifier.
      • getName

        public String getName()
        A friendly identifier for the tag.
        Returns:
        A friendly identifier for the tag.
      • getPosition

        public String getPosition()
        Defines the position over a display component this tag should be displayed such as the "top-left" of a Product's image on a list or details page. If multiple tags have the same position, then their relative order on a product or their priority will determine which is displayed.
        Returns:
        The position over a component this tag should be displayed.
      • getType

        public String getType()
        Defines the type of this tag such as "key feature" or "discount". This allows categorizing tags to enhance user's ability to prioritize related tags such as only showing one "discount" tag even if a product has several.
        Returns:
        The type of this tag such as "key feature" or "discount".
      • getPriority

        public Long getPriority()
        Priority of this tag relative to other tags that may share the same position or type. This provides a way to pick on tag over another when there is a conflict. This could be overridden in the context of a specific product depending on the ProductTag.getSorting().
        Returns:
        Priority of this tag relative to other tags that may share the same position or type.
      • getAttributes

        public Map<String,​Object> getAttributes()
        Map holding any additional attributes passed in the request not matching any defined properties.
      • setId

        public void setId​(String id)
        A unique system identifier.
        Parameters:
        id - A unique system identifier.
      • setName

        public void setName​(String name)
        A friendly identifier for the tag.
        Parameters:
        name - A friendly identifier for the tag.
      • setPosition

        public void setPosition​(String position)
        Defines the position over a display component this tag should be displayed such as the "top-left" of a Product's image on a list or details page. If multiple tags have the same position, then their relative order on a product or their priority will determine which is displayed.
        Parameters:
        position - The position over a component this tag should be displayed.
      • setType

        public void setType​(String type)
        Defines the type of this tag such as "key feature" or "discount". This allows categorizing tags to enhance user's ability to prioritize related tags such as only showing one "discount" tag even if a product has several.
        Parameters:
        type - The type of this tag such as "key feature" or "discount".
      • setPriority

        public void setPriority​(Long priority)
        Priority of this tag relative to other tags that may share the same position or type. This provides a way to pick on tag over another when there is a conflict. This could be overridden in the context of a specific product depending on the ProductTag.getSorting().
        Parameters:
        priority - Priority of this tag relative to other tags that may share the same position or type.
      • setAttributes

        public void setAttributes​(Map<String,​Object> attributes)
        Map holding any additional attributes passed in the request not matching any defined properties.
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object