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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AdvancedTag()
-
Method Summary
All Methods Instance Methods Concrete Methods 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
canEqual(Object other)
boolean
equals(Object o)
Map<String,Object>
getAttribute()
Return any additional attributes passed in the request not matching any defined properties.Map<String,Object>
getAttributes()
Map holding any additional attributes passed in the request not matching any defined properties.String
getId()
A unique system identifier.String
getName()
A friendly identifier for the tag.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.Long
getPriority()
String
getType()
Defines the type of this tag such as "key feature" or "discount".int
hashCode()
void
setAttributes(Map<String,Object> attributes)
Map holding any additional attributes passed in the request not matching any defined properties.void
setId(String id)
A unique system identifier.void
setName(String name)
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)
void
setType(String type)
Defines the type of this tag such as "key feature" or "discount".String
toString()
-
-
-
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 attributevalue
- 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 theirpriority
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 sameposition
ortype
. 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 theProductTag.getSorting()
.
-
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 theirpriority
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 sameposition
ortype
. 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 theProductTag.getSorting()
.
-
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)
-
-