com.ibm.commerce.rest.javadoc

Annotation Type ParameterDescription



  • @Retention(value=RUNTIME)
    public @interface ParameterDescription
    Annotation used to describe a parameter used in a REST API. It is mandatory for all URL query, URL path and HTTP header parameters.
    • Field Detail

      • TYPE_STRING

        public static final java.lang.String TYPE_STRING
        type : string
      • TYPE_INTEGER

        public static final java.lang.String TYPE_INTEGER
        type : integer
      • TYPE_NUMBER

        public static final java.lang.String TYPE_NUMBER
        type : number
      • TYPE_BOOLEAN

        public static final java.lang.String TYPE_BOOLEAN
        type : boolean
      • TYPE_ARRAY

        public static final java.lang.String TYPE_ARRAY
        type : array
      • TYPE_OBJECT

        public static final java.lang.String TYPE_OBJECT
        type : object
      • FORMAT_INT32

        public static final java.lang.String FORMAT_INT32
        format : int32
      • FORMAT_INT64

        public static final java.lang.String FORMAT_INT64
        format : int64
      • FLOAT_FORMAT

        public static final java.lang.String FLOAT_FORMAT
        format : float
      • FORMAT_DOUBLE

        public static final java.lang.String FORMAT_DOUBLE
        format : double
      • FORMAT_BYTE

        public static final java.lang.String FORMAT_BYTE
        format : byte
      • FORMAT_DATE

        public static final java.lang.String FORMAT_DATE
        format : date
      • FORMAT_NONE

        public static final java.lang.String FORMAT_NONE
        format : no format
      • FORMAT_DATE_TIME

        public static final java.lang.String FORMAT_DATE_TIME
        format : date-time
      • QUERY_TYPE

        public static final java.lang.String QUERY_TYPE
        paramType : HTTP query parameter type
      • HEADER_TYPE

        public static final java.lang.String HEADER_TYPE
        paramType : HTTP header parameter type
      • PATH_TYPE

        public static final java.lang.String PATH_TYPE
        paramType : HTTP header parameter type
      • BODY_TYPE

        public static final java.lang.String BODY_TYPE
        paramType : HTTP header parameter type
      • BODY_NAME

        public static final java.lang.String BODY_NAME
        name of the parameter that contains the body
      • BODY_DESCRIPTION

        public static final java.lang.String BODY_DESCRIPTION
        name of the parameter that contains the body
    • Element Detail

      • description

        public abstract java.lang.String description
        Returns:
        Description of the parameter.
      • name

        public abstract java.lang.String name
        Returns:
        Name of the parameter as it is used in the API.
        Default:
        ""
      • paramType

        public abstract java.lang.String paramType
        Returns:
        Type of the parameter such as query, body, header, path.
        Default:
        "query"
      • typeClass

        public abstract java.lang.Class typeClass
        Returns:
        The Java class used to represent the value. Can be linked to basic types such as Integer.class. Note : this parameter is ignored when the annotation is tagged next to a class member.
        Default:
        java.lang.String.class
      • typeResourceName

        public abstract java.lang.String typeResourceName
        Returns:
        The name of the resource to use for a resource that uses the BOD mapping framework. Defaults to the resource name returned by the handler.getResourceName() method if the field is left blank and the typeParameterGroup field is not blank.
        Default:
        ""
      • typeParameterGroup

        public abstract java.lang.String typeParameterGroup
        Returns:
        The name of the parameter group to use for a resource that uses the BOD mapping framework. Not used if left blank. When this field isn't blank, it overrides the typeClass() field.
        Default:
        ""
      • format

        public abstract java.lang.String format
        Returns:
        This field is used to override the format definition extracted form the typeClass() output. For valid values, see the constants in this class starting with the name FORMAT such as FORMAT_INT64. If the value is set to FORMAT_NONE, the format value will be extracted from the typeClass
        Default:
        ""
      • required

        public abstract boolean required
        Returns:
        Is the parameter required. All parameters of paramType=path are required = true;
        Default:
        false
      • multipleValue

        public abstract boolean multipleValue
        Returns:
        For parameters where the paramType=query, this value indicates if the parameter may be specified more than once.
        Default:
        false
      • values

        public abstract java.lang.String[] values
        Returns:
        An enumeration of all the possible values for the parameters if applicable. If not applicable, the returned list will be empty.
        Default:
        {}
      • valueProviderClass

        public abstract java.lang.Class<? extends ValueProvider> valueProviderClass
        Returns:
        Name of the class which may be used to fetch valid values for the parameter. This may be used to specify a class that will fetch valid values from a table in a database for instance.
        Default:
        com.ibm.commerce.rest.javadoc.EmptyValueProvider.class
      • valueSamplePath

        public abstract java.lang.String valueSamplePath
        Returns:
        Resource path of the sample to reverse engineer to document the schema. Only used if typeParameterGroup isn't specified.
        Default:
        ""