ch.elca.el4j.core.io.support
Class Module

java.lang.Object
  extended by ch.elca.el4j.core.io.support.Module

public class Module
extends Object

This class represents a simplified view of a module (EL4Ant build system unit). It contains its name, the configuration files and the dependencies.

Author:
Andreas Bur (ABU)
File-location:
Module
Last check-in date:
2009-08-04 15:22:05 +0200 (Di, 04. Aug 2009) by swismer for revision 3881

Field Summary
static String DELIMITER
          The delimiter used to separate configuration files and dependencies.
protected  ClassLoader m_classLoader
          Is the used class loader.
 
Constructor Summary
Module(String name)
          Creates a new module with the given name.
Module(String name, String moduleLocation)
          Creates a new module with the given name and the module's location.
Module(String name, String moduleLocation, ClassLoader classLoader)
          Creates a new module with the given name, the module's location and resolves resources by using the given class loader.
 
Method Summary
 void addAllConfigFiles(String configFiles)
          Adds all items -- separated by DELIMITER -- to the configuration file list.
 void addAllDependencies(String dependencies)
          Adds all item -- separated by DELIMITER -- to the dependency list.
 void addConfigFile(String configFile)
          Adds the given configuration file to the module.
 void addDependency(String dependency)
          Adds the given dependency to the module.
 Resource getConfigFileAsResource(String configFile)
          Converts the given config file in a resource that takes place in the current module.
 List<Resource> getConfigFileResourcesAsList()
           
 String[] getConfigFiles()
           
 List<String> getConfigFilesAsList()
           
 String[] getDependencies()
           
 List<String> getDependenciesAsList()
           
 String getModuleLocation()
           
 String getName()
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DELIMITER

public static final String DELIMITER
The delimiter used to separate configuration files and dependencies.

See Also:
Constant Field Values

m_classLoader

protected final ClassLoader m_classLoader
Is the used class loader.

Constructor Detail

Module

public Module(String name)
Creates a new module with the given name.

Parameters:
name - The module's name.

Module

public Module(String name,
              String moduleLocation)
Creates a new module with the given name and the module's location.

Parameters:
name - The module's name.
moduleLocation - The module's location.

Module

public Module(String name,
              String moduleLocation,
              ClassLoader classLoader)
Creates a new module with the given name, the module's location and resolves resources by using the given class loader.

Parameters:
name - The module's name.
moduleLocation - The module's location.
classLoader - The class loader to resolve resources.
Method Detail

addAllConfigFiles

public void addAllConfigFiles(String configFiles)
Adds all items -- separated by DELIMITER -- to the configuration file list.

Parameters:
configFiles - The list of configuration files to add.

addConfigFile

public void addConfigFile(String configFile)
Adds the given configuration file to the module.

Parameters:
configFile - The configuration file to add.

addAllDependencies

public void addAllDependencies(String dependencies)
Adds all item -- separated by DELIMITER -- to the dependency list.

Parameters:
dependencies - The list of dependencies to add.

addDependency

public void addDependency(String dependency)
Adds the given dependency to the module.

Parameters:
dependency - The dependency to add.

getConfigFiles

public String[] getConfigFiles()
Returns:
Returns all configuration files.

getDependencies

public String[] getDependencies()
Returns:
Returns all dependencies.

getConfigFilesAsList

public List<String> getConfigFilesAsList()
Returns:
Returns the configuration file list.

getDependenciesAsList

public List<String> getDependenciesAsList()
Returns:
Returns the dependency list.

getName

public String getName()
Returns:
Returns the module's name.

getModuleLocation

public String getModuleLocation()
Returns:
Returns the module's location.

getConfigFileResourcesAsList

public List<Resource> getConfigFileResourcesAsList()
Returns:
Returns the configuration files resolved as resources in a list.

getConfigFileAsResource

public Resource getConfigFileAsResource(String configFile)
Converts the given config file in a resource that takes place in the current module.

Parameters:
configFile - The config file to convert.
Returns:
Returns the converted resource.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2005-2011 ELCA. All Rights Reserved.