Class Asset
java.lang.Object
com.broadleafcommerce.catalogbrowse.domain.Asset
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,Serializable
public class Asset
extends Object
implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
Represents the metadata for an asset such as an image.
- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String name, Object value) Takes in any additional attributes passed in the request not matching any defined properties.protected booleanbooleanReturn 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.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateContext information specific to this instance of a trackable entity.getTags()Descriptive or identifying labels.inthashCode()booleanDetermines 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.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) Context information specific to this instance of a trackable entity.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.toString()
-
Constructor Details
-
Asset
public Asset()
-
-
Method Details
-
addAttribute
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
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
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.
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()Context information specific to this instance of a trackable entity.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
-
getAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
setTags
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.
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) Context information specific to this instance of a trackable entity.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
-
setAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-