Class FileSystemApi
java.lang.Object
nl.bimbase.bimworks.client.apis.SubApi
nl.bimbase.bimworks.client.apis.FileSystemApi
BIM.works Repository maintains a virtual file system. The API calls in this namespace allow you to manipulate this.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintRemove all Nodes of this currently authenticated Account or API Token, be careful!createNode(UUID parentNodeUuid, String name, boolean isFolder) Create a new NodecreateNode(UUID parentNodeUuid, String name, boolean isFolder, nl.bimbase.bimworks.api.upload.InputFileType inputFileType) Create a new NodecreateNodeIfNotExists(UUID parentNodeUuid, String name, boolean isFolder, nl.bimbase.bimworks.api.upload.InputFileType inputFileType) Create a new Node if it does not already exists.voiddeleteNode(UUID nodeUuid) Delete a Node based on its UUID if it exists, will throw an exception when a Node already existsvoiddeleteNodeError(UUID nodeUuid, UUID errorUuid) Delete an ErrorvoiddeleteNodeIfExists(String path) Delete a Node based on it's path if it exists, does not throw an exception for non-existing pathsvoiddeleteNodeVersion(UUID nodeUuid, UUID versionUuid) Delete a specific VersionbooleangetNodeByPath(String path) Get a Node by it's pathgetNodeByUuid(UUID nodeUuid) Get a Node by it's UUIDgetNodeByVersionUuid(UUID versionUuid) Get the Node the given Version belongs to.getNodeVersion(UUID versionUuid) Get a Versioncom.fasterxml.jackson.databind.node.ArrayNodelistNodeErrors(UUID nodeUuid) List all the errors on a given Nodecom.fasterxml.jackson.databind.node.ObjectNodeList all the child Nodes on the given pathcom.fasterxml.jackson.databind.node.ObjectNodeList all child nodes of the given Nodecom.fasterxml.jackson.databind.node.ObjectNodelistNodesRecursive(UUID nodeUuid) List all Nodes below the given Node.com.fasterxml.jackson.databind.node.ArrayNodelistNodeVersions(UUID nodeUuid) List all the Versions of the given NodevoidrenameNode(UUID nodeUuid, String newName) Rename an existing NodevoidundeleteNode(UUID nodeUuid) Undelete a NodeMethods inherited from class SubApi
getBimWorksClient
-
Constructor Details
-
FileSystemApi
-
-
Method Details
-
createNode
Create a new Node- Parameters:
parentNodeUuid- The UUID of the node the new Node should become a child ofname- The name of the new NodeisFolder- Whether the new Node is a folder or not- Returns:
- The UUID of the new Node
- Throws:
BimWorksException
-
createNode
public UUID createNode(UUID parentNodeUuid, String name, boolean isFolder, nl.bimbase.bimworks.api.upload.InputFileType inputFileType) throws BimWorksException Create a new Node- Parameters:
parentNodeUuid- The UUID of the node the new Node should become a child ofname- The name of the new NodeisFolder- Whether the new Node is a folder or notinputFileType- The type of the Model- Returns:
- Throws:
BimWorksException
-
deleteNodeIfExists
Delete a Node based on it's path if it exists, does not throw an exception for non-existing paths- Parameters:
path- The path to the Node to delete. Keep in mind that paths are relative to your (potential) API Token.- Throws:
BimWorksException
-
deleteNode
Delete a Node based on its UUID if it exists, will throw an exception when a Node already exists- Parameters:
nodeUuid- The UUID of the Node to delete. Keep in mind that paths are relative to your (potential) API Token.- Throws:
BimWorksException
-
renameNode
Rename an existing Node- Parameters:
nodeUuid- The UUID of the Node to renamenewName- The new name of the Node- Throws:
BimWorksException
-
deleteNodeVersion
Delete a specific Version- Parameters:
nodeUuid-versionUuid-- Throws:
BimWorksException
-
deleteNodeError
Delete an Error- Parameters:
nodeUuid- The Node UUID, this is a redundant argument and will be removed in the futureerrorUuid- The Error UUID- Throws:
BimWorksException
-
undeleteNode
Undelete a Node- Parameters:
nodeUuid- The UUID of the Node to undelete- Throws:
BimWorksException
-
getRootNode
- Returns:
- The root Node
- Throws:
BimWorksException
-
createNodeIfNotExists
public UUID createNodeIfNotExists(UUID parentNodeUuid, String name, boolean isFolder, nl.bimbase.bimworks.api.upload.InputFileType inputFileType) throws 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:
parentNodeUuid- The UUID of the parent Nodename- The name of the new NodeisFolder- Whether the new Node is a folderinputFileType- The type of Node- Returns:
- The UUID of the newly created Node, or the UUID of the existing Node
- Throws:
BimWorksException
-
getNodeByUuid
Get a Node by it's UUID- Parameters:
nodeUuid- The UUID of the requested Node- Returns:
- A Node
- Throws:
BimWorksException
-
getNodeVersion
Get a Version- Parameters:
versionUuid- The UUID of the requested Version- Returns:
- A Version
- Throws:
BimWorksException
-
getNodeByVersionUuid
Get the Node the given Version belongs to.- Parameters:
versionUuid- The UUID of the Version- Returns:
- A Node
- Throws:
BimWorksException
-
listNodes
public com.fasterxml.jackson.databind.node.ObjectNode listNodes(UUID nodeUuid, boolean includeDeletedNodes) throws BimWorksException List all child nodes of the given Node- Parameters:
nodeUuid- The UUID of the given NodeincludeDeletedNodes- Whether to include deleted Nodes. This option requires SUPER_ADMIN privileges at the moment.- Returns:
- Throws:
BimWorksException
-
listNodeErrors
public com.fasterxml.jackson.databind.node.ArrayNode listNodeErrors(UUID nodeUuid) throws BimWorksException List all the errors on a given Node- Parameters:
nodeUuid- The UUID of the given Node- Returns:
- An ArrayNode of all Errors
- Throws:
BimWorksException
-
listNodeVersions
public com.fasterxml.jackson.databind.node.ArrayNode listNodeVersions(UUID nodeUuid) throws BimWorksException List all the Versions of the given Node- Parameters:
nodeUuid- UUID of the given Node- Returns:
- An ArrayNode of Version
- Throws:
BimWorksException
-
listNodesRecursive
public com.fasterxml.jackson.databind.node.ObjectNode listNodesRecursive(UUID nodeUuid) throws BimWorksException List all Nodes below the given Node. Lists all subnodes recursively but the returned data structure is a flat list.- Parameters:
nodeUuid-- Returns:
- Throws:
BimWorksException
-
getNodeByPath
Get a Node by it's path- Parameters:
path- The path- Returns:
- The Node if found
- Throws:
BimWorksException
-
exists
- Parameters:
path- The path to check- Returns:
- Whether a Node exists on the given path
- Throws:
BimWorksException
-
getRootNodeUuid
- 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.
- Throws:
BimWorksException
-
clearNodeChildren
Remove all Nodes of this currently authenticated Account or API Token, be careful!- Returns:
- The amount of deleted Nodes
- Throws:
BimWorksException
-
listNodes
public com.fasterxml.jackson.databind.node.ObjectNode listNodes(String path, boolean includeDeletedNodes) throws BimWorksException List all the child Nodes on the given path- Parameters:
path- The path to the given NodeincludeDeletedNodes- Whether to include deleted Nodes. This option requires SUPER_ADMIN privileges at the moment.- Returns:
- Throws:
BimWorksException
-