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 Details

    • UserFieldMapping

      public UserFieldMapping()
  • Method Details

    • getId

      public String getId()
    • getTargetKey

      public String getTargetKey()
      The target key corresponding to the augmentation used to produce this user field mapping.
    • getTenantId

      public String getTenantId()
      The ID of the tenant to which this user field mapping belongs. This should be unique when combined with attributeName
    • getAttributeName

      public String getAttributeName()
      The attribute name where this field's value should be stored in User.getAttributes().
    • getValuePath

      public String getValuePath()
      The JsonPath on the Customer or AdminUser to retrieve the value(s) which should be stored in that attribute.
    • 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 of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setId

      public void setId(String id)
    • setTargetKey

      public void setTargetKey(String targetKey)
      The target key corresponding to the augmentation used to produce this user field mapping.
    • setTenantId

      public void setTenantId(String tenantId)
      The ID of the tenant to which this user field mapping belongs. This should be unique when combined with attributeName
    • setAttributeName

      public void setAttributeName(String attributeName)
      The attribute name where this field's value should be stored in User.getAttributes().
    • setValuePath

      public void setValuePath(String valuePath)
      The JsonPath on the Customer or AdminUser to retrieve the value(s) which should be stored in that attribute.
    • 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 of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object