Interface PurgeSandboxWorkflowEntitiesService
- All Known Implementing Classes:
PurgeSandboxWorkflowEntitiesServiceImpl
public interface PurgeSandboxWorkflowEntitiesService
A service to aid in retrieving and removing
WorkflowSandBoxItems and its related entities- Author:
- Jay Aisenbrey (cja769)
-
Method Summary
Modifier and TypeMethodDescriptionintRemoves all orphanedApprovalDetailssintbatchRemoveDeployments(Date expiryDate) Removes all orphanedWorkflowDeploymentsintbatchRemoveEntityItems(Set<Long> entityItems) Removes theEntityItems for the given entity item idsintRemoves all orphanedPromotionDetailssintbatchRemoveWorkflowEvents(Date expiryDate) Removes all orphanedWorkflowEventsintPurges all records per the providedPurgeSandboxWorkflowBatchDTO.intbatchRemoveWorkflowSandBoxEventItems(Set<Long> workflowIds) RemovesWorkflowEventWorkflowItemXrefwhere the item id is in the given set of longsintbatchRemoveWorkflowSandBoxItems(Set<Long> workflowIds) Removes theWorkflowSandBoxItems for the given idsfindArchivedParentWorkflowSandBoxItems(Set<Long> itemsToIgnore, Date expiryDate, int maxResults, boolean filterSiteOverrides) Retrieves theWorkflowSandBoxItems that are archived, are older than expiryDate, whose id isn't in itemsToIgnore, and doesn't have aWorkflowSandBoxItemthat depend on them.Returns theEntityItem, if it exists, for the givenWorkflowSandBoxItemReturns theWorkflowEvent, if it exists, for the givenWorkflowSandBoxItemFinds theWorkflowSandBoxItemby the given id;Saves the givenWorkflowSandBoxItem.
-
Method Details
-
findArchivedParentWorkflowSandBoxItems
List<WorkflowSandBoxItem> findArchivedParentWorkflowSandBoxItems(Set<Long> itemsToIgnore, Date expiryDate, int maxResults, boolean filterSiteOverrides) Retrieves theWorkflowSandBoxItems that are archived, are older than expiryDate, whose id isn't in itemsToIgnore, and doesn't have aWorkflowSandBoxItemthat depend on them. Additionally the filterSiteOverrides parameter dictates if we should returnWorkflowSandBoxItems that are for a site override.- Parameters:
itemsToIgnore- A set of longs that indicate theWorkflowSandBoxItemids that should not filtered out from the result setexpiryDate- The most recentDateof an archivedWorkflowSandBoxItemthat shoudl be returnedmaxResults- The maximum number of results that should be returnedfilterSiteOverrides- A boolean indicating ifWorkflowSandBoxItemfor site overrides should be returned. If true then they will filtered; else they will be included in the result- Returns:
- A List of
WorkflowSandBoxItems that meet the given criteria
-
findWorkflowEventByWorkflowSandBoxItem
Returns theWorkflowEvent, if it exists, for the givenWorkflowSandBoxItem- Parameters:
item- TheWorkflowSandBoxItemto find theWorkflowEventfor- Returns:
- The corresponding
WorkflowEventfor the givenWorkflowSandBoxItem
-
findEntityItemByWorkflowSandBoxItem
Returns theEntityItem, if it exists, for the givenWorkflowSandBoxItem- Parameters:
item- TheWorkflowSandBoxItemto find theEntityItemfor- Returns:
- The corresponding
EntityItemfor the givenWorkflowSandBoxItem
-
saveWorkflowSandBoxItem
Saves the givenWorkflowSandBoxItem. This is usually used to save changes to the dependent items so we don't have to manually delete from that xref table- Parameters:
item- TheWorkflowSandBoxItemto save- Returns:
- The
WorkflowSandBoxItemafter it's persisted
-
findWorkflowSandBoxItemById
Finds theWorkflowSandBoxItemby the given id;- Parameters:
id- The id to find theWorkflowSandBoxItemby- Returns:
- The
WorkflowSandBoxItemthat was found
-
batchRemoveWorkflowSandBoxEventItems
RemovesWorkflowEventWorkflowItemXrefwhere the item id is in the given set of longs- Parameters:
workflowIds- TheWorkflowSandBoxItemids whoseWorkflowEventWorkflowItemXrefs should be removed for- Returns:
- The number of records deleted
-
batchRemoveEntityItems
Removes theEntityItems for the given entity item ids- Parameters:
entityItems- TheEntityItemids to use for removal- Returns:
- The number of records deleted
-
batchRemoveWorkflowSandBoxItems
Removes theWorkflowSandBoxItems for the given ids- Parameters:
workflowIds- The ids for theWorkflowSandBoxItems that should be removed- Returns:
- The number of records deleted
-
batchRemoveWorkflowEvents
Removes all orphanedWorkflowEvents- Parameters:
expiryDate- is a limit of time to perform the Remove- Returns:
- The number of records deleted
-
batchRemoveDeployments
Removes all orphanedWorkflowDeployments- Parameters:
expiryDate- is a limit of time to perform the Remove- Returns:
- The number of records deleted
-
batchRemoveApprovals
int batchRemoveApprovals()Removes all orphanedApprovalDetailss- Returns:
- The number of records deleted
-
batchRemovePromotions
int batchRemovePromotions()Removes all orphanedPromotionDetailss- Returns:
- The number of records deleted
-
batchRemoveWorkflowSandBoxDTO
Purges all records per the providedPurgeSandboxWorkflowBatchDTO. Generally this indicates a purge of one or moreWorkflowSandBoxItems- Parameters:
batchDTO- ThePurgeSandboxWorkflowBatchDTOused for deletion- Returns:
- The number of records deleted
-