|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProductAssociation
Represents a link between two products for the purpose of displaying information about related products when viewing a particular product.
Terminology:
Source Product - The product that the user is viewing when additional products are to be displayed, e.g. for upselling to a more expensive product.
Target Product - The other product that is to be displayed when viewing the source product.
Field Summary | |
---|---|
static int |
ACCESSORY
Accessory product association. |
static java.lang.String[] |
ALL_ASSOCIATION_TYPE_NAMES
All possible association type string names. |
static int[] |
ALL_ASSOCIATION_TYPES
All possible association types. |
static int |
CROSS_SELL
Cross-sell association. |
static int |
RECOMMENDATION
Computed product recommentation association. |
static int |
REPLACEMENT
Replacement product association. |
static int |
UP_SELL
Up-sell association. |
static int |
WARRANTY
Warranty item. |
Method Summary | |
---|---|
int |
getAssociationType()
Get the type of this ProductAssociation . |
int |
getDefaultQuantity()
Get the default quantity of the product targeted by this MerchandiseAssociation . |
java.util.Date |
getEndDate()
Get the end date after which this MerchandiseAssociation is no longer valid for display. |
int |
getOrdering()
Get the order in which this product should appear on the page relative to other products having the same source product. |
java.util.Date |
getStartDate()
Get the starting date on which this MerchandiseAssociation is valid for display. |
Product |
getTargetProduct()
Get the product targeted by this association. |
ProductSku |
getTargetSku()
Get the specific SKU targeted by this association. |
boolean |
isSourceProductDependent()
Returns true if the product targeted by this MerchandiseAssociation depends on the source product such that it should be
removed from the cart if the source product is removed. |
boolean |
isValid()
Returns true if this association is valid because the current date is within the start and end dates. |
boolean |
isValidAssociationType(int associationType)
Returns true if the given association type is valid. |
void |
setAssociationType(int associationType)
Set the type of this ProductAssociation . |
void |
setDefaultQuantity(int defaultQuantity)
Set the default quantity of the product targeted by this MerchandiseAssociation . |
void |
setEndDate(java.util.Date endDate)
Set the end date after which this MerchandiseAssociation is no longer valid for display. |
void |
setOrdering(int ordering)
Set the order in which this product should appear on the page relative to other products having the same source product. |
void |
setSourceProductDependent(boolean sourceProductDependent)
Set to true if the product targeted by this MerchandiseAssociation depends on the source product such that it should be removed
from the cart if the source product is removed. |
void |
setStartDate(java.util.Date startDate)
Set the starting date on which this MerchandiseAssociation is valid for display. |
void |
setTargetProduct(Product targetProduct)
Set the target product. |
void |
setTargetSku(ProductSku targetSku)
Set the specific SKU to be targeted by this association. |
Methods inherited from interface com.elasticpath.domain.Persistence |
---|
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk |
Methods inherited from interface com.elasticpath.domain.EpDomain |
---|
getElasticPath, setElasticPath |
Field Detail |
---|
static final int ACCESSORY
static final java.lang.String[] ALL_ASSOCIATION_TYPE_NAMES
static final int[] ALL_ASSOCIATION_TYPES
static final int CROSS_SELL
static final int RECOMMENDATION
static final int REPLACEMENT
static final int UP_SELL
static final int WARRANTY
Method Detail |
---|
int getAssociationType()
ProductAssociation
.
int getDefaultQuantity()
MerchandiseAssociation
. If no default quantity has been set, the
default defaultQuantity is 1. If the target product is added to the cart automatically, it should be added in this default quantity.
java.util.Date getEndDate()
MerchandiseAssociation
is no longer valid for display.
int getOrdering()
java.util.Date getStartDate()
MerchandiseAssociation
is valid for display.
Product getTargetProduct()
ProductSku getTargetSku()
ProductSku
boolean isSourceProductDependent()
MerchandiseAssociation
depends on the source product such that it should be
removed from the cart if the source product is removed.
boolean isValid()
boolean isValidAssociationType(int associationType)
true
if the given association type is valid.
associationType
- the association type
true
if the given association type is validvoid setAssociationType(int associationType)
ProductAssociation
.
associationType
- one of the association type constants defined in this interfacevoid setDefaultQuantity(int defaultQuantity)
MerchandiseAssociation
.
defaultQuantity
- the default quantityvoid setEndDate(java.util.Date endDate)
MerchandiseAssociation
is no longer valid for display.
endDate
- the end datevoid setOrdering(int ordering)
ordering
- the orderingvoid setSourceProductDependent(boolean sourceProductDependent)
MerchandiseAssociation
depends on the source product such that it should be removed
from the cart if the source product is removed.
sourceProductDependent
- sets whether the target product depends on the source productvoid setStartDate(java.util.Date startDate)
MerchandiseAssociation
is valid for display.
startDate
- the start datevoid setTargetProduct(Product targetProduct)
targetProduct
- the target productvoid setTargetSku(ProductSku targetSku)
targetSku
- the ProductSku
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |