org.argouml.application.modules
Class ModuleLoader

java.lang.Object
  extended byorg.argouml.application.modules.ModuleLoader

Deprecated. by Linus Tolke (0.21.1 March 2006). Use ModuleLoader2.

public class ModuleLoader
extends Object

Handles loading of modules and plugins for ArgoUML.

Since:
0.9.4

Field Summary
static String CLASS_SUFFIX
          Deprecated. Class file suffix.
 
Method Summary
 boolean activateModule(ArgoModule module)
          Deprecated. Activate a loaded module.
 void addModuleAction(Vector popUpActions, Object context)
          Deprecated. Process all of the modules to add popup actions for the given context.
 String getArgoHome()
          Deprecated. Returns argo home.
 String getArgoRoot()
          Deprecated. Returns argo root.
static ArgoModule getCurrentSingleton(Class moduleClass)
          Deprecated. Gets the current singleton of the module type requested.
static ModuleLoader getInstance()
          Deprecated. Get the singleton instance.
 Object getModule(String key)
          Deprecated. Locates a module by key.
 ArrayList getModules()
          Deprecated. Get the list of modules.
 Pluggable getPlugin(Class pluginType, Object[] context)
          Deprecated. Returns a plug-in of a given type.
 ArrayList getPlugins(Class pluginType, Object[] context)
          Deprecated. Returns all plug-in of a given type.
 boolean hasPlugin(Class pluginType, Object[] context)
          Deprecated. Indicates whether a requested plug-in is available.
 void initialize()
          Deprecated. Load the internal modules.
 void loadClassFromLoader(ClassLoader classloader, String key, String classname, boolean secure)
          Deprecated.  
 boolean loadModules(InputStream is, String filename)
          Deprecated. Load modules from an input stream.
 void loadModulesFromClassPathJars()
          Deprecated. Load modules from jars in the class path.
 void loadModulesFromExtensionDir()
          Deprecated. Search for and load modules from classpath, and from other places.
 boolean loadModulesFromFile(String moduleFile)
          Deprecated. Load modules from a property file.
 void loadModulesFromJar(String filename)
          Deprecated. Load modules from a jar file.
 void loadModulesFromPredefinedLists()
          Deprecated. Search for and load modules from predefined places.
static boolean requestNewSingleton(Class modClass, ArgoSingletonModule moduleInstance)
          Deprecated. Requests the passed singleton to become the current singleton of the module type requested.
 void shutdown()
          Deprecated. Shut down all modules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_SUFFIX

public static final String CLASS_SUFFIX
Deprecated. 
Class file suffix.

See Also:
Constant Field Values
Method Detail

getInstance

public static ModuleLoader getInstance()
Deprecated. 
Get the singleton instance.

Returns:
the module loader singleton

initialize

public void initialize()
Deprecated. 
Load the internal modules.


loadModulesFromPredefinedLists

public void loadModulesFromPredefinedLists()
Deprecated. 
Search for and load modules from predefined places. Look in the following locations in the following order, using System.getProperty() to retrieve the values. Property name ${user.dir} ${user.home} ${java.home}/lib


loadModulesFromExtensionDir

public void loadModulesFromExtensionDir()
Deprecated. 
Search for and load modules from classpath, and from other places.


loadModulesFromJar

public void loadModulesFromJar(String filename)
Deprecated. 
Load modules from a jar file.

Parameters:
filename - jar file name to load from

loadModulesFromClassPathJars

public void loadModulesFromClassPathJars()
Deprecated. 
Load modules from jars in the class path.


loadModulesFromFile

public boolean loadModulesFromFile(String moduleFile)
Deprecated. 
Load modules from a property file. The load may be successful even if no modules are loaded.

Parameters:
moduleFile - name of file
Returns:
false if the load succeeded

loadClassFromLoader

public void loadClassFromLoader(ClassLoader classloader,
                                String key,
                                String classname,
                                boolean secure)
Deprecated. 

loadModules

public boolean loadModules(InputStream is,
                           String filename)
Deprecated. 
Load modules from an input stream. The load may be successful even if no modules are loaded.

Parameters:
is - input stream in property file format
filename - the input stream is from (for reporting purposes)
Returns:
false if the load succeeded

shutdown

public void shutdown()
Deprecated. 
Shut down all modules.


addModuleAction

public void addModuleAction(Vector popUpActions,
                            Object context)
Deprecated. 
Process all of the modules to add popup actions for the given context.

Parameters:
popUpActions - vector of actions
context - to filter by

getModules

public ArrayList getModules()
Deprecated. 
Get the list of modules.

Returns:
the list of modules.

getModule

public Object getModule(String key)
Deprecated. 
Locates a module by key.

Parameters:
key - module identifier to find
Returns:
a module object or null if not found.

activateModule

public boolean activateModule(ArgoModule module)
Deprecated. 
Activate a loaded module.

Parameters:
module - to activate
Returns:
true if the module was activated, false if not or if it was already active.

getCurrentSingleton

public static ArgoModule getCurrentSingleton(Class moduleClass)
Deprecated. 
Gets the current singleton of the module type requested.

Parameters:
moduleClass - the class of the module singleton
Returns:
null if there is some problem.

requestNewSingleton

public static boolean requestNewSingleton(Class modClass,
                                          ArgoSingletonModule moduleInstance)
Deprecated. 
Requests the passed singleton to become the current singleton of the module type requested. Singletons may refuse to be activated. In this case, requestNewSingleton returns false and does not deactivate the current singleton.

Parameters:
modClass - class which identifies the singleton
moduleInstance - the module to make the singleton
Returns:
true if the singleton is activated

getPlugin

public Pluggable getPlugin(Class pluginType,
                           Object[] context)
Deprecated. 
Returns a plug-in of a given type. The type of plug-in returned is determined by the class passed.

Parameters:
pluginType - a Class which extends Pluggable and indicates the type of plug-in to return.
context - Additional information used to choose between plugins.
Returns:
A plug-in class which extends the type of class passed as the argument or null if there is some problem.

hasPlugin

public boolean hasPlugin(Class pluginType,
                         Object[] context)
Deprecated. 
Indicates whether a requested plug-in is available. This guarantees not to instantiate the plug-in.

Parameters:
pluginType - a Class which extends Pluggable and indicates the type of plug-in to return.
context - Additional information used to choose between plugins.
Returns:
A plug-in class which extends the type of class passed as the argument.

getPlugins

public ArrayList getPlugins(Class pluginType,
                            Object[] context)
Deprecated. 
Returns all plug-in of a given type. The type of plug-in returned is determined by the class passed.

Parameters:
pluginType - a Class which extends Pluggable and indicates the type of plug-in to return.
context - An object (or null) which allows the plugin to determine if it should be included in a list.
Returns:
A Vector containing all the plugins of the type passed for the passed context, or null if none are available.

getArgoHome

public String getArgoHome()
Deprecated. 
Returns argo home.

Returns:
the argo home directory

getArgoRoot

public String getArgoRoot()
Deprecated. 
Returns argo root.

Returns:
the argo root directory


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook