org.jtheque.core.managers.module
Class ModuleConfiguration

java.lang.Object
  extended by org.jtheque.core.managers.state.AbstractState
      extended by org.jtheque.core.managers.module.ModuleConfiguration
All Implemented Interfaces:
IState

public final class ModuleConfiguration
extends AbstractState

A module configuration.

Author:
Baptiste Wicht

Constructor Summary
ModuleConfiguration()
          Construct a new ModuleConfiguration.
 
Method Summary
 void add(InstallationResult result)
          Add the result of an installation to the module configuration.
 void add(ModuleContainer module)
          Add a module container to the configuration.
 void add(ModuleContainer module, ModuleState state)
          Add a module to the configuration.
 boolean containsFile(java.lang.String filePath)
          Indicate if the configuration contains a file or not.
 void delegateLoad(java.util.List<NodeState> nodes)
          Delegate the load.
 java.util.List<NodeState> delegateSave()
          Delegate the save.
 ModuleState getState(java.lang.String moduleName)
          Return the state of the module.
 boolean isDelegated()
          Indicate if the write and read operations are delegated to the state or are standard managed by the statemanager.
 void remove(ModuleContainer module)
          Remove the module.
 void setState(java.lang.String moduleName, ModuleState state)
          Set the state of the module.
 
Methods inherited from class org.jtheque.core.managers.state.AbstractState
getProperties, getProperty, getProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleConfiguration

public ModuleConfiguration()
Construct a new ModuleConfiguration.

Method Detail

isDelegated

public boolean isDelegated()
Description copied from interface: IState
Indicate if the write and read operations are delegated to the state or are standard managed by the statemanager.

Specified by:
isDelegated in interface IState
Overrides:
isDelegated in class AbstractState
Returns:
true if the operations are delegated else false.

delegateLoad

public void delegateLoad(java.util.List<NodeState> nodes)
Description copied from interface: IState
Delegate the load.

Specified by:
delegateLoad in interface IState
Overrides:
delegateLoad in class AbstractState
Parameters:
nodes - The noads of the state.

delegateSave

public java.util.List<NodeState> delegateSave()
Description copied from interface: IState
Delegate the save.

Specified by:
delegateSave in interface IState
Overrides:
delegateSave in class AbstractState
Returns:
A List of NodeState to write.

getState

public ModuleState getState(java.lang.String moduleName)
Return the state of the module.

Parameters:
moduleName - The name of the module.
Returns:
The state of the module.

setState

public void setState(java.lang.String moduleName,
                     ModuleState state)
Set the state of the module.

Parameters:
moduleName - The name of the module.
state - The state.

containsFile

public boolean containsFile(java.lang.String filePath)
Indicate if the configuration contains a file or not.

Parameters:
filePath - The path to the file.
Returns:
true if the manager contains the file.

remove

public void remove(ModuleContainer module)
Remove the module.

Parameters:
module - The module to remove.

add

public void add(ModuleContainer module)
Add a module container to the configuration.

Parameters:
module - The module container to add.

add

public void add(ModuleContainer module,
                ModuleState state)
Add a module to the configuration.

Parameters:
module - The module to add.
state - The state of the module.

add

public void add(InstallationResult result)
Add the result of an installation to the module configuration.

Parameters:
result - The installation result.


Copyright © 2009 JTheque. All Rights Reserved.