Class ListConstraint

java.lang.Object
com.orchestranetworks.addon.dqid.ListConstraint

public final class ListConstraint extends Object
Definition of a constraint for a multiple occurred parameter or enumeration.

The enumeration can be presented when HTMLComponent.isHTMLComponentForEnumeration() returns true.

Since:
1.3.0
See Also:
  • Constructor Details

    • ListConstraint

      public ListConstraint(int minOccurs, int maxOccurs, List<String> defaultValues)
      Initializes in the case the parameter is a list.
    • ListConstraint

      public ListConstraint(int minOccurs, int maxOccurs, Set<PredefinedValue> defaultValues)
      Initializes in the case the parameter is a list.
    • ListConstraint

      public ListConstraint(Set<PredefinedValue> possibleValues, Set<PredefinedValue> defaultValues)
      Initializes in the case the parameter is an enumeration type.
      Parameters:
      possibleValues - All possible enumeration values.
      defaultValues - The selected values on the UI.
      Since:
      1.4.0
    • ListConstraint

      public ListConstraint(int minOccurs, int maxOccurs, Set<PredefinedValue> possibleValues, Set<PredefinedValue> defaultValues)
      Initializes in the case the parameter is an enumeration type and is multiple-occurrenced.
      Parameters:
      minOccurs - The minimum occurrence number.
      maxOccurs - The maximum occurrence number.
      possibleValues - All possible enumeration values.
      defaultValues - The selected values on the user interface.
      Since:
      1.4.0
  • Method Details

    • getMinOccurs

      public int getMinOccurs()
      Returns the minimum occurrence number.
    • getMaxOccurs

      public int getMaxOccurs()
      Returns the maximum occurrence number.
    • getDefaultValues

      @Deprecated public List<String> getDefaultValues()
      Deprecated.
      As of v1.4.0, replaced by getDefaultPredefinedValues().
      Returns the list of the predefined default values.
    • getDefaultPredefinedValues

      public Set<PredefinedValue> getDefaultPredefinedValues()
      Returns the list of the predefined default values.
      Since:
      1.4.0
    • getPossibleValues

      public Set<PredefinedValue> getPossibleValues()
      Returns the list of possible values in case of enumeration.
      Since:
      1.4.0
    • isUnbounded

      public boolean isUnbounded()
      Returns true if getMaxOccurs() equals Integer.MAX_VALUE.
    • isEnum

      public boolean isEnum()
      Returns true in case of enumeration.
      Since:
      1.4.0
    • isList

      public boolean isList()
      Returns true if the maximum occurrence number is greater than 1.
      Since:
      1.4.0