java.lang.Object
com.broadleafcommerce.subscription.domain.entitlement.Entitlement
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware

public class Entitlement extends Object implements com.broadleafcommerce.data.tracking.core.ContextStateAware
This is a copy of the domain object from EntitlementServices. It represents a customer's ability to access a resource per their Subscription terms.
  • Constructor Details

    • Entitlement

      public Entitlement()
    • Entitlement

      public Entitlement(String id, String principalId, String alternatePrincipalId, String principalType, String entitlementCode, String source, String sourceId, String subscriptionRef, Date startsOn, String originalEntitlementId, Date expiresOn, Date revokesOn, String siteIdentifier, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
  • Method Details

    • getId

      public String getId()
    • getPrincipalId

      public String getPrincipalId()
      The id of the user principal
    • getAlternatePrincipalId

      public String getAlternatePrincipalId()
      Alternate reference to the user principal. Useful for third-party authentication system identifiers
    • getPrincipalType

      public String getPrincipalType()
      Type of the user principal
    • getEntitlementCode

      public String getEntitlementCode()
      Reference to the resource to which this entitlement permits access
    • getSource

      public String getSource()
      Type of process that granted this entitlement
    • getSourceId

      public String getSourceId()
      The id of process that granted this entitlement
    • getSubscriptionRef

      public String getSubscriptionRef()
      Reference to the subscription that provides this entitlement
    • getStartsOn

      public Date getStartsOn()
      Start date of this entitlement
    • getOriginalEntitlementId

      public String getOriginalEntitlementId()
      If this entitlement is a clone, this is a reference to the original entitlement
    • getExpiresOn

      public Date getExpiresOn()
      Expiration date of this entitlement
    • getRevokesOn

      public Date getRevokesOn()
      Revocation date of this entitlement
    • getSiteIdentifier

      public String getSiteIdentifier()
      Multi-tenancy support
    • 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
    • setId

      public void setId(String id)
    • setPrincipalId

      public void setPrincipalId(String principalId)
      The id of the user principal
    • setAlternatePrincipalId

      public void setAlternatePrincipalId(String alternatePrincipalId)
      Alternate reference to the user principal. Useful for third-party authentication system identifiers
    • setPrincipalType

      public void setPrincipalType(String principalType)
      Type of the user principal
    • setEntitlementCode

      public void setEntitlementCode(String entitlementCode)
      Reference to the resource to which this entitlement permits access
    • setSource

      public void setSource(String source)
      Type of process that granted this entitlement
    • setSourceId

      public void setSourceId(String sourceId)
      The id of process that granted this entitlement
    • setSubscriptionRef

      public void setSubscriptionRef(String subscriptionRef)
      Reference to the subscription that provides this entitlement
    • setStartsOn

      public void setStartsOn(Date startsOn)
      Start date of this entitlement
    • setOriginalEntitlementId

      public void setOriginalEntitlementId(String originalEntitlementId)
      If this entitlement is a clone, this is a reference to the original entitlement
    • setExpiresOn

      public void setExpiresOn(Date expiresOn)
      Expiration date of this entitlement
    • setRevokesOn

      public void setRevokesOn(Date revokesOn)
      Revocation date of this entitlement
    • setSiteIdentifier

      public void setSiteIdentifier(String siteIdentifier)
      Multi-tenancy support
    • 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
    • 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