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

java.lang.Object
  extended by ch.elca.el4j.core.io.support.AbstractOrderedConfigLocationProvider
      extended by ch.elca.el4j.core.io.support.ManifestOrderedConfigLocationProvider
All Implemented Interfaces:
ConfigLocationProvider

public class ManifestOrderedConfigLocationProvider
extends AbstractOrderedConfigLocationProvider

This configuration location provider extracts module dependency information from manifest files.

Author:
Andreas Bur (ABU)
File-location:
ManifestOrderedConfigLocationProvider
Last check-in date:
2010-03-22 08:51:25 +0100 (Mo, 22. Mrz 2010) by swisswheel for revision 4107

Field Summary
static String CONFIG_DEPENDENCIES
          The name of the module dependencies attribute.
static String CONFIG_FILES
          The name of the configuration files attribute.
static String CONFIG_MODULE
          The name of the module name attribute.
static String CONFIG_SECTION
          The name of the configuration section in the manifest file.
protected  Resource[] m_configLocationResources
          The sorted list of resolved config locations.
protected  String[] m_configLocations
          The sorted list of configuration locations.
static String MANIFEST_FILE
          A manifest file's path.
 
Constructor Summary
ManifestOrderedConfigLocationProvider()
           
 
Method Summary
protected  Resource[] assembleConfigLocationResources()
           
protected  String[] assembleConfigLocations()
           
protected  Module createModuleFromManifest(URL url)
          Creates a new module instance, getting the needed information from a manifest file.
protected  Module[] createModules()
           
 Resource[] getConfigLocationResources()
          
 String[] getConfigLocations()
          
protected  URL[] getManifestFiles()
           
 
Methods inherited from class ch.elca.el4j.core.io.support.AbstractOrderedConfigLocationProvider
getSortedModules, mergeConfigLocationResources, mergeConfigLocations, setModuleSorter, sortModules
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MANIFEST_FILE

public static final String MANIFEST_FILE
A manifest file's path.

See Also:
Constant Field Values

CONFIG_SECTION

public static final String CONFIG_SECTION
The name of the configuration section in the manifest file.

See Also:
Constant Field Values

CONFIG_MODULE

public static final String CONFIG_MODULE
The name of the module name attribute.

See Also:
Constant Field Values

CONFIG_FILES

public static final String CONFIG_FILES
The name of the configuration files attribute.

See Also:
Constant Field Values

CONFIG_DEPENDENCIES

public static final String CONFIG_DEPENDENCIES
The name of the module dependencies attribute.

See Also:
Constant Field Values

m_configLocations

protected String[] m_configLocations
The sorted list of configuration locations.


m_configLocationResources

protected Resource[] m_configLocationResources
The sorted list of resolved config locations.

Constructor Detail

ManifestOrderedConfigLocationProvider

public ManifestOrderedConfigLocationProvider()
Method Detail

getConfigLocations

public String[] getConfigLocations()

Returns:
Returns a list of configuration locations.

assembleConfigLocations

protected String[] assembleConfigLocations()
Returns:
Returns the list of sorted configuration locations, which are extracted from manifest files.

getManifestFiles

protected URL[] getManifestFiles()
                          throws IOException
Returns:
Returns a list of all manifest files which are on the classpath.
Throws:
IOException - If an I/O error occurs.

createModules

protected Module[] createModules()
                          throws IOException
Specified by:
createModules in class AbstractOrderedConfigLocationProvider
Returns:
Returns an unordered list of modules that are specified in the manifest files that are on the classpath.
Throws:
IOException - If an I/O error occurs.

createModuleFromManifest

protected Module createModuleFromManifest(URL url)
                                   throws IOException
Creates a new module instance, getting the needed information from a manifest file.

Parameters:
url - The manifest file's URL.
Returns:
Returns a freshly created module containing the information specified in the given manifest file.
Throws:
IOException - If an I/O error occurs.

getConfigLocationResources

public Resource[] getConfigLocationResources()

Returns:
Returns a list of resolved configuration locations.

assembleConfigLocationResources

protected Resource[] assembleConfigLocationResources()
Returns:
Returns the assembled configuration location resources.


Copyright © 2005-2011 ELCA. All Rights Reserved.