Interface CustomizedChangeSummaryGroupRepository<D>

All Superinterfaces:
com.broadleafcommerce.common.extension.DomainTypeAware
All Known Subinterfaces:
ChangeSummaryGroupRepository<D>, JpaChangeSummaryGroupRepository<D>
All Known Implementing Classes:
JpaCustomizedChangeSummaryGroupRepository

public interface CustomizedChangeSummaryGroupRepository<D> extends com.broadleafcommerce.common.extension.DomainTypeAware
Additional persistence operations to perform on ChangeSummaryGroup repository domain.
Author:
Jeff Fischer
  • Method Details

    • readByIdAndArchivedNot

      @Policy(operationTypes=READ) Optional<D> readByIdAndArchivedNot(String id, boolean archived, boolean vendorNarrowing, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Takes ChangeSummaryGroup.getArchived() into account when retrieving a group with the given ID.
      Parameters:
      id - ID of the group to retrieve
      archived - ChangeSummaryGroup.getArchived() value to not match
      vendorNarrowing - whether or not to filter results based on the current authentication's vendor restrictions if vendor processing is enabled
      contextInfo - context information about sandboxing and multitenant state
      Returns:
      A ChangeSummaryGroup matching the given ID and not matching the given archived status
    • updateVals

      @Policy(operationTypes=UPDATE) boolean updateVals(@NonNull @NonNull String changeSummaryGroupId, @Nullable List<String> whereStates, @Nullable List<String> whereStatus, @NonNull @NonNull Map<String,Object> vals, boolean enforceArchive)
      Update the fields for a record matching the id
      Parameters:
      changeSummaryGroupId - The id requested to mutate
      whereStates - The list of valid ChangeState values for which ChangeSummaryGroup.getState() should match
      whereStatus - The list of ChangeStatusType values for which ChangeSummaryGroup.getStatus() should match one or more of. Can be empty to indicate no filtration
      vals - Map of field to value changes to make to the ChangeSummaryGroup instance
      enforceArchive - Whether archive status should be checked before updating
      Returns:
      Whether or not an update was performed. If no record found matching the id and state, will return false.
      Throws:
      IllegalArgumentException - if vals is empty
    • updateVals

      @Policy(operationTypes=UPDATE) void updateVals(@NonNull @NonNull List<String> changeSummaryGroupIds, @Nullable String whereState, @Nullable List<String> whereStatus, @NonNull @NonNull Map<String,Object> vals)
      Update the fields for multiple records matching the ids
      Parameters:
      changeSummaryGroupIds - The ids requested to mutate
      whereState - The valid ChangeState value for which ChangeSummaryGroup.getState() should match
      whereStatus - The list of ChangeStatusType values for which ChangeSummaryGroup.getStatus() should match one or more of. Can be empty to indicate no filtration
      vals - Map of field to value changes to make to the ChangeSummaryGroup instance
      Throws:
      IllegalArgumentException - if vals is empty
    • batchTransition

      @Policy(operationTypes=UPDATE) boolean batchTransition(PromoteBatchFlushContext flushContext)
      Given a PromoteBatchFlushContext containing ChangeSummaryGroup transition information, update the state of the group, especially as it relates to transitioned ChangeSummary instances.
      Parameters:
      flushContext - Context object containing the change summary group transition information to commit
    • batchTransition

      @Policy(operationTypes=UPDATE) boolean batchTransition(StateChangeOnlyBatchFlushContext flushContext)
      Given a StateChangeOnlyBatchFlushContext containing ChangeSummaryGroup and ChangeSummary state change information, perform a batch update of the prescribed state. This does not involved changes to notification states and does not result in state related to sending messages.
      Parameters:
      flushContext - Context containing ChangeSummaryGroup and ChangeSummary state change information
      Returns:
      Whether or not the transition was performed
    • findChangeSummaryGroupsBySandbox

      @Deprecated @Policy(operationTypes=READ) Stream<D> findChangeSummaryGroupsBySandbox(String sandbox, String state, @Nullable List<String> status)
      Find all ChangeSummaryGroup instances matching primarily the sandbox.
      Parameters:
      sandbox - The sandbox for which the ChangeSummaryGroup.getSandbox() should match
      state - The ChangeState value for which ChangeSummaryGroup.getState() should match
      status - The list of ChangeStatusType values for which ChangeSummaryGroup.getStatus() should match one or more of. Can be empty
      Returns:
      A Stream that can be iterated, possibly containing a large number of records or an empty stream if no matches
    • findChangeSummaryGroupsBySandbox

      @Policy(operationTypes=READ) Stream<D> findChangeSummaryGroupsBySandbox(String sandbox, String state, @Nullable List<String> status, boolean vendorNarrowing, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Find all ChangeSummaryGroup instances matching primarily the sandbox.
      Parameters:
      sandbox - The sandbox for which the ChangeSummaryGroup.getSandbox() should match
      state - The ChangeState value for which ChangeSummaryGroup.getState() should match
      status - The list of ChangeStatusType values for which ChangeSummaryGroup.getStatus() should match one or more of. Can be empty
      vendorNarrowing - whether or not to filter results based on the current authentication's vendor restrictions if vendor processing is enabled
      contextInfo - context information about sandboxing and multitenant state
      Returns:
      A Stream that can be iterated, possibly containing a large number of records or an empty stream if no matches
    • findChangeSummaryGroupsByIds

      @Deprecated @Policy(operationTypes=READ) Stream<D> findChangeSummaryGroupsByIds(List<String> changeSummaryGroupIds, String sandbox, List<String> whereStates, @Nullable List<String> whereStatuses)
      Find all ChangeSummaryGroup instances matching primarily a list of ids.
      Parameters:
      changeSummaryGroupIds - The list of ChangeSummaryGroup.getId() values to match
      sandbox - The sandbox for which the ChangeSummaryGroup.getSandbox() should match
      whereStates - The ChangeState value for which ChangeSummaryGroup.getState() should match. Cannot be empty
      whereStatuses - The list of ChangeStatusType values for which ChangeSummaryGroup.getStatus() should match one of more of. Can be empty to indiciate no filtration
      Returns:
      A Stream that can be iterated, possibly containing a large number of records or an empty stream if no matches
      Throws:
      IllegalArgumentException - if no whereStates or changeSummaryGroupIds given
    • findChangeSummaryGroupsByIds

      @Policy(operationTypes=READ) Stream<D> findChangeSummaryGroupsByIds(List<String> changeSummaryGroupIds, String sandbox, List<String> whereStates, @Nullable List<String> whereStatuses, boolean vendorNarrowing, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Find all ChangeSummaryGroup instances matching primarily a list of ids.
      Parameters:
      changeSummaryGroupIds - The list of ChangeSummaryGroup.getId() values to match
      sandbox - The sandbox for which the ChangeSummaryGroup.getSandbox() should match
      whereStates - The ChangeState value for which ChangeSummaryGroup.getState() should match. Cannot be empty
      whereStatuses - The list of ChangeStatusType values for which ChangeSummaryGroup.getStatus() should match one of more of. Can be empty to indiciate no filtration
      vendorNarrowing - whether or not to filter results based on the current authentication's vendor restrictions if vendor processing is enabled
      contextInfo - context information about sandboxing and multitenant state
      Returns:
      A Stream that can be iterated, possibly containing a large number of records or an empty stream if no matches
      Throws:
      IllegalArgumentException - if no whereStates or changeSummaryGroupIds given
    • findChangeSummaryGroupsByIds

      @Policy(operationTypes=READ) Stream<D> findChangeSummaryGroupsByIds(List<String> changeSummaryGroupIds)
      Find all ChangeSummaryGroup instances matching primarily a list of ids.
      Parameters:
      changeSummaryGroupIds - The list of ChangeSummaryGroup.getId() values to match
      Returns:
      A Stream that can be iterated, possibly containing a large number of records or an empty stream if no matches
      Throws:
      IllegalArgumentException - if no changeSummaryGroupIds given
    • findChangeSummaryGroupByIdsCount

      @Policy(operationTypes=READ) Long findChangeSummaryGroupByIdsCount(List<String> changeSummaryGroupIds, List<String> states, @Nullable List<String> statuses, @NonNull @NonNull String sandbox)
      Given a list of ChangeSummaryGroup ids, find the count of groups that match the state requirements defined in the params.
      Parameters:
      changeSummaryGroupIds - The group ids to check
      states - The ChangeState value for which ChangeSummaryGroup.getState() should match. Cannot be empty
      statuses - he list of ChangeStatusType values for which ChangeSummaryGroup.getStatus() should match one of more of. Can be empty to indicate no filtration
      sandbox - The sandbox for which the ChangeSummaryGroup.getSandbox() should match
      Returns:
      The count of entities matching the requested params
    • readPageByStateAndSandboxAndArchivedNot

      @Deprecated @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> readPageByStateAndSandboxAndArchivedNot(String state, String sandbox, @Nullable Boolean archived, @Nullable cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable)
      Retrieve a page of records filtered by state and sandbox
      Parameters:
      state - The ChangeSummaryGroup.getState() value to filter results by
      sandbox - The ChangeSummaryGroup.getSandbox() ()} value to filter results by
      archived - ChangeSummaryGroup.getArchived() value to not match
      filters - the RSQL Node used to restrict result
      pageable - The page setup information
      Returns:
      The page of records
    • readPageByStateAndSandboxAndArchivedNot

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> readPageByStateAndSandboxAndArchivedNot(String state, String sandbox, @Nullable Boolean archived, @Nullable cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, boolean vendorNarrowing, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve a page of records filtered by state and sandbox
      Parameters:
      state - The ChangeSummaryGroup.getState() value to filter results by
      sandbox - The ChangeSummaryGroup.getSandbox() ()} value to filter results by
      archived - ChangeSummaryGroup.getArchived() value to not match
      filters - the RSQL Node used to restrict result
      pageable - The page setup information
      vendorNarrowing - whether or not to filter results based on the current authentication's vendor restrictions if vendor processing is enabled
      contextInfo - context information about sandboxing and multitenant state
      Returns:
      The page of records
    • readPageByStateAndSandboxAndAuthorAndArchivedNot

      @Deprecated @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> readPageByStateAndSandboxAndAuthorAndArchivedNot(String state, String sandbox, String author, @Nullable Boolean archived, @Nullable cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable)
      Retrieve a page of records filtered by state, sandbox, and author
      Parameters:
      state - The ChangeSummaryGroup.getState() value to filter results by
      sandbox - The ChangeSummaryGroup.getSandbox() value to filter results by
      author - The ChangeSummaryGroup.getAuthor() value to filter records by
      archived - ChangeSummaryGroup.getArchived() value to not match
      filters - the RSQL Node used to restrict result
      pageable - The page setup information
      Returns:
      The page of records
    • readPageByStateAndSandboxAndAuthorAndArchivedNot

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> readPageByStateAndSandboxAndAuthorAndArchivedNot(String state, String sandbox, String author, @Nullable Boolean archived, @Nullable cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, boolean vendorNarrowing, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve a page of records filtered by state, sandbox, and author
      Parameters:
      state - The ChangeSummaryGroup.getState() value to filter results by
      sandbox - The ChangeSummaryGroup.getSandbox() value to filter results by
      author - The ChangeSummaryGroup.getAuthor() value to filter records by
      archived - ChangeSummaryGroup.getArchived() value to not match
      filters - the RSQL Node used to restrict result
      pageable - The page setup information
      vendorNarrowing - whether or not to filter results based on the current authentication's vendor restrictions if vendor processing is enabled
      contextInfo - context information about sandboxing and multitenant state
      Returns:
      The page of records
    • archiveChangeSummaryGroupsForSandbox

      @Policy(operationTypes=UPDATE) void archiveChangeSummaryGroupsForSandbox(String sandboxId)
      Archives the group of ChangeSummary for the specified sandbox id.
      Parameters:
      sandboxId - the sandbox id associated to the change summary groups
    • removeFromAffectedVendors

      @Policy(operationTypes=UPDATE) boolean removeFromAffectedVendors(String changeSummaryGroupId, String vendorRef)
      Atomically removes the given vendorRef from ChangeSummaryGroup.getAffectedVendorRefs() of the given changeSummaryGroupId if present.
      Parameters:
      changeSummaryGroupId - the ID of the group to update
      vendorRef - the vendor ref to remove from ChangeSummaryGroup.getAffectedVendorRefs()
      Returns:
      true if the removal was successful, false otherwise
    • cleanupBatch

      @Policy(operationTypes=UPDATE) @Nullable String cleanupBatch(@Nullable String startingId, boolean archive, List<ChangeStatusType> detectStatuses, List<ChangeState> detectStates, ChangeStatusType targetStatus, ChangeState targetState, List<ChangeStatusType> summaryDetectStatuses, List<ChangeState> summaryDetectStates, Object source)
      Check a bag of ChangeSummaryGroup entities for completion state. If complete, update status and state.
      Parameters:
      startingId - The ChangeSummaryGroup entity id that represents the start of the collection of entities to check. The size of the collection is determined by CompletionCleanupProperties.getCleanupBatchSize().
      archive - Whether to archive the ChangeSummaryGroup upon completion
      detectStatuses - The list of statuses to match. One of these statuses must match an entity status to be considered as part of the cleanup routine.
      detectStates - The list of states to match. One of these statuses must match an entity state to be considered as part of the cleanup routine.
      targetStatus - The status to set on one or more entities if determined to be complete
      targetState - The state to set on one or more entities if determined to be complete
      summaryDetectStatuses - The list of associated ChangeSummary statuses to NOT match. Associated ChangeSummary instances must not be in any of these statuses for the related ChangeDeploy to be considered complete.
      summaryDetectStates - The list of associated ChangeSummary states to NOT match. Associated ChangeSummary instances must not be in any of these states for the related ChangeDeploy to be considered complete.
      source - The specific cleanup service instance making the call
      Returns:
      The last ChangeSummaryGroup entity id used as part of the executed batch. This value is interesting to provide as the startingId for subsequent calls to this method when performing a paged style execution approach. May be null if no values were found, or if fewer than the configured batch size were found.