com.marsching.flexiparse.parser
Class OSGiAwareParser

java.lang.Object
  extended by com.marsching.flexiparse.parser.SimpleParser
      extended by com.marsching.flexiparse.parser.XMLConfiguredParser
          extended by com.marsching.flexiparse.parser.OSGiAwareParser
All Implemented Interfaces:
Parser

public class OSGiAwareParser
extends XMLConfiguredParser

Parser implementation that looks for configuration files in OSGi bundles and uses the class loader of the file's bundle to load classes.

Author:
Sebastian Marsching

Field Summary
 
Fields inherited from class com.marsching.flexiparse.parser.SimpleParser
documentBuilder, mappingConfigurations, nodeHandlers
 
Constructor Summary
OSGiAwareParser(org.osgi.framework.BundleContext bundleContext)
          Default constructor, looks for configuration at "META-INF/com/marsching/flexiparse/configuration/configuration.xml".
OSGiAwareParser(org.osgi.framework.BundleContext bundleContext, String configurationLocation)
          Creates a parser instance using the specified configuration location.
 
Method Summary
 
Methods inherited from class com.marsching.flexiparse.parser.XMLConfiguredParser
addConfigurationSource, addConfigurationSource, addConfigurationSources
 
Methods inherited from class com.marsching.flexiparse.parser.SimpleParser
addElementMappingConfiguration, addNodeHandler, getElementMappingConfigurations, getHandlerOrder, getNodeHandlers, parse, parse, parse, parse, removeElementMappingConfiguration, removeNodeHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSGiAwareParser

public OSGiAwareParser(org.osgi.framework.BundleContext bundleContext)
                throws ParserException
Default constructor, looks for configuration at "META-INF/com/marsching/flexiparse/configuration/configuration.xml".

Parameters:
bundleContext - bundle context that is used to search for bundles
Throws:
ParserException

OSGiAwareParser

public OSGiAwareParser(org.osgi.framework.BundleContext bundleContext,
                       String configurationLocation)
                throws ParserException
Creates a parser instance using the specified configuration location.

Parameters:
bundleContext - bundle context that is used to search for bundles
configurationLocation - location where to look for configuration files
Throws:
ParserException - if an error occurs while loading the configuration files


Copyright © 2008-2009. All Rights Reserved.