de.smartics.properties.impl.config.domain.key.rtaware
Class TenantUserConfigurationKey

Package class diagram package TenantUserConfigurationKey
java.lang.Object
  extended by de.smartics.properties.impl.config.domain.key.envapp.AbstractConfigurationKey<TenantUserConfigurationKey>
      extended by de.smartics.properties.impl.config.domain.key.rtaware.TenantUserConfigurationKey
All Implemented Interfaces:
ConfigurationKey< TenantUserConfigurationKey>, Serializable, Comparable< TenantUserConfigurationKey>

public final class TenantUserConfigurationKey
     
     
extends AbstractConfigurationKey< TenantUserConfigurationKey>

The configuration key identifies a configuration with environment and application information. With this key all configuration values can be accessed by their local configuration keys.

See Also:
Serialized Form

Constructor Summary
TenantUserConfigurationKey(EnvironmentId environmentId, ApplicationId applicationId)
          Convenience constructor for any tenant and any user..
TenantUserConfigurationKey(EnvironmentId environmentId, ApplicationId applicationId, TenantId tenantId, UserId userId)
          Default constructor.
TenantUserConfigurationKey(TenantUserConfigurationKey key, ApplicationId appId)
          Copy constructor.
 
Method Summary
 int compareTo(TenantUserConfigurationKey o)
           
 boolean equals(Object object)
          Returns true if the given object is semantically equal to the given object, false otherwise.
 TenantId getTenantId()
          Returns the identifier of the tenant the configuration is for.
 UserId getUserId()
          Returns the identifier of the user the configuration is for.
 boolean hasActiveDynamicParts()
          Returns true if this key instance has active dynamic parts.
 int hashCode()
          Returns the hash code of the object.
 String toString()
          Returns the string representation of the object.
 
Methods inherited from class de.smartics.properties.impl.config.domain.key.envapp.AbstractConfigurationKey
getApplicationId, getEnvironmentId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TenantUserConfigurationKey

public TenantUserConfigurationKey(EnvironmentId environmentId,
                                  ApplicationId applicationId)
                           throws NullPointerException
Convenience constructor for any tenant and any user..

Parameters:
environmentId - the identifier of the environment the application is deployed in.
applicationId - the identifier of the application whose configuration is requested.
Throws:
NullPointerException - if environmentId or applicationId is null.

TenantUserConfigurationKey

public TenantUserConfigurationKey(EnvironmentId environmentId,
                                  ApplicationId applicationId,
                                  TenantId tenantId,
                                  UserId userId)
                           throws NullPointerException
Default constructor.

Parameters:
environmentId - the identifier of the environment the application is deployed in.
applicationId - the identifier of the application whose configuration is requested.
tenantId - the identifier of the tenant the configuration is for.
userId - the identifier of the user the configuration is for.
Throws:
NullPointerException - if environmentId, applicationId, tenantId, or userId is null.

TenantUserConfigurationKey

public TenantUserConfigurationKey(TenantUserConfigurationKey key,
                                  ApplicationId appId)
                           throws NullPointerException
Copy constructor.

Parameters:
key - the key to copy.
appId - the appId to set into the copy.
Throws:
NullPointerException - if key or appId is null.
Method Detail

getTenantId

public TenantId getTenantId()
Returns the identifier of the tenant the configuration is for.

Returns:
the identifier of the tenant the configuration is for.

getUserId

public UserId getUserId()
Returns the identifier of the user the configuration is for.

Returns:
the identifier of the user the configuration is for.

hasActiveDynamicParts

public boolean hasActiveDynamicParts()
Description copied from interface: ConfigurationKey
Returns true if this key instance has active dynamic parts. Returns false (otherwise) if this key instance has only static parts. The decision criteria between a static and a dynamic key is, if all keys are known at startup, or if keys have dynamic parts, like the current user or the current tenant which can change during runtime.

Specified by:
hasActiveDynamicParts in interface ConfigurationKey<TenantUserConfigurationKey>
Overrides:
hasActiveDynamicParts in class AbstractConfigurationKey<TenantUserConfigurationKey>
Returns:
true when this key uses dynamic parts (and not only static parts). false otherwise.

hashCode

public int hashCode()
Returns the hash code of the object.

Specified by:
hashCode in interface ConfigurationKey<TenantUserConfigurationKey>
Overrides:
hashCode in class AbstractConfigurationKey<TenantUserConfigurationKey>
Returns:
the hash code.

equals

public boolean equals(Object object)
Returns true if the given object is semantically equal to the given object, false otherwise.

Specified by:
equals in interface ConfigurationKey<TenantUserConfigurationKey>
Overrides:
equals in class AbstractConfigurationKey<TenantUserConfigurationKey>
Parameters:
object - the instance to compare to.
Returns:
true if the given object is semantically equal to the given object, false otherwise.

compareTo

public int compareTo(TenantUserConfigurationKey o)
Specified by:
compareTo in interface ConfigurationKey<TenantUserConfigurationKey>
Specified by:
compareTo in interface Comparable<TenantUserConfigurationKey>
Overrides:
compareTo in class AbstractConfigurationKey<TenantUserConfigurationKey>

toString

public String toString()
Description copied from class: AbstractConfigurationKey
Returns the string representation of the object.

Specified by:
toString in interface ConfigurationKey<TenantUserConfigurationKey>
Overrides:
toString in class AbstractConfigurationKey<TenantUserConfigurationKey>
Returns:
the string representation of the object.


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