public interface EntityDuplicator
admin.entity.duplication.isactive=true
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.
|
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.
|
boolean validate(Class<?> entityClass, Long id)
entityClass
- id
- boolean validate(Object entity)
entity
- <T> T copy(Class<T> entityClass, Long id, Map<String,String> copyHints, EntityDuplicateModifier... modifiers)
T
- 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 persistence<T> T copy(MultiTenantCopyContext context, MultiTenantCloneable<T> entity, Map<String,String> copyHints, EntityDuplicateModifier... modifiers)
T
- 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 persistenceCopyright © 2019. All rights reserved.