de.smartics.properties.spi.config.transfer
Class PropertyProviderList

Package class diagram package PropertyProviderList
java.lang.Object
  extended by de.smartics.properties.spi.config.transfer.PropertyProviderList
All Implemented Interfaces:
Iterable< PropertyProvider>

public final class PropertyProviderList
     
     
extends Object
implements Iterable< PropertyProvider>

Collects property providers to make them accessible by the transfer process as a source of property definitions.


Constructor Summary
PropertyProviderList()
          Default constructor.
 
Method Summary
 void addPropertyDefinitions(DefinitionConfigParser<?> definitionConfigParser, ClassPathEnvironment env)
          Resolves the environment to property providers and adds them.
 void addPropertyProvider(PropertyProvider provider)
          Adds a property provider.
 Iterator<PropertyProvider> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyProviderList

public PropertyProviderList()
Default constructor.

Method Detail

addPropertyProvider

public void addPropertyProvider(PropertyProvider provider)
                         throws NullPointerException
Adds a property provider.

Parameters:
provider - the provider to add.
Throws:
NullPointerException - if provider is null.

addPropertyDefinitions

public void addPropertyDefinitions(DefinitionConfigParser<?> definitionConfigParser,
                                   ClassPathEnvironment env)
                            throws NullPointerException,
                                   TransferException
Resolves the environment to property providers and adds them.

Parameters:
definitionConfigParser - the parser to read definition.xml files to determine the configuration keys for properties files.
env - the environment containing properties files. Each of them will be turned into a provider and added to the list.
Throws:
NullPointerException - if env is null.
TransferException - if any of the artifacts provided in the environment env is not valid. An artifact is not valid, if the configuration key for a properties file cannot be determined. Also thrown if a properties file cannot be mapped to a configuration key.

iterator

public Iterator<PropertyProvider> iterator()
Specified by:
iterator in interface Iterable<PropertyProvider>


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