Class UserFieldMapping
java.lang.Object
com.broadleafcommerce.auth.resource.domain.UserFieldMapping
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware
,Serializable
public class UserFieldMapping
extends Object
implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
The API domain that represents a field mapping added by a specific tenant
- Author:
- Susana Cruz (susanaccruz)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The attribute name where this field's value should be stored inUser.getAttributes()
.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
A subset ofTracking
information to expose the context state for this object.getId()
The target key corresponding to the augmentation used to produce this user field mapping.The ID of the tenant to which this user field mapping belongs.int
hashCode()
boolean
Whether to also include the attribute as a claim on the token.void
setAttributeName
(String attributeName) The attribute name where this field's value should be stored inUser.getAttributes()
.void
setContextState
(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
information to expose the context state for this object.void
void
setIncludeAsTokenClaim
(boolean includeAsTokenClaim) Whether to also include the attribute as a claim on the token.void
setTargetKey
(String targetKey) The target key corresponding to the augmentation used to produce this user field mapping.void
setTenantId
(String tenantId) The ID of the tenant to which this user field mapping belongs.void
setValuePath
(String valuePath) toString()
-
Constructor Details
-
UserFieldMapping
public UserFieldMapping()
-
-
Method Details
-
getId
-
getTargetKey
The target key corresponding to the augmentation used to produce this user field mapping. -
getTenantId
The ID of the tenant to which this user field mapping belongs. This should be unique when combined withattributeName
-
getAttributeName
The attribute name where this field's value should be stored inUser.getAttributes()
. -
getValuePath
-
isIncludeAsTokenClaim
public boolean isIncludeAsTokenClaim()Whether to also include the attribute as a claim on the token.attributeName
will be converted to snake case (phoneNumber -> phone_number
) if it is not already when added as a claim.Note, this will only work if the value is a
String
, other objects cannot be used as claims. -
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTracking
information to expose the context state for this object.- Specified by:
getContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Returns:
- a subset of
Tracking
information to expose the context state for this object
-
setId
-
setTargetKey
The target key corresponding to the augmentation used to produce this user field mapping. -
setTenantId
The ID of the tenant to which this user field mapping belongs. This should be unique when combined withattributeName
-
setAttributeName
The attribute name where this field's value should be stored inUser.getAttributes()
. -
setValuePath
-
setIncludeAsTokenClaim
public void setIncludeAsTokenClaim(boolean includeAsTokenClaim) Whether to also include the attribute as a claim on the token.attributeName
will be converted to snake case (phoneNumber -> phone_number
) if it is not already when added as a claim.Note, this will only work if the value is a
String
, other objects cannot be used as claims. -
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
information to expose the context state for this object.- Specified by:
setContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Parameters:
contextState
- a subset ofTracking
information to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-