T
- object being deserializedpublic class ConfigDependencyAnalyzer<T extends ICloneableConfig<T>> extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
canPersist |
protected List<ConfigForeignKey> |
configForeignKeys |
protected Collection<String> |
dependencyKeys |
protected DeserializationContext |
deserializationContext |
protected boolean |
hasViolation |
protected T |
originalConfig |
protected T |
persistableConfig |
Constructor and Description |
---|
ConfigDependencyAnalyzer(DeserializationContext deserializationContext,
List<ConfigForeignKey> configForeignKeys,
T originalConfig) |
Modifier and Type | Method and Description |
---|---|
protected void |
addDependentConfigOperation(IConfigPersister configPersister) |
void |
analyze(IConfigPersister configPersister)
Analyze the original config, generating a persistable config and scheduling the persistence
of original config to be performed after the dependencies were resolved.
|
protected void |
analyzeForeignKeys()
Analyze the original config, generating a persistable config.
|
boolean |
foreignKeysExists()
Verify that all foreign key mapped values match persisted objects
|
boolean |
getCanPersist() |
protected ConfigPersistence |
getConfigPersistence(IConfigPersister configPersister) |
Collection<String> |
getDependencyKeys() |
boolean |
getHasViolation() |
T |
getMappedPersistableConfig()
Returns a mapped cloned of the persistable config, which, in turn, represents a clone of original config, with its foreign keys updated to be non-violated.
|
T |
getOriginalConfig() |
T |
getPersistableConfig()
Returns the persistable config, which represents a clone of original config, with its foreign keys updated to be non-violated.
|
void |
persist(IConfigPersister configPersister,
boolean firstPersistenceIsRequired) |
void |
setHasViolation(boolean hasViolation) |
protected final DeserializationContext deserializationContext
protected final List<ConfigForeignKey> configForeignKeys
protected final T extends ICloneableConfig<T> originalConfig
protected T extends ICloneableConfig<T> persistableConfig
protected boolean hasViolation
protected final Collection<String> dependencyKeys
protected boolean canPersist
public ConfigDependencyAnalyzer(DeserializationContext deserializationContext, List<ConfigForeignKey> configForeignKeys, T originalConfig)
public boolean getHasViolation()
public void setHasViolation(boolean hasViolation)
public T getOriginalConfig()
public T getPersistableConfig()
public T getMappedPersistableConfig()
public Collection<String> getDependencyKeys()
public boolean getCanPersist()
public void persist(IConfigPersister configPersister, boolean firstPersistenceIsRequired) throws PortalException
PortalException
public void analyze(IConfigPersister configPersister)
configPersister
- PortalException
protected void analyzeForeignKeys()
protected void addDependentConfigOperation(IConfigPersister configPersister)
protected ConfigPersistence getConfigPersistence(IConfigPersister configPersister)
public boolean foreignKeysExists()
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.