@Service(value="blVersionManager") public class VersionManagerImpl extends Object implements VersionManager
VersionManager
Modifier and Type | Field and Description |
---|---|
protected org.broadleafcommerce.common.sandbox.service.SandBoxService |
sandBoxService |
protected WorkflowSandBoxItemService |
sbItemService |
protected VersionDao |
versionDao |
protected EnterpriseWorkflowLogger |
workflowLogger |
protected WorkflowStateManager |
workflowStateManager |
Constructor and Description |
---|
VersionManagerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
handlePromote(Long targetSandBoxId,
String groupDescription,
Long version,
Long sandBoxId)
Update the version for a
WorkflowSandBoxItem resulting from a promotion |
void |
handleReject(Long mySandBoxId,
String groupDescription,
Long originalSandBox)
Update the version for a
WorkflowSandBoxItem resulting from a reject |
void |
handleSyncChanges(Long mySandBoxId,
Long parentSandBox,
String groupDescription)
Update the version for a
WorkflowSandBoxItem resulting from a sync |
boolean |
isSandBoxInSyncWithParent(Long parentSandBox,
Long mySandBox,
String groupName,
Long inheritedVersion)
Detect whether or not the current user context is behind in version from the next promotion sandbox.
|
protected VersionDao versionDao
protected WorkflowSandBoxItemService sbItemService
protected org.broadleafcommerce.common.sandbox.service.SandBoxService sandBoxService
protected WorkflowStateManager workflowStateManager
protected EnterpriseWorkflowLogger workflowLogger
public void handlePromote(Long targetSandBoxId, String groupDescription, Long version, Long sandBoxId)
VersionManager
WorkflowSandBoxItem
resulting from a promotionhandlePromote
in interface VersionManager
targetSandBoxId
- the sandbox the change was promoted togroupDescription
- the description for the group (this includes the entity name and id) WorkflowSandBoxItem.getGroupDescription()
version
- the current version of the promoted WorkflowSandBoxItem
sandBoxId
- the sandbox for the promoted WorkflowSandBoxItem
public void handleSyncChanges(Long mySandBoxId, Long parentSandBox, String groupDescription)
VersionManager
WorkflowSandBoxItem
resulting from a synchandleSyncChanges
in interface VersionManager
mySandBoxId
- the sandbox requesting the syncparentSandBox
- the sandbox from which the sync is derived - presumably advanced beyond my sandboxgroupDescription
- the description for the group (this includes the entity name and id) WorkflowSandBoxItem.getGroupDescription()
public void handleReject(Long mySandBoxId, String groupDescription, Long originalSandBox)
VersionManager
WorkflowSandBoxItem
resulting from a rejecthandleReject
in interface VersionManager
mySandBoxId
- the current version of the WorkflowSandBoxItem
groupDescription
- the description for the group (this includes the entity name and id) WorkflowSandBoxItem.getGroupDescription()
originalSandBox
- the version from which the WorkflowSandBoxItem
originally came. WorkflowSandBoxItem.getOriginalSandBoxId()
public boolean isSandBoxInSyncWithParent(Long parentSandBox, Long mySandBox, String groupName, Long inheritedVersion)
VersionManager
isSandBoxInSyncWithParent
in interface VersionManager
parentSandBox
- the next promotion sandboxmySandBox
- the current promotion sandboxgroupName
- the description for the group (this includes the entity name and id) WorkflowSandBoxItem.getGroupDescription()
inheritedVersion
- the version that my sandbox changes were most recently synced to, if at all (can be null). WorkflowSandBoxItem.getInheritedVersion()
Copyright © 2021. All rights reserved.