Class Asset
- java.lang.Object
-
- com.broadleafcommerce.catalogbrowse.domain.Asset
-
- All Implemented Interfaces:
Serializable
public class Asset extends Object implements Serializable
Represents the metadata for an asset such as an image.- Author:
- Nathan Moore (nathandmoore)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Asset()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(String name, Object value)Takes in any additional attributes passed in the request not matching any defined properties.protected booleancanEqual(Object other)booleanequals(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.LinkedHashSet<String>getTags()Descriptive or identifying labels.inthashCode()booleanisPrimary()Determines whether this asset should be considered the primary (or default) asset for the parent entity.voidsetAttributes(Map<String,Object> attributes)Map holding any additional attributes passed in the request not matching any defined properties.voidsetPrimary(boolean primary)Determines whether this asset should be considered the primary (or default) asset for the parent entity.voidsetTags(LinkedHashSet<String> tags)Descriptive or identifying labels.StringtoString()
-
-
-
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.
-
getTags
public LinkedHashSet<String> getTags()
Descriptive or identifying labels.- Returns:
- Descriptive or identifying labels.
-
isPrimary
public boolean isPrimary()
Determines whether this asset should be considered the primary (or default) asset for the parent entity.For any entity, there can only be one
Assetwith this value set totrue.- Returns:
- Whether this the primary asset for the parent entity.
-
getAttributes
public Map<String,Object> getAttributes()
Map holding any additional attributes passed in the request not matching any defined properties.
-
setTags
public void setTags(LinkedHashSet<String> tags)
Descriptive or identifying labels.- Parameters:
tags- Descriptive or identifying labels.
-
setPrimary
public void setPrimary(boolean primary)
Determines whether this asset should be considered the primary (or default) asset for the parent entity.For any entity, there can only be one
Assetwith this value set totrue.- Parameters:
primary- Whether this the primary asset for the parent entity.
-
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)
-
-