@Service(value="blEntityDuplicator") public class EntityDuplicatorImpl extends MultiTenantCopier implements EntityDuplicator
EntityDuplicator| Modifier and Type | Field and Description | 
|---|---|
| protected Collection<EntityDuplicationHelper> | entityDuplicationHelpers | 
| 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)Create a production duplicate of the entity specified in the params. | 
| <T> T | copy(Class<T> entityClass,
    Long id,
    Map<String,String> copyHints,
    EntityDuplicateModifier... modifiers)Deprecated.  | 
| <T> T | copy(MultiTenantCopyContext context,
    MultiTenantCloneable<T> entity)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)Deprecated.  | 
| void | copyEntities(MultiTenantCopyContext context)Main method that should be implemented by each  MultiTenantCopierto drive the logic of
 copying that particular entity to the new derived catalog. | 
| protected Set<EntityDuplicationHelper> | filterDuplicationHelpers(MultiTenantCloneable entity) | 
| protected <T> T | performCopy(MultiTenantCopyContext context,
           MultiTenantCloneable<T> entity) | 
| protected <T> T | performCopy(MultiTenantCopyContext context,
           MultiTenantCloneable<T> entity,
           Map<String,String> copyHints,
           EntityDuplicateModifier... modifiers)Deprecated.  | 
| protected void | putAllCopyHints(MultiTenantCopyContext context,
               Set<EntityDuplicationHelper> helpers) | 
| boolean | validate(Class<?> entityClass,
        Long id)Validate whether or not this feature is enabled and whether 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
protected Collection<EntityDuplicationHelper> entityDuplicationHelpers
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 EntityDuplicator@Deprecated public <T> T copy(Class<T> entityClass, Long id, Map<String,String> copyHints, EntityDuplicateModifier... modifiers)
EntityDuplicateModifiers, add the beans to
 EntityDuplicationHelpers. Additionally, add copy hints to the helpers.
 Also, note that you should implement AbstractEntityDuplicationHelper now instead as
 EntityDuplicateModifier is deprecated.copy in interface EntityDuplicator@Deprecated public <T> T copy(MultiTenantCopyContext context, MultiTenantCloneable<T> entity, Map<String,String> copyHints, EntityDuplicateModifier... modifiers)
EntityDuplicateModifiers, add the beans to
 EntityDuplicationHelpers. Additionally, add copy hints to the helpers.
 Also, note that you should implement AbstractEntityDuplicationHelper now instead as
 EntityDuplicateModifier is deprecated.copy in interface EntityDuplicator@Transactional(value="blTransactionManager") public <T> T copy(Class<T> entityClass, Long id)
EntityDuplicatorcopy in interface EntityDuplicatorT - the entity typeentityClass - the class for the entityid - the primary key@Transactional(value="blTransactionManager") public <T> T copy(MultiTenantCopyContext context, MultiTenantCloneable<T> entity)
EntityDuplicatorcopy in interface EntityDuplicatorT - the entity typecontext - prepopulated copy context that is setup for catalog and/or siteentity - the instance to duplicate@Deprecated protected <T> T performCopy(MultiTenantCopyContext context, MultiTenantCloneable<T> entity, Map<String,String> copyHints, EntityDuplicateModifier... modifiers) throws Exception
EntityDuplicateModifiers, add the beans to 
 EntityDuplicationHelpers. Additionally, add copy hints to the helpers.
 Also, note that you should implement AbstractEntityDuplicationHelper now instead as 
 EntityDuplicateModifier is deprecated.Exceptionprotected <T> T performCopy(MultiTenantCopyContext context, MultiTenantCloneable<T> entity) throws Exception
Exceptionprotected Set<EntityDuplicationHelper> filterDuplicationHelpers(MultiTenantCloneable entity)
protected void putAllCopyHints(MultiTenantCopyContext context, Set<EntityDuplicationHelper> helpers)
Copyright © 2020. All rights reserved.