public class MultiTenantCopyContext extends Object
Modifier and Type | Field and Description |
---|---|
static String[] |
BROADLEAF_PACKAGE_PREFIXES |
protected Map<Integer,Object> |
currentCloneMap |
protected com.google.common.collect.BiMap<Integer,String> |
currentEquivalentMap |
protected Map<String,Map<Object,Object>> |
equivalentsMap |
protected MultiTenantCopierExtensionManager |
extensionManager |
protected Catalog |
fromCatalog |
protected Site |
fromSite |
protected GenericEntityService |
genericEntityService |
protected Catalog |
toCatalog |
protected Site |
toSite |
Constructor and Description |
---|
MultiTenantCopyContext(Catalog fromCatalog,
Catalog toCatalog,
Site fromSite,
Site toSite,
GenericEntityService genericEntityService,
MultiTenantCopierExtensionManager extensionManager) |
Modifier and Type | Method and Description |
---|---|
void |
checkCloneable(Object cloned)
Detects whether or not the current cloned entity is an extension of an entity in Broadleaf, and if so, if the
extension itself does not implement clone.
|
protected boolean |
checkCloneStatus(Object instance) |
void |
clearOriginalIdentifiers() |
<G> CreateResponse<G> |
createOrRetrieveCopyInstance(Object instance)
Create a new instance of the polymorphic entity type - could be an extended type outside of Broadleaf.
|
Field[] |
getAllFields(Class<?> targetClass) |
<T> T |
getClonedVersion(Class<T> clazz,
Object originalId) |
Object |
getEquivalentId(String className,
Object fromId) |
Catalog |
getFromCatalog() |
Site |
getFromSite() |
Long |
getIdentifier(Object entity) |
Catalog |
getToCatalog() |
Site |
getToSite() |
Object |
removeOriginalIdentifier(Object copy) |
void |
storeEquivalentMapping(String className,
Object fromId,
Object toId) |
public static final String[] BROADLEAF_PACKAGE_PREFIXES
protected Catalog fromCatalog
protected Catalog toCatalog
protected Site fromSite
protected Site toSite
protected MultiTenantCopierExtensionManager extensionManager
protected GenericEntityService genericEntityService
public MultiTenantCopyContext(Catalog fromCatalog, Catalog toCatalog, Site fromSite, Site toSite, GenericEntityService genericEntityService, MultiTenantCopierExtensionManager extensionManager)
public void storeEquivalentMapping(String className, Object fromId, Object toId)
public Catalog getFromCatalog()
public Catalog getToCatalog()
public Site getFromSite()
public Site getToSite()
public void checkCloneable(Object cloned) throws CloneNotSupportedException
cloned
- the cloned entity instanceCloneNotSupportedException
- thrown if the entity is an extension and is does not implement clonepublic <G> CreateResponse<G> createOrRetrieveCopyInstance(Object instance) throws CloneNotSupportedException
G
- instance
- the object instance for the actual entity type (could be extended)CloneNotSupportedException
public void clearOriginalIdentifiers()
protected boolean checkCloneStatus(Object instance)
Copyright © 2017. All rights reserved.