org.rhq.core.clientapi.agent.configuration
Class ConfigurationUtility
java.lang.Object
org.rhq.core.clientapi.agent.configuration.ConfigurationUtility
public abstract class ConfigurationUtility
- extends Object
Utility methods for working with Configurations.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurationUtility
public ConfigurationUtility()
normalizeConfiguration
public static void normalizeConfiguration(@NotNull
Configuration configuration,
@Nullable
ConfigurationDefinition configurationDefinition)
- "Normalize" the given configuration according to the given configuration definition. That is, for any optional
properties that are not defined in the top-level configuration Map or any sub-Maps, set them. Simple properties
are set with a null value, Map properties as an empty Map, and List properties as an empty List.
- Parameters:
configuration - the configuration to be normalizedconfigurationDefinition - the configuration definition to normalize the configuration against
validateConfiguration
@NotNull
public static List<String> validateConfiguration(@NotNull
Configuration configuration,
@Nullable
ConfigurationDefinition configurationDefinition)
- Validate the given configuration according to the given configuration definition. That is, check that any
required properties in the top-level configuration Map or any sub-Maps, are defined and, in the case of simple
properties, check that they have a non-null value. A list of messages describing any errors that were found is
returned. Additionally, any undefined or null simple properties will be assigned a value of "".
- Parameters:
configuration - the configuration to be validatedconfigurationDefinition - the configuration definition to validate the configuration against
- Returns:
- a list of messages describing any errors that were found
Copyright © 2008-2009 Red Hat, Inc.. All Rights Reserved.