Reference·Java · nl.bimbase.bimworks.clientJava

BimWorksClientFactory

CLASS in nl.bimbase.bimworks.client.

API catalogue · nl.bimbase.bimworks.client · CLASS

Java#
public class BimWorksClientFactory

Factory for BimWorksClient objects. An instance of this class is supposed to be a long-lived object.

One BimWorksClientFactory is required per endpoint (in case you are connecting to multiple BIM.works environments from the same client).

Inheritance and interfaces#

  • java.lang.AutoCloseable

Members#

Member Kind Description
BimWorksClientFactory(String) CONSTRUCTOR
BimWorksClientFactory(String, ClientSettings) CONSTRUCTOR
setApplication(String, String) METHOD Names your application, sent with every request of the clients created afterwards (the app of the X-BIMworks-Client header and the end of the User-Agent). …
excludePlatformInfo() METHOD Leaves the Java version and the operating system out of what the clients created afterwards send. The SDK's own name, version and build are always sent: supp…
createAnonymousClient() METHOD Create a new BimWorksClient with anonymous access, only a very small set of API calls is allowed
createClientWithUsernamePassword(String, String) METHOD Login to the API with a username / password. This is generally not the recommended way of connecting, the preferrable option is to use an API Token. See also…
createClientWithApiToken(String) METHOD Create a new BimWorksClient based on an API Token. API Tokens in BIM.works are long-lived tokens that can be revoked. See general documentation for more info…
createClientWithAuth(ObjectNode) METHOD Create a new BimWorksClient based on an Auth Token. Auth Tokens are short-lived tokens. See general documentation for more information.
getAddress() METHOD
toString() METHOD
close() METHOD
createClient(Credentials) METHOD Alternative way of creating BimWorksClient objects, generally @see BimWorksClientFactory.createClientWithApiToken and @see BimWorksClientFactory.createClient…

BimWorksClientFactory(String)#

Java#
public BimWorksClientFactory(java.lang.String address)

Parameters#

Name Type Description
address java.lang.String The address of your BIM.works environment. In the form of https://host[:port][/context_path]

BimWorksClientFactory(String, ClientSettings)#

Java#
public BimWorksClientFactory(java.lang.String address, nl.sascom.backplane.client.ClientSettings settings)

Parameters#

Name Type Description
address java.lang.String
settings nl.sascom.backplane.client.ClientSettings

setApplication(String, String)#

Java#
public nl.bimbase.bimworks.client.BimWorksClientFactory setApplication(java.lang.String name, java.lang.String version)

Names your application, sent with every request of the clients created afterwards (the app of the X-BIMworks-Client header and the end of the User-Agent). It tells BIM.works support which of your integrations made a call. Letters, digits and . _ + -; anything else becomes _.

Parameters#

Name Type Description
name java.lang.String your application, e.g. acme-sync
version java.lang.String its version, or null

Returns#

this factory

excludePlatformInfo()#

Java#
public nl.bimbase.bimworks.client.BimWorksClientFactory excludePlatformInfo()

Leaves the Java version and the operating system out of what the clients created afterwards send. The SDK's own name, version and build are always sent: support needs them.

Returns#

this factory

createAnonymousClient()#

Create a new BimWorksClient with anonymous access, only a very small set of API calls is allowed

Returns#

A new BimWorksClient instance

Exceptions#

  • BimWorksException —

createClientWithUsernamePassword(String, String)#

Java#
public nl.bimbase.bimworks.client.BimWorksClient createClientWithUsernamePassword(java.lang.String username, java.lang.String password) throws nl.bimbase.bimworks.client.BimWorksException

Login to the API with a username / password. This is generally not the recommended way of connecting, the preferrable option is to use an API Token.

See also: BimWorksClientFactory#createClientWithApiToken

Parameters#

Name Type Description
username java.lang.String Your username, always a valid email address format (it does not always have to exist)
password java.lang.String You password

Returns#

A new BimWorksClient instance on successful authentication

Exceptions#

  • BimWorksException —

createClientWithApiToken(String)#

Java#
public nl.bimbase.bimworks.client.BimWorksClient createClientWithApiToken(java.lang.String apiToken) throws nl.bimbase.bimworks.client.BimWorksException

Create a new BimWorksClient based on an API Token. API Tokens in BIM.works are long-lived tokens that can be revoked. See general documentation for more information.

Parameters#

Name Type Description
apiToken java.lang.String Your API Token. API Tokens can be created with API calls in @see nl.bimbase.bimworks.client.apis.AuthApi. API Token are generally created using the BIM.works UI, as you generally do it once for each application.

Returns#

A new BimWorksClient instance on successful authentication

Exceptions#

  • BimWorksException —

createClientWithAuth(ObjectNode)#

Java#
public nl.bimbase.bimworks.client.BimWorksClient createClientWithAuth(com.fasterxml.jackson.databind.node.ObjectNode auth) throws nl.bimbase.bimworks.client.BimWorksException

Create a new BimWorksClient based on an Auth Token. Auth Tokens are short-lived tokens. See general documentation for more information.

Parameters#

Name Type Description
auth com.fasterxml.jackson.databind.node.ObjectNode The AuthToken as a Jackson ObjectNode

Returns#

A new BimWorksClient instance on successful authentication

Exceptions#

  • BimWorksException —

getAddress()#

Java#
public java.lang.String getAddress()

Returns#

The address with which this factory was initialized

toString()#

Java#
@java.lang.Override
public java.lang.String toString()

close()#

Java#
@java.lang.Override
public void close() throws java.lang.Exception

createClient(Credentials)#

Java#
public nl.bimbase.bimworks.client.BimWorksClient createClient(nl.bimbase.bimworks.Credentials credentials) throws nl.bimbase.bimworks.client.BimWorksException

Alternative way of creating BimWorksClient objects, generally @see BimWorksClientFactory.createClientWithApiToken and @see BimWorksClientFactory.createClientWithAuth are preferred.

Parameters#

Name Type Description
credentials nl.bimbase.bimworks.Credentials The credentials

Returns#

A new BimWorksClient instance on successful authentication

Exceptions#

  • Exception —

Inherited members#

  • java.lang.Object#equals(java.lang.Object)
  • java.lang.Object#wait(long)
  • java.lang.Object#wait(long,int)
  • java.lang.Object#wait()
  • java.lang.Object#finalize()
  • java.lang.Object#getClass()
  • java.lang.Object#hashCode()
  • java.lang.Object#clone()
  • java.lang.Object#notify()
  • java.lang.Object#notifyAll()