Class ParameterDefinition
- java.lang.Object
-
- com.github.toolarium.processing.unit.dto.ParameterDefinition
-
- All Implemented Interfaces:
java.io.Serializable
public final class ParameterDefinition extends java.lang.Object implements java.io.SerializableDefines the parameter definition.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static booleanEMPTY_VALUE_ALLOWEDEMPTY_VALUE_ALLOWED: Constant for empty value allowedstatic booleanEMPTY_VALUE_NOT_ALLOWEDEMPTY_VALUE_NOT_ALLOWED: Constant for empty value not allowedstatic java.lang.ObjectNO_DEFAULT_PARAMETERNO_DEFAULT_PARAMETER: Constant for no default parameterstatic intNOT_OPTIONALNOT_OPTIONAL: Constant for minOccurs = 1static intOPTIONALOPTIONAL: Constant for minOccurs = 0
-
Constructor Summary
Constructors Constructor Description ParameterDefinition(java.lang.String key, int minOccurs, java.lang.String description)Constructor: only key parameter without value.ParameterDefinition(java.lang.String key, ParameterValueType valueDataType, int minOccurs, java.lang.String description)ConstructorParameterDefinition(java.lang.String key, ParameterValueType valueDataType, java.lang.Object defaultValue, int minOccurs, int maxOccurs, boolean isEmptyValueAllowed, boolean hasValueToProtect, java.lang.String description)ConstructorParameterDefinition(java.lang.String key, ParameterValueType valueDataType, java.lang.Object defaultValue, int minOccurs, int maxOccurs, boolean isEmptyValueAllowed, java.lang.String description)ConstructorParameterDefinition(java.lang.String key, ParameterValueType valueDataType, java.lang.Object defaultValue, int minOccurs, java.lang.String description)ConstructorParameterDefinition(java.lang.String key, java.lang.Object defaultValue, int minOccurs, java.lang.String description)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParameterDefinitionclone()booleanequals(java.lang.Object obj)java.lang.ObjectgetDefaultValue()Gets the default valuejava.lang.StringgetDescription()Gets the parameter description.java.lang.StringgetKey()Gets the key.intgetMaxOccurs()Get the max occurs.intgetMinOccurs()Get the min occurs.ParameterValueTypegetValueDataType()Gets the value data typeinthashCode()booleanhasValueToProtect()Check if the value of this parameter should be protected.booleanisEmptyValueAllowed()Check if an empty value is allowed or not.booleanisOptional()Check if the key is optional or not.java.lang.StringtoString()
-
-
-
Field Detail
-
NO_DEFAULT_PARAMETER
public static final java.lang.Object NO_DEFAULT_PARAMETER
NO_DEFAULT_PARAMETER: Constant for no default parameter
-
OPTIONAL
public static final int OPTIONAL
OPTIONAL: Constant for minOccurs = 0- See Also:
- Constant Field Values
-
NOT_OPTIONAL
public static final int NOT_OPTIONAL
NOT_OPTIONAL: Constant for minOccurs = 1- See Also:
- Constant Field Values
-
EMPTY_VALUE_ALLOWED
public static final boolean EMPTY_VALUE_ALLOWED
EMPTY_VALUE_ALLOWED: Constant for empty value allowed- See Also:
- Constant Field Values
-
EMPTY_VALUE_NOT_ALLOWED
public static final boolean EMPTY_VALUE_NOT_ALLOWED
EMPTY_VALUE_NOT_ALLOWED: Constant for empty value not allowed- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ParameterDefinition
public ParameterDefinition(java.lang.String key, int minOccurs, java.lang.String description) throws java.lang.IllegalArgumentExceptionConstructor: only key parameter without value.- Parameters:
key- the keyminOccurs- The min occurs (zero minOccurs has the meaning of the value is optional)description- The parameter description- Throws:
java.lang.IllegalArgumentException- In case of illegal arguments
-
ParameterDefinition
public ParameterDefinition(java.lang.String key, java.lang.Object defaultValue, int minOccurs, java.lang.String description) throws java.lang.IllegalArgumentExceptionConstructor- Parameters:
key- the keydefaultValue- the default valueminOccurs- The min occurs (zero minOccurs has the meaning of the value is optional)description- The parameter description- Throws:
java.lang.IllegalArgumentException- In case of illegal arguments
-
ParameterDefinition
public ParameterDefinition(java.lang.String key, ParameterValueType valueDataType, int minOccurs, java.lang.String description) throws java.lang.IllegalArgumentExceptionConstructor- Parameters:
key- the keyvalueDataType- the value data typeminOccurs- The min occurs (zero minOccurs has the meaning of the value is optional)description- The parameter description- Throws:
java.lang.IllegalArgumentException- In case of illegal arguments
-
ParameterDefinition
public ParameterDefinition(java.lang.String key, ParameterValueType valueDataType, java.lang.Object defaultValue, int minOccurs, java.lang.String description) throws java.lang.IllegalArgumentExceptionConstructor- Parameters:
key- the keyvalueDataType- the value data typedefaultValue- the default valueminOccurs- The min occurs (zero minOccurs has the meaning of the value is optional)description- The parameter description- Throws:
java.lang.IllegalArgumentException- In case of illegal arguments
-
ParameterDefinition
public ParameterDefinition(java.lang.String key, ParameterValueType valueDataType, java.lang.Object defaultValue, int minOccurs, int maxOccurs, boolean isEmptyValueAllowed, java.lang.String description) throws java.lang.IllegalArgumentExceptionConstructor- Parameters:
key- the keyvalueDataType- the value data typedefaultValue- the default valueminOccurs- The min occurs (zero minOccurs has the meaning of the value is optional)maxOccurs- the max occursisEmptyValueAllowed- true if an empty value is alloweddescription- The parameter description- Throws:
java.lang.IllegalArgumentException- In case of illegal arguments
-
ParameterDefinition
public ParameterDefinition(java.lang.String key, ParameterValueType valueDataType, java.lang.Object defaultValue, int minOccurs, int maxOccurs, boolean isEmptyValueAllowed, boolean hasValueToProtect, java.lang.String description) throws java.lang.IllegalArgumentExceptionConstructor- Parameters:
key- the keyvalueDataType- the value data typedefaultValue- the default valueminOccurs- The min occurs (zero minOccurs has the meaning of the value is optional)maxOccurs- the max occursisEmptyValueAllowed- true if an empty value is allowedhasValueToProtect- true if the value of this parameter should be protected; otherwise false.description- The parameter description- Throws:
java.lang.IllegalArgumentException- In case of illegal arguments
-
-
Method Detail
-
getKey
public java.lang.String getKey()
Gets the key.- Returns:
- the key
-
getValueDataType
public ParameterValueType getValueDataType()
Gets the value data type- Returns:
- the data type
-
getDefaultValue
public java.lang.Object getDefaultValue()
Gets the default value- Returns:
- the default value
-
isOptional
public boolean isOptional()
Check if the key is optional or not.- Returns:
- true if it is optional
-
getMinOccurs
public int getMinOccurs()
Get the min occurs.- Returns:
- the min occurs.
-
getMaxOccurs
public int getMaxOccurs()
Get the max occurs.- Returns:
- the max occurs.
-
isEmptyValueAllowed
public boolean isEmptyValueAllowed()
Check if an empty value is allowed or not.- Returns:
- true if an empty value is allowed
-
hasValueToProtect
public boolean hasValueToProtect()
Check if the value of this parameter should be protected.- Returns:
- true if the value of this parameter should be protected; otherwise false.
-
getDescription
public java.lang.String getDescription()
Gets the parameter description.- Returns:
- The parameter description
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
clone
public ParameterDefinition clone() throws java.lang.CloneNotSupportedException
- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException- See Also:
Object.clone()
-
-