Class EntityDuplicatorExtensionManager
java.lang.Object
org.broadleafcommerce.common.extension.ExtensionManager<EntityDuplicatorExtensionHandler>
org.broadleafcommerce.common.persistence.EntityDuplicatorExtensionManager
- All Implemented Interfaces:
InvocationHandler
,ExtensionHandler
,EntityDuplicatorExtensionHandler
@Service("blEntityDuplicatorExtensionManager")
public class EntityDuplicatorExtensionManager
extends ExtensionManager<EntityDuplicatorExtensionHandler>
implements EntityDuplicatorExtensionHandler
Manage the interaction between a duplication operation and other modules that wish to contribute to that lifecycle
- Author:
- Jeff Fischer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ExtensionManagerOperation
static final ExtensionManagerOperation
static final ExtensionManagerOperation
static final ExtensionManagerOperation
static final ExtensionManagerOperation
static final ExtensionManagerOperation
Fields inherited from class org.broadleafcommerce.common.extension.ExtensionManager
extensionHandler, handlers, handlersSorted, LOCK_OBJECT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddToSandbox
(Object entity) Add duplication entity to the sandboxgetCatalogsForPropagation
(MultiTenantCopyContext context, ExtensionResultHolder<List<MultiTenantCopyContext>> resultHolder) getClonesByCatalogs
(String tableName, Long id, MultiTenantCopyContext multiTenantCopyContext, ExtensionResultHolder<Map<Long, Map<Long, Long>>> resultHolder) boolean
If false, the ExtensionManager should skip this Handler.setupDuplicate
(Object entity, ExtensionResultHolder<MultiTenantCopyContext> resultHolder) Perform any required context and state setup before commencing with the duplicationTear down any expired context and state used during the duplicationvalidateDuplicate
(Object entity, ExtensionResultHolder<Boolean> resultHolder) Confirm whether or not duplication operation is allowedMethods inherited from class org.broadleafcommerce.common.extension.ExtensionManager
continueOnHandled, execute, getHandlers, getPriority, getProxy, invoke, registerHandler, setHandlers, shouldContinue, sortHandlers
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler
getPriority
-
Field Details
-
validateDuplicate
-
setupDuplicate
-
tearDownDuplicate
-
addToSandbox
-
getCatalogsForPropagation
-
getClonesByCatalogs
-
-
Constructor Details
-
EntityDuplicatorExtensionManager
public EntityDuplicatorExtensionManager()
-
-
Method Details
-
validateDuplicate
public ExtensionResultStatusType validateDuplicate(Object entity, ExtensionResultHolder<Boolean> resultHolder) Description copied from interface:EntityDuplicatorExtensionHandler
Confirm whether or not duplication operation is allowed- Specified by:
validateDuplicate
in interfaceEntityDuplicatorExtensionHandler
- Returns:
-
setupDuplicate
public ExtensionResultStatusType setupDuplicate(Object entity, ExtensionResultHolder<MultiTenantCopyContext> resultHolder) Description copied from interface:EntityDuplicatorExtensionHandler
Perform any required context and state setup before commencing with the duplication- Specified by:
setupDuplicate
in interfaceEntityDuplicatorExtensionHandler
- Returns:
-
addToSandbox
Description copied from interface:EntityDuplicatorExtensionHandler
Add duplication entity to the sandbox- Specified by:
addToSandbox
in interfaceEntityDuplicatorExtensionHandler
- Returns:
-
tearDownDuplicate
Description copied from interface:EntityDuplicatorExtensionHandler
Tear down any expired context and state used during the duplication- Specified by:
tearDownDuplicate
in interfaceEntityDuplicatorExtensionHandler
- Returns:
-
getCatalogsForPropagation
public ExtensionResultStatusType getCatalogsForPropagation(MultiTenantCopyContext context, ExtensionResultHolder<List<MultiTenantCopyContext>> resultHolder) - Specified by:
getCatalogsForPropagation
in interfaceEntityDuplicatorExtensionHandler
-
getClonesByCatalogs
public ExtensionResultStatusType getClonesByCatalogs(String tableName, Long id, MultiTenantCopyContext multiTenantCopyContext, ExtensionResultHolder<Map<Long, Map<Long, Long>>> resultHolder) - Specified by:
getClonesByCatalogs
in interfaceEntityDuplicatorExtensionHandler
-
isEnabled
public boolean isEnabled()Description copied from interface:ExtensionHandler
If false, the ExtensionManager should skip this Handler.- Specified by:
isEnabled
in interfaceExtensionHandler
- Returns:
-