Class WorkspacesApi

java.lang.Object
nl.bimbase.bimworks.client.apis.SubApi
nl.bimbase.bimworks.client.apis.WorkspacesApi

public class WorkspacesApi extends SubApi
Workspaces: named, optionally filtered views over an account's tree that can be published and switched between.
  • Constructor Summary

    Constructors
    Constructor
    Description
    WorkspacesApi(BimWorksClient bimWorksClient)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    create(String name, UUID parentWorkspaceUuid, String filter)
    Create a workspace.
    void
    create(String name, UUID parentWorkspaceUuid, String filter, com.fasterxml.jackson.databind.node.ObjectNode featureVisibility)
     
    void
    delete(UUID uuid)
    Soft-delete a workspace and its sub-workspaces: they leave list() and their published links stop working; the models and actions are kept.
    com.fasterxml.jackson.databind.node.ObjectNode
    Info about the workspace behind a workspace credential.
    com.fasterxml.jackson.databind.node.ArrayNode
    Root workspaces (children nested under children); the active one is flagged active.
    void
    publish(UUID uuid)
     
    void
    setCurrent(UUID workspaceUuid)
    Switch the session's current workspace; null (or "DEFAULT") returns to the plain account view.
    void
    update(UUID uuid, String name, String filter)
     
    void
    update(UUID uuid, String name, String filter, com.fasterxml.jackson.databind.node.ObjectNode featureVisibility, boolean clearFeatureVisibility)
    Update with the visible-features rule: an object sets it, clearFeatureVisibility removes it (everything visible again); both false = leave it as it is.

    Methods inherited from class SubApi

    getBimWorksClient
    Modifier and Type
    Method
    Description
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • create

      public void create(String name, UUID parentWorkspaceUuid, String filter) throws BimWorksException
      Create a workspace. The server answers with the new uuid, which this method does not pass on; use list() to find it.
      Parameters:
      filter - an optional BQL filter applied inside the workspace
      Throws:
      BimWorksException
    • create

      public void create(String name, UUID parentWorkspaceUuid, String filter, com.fasterxml.jackson.databind.node.ObjectNode featureVisibility) throws BimWorksException
      Parameters:
      featureVisibility - the white-list or black-list of the features a visitor of the published workspace sees: {"mode": "allow" | "deny", "features": ["attribute.Name", "property.Pset_WallCommon.*", ...]} (docs/feature-list-and-visibility-design.md par 8.2); null = everything visible
      Throws:
      BimWorksException
    • update

      public void update(UUID uuid, String name, String filter) throws BimWorksException
      Throws:
      BimWorksException
    • update

      public void update(UUID uuid, String name, String filter, com.fasterxml.jackson.databind.node.ObjectNode featureVisibility, boolean clearFeatureVisibility) throws BimWorksException
      Update with the visible-features rule: an object sets it, clearFeatureVisibility removes it (everything visible again); both false = leave it as it is.
      Throws:
      BimWorksException
    • delete

      public void delete(UUID uuid) throws BimWorksException
      Soft-delete a workspace and its sub-workspaces: they leave list() and their published links stop working; the models and actions are kept.
      Throws:
      BimWorksException
    • list

      public com.fasterxml.jackson.databind.node.ArrayNode list() throws BimWorksException
      Root workspaces (children nested under children); the active one is flagged active.
      Throws:
      BimWorksException
    • setCurrent

      public void setCurrent(UUID workspaceUuid) throws BimWorksException
      Switch the session's current workspace; null (or "DEFAULT") returns to the plain account view.
      Throws:
      BimWorksException
    • getInfo

      public com.fasterxml.jackson.databind.node.ObjectNode getInfo() throws BimWorksException
      Info about the workspace behind a workspace credential.
      Throws:
      BimWorksException
    • publish

      public void publish(UUID uuid) throws BimWorksException
      Throws:
      BimWorksException