de.smartics.properties.api.config.domain.key
Interface ConfigurationKeyFactory<T extends ConfigurationKey<?>>

Package class diagram package ConfigurationKeyFactory
Type Parameters:
T - the type of the configuration key.

public interface ConfigurationKeyFactory<T extends ConfigurationKey<?>>

A factory to create special configuration keys.


Method Summary
 ConfigurationKey<T> createDefaultKey()
          Creates a default key that references any configuration.
 ConfigurationKey<?> createKey(ApplicationId applicationId)
          Creates a key dependent on the given application.
 ConfigurationKey<?> createKey(ConfigurationKey<?> key, ApplicationId appId)
          Create a key based on properties provided by the given key, but for the given application.
 ConfigurationKey<?> createKeyFromString(String key)
          Creates a key from parsing its string representation.
 ConfigurationKey<?> createStaticKey(ConfigurationKey<?> key)
          Create a key based on the given key, but the new created key shall have only the static parts of the given key.
 ConfigurationKey<?> createUniqueKey(String id)
          Creates a unique key with the given identifier.
 

Method Detail

createDefaultKey

ConfigurationKey<T> createDefaultKey()
Creates a default key that references any configuration.

Returns:
a default key that references any configuration.

createKey

ConfigurationKey<?> createKey(ApplicationId applicationId)
Creates a key dependent on the given application.

Parameters:
applicationId - the application to depend upon.
Returns:
the configuration key.

createUniqueKey

ConfigurationKey<?> createUniqueKey(String id)
Creates a unique key with the given identifier.

Parameters:
id - the unique identifier to create the key.
Returns:
the unique key.

createKey

ConfigurationKey<?> createKey(ConfigurationKey<?> key,
                              ApplicationId appId)
Create a key based on properties provided by the given key, but for the given application.

Parameters:
key - the key to clone.
appId - the application info to set into the clone.
Returns:
the cloned key.

createKeyFromString

ConfigurationKey<?> createKeyFromString(String key)
                                        throws IllegalArgumentException
Creates a key from parsing its string representation.

Parameters:
key - the string representation to parse.
Returns:
the configuration key based on the string representation.
Throws:
IllegalArgumentException - if the key cannot be parsed.

createStaticKey

ConfigurationKey<?> createStaticKey(ConfigurationKey<?> key)
Create a key based on the given key, but the new created key shall have only the static parts of the given key. Some keys have dynamic and static parts. This method reduces the given key to a key with only the static parts.

Parameters:
key - the key to clone.
Returns:
the cloned key.


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