|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jtheque.core.managers.AbstractManager org.jtheque.core.managers.module.ModuleManager
public final class ModuleManager
A module manager implementation. It manage the cycle life of the modules.
Constructor Summary | |
---|---|
ModuleManager()
|
Method Summary | |
---|---|
void |
addModuleListener(ModuleListener listener)
Add a module listener. |
java.lang.String |
canModuleLaunched(ModuleContainer module)
Test if a module can ben launched. |
void |
choosePrimaryModule()
Choose the primary module to launch. |
void |
close()
Close the manager. |
void |
disableModule(ModuleContainer module)
Disable a module. |
void |
enableModule(ModuleContainer module)
Enable a module. |
ModuleContainer |
getModule(java.lang.String name)
Return the module with the name. |
java.util.Collection<ModuleContainer> |
getModules()
Return all the modules. |
java.util.List<ModuleDescription> |
getModulesFromRepository()
Return all the modules of the application repository. |
ModuleContainer |
getPrimaryModule()
Return the current primary module. |
java.util.List<ModuleContainer> |
getPrimaryModules()
Return all the primary modules. |
Repository |
getRepository()
Return the repository of the application. |
void |
init()
Init the manager. |
void |
install(java.lang.String versionsFileURL)
Install the module from the versions file. |
boolean |
installModule(java.io.File file)
Install a module. |
boolean |
isCollectionModule()
Indicate if the primary module is collection based. |
boolean |
isInstalled(java.lang.String module)
Test if the module is installed. |
void |
launchPrimaryModule()
Launch the primary module. |
void |
loadModule(ModuleContainer module)
Load a module. |
boolean |
plugCollection(java.lang.String collection,
java.lang.String password,
boolean create)
Plug the collection. |
void |
plugModules()
Plug the modules. |
void |
preInit()
Pre-init the manager. |
void |
prePlugModules()
Preplug the modules. |
void |
removeModuleListener(ModuleListener listener)
Remove a module listener. |
void |
setPrimaryModule(ModuleContainer primaryModule)
Set the primary module. |
void |
switchPrimaryModule()
Swith the primary module. |
void |
uninstallModule(ModuleContainer module)
Uninstall a module. |
void |
unplugModules()
Unplug the modules. |
Methods inherited from class org.jtheque.core.managers.AbstractManager |
---|
getErrors, getListeners, getLogger, getMessage, getMessage, getStates |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModuleManager()
Method Detail |
---|
public void preInit()
IManager
preInit
in interface IManager
public void init()
IManager
init
in interface IManager
public void close()
IManager
close
in interface IManager
public void prePlugModules()
prePlugModules
in interface IModuleManager
public void plugModules()
plugModules
in interface IModuleManager
public void unplugModules()
unplugModules
in interface IModuleManager
public java.util.Collection<ModuleContainer> getModules()
IModuleManager
getModules
in interface IModuleManager
public java.util.List<ModuleContainer> getPrimaryModules()
IModuleManager
getPrimaryModules
in interface IModuleManager
public java.util.List<ModuleDescription> getModulesFromRepository()
IModuleManager
getModulesFromRepository
in interface IModuleManager
public Repository getRepository()
IModuleManager
getRepository
in interface IModuleManager
public void setPrimaryModule(ModuleContainer primaryModule)
setPrimaryModule
in interface IModuleManager
primaryModule
- The primary module.public ModuleContainer getPrimaryModule()
IModuleManager
getPrimaryModule
in interface IModuleManager
public void loadModule(ModuleContainer module)
loadModule
in interface IModuleManager
module
- The module to load.public void enableModule(ModuleContainer module)
IModuleManager
enableModule
in interface IModuleManager
module
- The module to enable.public void disableModule(ModuleContainer module)
disableModule
in interface IModuleManager
module
- The module to disable.public boolean installModule(java.io.File file)
installModule
in interface IModuleManager
file
- The file of the module.
public void install(java.lang.String versionsFileURL)
IModuleManager
install
in interface IModuleManager
versionsFileURL
- The URL of the versions file.public void choosePrimaryModule()
IModuleManager
choosePrimaryModule
in interface IModuleManager
public void uninstallModule(ModuleContainer module)
uninstallModule
in interface IModuleManager
module
- The module to uninstall.public void addModuleListener(ModuleListener listener)
IModuleManager
addModuleListener
in interface IModuleManager
listener
- The listener to add.public void removeModuleListener(ModuleListener listener)
IModuleManager
removeModuleListener
in interface IModuleManager
listener
- The listener to remove.public java.lang.String canModuleLaunched(ModuleContainer module)
IModuleManager
canModuleLaunched
in interface IModuleManager
module
- The module to be launched.
public ModuleContainer getModule(java.lang.String name)
IModuleManager
getModule
in interface IModuleManager
name
- The name of the module.
public boolean isInstalled(java.lang.String module)
IModuleManager
isInstalled
in interface IModuleManager
module
- The module name.
public void launchPrimaryModule()
launchPrimaryModule
in interface IModuleManager
public void switchPrimaryModule()
switchPrimaryModule
in interface IModuleManager
public boolean isCollectionModule()
IModuleManager
isCollectionModule
in interface IModuleManager
public boolean plugCollection(java.lang.String collection, java.lang.String password, boolean create)
IModuleManager
plugCollection
in interface IModuleManager
collection
- The collection to use.password
- The password of the collection.create
- A boolea flag indicating if we must create the collection or not.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |