Class RestServiceConstants

java.lang.Object
com.bonitasoft.processbuilder.extension.RestServiceConstants

public final class RestServiceConstants extends Object
Constants for REST service execution.

This class contains common constants used when making REST API calls, including default headers, timeouts, and JSON field names.

Since:
1.0
Author:
Bonitasoft
  • Field Details

    • DEFAULT_CONNECT_TIMEOUT_MS

      public static final int DEFAULT_CONNECT_TIMEOUT_MS
      Default connection timeout in milliseconds (10 seconds).
      See Also:
    • DEFAULT_READ_TIMEOUT_MS

      public static final int DEFAULT_READ_TIMEOUT_MS
      Default read timeout in milliseconds (30 seconds).
      See Also:
    • MAX_TIMEOUT_MS

      public static final int MAX_TIMEOUT_MS
      Maximum timeout allowed in milliseconds (5 minutes).
      See Also:
    • MIN_TIMEOUT_MS

      public static final int MIN_TIMEOUT_MS
      Minimum timeout allowed in milliseconds (1 second).
      See Also:
    • HEADER_ACCEPT

      public static final String HEADER_ACCEPT
      Accept header name.
      See Also:
    • HEADER_CONTENT_TYPE

      public static final String HEADER_CONTENT_TYPE
      Content-Type header name.
      See Also:
    • HEADER_AUTHORIZATION

      public static final String HEADER_AUTHORIZATION
      Authorization header name.
      See Also:
    • HEADER_USER_AGENT

      public static final String HEADER_USER_AGENT
      User-Agent header name.
      See Also:
    • HEADER_REQUEST_ID

      public static final String HEADER_REQUEST_ID
      X-Request-ID header name for request tracing.
      See Also:
    • HEADER_CORRELATION_ID

      public static final String HEADER_CORRELATION_ID
      X-Correlation-ID header name for distributed tracing.
      See Also:
    • DEFAULT_USER_AGENT

      public static final String DEFAULT_USER_AGENT
      Default User-Agent value.
      See Also:
    • CONTENT_TYPE_JSON

      public static final String CONTENT_TYPE_JSON
      JSON content type.
      See Also:
    • CONTENT_TYPE_JSON_UTF8

      public static final String CONTENT_TYPE_JSON_UTF8
      JSON content type with UTF-8 charset.
      See Also:
    • CONTENT_TYPE_XML

      public static final String CONTENT_TYPE_XML
      XML content type.
      See Also:
    • CONTENT_TYPE_FORM

      public static final String CONTENT_TYPE_FORM
      Form URL encoded content type.
      See Also:
    • CONTENT_TYPE_TEXT

      public static final String CONTENT_TYPE_TEXT
      Plain text content type.
      See Also:
    • OAUTH2_GRANT_CLIENT_CREDENTIALS

      public static final String OAUTH2_GRANT_CLIENT_CREDENTIALS
      OAuth2 grant type for client credentials.
      See Also:
    • OAUTH2_GRANT_PASSWORD

      public static final String OAUTH2_GRANT_PASSWORD
      OAuth2 grant type for password.
      See Also:
    • OAUTH2_GRANT_REFRESH_TOKEN

      public static final String OAUTH2_GRANT_REFRESH_TOKEN
      OAuth2 grant type for refresh token.
      See Also:
    • OAUTH2_ACCESS_TOKEN

      public static final String OAUTH2_ACCESS_TOKEN
      OAuth2 access token field name in response.
      See Also:
    • OAUTH2_TOKEN_TYPE

      public static final String OAUTH2_TOKEN_TYPE
      OAuth2 token type field name in response.
      See Also:
    • OAUTH2_EXPIRES_IN

      public static final String OAUTH2_EXPIRES_IN
      OAuth2 expires in field name in response (seconds).
      See Also:
    • OAUTH2_REFRESH_TOKEN

      public static final String OAUTH2_REFRESH_TOKEN
      OAuth2 refresh token field name in response.
      See Also:
    • OAUTH2_SCOPE

      public static final String OAUTH2_SCOPE
      OAuth2 scope field name in response.
      See Also:
    • JSON_URL

      public static final String JSON_URL
      JSON field name for URL.
      See Also:
    • JSON_METHOD

      public static final String JSON_METHOD
      JSON field name for HTTP method.
      See Also:
    • JSON_HEADERS

      public static final String JSON_HEADERS
      JSON field name for headers.
      See Also:
    • JSON_QUERY_PARAMS

      public static final String JSON_QUERY_PARAMS
      JSON field name for query parameters.
      See Also:
    • JSON_BODY

      public static final String JSON_BODY
      JSON field name for request/response body.
      See Also:
    • JSON_CONTENT_TYPE

      public static final String JSON_CONTENT_TYPE
      JSON field name for content type.
      See Also:
    • JSON_AUTH

      public static final String JSON_AUTH
      JSON field name for authentication configuration.
      See Also:
    • JSON_AUTH_TYPE

      public static final String JSON_AUTH_TYPE
      JSON field name for authentication type.
      See Also:
    • JSON_TIMEOUT_MS

      public static final String JSON_TIMEOUT_MS
      JSON field name for timeout.
      See Also:
    • JSON_FOLLOW_REDIRECTS

      public static final String JSON_FOLLOW_REDIRECTS
      JSON field name for follow redirects flag.
      See Also:
    • JSON_VERIFY_SSL

      public static final String JSON_VERIFY_SSL
      JSON field name for verify SSL flag.
      See Also:
    • JSON_STATUS_CODE

      public static final String JSON_STATUS_CODE
      JSON field name for status code.
      See Also:
    • JSON_ERROR_MESSAGE

      public static final String JSON_ERROR_MESSAGE
      JSON field name for error message.
      See Also:
    • JSON_EXECUTION_TIME_MS

      public static final String JSON_EXECUTION_TIME_MS
      JSON field name for execution time.
      See Also:
    • JSON_USERNAME

      public static final String JSON_USERNAME
      JSON field name for username.
      See Also:
    • JSON_PASSWORD

      public static final String JSON_PASSWORD
      JSON field name for password.
      See Also:
    • JSON_TOKEN

      public static final String JSON_TOKEN
      JSON field name for token.
      See Also:
    • JSON_KEY_NAME

      public static final String JSON_KEY_NAME
      JSON field name for API key name.
      See Also:
    • JSON_KEY_VALUE

      public static final String JSON_KEY_VALUE
      JSON field name for API key value.
      See Also:
    • JSON_LOCATION

      public static final String JSON_LOCATION
      JSON field name for API key location.
      See Also:
    • JSON_TOKEN_URL

      public static final String JSON_TOKEN_URL
      JSON field name for OAuth2 token URL.
      See Also:
    • JSON_CLIENT_ID

      public static final String JSON_CLIENT_ID
      JSON field name for OAuth2 client ID.
      See Also:
    • JSON_CLIENT_SECRET

      public static final String JSON_CLIENT_SECRET
      JSON field name for OAuth2 client secret.
      See Also:
    • JSON_SCOPE

      public static final String JSON_SCOPE
      JSON field name for OAuth2 scope.
      See Also:
    • JSON_AUDIENCE

      public static final String JSON_AUDIENCE
      JSON field name for OAuth2 audience.
      See Also:
    • HTTP_OK

      public static final int HTTP_OK
      HTTP 200 OK.
      See Also:
    • HTTP_CREATED

      public static final int HTTP_CREATED
      HTTP 201 Created.
      See Also:
    • HTTP_NO_CONTENT

      public static final int HTTP_NO_CONTENT
      HTTP 204 No Content.
      See Also:
    • HTTP_BAD_REQUEST

      public static final int HTTP_BAD_REQUEST
      HTTP 400 Bad Request.
      See Also:
    • HTTP_UNAUTHORIZED

      public static final int HTTP_UNAUTHORIZED
      HTTP 401 Unauthorized.
      See Also:
    • HTTP_FORBIDDEN

      public static final int HTTP_FORBIDDEN
      HTTP 403 Forbidden.
      See Also:
    • HTTP_NOT_FOUND

      public static final int HTTP_NOT_FOUND
      HTTP 404 Not Found.
      See Also:
    • HTTP_INTERNAL_ERROR

      public static final int HTTP_INTERNAL_ERROR
      HTTP 500 Internal Server Error.
      See Also:
    • HTTP_BAD_GATEWAY

      public static final int HTTP_BAD_GATEWAY
      HTTP 502 Bad Gateway.
      See Also:
    • HTTP_SERVICE_UNAVAILABLE

      public static final int HTTP_SERVICE_UNAVAILABLE
      HTTP 503 Service Unavailable.
      See Also:
    • DEFAULT_JSON_HEADERS

      public static final Map<String,String> DEFAULT_JSON_HEADERS
      Default headers for JSON requests.
    • DEFAULT_XML_HEADERS

      public static final Map<String,String> DEFAULT_XML_HEADERS
      Default headers for XML requests.