FileSystemApi
CLASS in nl.bimbase.bimworks.client.apis.
API catalogue · nl.bimbase.bimworks.client.apis · CLASS
public class FileSystemApiBIM.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)#
public FileSystemApi(nl.bimbase.bimworks.client.BimWorksClient bimWorksClient)Parameters#
| Name | Type | Description |
|---|---|---|
bimWorksClient |
BimWorksClient |
createNode(UUID, String, boolean)#
public java.util.UUID createNode(java.util.UUID parentNodeUuid, java.lang.String name, boolean isFolder) throws nl.bimbase.bimworks.client.BimWorksExceptionCreate 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)#
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.BimWorksExceptionCreate 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)#
public void deleteNodeIfExists(java.lang.String path) throws nl.bimbase.bimworks.client.BimWorksExceptionDelete 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)#
public void deleteNode(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksExceptionDelete 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)#
public void renameNode(java.util.UUID nodeUuid, java.lang.String newName) throws nl.bimbase.bimworks.client.BimWorksExceptionRename 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)#
public void moveNode(java.util.UUID nodeUuid, java.util.UUID targetParentNodeUuid) throws nl.bimbase.bimworks.client.BimWorksExceptionMove 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)#
public void deleteNodeVersion(java.util.UUID nodeUuid, java.util.UUID versionUuid) throws nl.bimbase.bimworks.client.BimWorksExceptionDelete a specific Version
Parameters#
| Name | Type | Description |
|---|---|---|
nodeUuid |
java.util.UUID |
|
versionUuid |
java.util.UUID |
Exceptions#
BimWorksException—
deleteNodeError(UUID, UUID)#
public void deleteNodeError(java.util.UUID nodeUuid, java.util.UUID errorUuid) throws nl.bimbase.bimworks.client.BimWorksExceptionDelete 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)#
public void undeleteNode(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksExceptionUndelete a Node
Parameters#
| Name | Type | Description |
|---|---|---|
nodeUuid |
java.util.UUID |
The UUID of the Node to undelete |
Exceptions#
BimWorksException—
getRootNode()#
public nl.bimbase.bimworks.client.TreeNode getRootNode() throws nl.bimbase.bimworks.client.BimWorksExceptionReturns#
The root Node
Exceptions#
BimWorksException—
createNodeIfNotExists(UUID, String, boolean, InputFileType)#
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.BimWorksExceptionCreate 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)#
public nl.bimbase.bimworks.client.TreeNode getNodeByUuid(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksExceptionGet 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)#
public nl.bimbase.bimworks.client.TreeNodeVersion getNodeVersion(java.util.UUID versionUuid) throws nl.bimbase.bimworks.client.BimWorksExceptionGet a Version
Parameters#
| Name | Type | Description |
|---|---|---|
versionUuid |
java.util.UUID |
The UUID of the requested Version |
Returns#
A Version
Exceptions#
BimWorksException—
getNodeByVersionUuid(UUID)#
public nl.bimbase.bimworks.client.TreeNode getNodeByVersionUuid(java.util.UUID versionUuid) throws nl.bimbase.bimworks.client.BimWorksExceptionGet 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)#
public com.fasterxml.jackson.databind.node.ObjectNode listNodes(java.util.UUID nodeUuid, boolean includeDeletedNodes) throws nl.bimbase.bimworks.client.BimWorksExceptionList 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)#
public com.fasterxml.jackson.databind.node.ArrayNode listNodeErrors(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksExceptionList 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)#
public com.fasterxml.jackson.databind.node.ArrayNode listNodeVersions(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksExceptionList 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)#
public com.fasterxml.jackson.databind.node.ObjectNode listNodesRecursive(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksExceptionList 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)#
public nl.bimbase.bimworks.client.TreeNode getNodeByPath(java.lang.String path) throws nl.bimbase.bimworks.client.BimWorksExceptionGet 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)#
public boolean exists(java.lang.String path) throws nl.bimbase.bimworks.client.BimWorksExceptionParameters#
| Name | Type | Description |
|---|---|---|
path |
java.lang.String |
The path to check |
Returns#
Whether a Node exists on the given path
Exceptions#
BimWorksException—
getRootNodeUuid()#
public java.util.UUID getRootNodeUuid() throws nl.bimbase.bimworks.client.BimWorksExceptionReturns#
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()#
public int clearNodeChildren() throws nl.bimbase.bimworks.client.BimWorksExceptionRemove 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)#
public int clearNodeChildren(java.util.UUID nodeUuid) throws nl.bimbase.bimworks.client.BimWorksExceptionRemove 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)#
public java.io.InputStream downloadAsZip(java.util.UUID nodeUuid, boolean includeDeleted) throws nl.bimbase.bimworks.client.BimWorksExceptionDownload 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)#
public com.fasterxml.jackson.databind.node.ObjectNode listNodes(java.lang.String path, boolean includeDeletedNodes) throws nl.bimbase.bimworks.client.BimWorksExceptionList 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)#
public nl.bimbase.bimworks.client.apis.FileSystemApi.NodeSubscription listNodesInteractive(java.util.UUID parentNodeUuid, nl.bimbase.bimworks.client.apis.FileSystemApi.TreeChangeListener listener) throws nl.bimbase.bimworks.client.BimWorksExceptionList 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>)#
public com.fasterxml.jackson.databind.node.ArrayNode getNodeVersions(java.util.Set<java.util.UUID> versionUuids) throws nl.bimbase.bimworks.client.BimWorksExceptionThe 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()