de.smartics.properties.api.config.domain.key
Interface ConfigurationKeyHelper

Package class diagram package ConfigurationKeyHelper
All Superinterfaces:
Serializable
All Known Implementing Classes:
EnvAppConfigurationKeyHelper, TenantUserConfigurationKeyHelper

public interface ConfigurationKeyHelper
     
     
extends Serializable

Helper to construct configuration keys.


Method Summary
 ConfigurationKey<?> load(ApplicationId applicationId)
          Loads the configuration key using the given applicationId and determines the environmentId through system properties or defaults (null for the environment and hostname for the node).
 ConfigurationKey<?> load(Class<?> locator)
          Loads the application identifier from the manifest file pointed at by the given locator class.
 ConfigurationKey<?> load(EnvironmentId environmentId, Class<?> locator)
          Loads the application identifier from the manifest file pointed at by the given locator class.
 ConfigurationKey<?> load(String environmentName, Class<?> locator)
          Loads the application identifier from the manifest file pointed at by the given locator class.
 

Method Detail

load

ConfigurationKey<?> load(Class<?> locator)
                         throws IllegalStateException
Loads the application identifier from the manifest file pointed at by the given locator class.

Parameters:
locator - the class to locate the manifest file to load. It is the manifest file of the archive this class is part of.
Returns:
the application identifier.
Throws:
IllegalStateException - if the application identifier cannot be read from the manifest.
See Also:
load(EnvironmentId, Class)

load

ConfigurationKey<?> load(String environmentName,
                         Class<?> locator)
                         throws IllegalStateException
Loads the application identifier from the manifest file pointed at by the given locator class.

Parameters:
environmentName - the name of the environment of use. May be null if the value of the system property #SYSTEM_PROPERTY_ENVIRONMENT_NAME should be used (along with the node name defined by #SYSTEM_PROPERTY_ENVIRONMENT_NODE). If not specified, the name of the host of this runtime is determined.
locator - the class to locate the manifest file to load. It is the manifest file of the archive this class is part of.
Returns:
the application identifier.
Throws:
IllegalStateException - if the application identifier cannot be read from the manifest.
See Also:
load(EnvironmentId, Class)

load

ConfigurationKey<?> load(EnvironmentId environmentId,
                         Class<?> locator)
                         throws IllegalStateException
Loads the application identifier from the manifest file pointed at by the given locator class.

Parameters:
environmentId - the environment part of the configuration key to construct.
locator - the class to locate the manifest file to load. It is the manifest file of the archive this class is part of.
Returns:
the application identifier.
Throws:
IllegalStateException - if the application identifier cannot be read from the manifest.
See Also:
load(Class), load(String, Class)

load

ConfigurationKey<?> load(ApplicationId applicationId)
Loads the configuration key using the given applicationId and determines the environmentId through system properties or defaults (null for the environment and hostname for the node).

Parameters:
applicationId - the application part of the configuration key to construct.
Returns:
the configuration key.


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