Class ChangeSummary

java.lang.Object
com.broadleafcommerce.sandbox.domain.ChangeSummary
All Implemented Interfaces:
Serializable

public class ChangeSummary extends Object implements Serializable
Detailed summary information of a change made to an instance of a sandboxable entity. Each summary is unique for it's combination of domainContextId, domainAlias, author, sandbox, and state.
Author:
Chad Harchar (charchar)
See Also:
  • Constructor Details

    • ChangeSummary

      public ChangeSummary()
  • Method Details

    • getId

      public String getId()
      Unique identifier for this change summary.
      Returns:
      Unique identifier for this change summary
    • getDomainContextId

      public String getDomainContextId()
      The contextId of the domain object that underwent the change.
      Returns:
      The contextId of the domain object that underwent the change
    • getDomainAlias

      public String getDomainAlias()
      The projection domain alias for this change, represented as the class simple name, i.e., Product.
      Returns:
      The projection domain alias for this change
    • getEntityType

      public String getEntityType()
      The entity type for this change, represented as the fully qualified classname.
      Returns:
      The entity type for this change
    • getAuthor

      public String getAuthor()
      The author responsible for the change.
      Returns:
      The author responsible for this change
    • getSandbox

      public String getSandbox()
      The sandbox that contains the change.
      Returns:
      The sandbox that contains the change
    • getChangeTracking

      public ChangeTracking getChangeTracking()
      All of the information contained within Tracking for the original record (domainAlias + domainContextId) of this change.
      Returns:
      All of the information contained within Tracking for the record of this change
    • getState

      public String getState()
      The current state of this change summary. This will change only when the status changes to a completed type, i.e., ChangeStatusType.REJECTED, ChangeStatusType.FINISHED, or an error status.
      Returns:
      The current state of this change summary
    • getStatusChangeTime

      public Instant getStatusChangeTime()
      The time that the status last changed.
      Returns:
      The time that the status last changed
    • getStatus

      public String getStatus()
      The current status of this change summary.
      Returns:
      The current status of this change summary
    • getDisplayName

      public String getDisplayName()
      The name to display to the user that represents this change summary. Typically retrieved from Trackable.getDisplay().
      Returns:
      The name to display to the user that represents this change summary
    • getException

      public String getException()
      Any exceptions that result from this change summary.
      Returns:
      Any exceptions that result from this change summary
    • getRejectMessage

      public String getRejectMessage()
      The message given to this change summary during rejection.
      Returns:
      The message given to this change summary during rejection
    • getPromotionId

      public String getPromotionId()
      The identifier given to this change summary during a promotion
      Returns:
      The identifier given to this change summary during a promotion
    • getArchived

      public Boolean getArchived()
      The archival state. Archived records are generally filtered from fetch results. Records are often archived at this level as a result of a completed reversion.
      Returns:
      The archival state
    • getDivergentStatus

      public String getDivergentStatus()
      Whether this change is identified as divergent, meaning it is a ChangeState.USER change that requires a rebase due to a higher level change before advancing. By default, this value will be DivergentStatus.UNKNOWN, meaning the summary has not been evaluated for divergence. This value is generally set via some post processing routine for those flows that are concerned with detection of divergent state.
      Returns:
      Whether this change is identified as divergent, meaning it is a ChangeState.USER change that requires a rebase due to a higher level change before advancing
      See Also:
    • getDivergedChanges

      public List<DivergedChange> getDivergedChanges()
      Changes that have been promoted in advance of the current change represented in this ChangeInfo. The base from which the current ChangeSummary is derived has diverged as a result of these changes.
      Returns:
      Changes that have been promoted in advance of the current ChangeInfo
    • getIndexableType

      public String getIndexableType()
      If the change implements Indexable and is a member of BatchIndexableType, reference the string value of BatchIndexableType here for the target item to be indexed. Note, this may not be the entity actually being changed here. If, for example, this change is for a CatalogProduct, the target item to be indexed is actually the referenced product.
      Returns:
      The string value of BatchIndexableType here for the target item to be indexed
    • getIndexableTargetId

      public String getIndexableTargetId()
      If the change implements Indexable and is a member of BatchIndexableType, reference the contextId of the target item to be indexed. Note, this may not be the entity actually being changed here. If, for example, this change is for a CatalogProduct, the target item to be indexed is actually the referenced product.
      Returns:
      The contextId of the target item to be indexed
    • isRemoveTemporaryOverride

      public boolean isRemoveTemporaryOverride()
      In the case of PropagationType.REQUIRES_APPROVAL, sandbox state for the incoming change is created at the application level for approval. If there is not already an application override, a temporary override is put into place to cover hiding the incoming changes from production until the change completes its lifecycle. At the point where the application-level change is either reverted or deployed, the system will evaluate the temporary override for possible removal if no additional changes were made during the application level sandbox lifecycle (in order to maintain sparse overrides). This flag determines if the system should perform this completion evaluation and possibly remove the temporary override.
      Returns:
      If the system should perform this completion evaluation and possibly remove the temporary override
    • getVendorRef

      @Nullable public String getVendorRef()
      If the corresponding entity was changed within a particular vendor, this field should contain the value of that vendor code or ID. Otherwise, if non-vendor data is affected, then this field should be null.

      If vendor processing is enabled, this will affect which summaries a vendor-restricted user can view and operate on.

      See Also:
      • ChangeEvent.getVendorRef()
    • getLastGroupRelation

      @Nullable public String getLastGroupRelation()
      The most recent ChangeSummaryGroup to be associated with this summary.
    • getLastDeployRelation

      @Nullable public String getLastDeployRelation()
      The most recent ChangeDeploy to be associated with this summary.
    • setId

      public void setId(String id)
      Unique identifier for this change summary.
      Parameters:
      id - Unique identifier for this change summary
    • setDomainContextId

      public void setDomainContextId(String domainContextId)
      The contextId of the domain object that underwent the change.
      Parameters:
      domainContextId - The contextId of the domain object that underwent the change
    • setDomainAlias

      public void setDomainAlias(String domainAlias)
      The projection domain alias for this change, represented as the class simple name, i.e., Product.
      Parameters:
      domainAlias - The projection domain alias for this change
    • setEntityType

      public void setEntityType(String entityType)
      The entity type for this change, represented as the fully qualified classname.
      Parameters:
      entityType - The entity type for this change
    • setAuthor

      public void setAuthor(String author)
      The author responsible for the change.
      Parameters:
      author - The author responsible for this change
    • setSandbox

      public void setSandbox(String sandbox)
      The sandbox that contains the change.
      Parameters:
      sandbox - The sandbox that contains the change
    • setChangeTracking

      public void setChangeTracking(ChangeTracking changeTracking)
      All of the information contained within Tracking for the original record (domainAlias + domainContextId) of this change.
      Parameters:
      changeTracking - All of the information contained within Tracking for the record of this change
    • setState

      public void setState(String state)
      The current state of this change summary. This will change only when the status changes to a completed type, i.e., ChangeStatusType.REJECTED, ChangeStatusType.FINISHED, or an error status.
      Parameters:
      state - The current state of this change summary
    • setStatusChangeTime

      public void setStatusChangeTime(Instant statusChangeTime)
      The time that the status last changed.
      Parameters:
      statusChangeTime - The time that the status last changed.
    • setStatus

      public void setStatus(String status)
      The current status of this change summary.
      Parameters:
      state - The current status of this change summary
    • setDisplayName

      public void setDisplayName(String displayName)
      The name to display to the user that represents this change summary. Typically retrieved from Trackable.getDisplay().
      Parameters:
      displayName - The name to display to the user that represents this change summary
    • setException

      public void setException(String exception)
      Any exceptions that result from this change summary.
      Parameters:
      exception - Any exceptions that result from this change summary
    • setRejectMessage

      public void setRejectMessage(String rejectMessage)
      The message given to this change summary during rejection.
      Parameters:
      rejectMessage - The message given to this change summary during rejection
    • setPromotionId

      public void setPromotionId(String promotionId)
      The identifier given to this change summary during a promotion
      Parameters:
      promotionId - The identifier given to this change summary during a promotion
    • setArchived

      public void setArchived(Boolean archived)
      The archival state. Archived records are generally filtered from fetch results. Records are often archived at this level as a result of a completed reversion.
      Parameters:
      archived - Whether this summary should be filtered from fetch results
    • setDivergentStatus

      public void setDivergentStatus(String divergentStatus)
      Whether this change is identified as divergent, meaning it is a ChangeState.USER change that requires a rebase due to a higher level change before advancing. By default, this value will be DivergentStatus.UNKNOWN, meaning the summary has not been evaluated for divergence. This value is generally set via some post processing routine for those flows that are concerned with detection of divergent state.
      Parameters:
      divergentStatus - Whether this change is identified as divergent, meaning it is a ChangeState.USER change that requires a rebase due to a higher level change before advancing
      See Also:
    • setDivergedChanges

      public void setDivergedChanges(List<DivergedChange> divergedChanges)
      Changes that have been promoted in advance of the current change represented in this ChangeInfo. The base from which the current ChangeSummary is derived has diverged as a result of these changes.
      Parameters:
      divergedChanges - Changes that have been promoted in advance of the current ChangeInfo
    • setIndexableType

      public void setIndexableType(String indexableType)
      If the change implements Indexable and is a member of BatchIndexableType, reference the string value of BatchIndexableType here for the target item to be indexed. Note, this may not be the entity actually being changed here. If, for example, this change is for a CatalogProduct, the target item to be indexed is actually the referenced product.
      Parameters:
      indexableType - The string value of BatchIndexableType here for the target item to be indexed
    • setIndexableTargetId

      public void setIndexableTargetId(String indexableTargetId)
      If the change implements Indexable and is a member of BatchIndexableType, reference the contextId of the target item to be indexed. Note, this may not be the entity actually being changed here. If, for example, this change is for a CatalogProduct, the target item to be indexed is actually the referenced product.
      Parameters:
      indexableTargetId - The contextId of the target item to be indexed
    • setRemoveTemporaryOverride

      public void setRemoveTemporaryOverride(boolean isRemoveTemporaryOverride)
      In the case of PropagationType.REQUIRES_APPROVAL, sandbox state for the incoming change is created at the application level for approval. If there is not already an application override, a temporary override is put into place to cover hiding the incoming changes from production until the change completes its lifecycle. At the point where the application-level change is either reverted or deployed, the system will evaluate the temporary override for possible removal if no additional changes were made during the application level sandbox lifecycle (in order to maintain sparse overrides). This flag determines if the system should perform this completion evaluation and possibly remove the temporary override.
      Parameters:
      isRemoveTemporaryOverride - If the system should perform this completion evaluation and possibly remove the temporary override
    • setVendorRef

      public void setVendorRef(@Nullable String vendorRef)
      If the corresponding entity was changed within a particular vendor, this field should contain the value of that vendor code or ID. Otherwise, if non-vendor data is affected, then this field should be null.

      If vendor processing is enabled, this will affect which summaries a vendor-restricted user can view and operate on.

      See Also:
      • ChangeEvent.getVendorRef()
    • setLastGroupRelation

      public void setLastGroupRelation(@Nullable String lastGroupRelation)
      The most recent ChangeSummaryGroup to be associated with this summary.
    • setLastDeployRelation

      public void setLastDeployRelation(@Nullable String lastDeployRelation)
      The most recent ChangeDeploy to be associated with this summary.
    • 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