Package org.somox.configuration
Class ConfigurationDefinition
java.lang.Object
org.somox.configuration.ConfigurationDefinition
Configuration Object defining a configuration Element
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The available types for configuration fields -
Field Summary
Modifier and TypeFieldDescriptionstatic int
Indicator for an unlimited multiplicity -
Constructor Summary
ConstructorDescriptionConfigurationDefinition
(String id, String name, ConfigurationDefinition.Type type) Constructor requiring the minimum of definitionsConfigurationDefinition
(String id, String name, ConfigurationDefinition.Type type, String defaultValue) Constructor requiring the basic information and the default valueConfigurationDefinition
(String id, String name, ConfigurationDefinition.Type type, String defaultValue, boolean required) Constructor requiring the basic information and the default valueConfigurationDefinition
(String id, String name, ConfigurationDefinition.Type type, String defaultValue, List<String> possibleValues, int multiplicity, boolean required) Constructor requiring the complete set of definitions -
Method Summary
Modifier and TypeMethodDescriptiongetId()
int
getName()
getType()
boolean
void
setDefaultValue
(String defaultValue) void
void
setMultiplicity
(int multiplicity) void
void
setPossibleValues
(List<String> possibleValues) void
setRequired
(boolean required) void
-
Field Details
-
MULIPLICITY_UNLIMITED
public static int MULIPLICITY_UNLIMITEDIndicator for an unlimited multiplicity
-
-
Constructor Details
-
ConfigurationDefinition
public ConfigurationDefinition(String id, String name, ConfigurationDefinition.Type type, String defaultValue, List<String> possibleValues, int multiplicity, boolean required) Constructor requiring the complete set of definitions- Parameters:
id
- The identifier for the parametername
- The name of the parametertype
- The type of the parameterdefaultValue
- The defaultValuepossibleValues
- The possible values for this configurationmultiplicity
- The maximum number of possibleValues for this configurationrequired
- Flag whether this configuration is required
-
ConfigurationDefinition
public ConfigurationDefinition(String id, String name, ConfigurationDefinition.Type type, String defaultValue) Constructor requiring the basic information and the default value- Parameters:
id
- The identifier for the parametername
- The name of the parametertype
- The type of the parameterdefaultValue
- The defaultValue
-
ConfigurationDefinition
public ConfigurationDefinition(String id, String name, ConfigurationDefinition.Type type, String defaultValue, boolean required) Constructor requiring the basic information and the default value- Parameters:
id
- The identifier for the parametername
- The name of the parametertype
- The type of the parameterdefaultValue
- The defaultValuerequired
- Flag whether this configuration is required
-
ConfigurationDefinition
Constructor requiring the minimum of definitions- Parameters:
id
- The identifier for the parametername
- The name of the parametertype
- The type of the parameter
-
-
Method Details
-
getId
- Returns:
- the id
-
setId
- Parameters:
id
- the id to set
-
getName
- Returns:
- the name
-
setName
- Parameters:
name
- the name to set
-
getType
- Returns:
- the type
-
setType
- Parameters:
type
- the type to set
-
getDefaultValue
- Returns:
- the defaultValue
-
setDefaultValue
- Parameters:
defaultValue
- the defaultValue to set
-
setPossibleValues
- Parameters:
possibleValues
- the possibleValues to set
-
getPossibleValues
- Returns:
- the possibleValues
-
setMultiplicity
public void setMultiplicity(int multiplicity) - Parameters:
multiplicity
- the multiplicity to set
-
getMultiplicity
public int getMultiplicity()- Returns:
- the multiplicity
-
setRequired
public void setRequired(boolean required) - Parameters:
required
- the required to set
-
isRequired
public boolean isRequired()- Returns:
- the required
-