Class ModuleNodeFactory
- java.lang.Object
-
- org.pentaho.reporting.tools.configeditor.model.ModuleNodeFactory
-
public class ModuleNodeFactory extends Object
The module node factory is used to build the lists of modules and their assigned keys for the ConfigTreeModel.- Author:
- Thomas Morgner
-
-
Constructor Summary
Constructors Constructor Description ModuleNodeFactory(org.pentaho.reporting.libraries.base.boot.AbstractBoot packageManager)
Create a new and uninitialized module node factory.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigDescriptionEntry
getEntryForKey(String key)
Returns the entry for the given key or null, if the key has no metadata.ConfigTreeModuleNode[]
getGlobalNodes()
Returns all global nodes.ConfigTreeModuleNode[]
getLocalNodes()
Returns all local nodes.static String
getPackage(Class c)
Returns the name of the package for the given class.void
init()
(Re)Initializes the factory from the given report configuration.void
load(boolean append)
void
load(InputStream in, boolean append)
-
-
-
Method Detail
-
load
public void load(boolean append) throws IOException
- Throws:
IOException
-
load
public void load(InputStream in, boolean append) throws IOException
- Throws:
IOException
-
init
public void init()
(Re)Initializes the factory from the given report configuration. This will assign all keys frmo the report configuration to the model and assignes the definition from the configuration description if possible.
-
getPackage
public static String getPackage(Class c)
Returns the name of the package for the given class. This is a workaround for the classloader behaviour of JDK1.2.2 where no package objects are created.- Parameters:
c
- the class for which we search the package.- Returns:
- the name of the package, never null.
-
getGlobalNodes
public ConfigTreeModuleNode[] getGlobalNodes()
Returns all global nodes. You have to initialize the factory before using this method.- Returns:
- the list of all global nodes.
-
getLocalNodes
public ConfigTreeModuleNode[] getLocalNodes()
Returns all local nodes. You have to initialize the factory before using this method.- Returns:
- the list of all global nodes.
-
getEntryForKey
public ConfigDescriptionEntry getEntryForKey(String key)
Returns the entry for the given key or null, if the key has no metadata.- Parameters:
key
- the name of the key- Returns:
- the entry or null if not found.
-
-