java.lang.Object
dev.getelements.elements.sdk.model.goods.Item
All Implemented Interfaces:
Taggable, Serializable

public class Item extends Object implements Serializable, Taggable
Represents an Item that is a Digital Good.
See Also:
  • Constructor Details

    • Item

      public Item()
  • Method Details

    • getId

      public String getId()
      Get the unique ID of the Item.
      Returns:
      the Item's unique ID
    • setId

      public void setId(String id)
      Set the unique ID of the Item.
      Parameters:
      id - the Item's unique ID
    • getName

      @NotNull public @NotNull String getName()
      Get the unique name of the Item
      Returns:
      The unique name for the Item
    • setName

      public void setName(@NotNull @NotNull String name)
      Set the unique name for the Item
      Parameters:
      name - unique name for the Item
    • getTags

      public List<String> getTags()
      Get the tags for the Item. The returned List should be treated as immutable.
      Specified by:
      getTags in interface Taggable
      Returns:
      The tags for an Item, or an empty List if the Item does not have any tags.
    • setTags

      public void setTags(List<String> tags)
      Sets the tags for the Item.
      Specified by:
      setTags in interface Taggable
      Parameters:
      tags - The tags for the Item.
    • getDisplayName

      @NotNull public @NotNull String getDisplayName()
      Gets the display name for this item, suitable for use at the presentation tier.
      Returns:
      The display name for the Item
    • setDisplayName

      public void setDisplayName(@NotNull @NotNull String displayName)
      Sets the display name for this item.
      Parameters:
      displayName - The display name for this item
    • getDescription

      @NotNull public @NotNull String getDescription()
      Gets the long description for the Item
      Returns:
      The long description for the Item
    • setDescription

      public void setDescription(@NotNull @NotNull String description)
      Sets the long description for the Item
      Parameters:
      description - The long description for the Item
    • getMetadataSpec

      public MetadataSpec getMetadataSpec()
    • setMetadataSpec

      public void setMetadataSpec(MetadataSpec metadataSpec)
    • getMetadata

      public Map<String,Object> getMetadata()
      Gets a copy of metadata of string key-value pairs for this Item. Changes to the returned Map are not reflected on this Item.
      Returns:
      The metadata for the Item
    • setMetadata

      public void setMetadata(Map<String,Object> metadata)
      Sets the metadata of string key-value pairs for this Item.
      Parameters:
      metadata - The metadata for the Item
    • getCategory

      public ItemCategory getCategory()
      Gets the ItemCategory of this item.
      Returns:
      the item category
    • setCategory

      public void setCategory(ItemCategory category)
      Sets the ItemCategory of this item.
      Parameters:
      category - the item category
    • isPublicVisible

      public boolean isPublicVisible()
      Gets the visibility of this item.
      Returns:
      visibility
    • setPublicVisible

      public void setPublicVisible(boolean publicVisible)
      Sets the visibility of this item.
    • addMetadata

      public void addMetadata(String name, Object value)
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object