de.smartics.properties.admin.domain.service
Class ConfigurationService

Package class diagram package ConfigurationService
java.lang.Object
  extended by de.smartics.properties.admin.domain.service.ConfigurationService
All Implemented Interfaces:
Serializable

public class ConfigurationService
     
     
extends Object
implements Serializable

Application service to access configurations.

See Also:
Serialized Form

Constructor Summary
ConfigurationService()
           
 
Method Summary
 RemoteConfigurationPropertiesManagementFactory createFactory(de.smartics.properties.resource.domain.ArtifactId applicationId, de.smartics.properties.impl.config.ds.DataSourceConfiguration dataSourceConfig)
          Creates a factory to create properties configurations.
 void validate(de.smartics.properties.spi.config.support.ConfigurationPropertiesManagementFactory factory, de.smartics.properties.api.config.domain.key.ConfigurationKey<?> key, boolean lenient)
          Validates the configuration specified by its key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationService

public ConfigurationService()
Method Detail

createFactory

public RemoteConfigurationPropertiesManagementFactory createFactory(de.smartics.properties.resource.domain.ArtifactId applicationId,
                                                                    de.smartics.properties.impl.config.ds.DataSourceConfiguration dataSourceConfig)
                                                             throws NullPointerException
Creates a factory to create properties configurations.

Parameters:
applicationId - the identifier of the application the factory is created for. The GAV coordinates identify an artifact that references the resources to parse for property declarations and definitions.
dataSourceConfig - the configuration to access property definitions in a data source. May be null in which case the configuration in META-INF/services is used. Otherwise a datasource capable implementation will be instantiated regardless of the configuration in META-INF/services.
Returns:
the factory to create property configurations.
Throws:
NullPointerException - if applicationId is null.

validate

public void validate(de.smartics.properties.spi.config.support.ConfigurationPropertiesManagementFactory factory,
                     de.smartics.properties.api.config.domain.key.ConfigurationKey<?> key,
                     boolean lenient)
              throws NullPointerException,
                     de.smartics.properties.api.config.domain.ConfigurationValidationException
Validates the configuration specified by its key.

Parameters:
factory - the factory to fetch the configuration by its key.
key - the key to the configuration to be validated.
lenient - flag to indicate whether ( true) or not ( false) the validation should be conducted lenient.
Throws:
NullPointerException - if factory or key is null.
de.smartics.properties.api.config.domain.ConfigurationValidationException - if the configuration is invalid.


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