de.deepamehta.plugins.workspaces.service
Interface WorkspacesService

Show UML class diagram
All Superinterfaces:
PluginService
All Known Implementing Classes:
WorkspacesPlugin

public interface WorkspacesService
extends PluginService


Field Summary
static String DEEPAMEHTA_WORKSPACE_NAME
           
static SharingMode DEEPAMEHTA_WORKSPACE_SHARING_MODE
           
static String DEEPAMEHTA_WORKSPACE_URI
           
 
Method Summary
 void assignToWorkspace(DeepaMehtaObject object, long workspaceId)
          Assigns the given object to the given workspace.
 void assignTypeToWorkspace(Type type, long workspaceId)
          Assigns the given type and all its view configuration topics to the given workspace.
 Topic createWorkspace(String name, String uri, SharingMode sharingMode)
           
 ResultList<RelatedTopic> getAssignedTopics(long workspaceId, String typeUri)
          Returns all topics of the given type that are assigned to the given workspace.
 Topic getAssignedWorkspace(long objectId)
          Returns the workspace a topic or association is assigned to.
 Topic getWorkspace(String uri)
          Returns a workspace by URI.
 boolean isAssignedToWorkspace(long objectId, long workspaceId)
          Checks weather the given topic or association is assigned to the given workspace.
 

Field Detail

DEEPAMEHTA_WORKSPACE_NAME

static final String DEEPAMEHTA_WORKSPACE_NAME
See Also:
Constant Field Values

DEEPAMEHTA_WORKSPACE_URI

static final String DEEPAMEHTA_WORKSPACE_URI
See Also:
Constant Field Values

DEEPAMEHTA_WORKSPACE_SHARING_MODE

static final SharingMode DEEPAMEHTA_WORKSPACE_SHARING_MODE
Method Detail

createWorkspace

Topic createWorkspace(String name,
                      String uri,
                      SharingMode sharingMode)
Parameters:
uri - may be null

getWorkspace

Topic getWorkspace(String uri)
Returns a workspace by URI. If no workspace exists for the given URI a runtime exception is thrown.

Returns:
The workspace (a topic of type "Workspace").

getAssignedTopics

ResultList<RelatedTopic> getAssignedTopics(long workspaceId,
                                           String typeUri)
Returns all topics of the given type that are assigned to the given workspace.


getAssignedWorkspace

Topic getAssignedWorkspace(long objectId)
Returns the workspace a topic or association is assigned to.

Parameters:
id - a topic ID, or an association ID
Returns:
The assigned workspace (a topic of type "Workspace"), or null if no workspace is assigned.

isAssignedToWorkspace

boolean isAssignedToWorkspace(long objectId,
                              long workspaceId)
Checks weather the given topic or association is assigned to the given workspace.


assignToWorkspace

void assignToWorkspace(DeepaMehtaObject object,
                       long workspaceId)
Assigns the given object to the given workspace.


assignTypeToWorkspace

void assignTypeToWorkspace(Type type,
                           long workspaceId)
Assigns the given type and all its view configuration topics to the given workspace.



Copyright © 2015. All Rights Reserved.