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 booleanbooleanThe attribute name where this field's value should be stored inUser.getAttributes().com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation 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.inthashCode()booleanWhether to also include the attribute as a claim on the token.voidsetAttributeName(String attributeName) The attribute name where this field's value should be stored inUser.getAttributes().voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidvoidsetIncludeAsTokenClaim(boolean includeAsTokenClaim) Whether to also include the attribute as a claim on the token.voidsetTargetKey(String targetKey) The target key corresponding to the augmentation used to produce this user field mapping.voidsetTenantId(String tenantId) The ID of the tenant to which this user field mapping belongs.voidsetValuePath(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.attributeNamewill 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 ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation 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.attributeNamewill 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 ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-