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 ExtensionManagerOperationstatic final ExtensionManagerOperationstatic final ExtensionManagerOperationstatic final ExtensionManagerOperationstatic final ExtensionManagerOperationstatic final ExtensionManagerOperationFields 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) booleanIf 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, sortHandlersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:EntityDuplicatorExtensionHandlerConfirm whether or not duplication operation is allowed- Specified by:
validateDuplicatein interfaceEntityDuplicatorExtensionHandler- Returns:
-
setupDuplicate
public ExtensionResultStatusType setupDuplicate(Object entity, ExtensionResultHolder<MultiTenantCopyContext> resultHolder) Description copied from interface:EntityDuplicatorExtensionHandlerPerform any required context and state setup before commencing with the duplication- Specified by:
setupDuplicatein interfaceEntityDuplicatorExtensionHandler- Returns:
-
addToSandbox
Description copied from interface:EntityDuplicatorExtensionHandlerAdd duplication entity to the sandbox- Specified by:
addToSandboxin interfaceEntityDuplicatorExtensionHandler- Returns:
-
tearDownDuplicate
Description copied from interface:EntityDuplicatorExtensionHandlerTear down any expired context and state used during the duplication- Specified by:
tearDownDuplicatein interfaceEntityDuplicatorExtensionHandler- Returns:
-
getCatalogsForPropagation
public ExtensionResultStatusType getCatalogsForPropagation(MultiTenantCopyContext context, ExtensionResultHolder<List<MultiTenantCopyContext>> resultHolder) - Specified by:
getCatalogsForPropagationin interfaceEntityDuplicatorExtensionHandler
-
getClonesByCatalogs
public ExtensionResultStatusType getClonesByCatalogs(String tableName, Long id, MultiTenantCopyContext multiTenantCopyContext, ExtensionResultHolder<Map<Long, Map<Long, Long>>> resultHolder) - Specified by:
getClonesByCatalogsin interfaceEntityDuplicatorExtensionHandler
-
isEnabled
public boolean isEnabled()Description copied from interface:ExtensionHandlerIf false, the ExtensionManager should skip this Handler.- Specified by:
isEnabledin interfaceExtensionHandler- Returns:
-