de.smartics.properties.spi.config.definition
Class DefinitionConfigParser

Package class diagram package DefinitionConfigParser
java.lang.Object
  extended by de.smartics.properties.spi.config.definition.DefinitionConfigParser

public final class DefinitionConfigParser
     
     
extends Object

Parses the definition.xml file for properties.


Constructor Summary
DefinitionConfigParser()
          Default constructor.
 
Method Summary
 PropertiesDefinitionContext parse(Class<?> type)
          Convenience method using a class' class loader to locate the configuration file to parse the configuration file at PropertiesContext.DEFINITION_FILE.
 PropertiesDefinitionContext parse(de.smartics.util.lang.ClassPathContext context)
          Parses the configuration file at PropertiesContext.DEFINITION_FILE.
 PropertiesDefinitionContext parse(String systemId, InputStream input)
          Parses the definition.xml from the given stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefinitionConfigParser

public DefinitionConfigParser()
Default constructor.

Method Detail

parse

public PropertiesDefinitionContext parse(Class<?> type)
                                  throws ConfigException
Convenience method using a class' class loader to locate the configuration file to parse the configuration file at PropertiesContext.DEFINITION_FILE.

Parameters:
type - the type whose class loader to use to locate the configuration file.
Returns:
the read configuration, never null.
Throws:
ConfigException - on any problem loading the file.

parse

public PropertiesDefinitionContext parse(de.smartics.util.lang.ClassPathContext context)
                                  throws ConfigException
Parses the configuration file at PropertiesContext.DEFINITION_FILE.

Parameters:
context - the class loader with its context to use to locate the configuration file.
Returns:
the read configuration, never null.
Throws:
ConfigException - on any problem loading the file.

parse

public PropertiesDefinitionContext parse(String systemId,
                                         InputStream input)
                                  throws ConfigException
Parses the definition.xml from the given stream.

Parameters:
systemId - the identifier of the resource on the stream.
input - the definition.xml on the stream.
Returns:
the parsed context.
Throws:
ConfigException - on any problem reading from the stream.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.