@Service(value="blEntityDuplicator") public class EntityDuplicatorImpl extends MultiTenantCopier implements EntityDuplicator
EntityDuplicator| Modifier and Type | Field and Description |
|---|---|
protected EntityDuplicatorExtensionManager |
extensionManager |
protected boolean |
isActive |
protected MultiTenantCopierExtensionManager |
mtCopierExtensionManager |
classExcludeRegexList, genericEntityService, LOG, order, transUtil| Constructor and Description |
|---|
EntityDuplicatorImpl() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
copy(Class<T> entityClass,
Long id,
Map<String,String> copyHints,
EntityDuplicateModifier... modifiers)
Create a production duplicate of the entity specified in the params.
|
<T> T |
copy(MultiTenantCopyContext context,
MultiTenantCloneable<T> entity,
Map<String,String> copyHints,
EntityDuplicateModifier... modifiers)
Create a production duplicate of the entity specified in the params.
|
void |
copyEntities(MultiTenantCopyContext context)
Main method that should be implemented by each
MultiTenantCopier to drive the logic of
copying that particular entity to the new derived catalog. |
protected <T> T |
performCopy(MultiTenantCopyContext context,
MultiTenantCloneable<T> entity,
Map<String,String> copyHints,
EntityDuplicateModifier... modifiers) |
boolean |
validate(Class<?> entityClass,
Long id)
Validate whether or not this feature is enabled and whether or not the passed entity params are valid for duplication.
|
boolean |
validate(Object entity)
Validate whether or not this feature is enabled and whether or not the passed entity params are valid for duplication.
|
copyEntitiesOfType, excludeFromCopyRegex, getOrder, persistCopyObjectTree, persistCopyObjectTreeInternal, persistNode, readAll, readAll, readAllIds, readCount, save, setOrder@Value(value="${admin.entity.duplication.isactive:false}")
protected boolean isActive
protected EntityDuplicatorExtensionManager extensionManager
protected MultiTenantCopierExtensionManager mtCopierExtensionManager
public void copyEntities(MultiTenantCopyContext context) throws Exception
MultiTenantCopierMultiTenantCopier to drive the logic of
copying that particular entity to the new derived catalog.copyEntities in class MultiTenantCopierExceptionpublic boolean validate(Class<?> entityClass, Long id)
EntityDuplicatorvalidate in interface EntityDuplicatorpublic boolean validate(Object entity)
EntityDuplicatorvalidate in interface EntityDuplicatorpublic <T> T copy(Class<T> entityClass, Long id, Map<String,String> copyHints, EntityDuplicateModifier... modifiers)
EntityDuplicatorcopy in interface EntityDuplicatorT - the entity typeentityClass - the class for the entityid - the primary keycopyHints - hints used to fine tune copying - generally support for hints is included in MultiTenantCloneable.createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext) implementations.modifiers - list of modifications to perform to the resulting duplicate prior to persistencepublic <T> T copy(MultiTenantCopyContext context, MultiTenantCloneable<T> entity, Map<String,String> copyHints, EntityDuplicateModifier... modifiers)
EntityDuplicatorcopy in interface EntityDuplicatorT - the entity typecontext - prepopulated copy context that is setup for catalog and/or siteentity - the instance to duplicatecopyHints - hints used to fine tune copying - generally support for hints is included in MultiTenantCloneable.createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext) implementations.modifiers - list of modifications to perform to the resulting duplicate prior to persistenceprotected <T> T performCopy(MultiTenantCopyContext context, MultiTenantCloneable<T> entity, Map<String,String> copyHints, EntityDuplicateModifier... modifiers) throws Exception
ExceptionCopyright © 2019. All rights reserved.