Class UserTarget
- java.lang.Object
-
- com.broadleafcommerce.promotion.offer.domain.UserTarget
-
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware,Serializable
public class UserTarget extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware
Abstraction of a user that offers can target. Examples include customers and accounts.- Author:
- Nathan Moore (nathanmoore).
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UserTarget()UserTarget(String targetType, String targetValue)UserTarget(String targetValue, String targetType, com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)com.broadleafcommerce.data.tracking.core.EmbeddedContextStategetContextState()A subset ofTrackinginformation to expose the context state for this object.StringgetTargetType()The type of the user.StringgetTargetValue()An identifying value for the user.inthashCode()voidsetContextState(com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState)A subset ofTrackinginformation to expose the context state for this object.voidsetTargetType(String targetType)The type of the user.voidsetTargetValue(String targetValue)An identifying value for the user.StringtoString()
-
-
-
Method Detail
-
getTargetValue
public String getTargetValue()
An identifying value for the user. Could be an email, username, or some similarly identifying value.- Returns:
- An identifying value for the user
-
getTargetType
public String getTargetType()
The type of the user. This could be "CUSTOMER", "ACCOUNT", etc.- Returns:
- The type of the user.
-
getContextState
public com.broadleafcommerce.data.tracking.core.EmbeddedContextState getContextState()
A subset ofTrackinginformation to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when theChangeDetailsfor the parent object's entireattributesmap are compared.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object
-
setTargetValue
public void setTargetValue(String targetValue)
An identifying value for the user. Could be an email, username, or some similarly identifying value.- Parameters:
targetValue- An identifying value for the user.
-
setTargetType
public void setTargetType(String targetType)
The type of the user. This could be "CUSTOMER", "ACCOUNT", etc.- Parameters:
targetType- The type of the user.
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState)
A subset ofTrackinginformation to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when theChangeDetailsfor the parent object's entireattributesmap are compared.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
canEqual
protected boolean canEqual(Object other)
-
-