org.eclipse.stardust.engine.core.preferences.configurationvariables
Class ConfigurationVariable

java.lang.Object
  extended by org.eclipse.stardust.engine.core.preferences.configurationvariables.ConfigurationVariableDefinition
      extended by org.eclipse.stardust.engine.core.preferences.configurationvariables.ConfigurationVariable
All Implemented Interfaces:
Serializable, org.eclipse.stardust.engine.core.preferences.configurationvariables.IConfigurationVariableDefinition

public class ConfigurationVariable
extends org.eclipse.stardust.engine.core.preferences.configurationvariables.ConfigurationVariableDefinition
implements org.eclipse.stardust.engine.core.preferences.configurationvariables.IConfigurationVariableDefinition, Serializable

Stores the changeable value of configuration-variable and also exposes non-changeable information like name, defaultValue, description

Author:
roland.stamm
See Also:
Serialized Form

Constructor Summary
ConfigurationVariable(org.eclipse.stardust.engine.core.preferences.configurationvariables.IConfigurationVariableDefinition definition, String value)
           
 
Method Summary
 String getValue()
           
 void setValue(String value)
          Changes the value of the configuration-variable.
 String toString()
           
 
Methods inherited from class org.eclipse.stardust.engine.core.preferences.configurationvariables.ConfigurationVariableDefinition
getDefaultValue, getDescription, getModelOid, getName, getType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.stardust.engine.core.preferences.configurationvariables.IConfigurationVariableDefinition
getDefaultValue, getDescription, getModelOid, getName, getType
 

Constructor Detail

ConfigurationVariable

public ConfigurationVariable(org.eclipse.stardust.engine.core.preferences.configurationvariables.IConfigurationVariableDefinition definition,
                             String value)
Method Detail

getValue

public String getValue()
Returns:
The currently set value of the configuration-variable.

setValue

public void setValue(String value)
Changes the value of the configuration-variable.
After modifying this value a saveConfigurationVariables(ConfigurationVariables) API call has to be made for the changes to take effect.

Saving a value that equals the defaultValue has the same effect as saving a value of null. It will remove the currently set value so the defaultValue takes priority. DefaultValues are defined per model so this behavior prevents having default values persistent over different model versions because a set value would take priority over a future model versions defaultValue.

Parameters:
value - a string defining the configuration variables runtime value

toString

public String toString()
Overrides:
toString in class org.eclipse.stardust.engine.core.preferences.configurationvariables.ConfigurationVariableDefinition


Copyright © 2017 Eclipse Stardust. All Rights Reserved.