org.openl.dependency
Class DependencyManager

java.lang.Object
  extended by org.openl.dependency.DependencyManager
All Implemented Interfaces:
IDependencyManager

public abstract class DependencyManager
extends Object
implements IDependencyManager


Constructor Summary
DependencyManager()
           
 
Method Summary
abstract  List<IDependencyLoader> getDependencyLoaders()
           
 Map<String,Object> getExternalParameters()
          Some additional options for compilation defined externally(e.g. external dependencies, overridden system properties)
protected  CompiledDependency handleLoadDependency(IDependency dependency)
          Handles loading dependent modules.
 boolean isExecutionMode()
          Return flag, describing is it execution mode or not.
 CompiledDependency loadDependency(IDependency dependency)
          Load and compile the given dependency.
 void reset(IDependency dependency)
          Remove given dependency from cache.
 void resetAll()
          Remove all dependencies from cache.
 void setExecutionMode(boolean executionMode)
          In execution mode all meta info that is not used in rules running is being cleaned.
 void setExternalParameters(Map<String,Object> parameters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DependencyManager

public DependencyManager()
Method Detail

loadDependency

public CompiledDependency loadDependency(IDependency dependency)
                                  throws OpenLCompilationException
Description copied from interface: IDependencyManager
Load and compile the given dependency.

Specified by:
loadDependency in interface IDependencyManager
Parameters:
dependency - to be loaded.
Returns:
CompiledDependency
Throws:
OpenLCompilationException

reset

public void reset(IDependency dependency)
Description copied from interface: IDependencyManager
Remove given dependency from cache.

Specified by:
reset in interface IDependencyManager
Parameters:
dependency - to be cleaned from cache.

resetAll

public void resetAll()
Description copied from interface: IDependencyManager
Remove all dependencies from cache.

Specified by:
resetAll in interface IDependencyManager

setExecutionMode

public void setExecutionMode(boolean executionMode)
In execution mode all meta info that is not used in rules running is being cleaned.

Parameters:
executionMode - flag indicating is it execution mode or not.

isExecutionMode

public boolean isExecutionMode()
Description copied from interface: IDependencyManager
Return flag, describing is it execution mode or not.
In execution mode all meta info that is not used in rules running is being cleaned.

Specified by:
isExecutionMode in interface IDependencyManager
Returns:
flag is it execution mode or not.

getDependencyLoaders

public abstract List<IDependencyLoader> getDependencyLoaders()

handleLoadDependency

protected CompiledDependency handleLoadDependency(IDependency dependency)
                                           throws OpenLCompilationException
Handles loading dependent modules. This method should not cache dependencies (method loadDependency(IDependency) already uses caching) Default implementation uses dependency loaders to load the dependency. Can be overriden to redefine behavior.

Parameters:
dependency - dependency to load
Returns:
loaded and compiled dependency
Throws:
OpenLCompilationException - if exception during compilation is occured

getExternalParameters

public Map<String,Object> getExternalParameters()
Description copied from interface: IDependencyManager
Some additional options for compilation defined externally(e.g. external dependencies, overridden system properties)

Specified by:
getExternalParameters in interface IDependencyManager

setExternalParameters

public void setExternalParameters(Map<String,Object> parameters)


Copyright © 2013. All Rights Reserved.