Class HttpBoxClient.HttpBoxClientBuilder

java.lang.Object
edu.byu.hbll.box.client.HttpBoxClient.HttpBoxClientBuilder
Enclosing class:
HttpBoxClient

public static class HttpBoxClient.HttpBoxClientBuilder extends Object
Builder for HttpBoxClient.
  • Constructor Details

    • HttpBoxClientBuilder

      public HttpBoxClientBuilder()
  • Method Details

    • uri

      Sets the base URI of the upstream Box source. Should include path to the desired source.
      Parameters:
      uri - the base URI of the upstream Box source
      Returns:
      this
    • uri

      Sets the base URI of the upstream Box source. Should include path to the desired source.
      Parameters:
      uri - the base URI of the upstream Box source
      Returns:
      this
    • accessTokenUri

      public HttpBoxClient.HttpBoxClientBuilder accessTokenUri(URI accessTokenUri)
      Sets the access token URI for OAuth2.
      Parameters:
      accessTokenUri - access token URI for OAuth2
      Returns:
      this
    • accessTokenUri

      public HttpBoxClient.HttpBoxClientBuilder accessTokenUri(String accessTokenUri)
      Sets the access token URI for OAuth2.
      Parameters:
      accessTokenUri - access token URI for OAuth2
      Returns:
      this
    • basicAuth

      public HttpBoxClient.HttpBoxClientBuilder basicAuth(String username, String password)
      Initialize to use basic authentication.
      Parameters:
      username - the username
      password - the password
      Returns:
      this
    • oauth2

      public HttpBoxClient.HttpBoxClientBuilder oauth2(String accessTokenUri, String clientId, String clientSecret)
      Initialize to use OAuth2.
      Parameters:
      accessTokenUri - the access token URI
      clientId - the client ID
      clientSecret - the client secret
      Returns:
      this