Interface WorkspacesService

  • All Known Implementing Classes:
    WorkspacesPlugin

    public interface WorkspacesService
    • Method Detail

      • deleteWorkspace

        void deleteWorkspace​(long workspaceId)
      • getWorkspace

        Topic getWorkspace​(String uri)
        Returns a workspace by URI. This is a privileged method: READ permission for the workspace is not required. ### TODO: why is this a privileged method?
        Returns:
        The workspace (a topic of type "Workspace").
        Throws:
        RuntimeException - If no workspace exists for the given URI.
      • getAssignedWorkspace

        Topic getAssignedWorkspace​(long objectId)
        Returns the workspace the given topic/association is assigned to.
        Parameters:
        objectId - a topic ID, or an association ID
        Returns:
        The assigned workspace (a topic of type "Workspace"), or null if no workspace is assigned.
        Throws:
        RuntimeException - If no object with the given ID exists.
        RuntimeException - If the current user has no READ permission for the workspace (and thus for the given topic/association).
      • assignToWorkspace

        void assignToWorkspace​(DMXObject object,
                               long workspaceId)
        Assigns an object to a workspace.
        Parameters:
        workspaceId - The ID of the workspace to assign the object to. If -1 is given an existing workspace assignment is removed.
      • assignTypeToWorkspace

        void assignTypeToWorkspace​(DMXType type,
                                   long workspaceId)
        Assigns a type as well as its "parts" to a workspace. In particular:
        • the type
        • the type's view config
        • the direct comp defs (not recursively)
        • the direct comp def's view configs
        Parameters:
        workspaceId - The ID of the workspace to assign the type (and its parts) to. If -1 is given the existing workspace assignments are removed.
      • assignRoleTypeToWorkspace

        void assignRoleTypeToWorkspace​(RoleType roleType,
                                       long workspaceId)
        Assigns a role type as well as its "parts" to a workspace. In particular:
        • the role type
        • the role type's view config
        Parameters:
        workspaceId - The ID of the workspace to assign the role type (and its parts) to. If -1 is given the existing workspace assignments are removed.
      • getAssignedTopics

        List<Topic> getAssignedTopics​(long workspaceId)
        Returns all topics assigned to the given workspace.
      • getAssignedAssocs

        List<Assoc> getAssignedAssocs​(long workspaceId)
        Returns all associations assigned to the given workspace.
      • getAssignedTopics

        List<Topic> getAssignedTopics​(long workspaceId,
                                      String topicTypeUri)
        Returns all topics of the given type that are assigned to the given workspace.
      • getAssignedAssocs

        List<Assoc> getAssignedAssocs​(long workspaceId,
                                      String assocTypeUri)
        Returns all associations of the given type that are assigned to the given workspace.