Package systems.dmx.workspaces
Interface WorkspacesService
-
- All Known Implementing Classes:
WorkspacesPlugin
public interface WorkspacesService
-
-
Field Summary
Fields Modifier and Type Field Description static String
DMX_WORKSPACE_NAME
static SharingMode
DMX_WORKSPACE_SHARING_MODE
static String
DMX_WORKSPACE_URI
static String
PROP_WORKSPACE_ID
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
assignRoleTypeToWorkspace(RoleType roleType, long workspaceId)
Assigns a role type as well as its "parts" to a workspace.void
assignToWorkspace(DMXObject object, long workspaceId)
Assigns an object to a workspace.void
assignTypeToWorkspace(DMXType type, long workspaceId)
Assigns a type as well as its "parts" to a workspace.Topic
createWorkspace(String name, String uri, SharingMode sharingMode)
void
deleteWorkspace(long workspaceId)
List<Assoc>
getAssignedAssocs(long workspaceId)
Returns all associations assigned to the given workspace.List<Assoc>
getAssignedAssocs(long workspaceId, String assocTypeUri)
Returns all associations of the given type that are assigned to the given workspace.List<Topic>
getAssignedTopics(long workspaceId)
Returns all topics assigned to the given workspace.List<Topic>
getAssignedTopics(long workspaceId, String topicTypeUri)
Returns all topics of the given type that are assigned to the given workspace.Topic
getAssignedWorkspace(long objectId)
Returns the workspace the given topic/association is assigned to.Topic
getWorkspace(String uri)
Returns a workspace by URI.
-
-
-
Field Detail
-
DMX_WORKSPACE_NAME
static final String DMX_WORKSPACE_NAME
- See Also:
- Constant Field Values
-
DMX_WORKSPACE_URI
static final String DMX_WORKSPACE_URI
- See Also:
- Constant Field Values
-
DMX_WORKSPACE_SHARING_MODE
static final SharingMode DMX_WORKSPACE_SHARING_MODE
-
PROP_WORKSPACE_ID
static final String PROP_WORKSPACE_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
createWorkspace
Topic createWorkspace(String name, String uri, SharingMode sharingMode)
- Parameters:
uri
- may be null
-
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.
-
-