Interface ParameterConstraints.Builder

  • Method Details

    • allowedValues

      ParameterConstraints.Builder allowedValues(Collection<String> allowedValues)

      The values that the administrator has allowed for the parameter.

      Parameters:
      allowedValues - The values that the administrator has allowed for the parameter.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedValues

      ParameterConstraints.Builder allowedValues(String... allowedValues)

      The values that the administrator has allowed for the parameter.

      Parameters:
      allowedValues - The values that the administrator has allowed for the parameter.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedPattern

      ParameterConstraints.Builder allowedPattern(String allowedPattern)

      A regular expression that represents the patterns that allow for String types. The pattern must match the entire parameter value provided.

      Parameters:
      allowedPattern - A regular expression that represents the patterns that allow for String types. The pattern must match the entire parameter value provided.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • constraintDescription

      ParameterConstraints.Builder constraintDescription(String constraintDescription)

      A string that explains a constraint when the constraint is violated. For example, without a constraint description, a parameter that has an allowed pattern of [A-Za-z0-9]+ displays the following error message when the user specifies an invalid value:

      Malformed input-Parameter MyParameter must match pattern [A-Za-z0-9]+

      By adding a constraint description, such as must only contain letters (uppercase and lowercase) and numbers, you can display the following customized error message:

      Malformed input-Parameter MyParameter must only contain uppercase and lowercase letters and numbers.

      Parameters:
      constraintDescription - A string that explains a constraint when the constraint is violated. For example, without a constraint description, a parameter that has an allowed pattern of [A-Za-z0-9]+ displays the following error message when the user specifies an invalid value:

      Malformed input-Parameter MyParameter must match pattern [A-Za-z0-9]+

      By adding a constraint description, such as must only contain letters (uppercase and lowercase) and numbers, you can display the following customized error message:

      Malformed input-Parameter MyParameter must only contain uppercase and lowercase letters and numbers.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • maxLength

      ParameterConstraints.Builder maxLength(String maxLength)

      An integer value that determines the largest number of characters you want to allow for String types.

      Parameters:
      maxLength - An integer value that determines the largest number of characters you want to allow for String types.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • minLength

      ParameterConstraints.Builder minLength(String minLength)

      An integer value that determines the smallest number of characters you want to allow for String types.

      Parameters:
      minLength - An integer value that determines the smallest number of characters you want to allow for String types.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • maxValue

      A numeric value that determines the largest numeric value you want to allow for Number types.

      Parameters:
      maxValue - A numeric value that determines the largest numeric value you want to allow for Number types.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • minValue

      A numeric value that determines the smallest numeric value you want to allow for Number types.

      Parameters:
      minValue - A numeric value that determines the smallest numeric value you want to allow for Number types.
      Returns:
      Returns a reference to this object so that method calls can be chained together.