lumis.portal.serialization.operation
Class ConfigDependencyAnalyzer<T extends ICloneableConfig<T>>

Package class diagram package ConfigDependencyAnalyzer
java.lang.Object
  extended by lumis.portal.serialization.operation.ConfigDependencyAnalyzer<T>
Type Parameters:
T - object being deserialized
Direct Known Subclasses:
AclDependencyAnalyzer, PageDependencyAnalyzer, ServiceInterfaceInstanceConfigDependencyAnalyzer

public class ConfigDependencyAnalyzer<T extends ICloneableConfig<T>>
extends Object

Responsible for analyze foreign key dependencies of a portal object being deserialized.

Since:
4.0.9

Field Summary
protected  boolean canPersist
           
protected  List<ConfigForeignKey> configForeignKeys
           
protected  Collection<String> dependencyKeys
           
protected  DeserializationContext deserializationContext
           
protected  boolean hasViolation
           
protected  T originalConfig
           
protected  T persistableConfig
           
 
Constructor Summary
ConfigDependencyAnalyzer(DeserializationContext deserializationContext, List<ConfigForeignKey> configForeignKeys, T originalConfig)
           
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deserializationContext

protected final DeserializationContext deserializationContext

configForeignKeys

protected final List<ConfigForeignKey> configForeignKeys

originalConfig

protected final T extends ICloneableConfig<T> originalConfig

persistableConfig

protected T extends ICloneableConfig<T> persistableConfig

hasViolation

protected boolean hasViolation

dependencyKeys

protected final Collection<String> dependencyKeys

canPersist

protected boolean canPersist
Constructor Detail

ConfigDependencyAnalyzer

public ConfigDependencyAnalyzer(DeserializationContext deserializationContext,
                                List<ConfigForeignKey> configForeignKeys,
                                T originalConfig)
Method Detail

getHasViolation

public boolean getHasViolation()

setHasViolation

public void setHasViolation(boolean hasViolation)

getOriginalConfig

public T getOriginalConfig()

getPersistableConfig

public T getPersistableConfig()
Returns the persistable config, which represents a clone of original config, with its foreign keys updated to be non-violated.

Returns:
persistable config

getMappedPersistableConfig

public 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.

Returns:
mapped cloned of the persistable config

getDependencyKeys

public Collection<String> getDependencyKeys()

getCanPersist

public boolean getCanPersist()
Returns:
true, if the persistable config can be persisted.

persist

public void persist(IConfigPersister configPersister,
                    boolean firstPersistenceIsRequired)
             throws PortalException
Throws:
PortalException

analyze

public 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. It also determines if the persistable config can be persisted.

Parameters:
configPersister -
Throws:
PortalException

analyzeForeignKeys

protected void analyzeForeignKeys()
Analyze the original config, generating a persistable config. It also determines if the persistable config can be persisted.


addDependentConfigOperation

protected void addDependentConfigOperation(IConfigPersister configPersister)

getConfigPersistence

protected ConfigPersistence getConfigPersistence(IConfigPersister configPersister)

foreignKeysExists

public boolean foreignKeysExists()
Verify that all foreign key mapped values match persisted objects

Returns:
true, if all foreign key mapped values match persisted objects.


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.