Reference·Java · nl.bimbase.bimworks.client.apisJava

FileSystemApi

CLASS in nl.bimbase.bimworks.client.apis.

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

Java#
public class FileSystemApi

BIM.works Repository maintains a virtual file system. The API calls in this namespace allow you to manipulate this.

Inheritance and interfaces#

Members#

Member Kind Description
FileSystemApi(BimWorksClient) CONSTRUCTOR
createNode(UUID, String, boolean) METHOD Create a new Node
createNode(UUID, String, boolean, InputFileType) METHOD Create a new Node
deleteNodeIfExists(String) METHOD Delete a Node based on it's path if it exists, does not throw an exception for non-existing paths
deleteNode(UUID) METHOD Delete a Node based on its UUID if it exists, will throw an exception when a Node already exists
renameNode(UUID, String) METHOD Rename an existing Node
moveNode(UUID, UUID) METHOD Move a Node into another folder. The Node keeps its name. The target must be a folder that does not already contain a node with that name, and a Node cannot …
deleteNodeVersion(UUID, UUID) METHOD Delete a specific Version
deleteNodeError(UUID, UUID) METHOD Delete an Error
undeleteNode(UUID) METHOD Undelete a Node
getRootNode() METHOD
createNodeIfNotExists(UUID, String, boolean, InputFileType) METHOD Create a new Node if it does not already exists. Does not throw an exception when a Node already exists and instead returns the UUID of the existing Node.
getNodeByUuid(UUID) METHOD Get a Node by it's UUID
getNodeVersion(UUID) METHOD Get a Version
getNodeByVersionUuid(UUID) METHOD Get the Node the given Version belongs to.
listNodes(UUID, boolean) METHOD List all child nodes of the given Node
listNodeErrors(UUID) METHOD List all the errors on a given Node
listNodeVersions(UUID) METHOD List all the Versions of the given Node
listNodesRecursive(UUID) METHOD List all Nodes below the given Node. Lists all subnodes recursively but the returned data structure is a flat list.
getNodeByPath(String) METHOD Get a Node by it's path
exists(String) METHOD
getRootNodeUuid() METHOD
clearNodeChildren() METHOD Remove all Nodes of this currently authenticated Account or API Token, be careful! Requires the ADVANCED_SETTINGS user feature on the authenticated Account (…
clearNodeChildren(UUID) METHOD Remove all child Nodes of the given Node recursively, be careful! The Node itself is kept. Requires the ADVANCED_SETTINGS user feature on the authenticated A…
downloadAsZip(UUID, boolean) METHOD Download a folder Node as a ZIP archive holding the last Version of every (non-deleted) Node below it, with the folder structure as entry paths. The archive …
listNodes(String, boolean) METHOD List all the child Nodes on the given path
listNodesInteractive(UUID, FileSystemApi.TreeChangeListener) METHOD List a folder the way the web UI does: the listing stays open and the server pushes every change under it (new versions, checkin progress, errors, renames) u…
getNodeVersions(Set<UUID>) METHOD The version records of the given versions (across nodes).

FileSystemApi(BimWorksClient)#

Parameters#

Name Type Description
bimWorksClient BimWorksClient

createNode(UUID, String, boolean)#

Java#
public java.util.UUID createNode(java.util.UUID parentNodeUuid, java.lang.String name, boolean isFolder) throws nl.bimbase.bimworks.client.BimWorksException

Create a new Node

Parameters#

Name Type Description
parentNodeUuid java.util.UUID The UUID of the node the new Node should become a child of
name java.lang.String The name of the new Node
isFolder boolean Whether the new Node is a folder or not

Returns#

The UUID of the new Node

Exceptions#

  • BimWorksException —

createNode(UUID, String, boolean, InputFileType)#

Java#
public java.util.UUID createNode(java.util.UUID parentNodeUuid, java.lang.String name, boolean isFolder, nl.bimbase.bimworks.api.upload.InputFileType inputFileType) throws nl.bimbase.bimworks.client.BimWorksException

Create a new Node

Parameters#

Name Type Description
parentNodeUuid java.util.UUID The UUID of the node the new Node should become a child of
name java.lang.String The name of the new Node
isFolder boolean Whether the new Node is a folder or not
inputFileType nl.bimbase.bimworks.api.upload.InputFileType The type of the Model

Exceptions#

  • BimWorksException —

deleteNodeIfExists(String)#

Java#
public void deleteNodeIfExists(java.lang.String path) throws nl.bimbase.bimworks.client.BimWorksException

Delete a Node based on it's path if it exists, does not throw an exception for non-existing paths

Parameters#

Name Type Description
path java.lang.String The path to the Node to delete. Keep in mind that paths are relative to your (potential) API Token.

Exceptions#

  • BimWorksException —

deleteNode(UUID)#

Java#
public void deleteNode(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksException

Delete a Node based on its UUID if it exists, will throw an exception when a Node already exists

Parameters#

Name Type Description
nodeUuid java.util.UUID The UUID of the Node to delete. Keep in mind that paths are relative to your (potential) API Token.

Exceptions#

  • BimWorksException —

renameNode(UUID, String)#

Java#
public void renameNode(java.util.UUID nodeUuid, java.lang.String newName) throws nl.bimbase.bimworks.client.BimWorksException

Rename an existing Node

Parameters#

Name Type Description
nodeUuid java.util.UUID The UUID of the Node to rename
newName java.lang.String The new name of the Node

Exceptions#

  • BimWorksException —

moveNode(UUID, UUID)#

Java#
public void moveNode(java.util.UUID nodeUuid, java.util.UUID targetParentNodeUuid) throws nl.bimbase.bimworks.client.BimWorksException

Move a Node into another folder. The Node keeps its name. The target must be a folder that does not already contain a node with that name, and a Node cannot be moved onto itself — those cases are rejected by the server with a typed error.

Parameters#

Name Type Description
nodeUuid java.util.UUID The UUID of the Node to move
targetParentNodeUuid java.util.UUID The UUID of the folder Node to move it into

Exceptions#

  • BimWorksException —

deleteNodeVersion(UUID, UUID)#

Java#
public void deleteNodeVersion(java.util.UUID nodeUuid, java.util.UUID versionUuid) throws nl.bimbase.bimworks.client.BimWorksException

Delete a specific Version

Parameters#

Name Type Description
nodeUuid java.util.UUID
versionUuid java.util.UUID

Exceptions#

  • BimWorksException —

deleteNodeError(UUID, UUID)#

Java#
public void deleteNodeError(java.util.UUID nodeUuid, java.util.UUID errorUuid) throws nl.bimbase.bimworks.client.BimWorksException

Delete an Error

Parameters#

Name Type Description
nodeUuid java.util.UUID The Node UUID, this is a redundant argument and will be removed in the future
errorUuid java.util.UUID The Error UUID

Exceptions#

  • BimWorksException —

undeleteNode(UUID)#

Java#
public void undeleteNode(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksException

Undelete a Node

Parameters#

Name Type Description
nodeUuid java.util.UUID The UUID of the Node to undelete

Exceptions#

  • BimWorksException —

getRootNode()#

Returns#

The root Node

Exceptions#

  • BimWorksException —

createNodeIfNotExists(UUID, String, boolean, InputFileType)#

Java#
public java.util.UUID createNodeIfNotExists(java.util.UUID parentNodeUuid, java.lang.String name, boolean isFolder, nl.bimbase.bimworks.api.upload.InputFileType inputFileType) throws nl.bimbase.bimworks.client.BimWorksException

Create a new Node if it does not already exists. Does not throw an exception when a Node already exists and instead returns the UUID of the existing Node.

Parameters#

Name Type Description
parentNodeUuid java.util.UUID The UUID of the parent Node
name java.lang.String The name of the new Node
isFolder boolean Whether the new Node is a folder
inputFileType nl.bimbase.bimworks.api.upload.InputFileType The type of Node

Returns#

The UUID of the newly created Node, or the UUID of the existing Node

Exceptions#

  • BimWorksException —

getNodeByUuid(UUID)#

Java#
public nl.bimbase.bimworks.client.TreeNode getNodeByUuid(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksException

Get a Node by it's UUID

Parameters#

Name Type Description
nodeUuid java.util.UUID The UUID of the requested Node

Returns#

A Node

Exceptions#

  • BimWorksException —

getNodeVersion(UUID)#

Java#
public nl.bimbase.bimworks.client.TreeNodeVersion getNodeVersion(java.util.UUID versionUuid) throws nl.bimbase.bimworks.client.BimWorksException

Get a Version

Parameters#

Name Type Description
versionUuid java.util.UUID The UUID of the requested Version

Returns#

A Version

Exceptions#

  • BimWorksException —

getNodeByVersionUuid(UUID)#

Java#
public nl.bimbase.bimworks.client.TreeNode getNodeByVersionUuid(java.util.UUID versionUuid) throws nl.bimbase.bimworks.client.BimWorksException

Get the Node the given Version belongs to.

Parameters#

Name Type Description
versionUuid java.util.UUID The UUID of the Version

Returns#

A Node

Exceptions#

  • BimWorksException —

listNodes(UUID, boolean)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode listNodes(java.util.UUID nodeUuid, boolean includeDeletedNodes) throws nl.bimbase.bimworks.client.BimWorksException

List all child nodes of the given Node

Parameters#

Name Type Description
nodeUuid java.util.UUID The UUID of the given Node
includeDeletedNodes boolean Whether to include deleted Nodes. This option requires SUPER_ADMIN privileges at the moment.

Exceptions#

  • BimWorksException —

listNodeErrors(UUID)#

Java#
public com.fasterxml.jackson.databind.node.ArrayNode listNodeErrors(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksException

List all the errors on a given Node

Parameters#

Name Type Description
nodeUuid java.util.UUID The UUID of the given Node

Returns#

An ArrayNode of all Errors

Exceptions#

  • BimWorksException —

listNodeVersions(UUID)#

Java#
public com.fasterxml.jackson.databind.node.ArrayNode listNodeVersions(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksException

List all the Versions of the given Node

Parameters#

Name Type Description
nodeUuid java.util.UUID UUID of the given Node

Returns#

An ArrayNode of Version

Exceptions#

  • BimWorksException —

listNodesRecursive(UUID)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode listNodesRecursive(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksException

List all Nodes below the given Node. Lists all subnodes recursively but the returned data structure is a flat list.

Parameters#

Name Type Description
nodeUuid java.util.UUID

Exceptions#

  • BimWorksException —

getNodeByPath(String)#

Java#
public nl.bimbase.bimworks.client.TreeNode getNodeByPath(java.lang.String path) throws nl.bimbase.bimworks.client.BimWorksException

Get a Node by it's path

Parameters#

Name Type Description
path java.lang.String The path

Returns#

The Node if found

Exceptions#

  • BimWorksException —

exists(String)#

Java#
public boolean exists(java.lang.String path) throws nl.bimbase.bimworks.client.BimWorksException

Parameters#

Name Type Description
path java.lang.String The path to check

Returns#

Whether a Node exists on the given path

Exceptions#

  • BimWorksException —

getRootNodeUuid()#

Java#
public java.util.UUID getRootNodeUuid() throws nl.bimbase.bimworks.client.BimWorksException

Returns#

The UUID of the root node of the current context. The context depends on the type of authentication. For Username/Password authentication this is always the root Account Node. For API Tokens this is always the Node on which the API Token was created.

Exceptions#

  • BimWorksException —

clearNodeChildren()#

Java#
public int clearNodeChildren() throws nl.bimbase.bimworks.client.BimWorksException

Remove all Nodes of this currently authenticated Account or API Token, be careful! Requires the ADVANCED_SETTINGS user feature on the authenticated Account (for an API Token, the Account that owns it) — without it the server refuses with USER_FEATURE_REQUIRED.

Returns#

The amount of deleted Nodes, counted recursively — folders and already-deleted Nodes included

Exceptions#

  • BimWorksException —

clearNodeChildren(UUID)#

Java#
public int clearNodeChildren(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksException

Remove all child Nodes of the given Node recursively, be careful! The Node itself is kept. Requires the ADVANCED_SETTINGS user feature on the authenticated Account (for an API Token, the Account that owns it) — without it the server refuses with USER_FEATURE_REQUIRED.

Parameters#

Name Type Description
nodeUuid java.util.UUID The UUID of the Node whose children are deleted

Returns#

The amount of deleted Nodes, counted recursively — folders and already-deleted Nodes included

Exceptions#

  • BimWorksException —

downloadAsZip(UUID, boolean)#

Java#
public java.io.InputStream downloadAsZip(java.util.UUID nodeUuid, boolean includeDeleted) throws nl.bimbase.bimworks.client.BimWorksException

Download a folder Node as a ZIP archive holding the last Version of every (non-deleted) Node below it, with the folder structure as entry paths. The archive is generated on the fly: the server pushes the stream descriptor up front and then streams the ZIP into it, so bytes arrive while generation is still running.

Parameters#

Name Type Description
nodeUuid java.util.UUID The UUID of the folder Node to download
includeDeleted boolean Whether deleted Nodes are included

Returns#

An InputStream with the ZIP content. Responsibility for closing this stream is on the caller.

Exceptions#

  • BimWorksException — when the node is not a folder, on missing read rights, or when no stream arrives

listNodes(String, boolean)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode listNodes(java.lang.String path, boolean includeDeletedNodes) throws nl.bimbase.bimworks.client.BimWorksException

List all the child Nodes on the given path

Parameters#

Name Type Description
path java.lang.String The path to the given Node
includeDeletedNodes boolean Whether to include deleted Nodes. This option requires SUPER_ADMIN privileges at the moment.

Exceptions#

  • BimWorksException —

listNodesInteractive(UUID, FileSystemApi.TreeChangeListener)#

List a folder the way the web UI does: the listing stays open and the server pushes every change under it (new versions, checkin progress, errors, renames) until the subscription is closed. A browser tab holds one of these per open folder.

Parameters#

Name Type Description
parentNodeUuid java.util.UUID the folder, null for the root
listener FileSystemApi.TreeChangeListener

getNodeVersions(Set<UUID>)#

Java#
public com.fasterxml.jackson.databind.node.ArrayNode getNodeVersions(java.util.Set<java.util.UUID> versionUuids) throws nl.bimbase.bimworks.client.BimWorksException

The version records of the given versions (across nodes).

Parameters#

Name Type Description
versionUuids java.util.Set<java.util.UUID>

Inherited members#

  • java.lang.Object#equals(java.lang.Object)
  • java.lang.Object#toString()
  • 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()
  • getBimWorksClient()