com.emarsys.ecommon.prefs.config
Enum SettingMode

java.lang.Object
  extended by java.lang.Enum<SettingMode>
      extended by com.emarsys.ecommon.prefs.config.SettingMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SettingMode>

public enum SettingMode
extends java.lang.Enum<SettingMode>

Describes the context an ISetting is used in.

The setting's context is always defined by the ConfigurationBackend that is used to retrieve it.
The apriori value is UNSPECIFIED.

Note that in a composited/chained backend its always the last backend in the chain that responsible to defines a setting's mode.
Ergo an ISetting's mode is only set on its retrieval from a ConfigurationBackend and not during the write process into a backend.

Author:
Michael "kULO" Kulovits

Enum Constant Summary
DEFAULT
          The setting got its value from a specified default.
FALLBACK
          The setting got its value from a fallback one.
FALLBACK_DEFAULT
          The setting got its value from an indirectly - through a fallback - accessed default value.
PRIMARY
          A primary setting in the context of a composited configuration backend.
UNSPECIFIED
          We do know nothing about an ISetting in this mode.
 
Method Summary
static SettingMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SettingMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNSPECIFIED

public static final SettingMode UNSPECIFIED
We do know nothing about an ISetting in this mode. The a priori value.


PRIMARY

public static final SettingMode PRIMARY
A primary setting in the context of a composited configuration backend.


FALLBACK

public static final SettingMode FALLBACK
The setting got its value from a fallback one.


DEFAULT

public static final SettingMode DEFAULT
The setting got its value from a specified default.


FALLBACK_DEFAULT

public static final SettingMode FALLBACK_DEFAULT
The setting got its value from an indirectly - through a fallback - accessed default value.

Method Detail

values

public static SettingMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SettingMode c : SettingMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SettingMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null


Copyright © 2010 emarsys AG. All Rights Reserved.