de.smartics.properties.api.config.domain.key
Class ConfigurationKeyBuilder

Package class diagram package ConfigurationKeyBuilder
java.lang.Object
  extended by de.smartics.properties.api.config.domain.key.ConfigurationKeyBuilder

public final class ConfigurationKeyBuilder
     
     
extends Object

Helper to create instances of ConfigurationKey.


Constructor Summary
ConfigurationKeyBuilder()
           
 
Method Summary
 ConfigurationKey build()
          Creates an ConfigurationKey instance.
 ConfigurationKeyBuilder withArtifactId(String artifactId)
          Sets the name of the application.
 ConfigurationKeyBuilder withEnvironmentName(String name)
          Sets the name of the environment.
 ConfigurationKeyBuilder withGroupId(String groupId)
          Sets the group the application belongs to.
 ConfigurationKeyBuilder withNode(String node)
          Sets the optional identifier of the node within the given environment.
 ConfigurationKeyBuilder withVersion(String version)
          Sets the version of the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationKeyBuilder

public ConfigurationKeyBuilder()
Method Detail

withEnvironmentName

public ConfigurationKeyBuilder withEnvironmentName(String name)
Sets the name of the environment.

Parameters:
name - the name of the environment.
Returns:
a reference to the builder.

withNode

public ConfigurationKeyBuilder withNode(String node)
Sets the optional identifier of the node within the given environment.

Parameters:
node - the optional identifier of the node within the given environment.
Returns:
a reference to the builder.

withGroupId

public ConfigurationKeyBuilder withGroupId(String groupId)
Sets the group the application belongs to.

Parameters:
groupId - the group the application belongs to.
Returns:
a reference to this builder.

withArtifactId

public ConfigurationKeyBuilder withArtifactId(String artifactId)
Sets the name of the application.

Parameters:
artifactId - the name of the application.
Returns:
a reference to this builder.

withVersion

public ConfigurationKeyBuilder withVersion(String version)
Sets the version of the application.

Parameters:
version - the version of the application.
Returns:
a reference to this builder.

build

public ConfigurationKey build()
                       throws de.smartics.util.lang.BlankArgumentException
Creates an ConfigurationKey instance.

Returns:
an ConfigurationKey instance.
Throws:
de.smartics.util.lang.BlankArgumentException - if the name of the environment, the groupId or artifactId of the application is blank.


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