BeanIO 1.2.3

org.beanio.config
Class DefaultConfigurationFactory

java.lang.Object
  extended by org.beanio.config.DefaultConfigurationFactory
All Implemented Interfaces:
ConfigurationFactory

public class DefaultConfigurationFactory
extends Object
implements ConfigurationFactory

Default configuration factory implementation.

Since:
1.0
Author:
Kevin Seim

Constructor Summary
DefaultConfigurationFactory()
          Constructs a new DefaultConfigurationFactory.
 
Method Summary
protected  StreamDefinitionFactory createStreamDefinitionFactory(String format)
          Instantiates the factory implementation to create the stream definition.
protected  Collection<StreamDefinition> createStreamDefinitions(BeanIOConfig config)
          Creates stream definitions from a BeanIO stream mapping configuration.
 ConfigurationLoader getConfigurationLoader()
          Returns the mapping configuration loader.
protected  ConfigurationLoader getDefaultConfigurationLoader()
          Returns the default mapping configuration loader implementation.
 Collection<StreamDefinition> loadDefinitions(InputStream in)
          Loads a stream mapping configuration from an input stream.
 void setConfigurationLoader(ConfigurationLoader configurationLoader)
          Sets the mapping configuration loader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConfigurationFactory

public DefaultConfigurationFactory()
Constructs a new DefaultConfigurationFactory.

Method Detail

loadDefinitions

public Collection<StreamDefinition> loadDefinitions(InputStream in)
                                             throws IOException,
                                                    BeanIOConfigurationException
Description copied from interface: ConfigurationFactory
Loads a stream mapping configuration from an input stream.

Specified by:
loadDefinitions in interface ConfigurationFactory
Parameters:
in - the input stream to read
Returns:
the collection of stream definitions loaded from the input stream
Throws:
IOException - if an I/O error occurs
BeanIOConfigurationException - if the configuration is invalid

getDefaultConfigurationLoader

protected ConfigurationLoader getDefaultConfigurationLoader()
Returns the default mapping configuration loader implementation.

Returns:
the default mapping configuration

createStreamDefinitions

protected Collection<StreamDefinition> createStreamDefinitions(BeanIOConfig config)
                                                        throws BeanIOConfigurationException
Creates stream definitions from a BeanIO stream mapping configuration.

Parameters:
config - the BeanIO stream mapping configuration
Returns:
the collection of stream definitions
Throws:
BeanIOConfigurationException - if a configuration setting is invalid

createStreamDefinitionFactory

protected StreamDefinitionFactory createStreamDefinitionFactory(String format)
Instantiates the factory implementation to create the stream definition.

Parameters:
format - the stream format
Returns:
the stream definition factory

getConfigurationLoader

public ConfigurationLoader getConfigurationLoader()
Returns the mapping configuration loader.

Returns:
the mapping configuration loader

setConfigurationLoader

public void setConfigurationLoader(ConfigurationLoader configurationLoader)
Sets the mapping configuration loader.

Parameters:
configurationLoader - the mapping configuration loader

BeanIO 1.2.3

Copyright © 2010-2012 Kevin Seim