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
    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.
    com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
    Context information specific to this instance of a trackable entity.
    Descriptive or identifying labels.
    int
     
    boolean
    Determines whether this asset should be considered the primary (or default) asset for the parent entity.
    void
    Map holding any additional attributes passed in the request not matching any defined properties.
    void
    setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
    Context information specific to this instance of a trackable entity.
    void
    setPrimary(boolean primary)
    Determines whether this asset should be considered the primary (or default) asset for the parent entity.
    void
    Descriptive or identifying labels.
     

    Methods inherited from class java.lang.Object

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

    • Asset

      public Asset()
  • 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.
    • 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 Asset with this value set to true.

      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:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
    • 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 Asset with this value set to true.

      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:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
    • 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