java.lang.Object
org.odpi.openmetadata.frameworks.connectors.properties.users.TokenAPI

public class TokenAPI extends Object
Describes a REST API to acquire a token
  • Constructor Details

    • TokenAPI

      public TokenAPI()
      Default constructor
  • Method Details

    • getHttpRequestType

      public String getHttpRequestType()
      Return the HTTP request type for the Token API: GET, POST etc
      Returns:
      string
    • setHttpRequestType

      public void setHttpRequestType(String httpRequestType)
      Set up the HTTP request type for the Token API: GET, POST etc
      Parameters:
      httpRequestType - string
    • getContentType

      public String getContentType()
      Return the content type for the API.
      Returns:
      content type
    • setContentType

      public void setContentType(String contentType)
      Set up the content type for the API - default is "application/json"
      Parameters:
      contentType - MIME content type
    • getURL

      public String getURL()
      Return the URL to use when issuing a REST call to get a token.
      Returns:
      string URL
    • setURL

      public void setURL(String url)
      Set up the URL to use when issuing a REST call to get a token.
      Parameters:
      url - string URL
    • getRequestBody

      public Map<String,Object> getRequestBody()
      Return the request body properties to use when issuing a REST call to get a token.
      Returns:
      JSON Structure as a map
    • setRequestBody

      public void setRequestBody(Map<String,Object> requestBody)
      Set up the request body properties to use when issuing a REST call to get a token.
      Parameters:
      requestBody - JSON Structure as a map
    • getResponseBodyMapping

      public Map<String,String> getResponseBodyMapping()
      Return mapping from secret name to response property name.
      Returns:
      map
    • setResponseBodyMapping

      public void setResponseBodyMapping(Map<String,String> responseBodyMapping)
      Set up mapping from secret name to response property name.
      Parameters:
      responseBodyMapping - map
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class Object
      Returns:
      print out of variables in a JSON-style
    • equals

      public boolean equals(Object objectToCompare)
      Compare the values of the supplied object with those stored in the current object.
      Overrides:
      equals in class Object
      Parameters:
      objectToCompare - supplied object
      Returns:
      boolean result of comparison
    • hashCode

      public int hashCode()
      Hash of properties
      Overrides:
      hashCode in class Object
      Returns:
      int