Annotation Type AllowedValues


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface AllowedValues

    The AllowedValues method annotation defines the list of valid values for a JobParameter or RequestParameter. The annotation can only be defined on a setXXX method which has either the JobParameter or RequestParameter annotations.

    The list of allowed values are encoded as strings. The string values will be converted to the data type of the parameter on the setXXX method.

    The list of allowed values is returned with the parameter descriptions in the business application specifications web services.

    The list of allowed values is used to Construct a new select list field on the job submission form. If the parameter is not required the select field will include "-" to indicate the null (not selected) value.

    The following code fragment shows an example of using the API.

    @AllowedValues(value = {
      "MD5",
      "SHA"
    })
    @JobParameter
    @RequestParameter
    public void setAlgorithmName(final String algorithmName) {
      this.algorithmName = algorithmName;
    }
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String[] value
      The list of allowed values encoded as strings.
    • Element Detail

      • value

        String[] value
        The list of allowed values encoded as strings. The string values will be converted to the data type of the parameter.
        Returns:
        The list of allowed values.