Class CatalogItem
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
End when this product is not longer active.Dynamic attributes that are a part of the product.Context id from catalog (product)This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf.getId()
Context idgetName()
getSku()
getUpc()
int
hashCode()
boolean
isActive()
Inactive products are by default NOT searchable, NOT browseable, and NOT purchaseable.boolean
If this product or any of its variants can be sold individually in the store, or if they must be apart of another product as an add-on.boolean
isOnline()
Whether or not this product should be visible at all in the store.boolean
Whether or not this product shows up in search.void
setActiveEndDate
(Instant activeEndDate) End when this product is not longer active.void
setActiveStartDate
(Instant activeStartDate) void
setAttributes
(Map<String, Object> attributes) Dynamic attributes that are a part of the product.void
setCatalogItemContextId
(String catalogItemContextId) Context id from catalog (product)void
setExternalId
(String externalId) This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf.void
Context idvoid
setIndividuallySold
(boolean individuallySold) If this product or any of its variants can be sold individually in the store, or if they must be apart of another product as an add-on.void
void
setNumericId
(Long numericId) void
setOnline
(boolean online) Whether or not this product should be visible at all in the store.void
setSearchable
(boolean searchable) Whether or not this product shows up in search.void
void
toString()
-
Constructor Details
-
CatalogItem
public CatalogItem() -
CatalogItem
-
-
Method Details
-
isActive
public boolean isActive()Inactive products are by default NOT searchable, NOT browseable, and NOT purchaseable.- Returns:
- the active state of this current product
- See Also:
-
getNumericId
-
getId
Context id -
getCatalogItemContextId
Context id from catalog (product) -
getName
-
getSku
-
getUpc
-
getExternalId
This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf.- Returns:
- an external ID
-
getActiveStartDate
-
getActiveEndDate
End when this product is not longer active. Unset indicates that it is always active.- Returns:
- the date when this product should no longer be active
- See Also:
-
isOnline
public boolean isOnline()Whether or not this product should be visible at all in the store. A product that is offline is not searchable, visible, or purchasable. A product that is offline behaves as if it falls outside the active date range. It is not returned from storefront requests by default.
Defaults to
true
- Returns:
- whether or not this product is visible in the store
-
isSearchable
public boolean isSearchable()Whether or not this product shows up in search. Usually this matches whether or not the product is
individuallySold
This defaults to
true
- Returns:
- whether or not this product shows up in search
-
isIndividuallySold
public boolean isIndividuallySold()If this product or any of its variants can be sold individually in the store, or if they must be apart of another product as an add-on. Usually if a product is not individually sold then it should also not show up in search.
This defaults to
true
.- Returns:
- whether or not this product or any of its variants can be sold individually
- See Also:
-
searchable
-
getAttributes
Dynamic attributes that are a part of the product. This is an admin-centered concept- Returns:
- dynamic attributes that are a part of the product
-
setNumericId
-
setId
Context id -
setCatalogItemContextId
Context id from catalog (product) -
setName
-
setSku
-
setUpc
-
setExternalId
This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf.- Parameters:
externalId
- an external ID, often a DB or business ID, from a system outside of Broadleaf
-
setActiveStartDate
-
setActiveEndDate
End when this product is not longer active. Unset indicates that it is always active.- Parameters:
activeEndDate
- the date when this product should no longer be active- See Also:
-
setOnline
public void setOnline(boolean online) Whether or not this product should be visible at all in the store. A product that is offline is not searchable, visible, or purchasable. A product that is offline behaves as if it falls outside the active date range. It is not returned from storefront requests by default.
Defaults to
true
- Parameters:
online
- whether or not this product is visible in the store
-
setSearchable
public void setSearchable(boolean searchable) Whether or not this product shows up in search. Usually this matches whether or not the product is
individuallySold
This defaults to
true
- Parameters:
searchable
- whether or not this product shows up in search
-
setIndividuallySold
public void setIndividuallySold(boolean individuallySold) If this product or any of its variants can be sold individually in the store, or if they must be apart of another product as an add-on. Usually if a product is not individually sold then it should also not show up in search.
This defaults to
true
.- Parameters:
individuallySold
- whether or not this product or any of its variants can be sold individually- See Also:
-
searchable
-
setAttributes
Dynamic attributes that are a part of the product. This is an admin-centered concept- Parameters:
attributes
- dynamic attributes that are a part of the product
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-