Class ParameterDefinition

  • All Implemented Interfaces:
    java.io.Serializable

    public final class ParameterDefinition
    extends java.lang.Object
    implements java.io.Serializable
    Defines the parameter definition.
    See Also:
    Serialized Form
    • 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.IllegalArgumentException
        Constructor: only key parameter without value.
        Parameters:
        key - the key
        minOccurs - 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.IllegalArgumentException
        Constructor
        Parameters:
        key - the key
        defaultValue - the default value
        minOccurs - 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.IllegalArgumentException
        Constructor
        Parameters:
        key - the key
        valueDataType - the value data type
        minOccurs - 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.IllegalArgumentException
        Constructor
        Parameters:
        key - the key
        valueDataType - the value data type
        defaultValue - the default value
        minOccurs - 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.IllegalArgumentException
        Constructor
        Parameters:
        key - the key
        valueDataType - the value data type
        defaultValue - the default value
        minOccurs - The min occurs (zero minOccurs has the meaning of the value is optional)
        maxOccurs - the max occurs
        isEmptyValueAllowed - true if an empty value is allowed
        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,
                                   boolean hasValueToProtect,
                                   java.lang.String description)
                            throws java.lang.IllegalArgumentException
        Constructor
        Parameters:
        key - the key
        valueDataType - the value data type
        defaultValue - the default value
        minOccurs - The min occurs (zero minOccurs has the meaning of the value is optional)
        maxOccurs - the max occurs
        isEmptyValueAllowed - true if an empty value is allowed
        hasValueToProtect - 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:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • clone

        public ParameterDefinition clone()
                                  throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException
        See Also:
        Object.clone()