Class AdvancedTag

java.lang.Object
com.broadleafcommerce.cartoperation.domain.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:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAttribute(String name, Object value)
    Takes in any additional attributes passed in the request not matching any defined properties.
    protected boolean
     
    boolean
     
    Return any additional attributes passed in the request not matching any defined properties.
    Map holding any additional attributes passed in the request not matching any defined properties.
    A unique system identifier.
    A friendly identifier for the tag.
    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.
    Priority of this tag relative to other tags that may share the same position or type.
    Defines the type of this tag such as "key feature" or "discount".
    int
     
    void
    Map holding any additional attributes passed in the request not matching any defined properties.
    void
    A unique system identifier.
    void
    A friendly identifier for the tag.
    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.
    void
    setPriority(Long priority)
    Priority of this tag relative to other tags that may share the same position or type.
    void
    Defines the type of this tag such as "key feature" or "discount".
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AdvancedTag

      public AdvancedTag()
  • Method Details

    • 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.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object