de.smartics.properties.spi.config.definition
Interface DefinitionConfigParser<T extends PropertiesDefinitionContext>

Package class diagram package DefinitionConfigParser
Type Parameters:
T - the type of context the parser creates.
All Known Implementing Classes:
AbstractDefinitionConfigParser, EnvAppDefinitionConfigParser, TenantUserDefinitionConfigParser

public interface DefinitionConfigParser<T extends PropertiesDefinitionContext>

Parses the definition.xml file for properties.


Method Summary
 T parse(Class<?> type)
          Convenience method using a class' class loader to locate the configuration file to parse the configuration file at PropertiesContext.DEFINITION_FILE.
 T parse(de.smartics.util.lang.classpath.ClassPathContext context)
          Parses the configuration file at PropertiesContext.DEFINITION_FILE.
 T parse(String systemId, InputStream input)
          Parses the definition.xml from the given stream.
 

Method Detail

parse

T 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

T parse(de.smartics.util.lang.classpath.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

T 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.