Class Entitlement
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 Summary
ConstructorsConstructorDescriptionEntitlement(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 Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanAlternate reference to the user principal.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.Reference to the resource to which this entitlement permits accessExpiration date of this entitlementgetId()If this entitlement is a clone, this is a reference to the original entitlementThe id of the user principalType of the user principalRevocation date of this entitlementMulti-tenancy supportType of process that granted this entitlementThe id of process that granted this entitlementStart date of this entitlementReference to the subscription that provides this entitlementinthashCode()voidsetAlternatePrincipalId(String alternatePrincipalId) Alternate reference to the user principal.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetEntitlementCode(String entitlementCode) Reference to the resource to which this entitlement permits accessvoidsetExpiresOn(Date expiresOn) Expiration date of this entitlementvoidvoidsetOriginalEntitlementId(String originalEntitlementId) If this entitlement is a clone, this is a reference to the original entitlementvoidsetPrincipalId(String principalId) The id of the user principalvoidsetPrincipalType(String principalType) Type of the user principalvoidsetRevokesOn(Date revokesOn) Revocation date of this entitlementvoidsetSiteIdentifier(String siteIdentifier) Multi-tenancy supportvoidType of process that granted this entitlementvoidsetSourceId(String sourceId) The id of process that granted this entitlementvoidsetStartsOn(Date startsOn) Start date of this entitlementvoidsetSubscriptionRef(String subscriptionRef) Reference to the subscription that provides this entitlementtoString()
-
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
-
getPrincipalId
The id of the user principal -
getAlternatePrincipalId
Alternate reference to the user principal. Useful for third-party authentication system identifiers -
getPrincipalType
Type of the user principal -
getEntitlementCode
Reference to the resource to which this entitlement permits access -
getSource
Type of process that granted this entitlement -
getSourceId
The id of process that granted this entitlement -
getSubscriptionRef
Reference to the subscription that provides this entitlement -
getStartsOn
Start date of this entitlement -
getOriginalEntitlementId
If this entitlement is a clone, this is a reference to the original entitlement -
getExpiresOn
Expiration date of this entitlement -
getRevokesOn
Revocation date of this entitlement -
getSiteIdentifier
Multi-tenancy support -
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
-
setId
-
setPrincipalId
The id of the user principal -
setAlternatePrincipalId
Alternate reference to the user principal. Useful for third-party authentication system identifiers -
setPrincipalType
Type of the user principal -
setEntitlementCode
Reference to the resource to which this entitlement permits access -
setSource
Type of process that granted this entitlement -
setSourceId
The id of process that granted this entitlement -
setSubscriptionRef
Reference to the subscription that provides this entitlement -
setStartsOn
Start date of this entitlement -
setOriginalEntitlementId
If this entitlement is a clone, this is a reference to the original entitlement -
setExpiresOn
Expiration date of this entitlement -
setRevokesOn
Revocation date of this entitlement -
setSiteIdentifier
Multi-tenancy support -
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
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-