@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
MultiTenantCopier to 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
MultiTenantCopier
MultiTenantCopier
to drive the logic of
copying that particular entity to the new derived catalog.copyEntities
in class MultiTenantCopier
Exception
public boolean validate(Class<?> entityClass, Long id)
EntityDuplicator
validate
in interface EntityDuplicator
public boolean validate(Object entity)
EntityDuplicator
validate
in interface EntityDuplicator
@Deprecated public <T> T copy(Class<T> entityClass, Long id, Map<String,String> copyHints, EntityDuplicateModifier... modifiers)
EntityDuplicateModifier
s, 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)
EntityDuplicateModifier
s, 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)
EntityDuplicator
copy
in interface EntityDuplicator
T
- the entity typeentityClass
- the class for the entityid
- the primary key@Transactional(value="blTransactionManager") public <T> T copy(MultiTenantCopyContext context, MultiTenantCloneable<T> entity)
EntityDuplicator
copy
in interface EntityDuplicator
T
- 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
EntityDuplicateModifier
s, 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.Exception
protected <T> T performCopy(MultiTenantCopyContext context, MultiTenantCloneable<T> entity) throws Exception
Exception
protected Set<EntityDuplicationHelper> filterDuplicationHelpers(MultiTenantCloneable entity)
protected void putAllCopyHints(MultiTenantCopyContext context, Set<EntityDuplicationHelper> helpers)
Copyright © 2022. All rights reserved.