This chapter contains the following subjects describing methods provided by the AdministrationService to retrieve configuration variables and save their changed values:
Please also refer to the section AdministrationService of the chapter Stardust Services for information on this service and the according Javadoc of the AdministrationService for detailed information on its methods and their parameter usage.
The ConfigurationVariables data transfer object contains the merged information from the preference store and the static model data like description or default value.
To retrieve configuration variables from a given model without password type, use the following method:
ConfigurationVariables getConfigurationVariables(byte[] model);
Hereby, model describes the model XML representation in byte array form.
The method returns a ConfigurationVariables object containing
only the configuration variables from the given model without password type.
The following functionality is available to retrieve merged configuration variables:
To retrieve an object of merged configuration variables from all models matching a specified modelId without password type, use the method:
ConfigurationVariables getConfigurationVariables(String modelId, boolean all);
The contained descriptions and default values are taken from the newest model version the configuration variable exists in.
The parameter modelId determines the model ID of the model(s)
to retrieve the configuration variables from. Parameter all indicates if
to fetch all configuration variables, including the password type.
The method returns a ConfigurationVariables object containing
the merged configuration variables from all model versions.
To retrieve an object of merged configuration variables from all models matching a specified modelId without password type, use the method:
ConfigurationVariables getConfigurationVariables(String modelId);
The contained descriptions and default values are taken from the newest model version the configuration variable exists in.
The parameter modelId determines the model ID of the model(s)
to retrieve the configuration variables from.
The method returns a ConfigurationVariables object containing
the merged configuration variables from all model versions.
To retrieve a list of objects of merged configuration variables from all models matching a list of specified modelIds (without password type), use the method:
List<ConfigurationVariables> getConfigurationVariables(List<String> modelId);
The contained descriptions and default values are taken from the newest model version the configuration variables exists in.
The parameter modelId determines a list of model IDs of the models
to retrieve the configuration variables list from.
The method returns a list of ConfigurationVariables objects containing
the merged configuration variables from all model versions.
In case you like to save changes to configuration variables values, use:
void saveConfigurationVariables(ConfigurationVariables configurationVariables, boolean force);
The parameter configurationVariables declares the
configuration variables containing changed values. Via force you
can determine if validation warnings should be ignored or not.
The required permission to execute this method is
saveOwnPartitionScopePreferences.