public class WorkspacesPlugin extends PluginActivator implements WorkspacesService, IntroduceTopicType, IntroduceAssocType, IntroduceRoleType, PostCreateTopic, PostCreateAssoc
bundle, dmx, mf
DMX_WORKSPACE_NAME, DMX_WORKSPACE_SHARING_MODE, DMX_WORKSPACE_URI, PROP_WORKSPACE_ID
Constructor and Description |
---|
WorkspacesPlugin() |
Modifier and Type | Method and 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.
|
DirectivesResponse |
assignToWorkspace(long objectId,
long workspaceId) |
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.
|
void |
introduceAssocType(AssocType assocType)
Takes care the DMX standard types (and their parts) get an assignment to the DMX workspace.
|
void |
introduceRoleType(RoleType roleType)
Takes care the DMX standard types (and their parts) get an assignment to the DMX workspace.
|
void |
introduceTopicType(TopicType topicType)
Takes care the DMX standard types (and their parts) get an assignment to the DMX workspace.
|
void |
postCreateAssoc(Assoc assoc)
Standard workspace assignment for assocs.
|
void |
postCreateTopic(Topic topic)
Standard workspace assignment for topics.
|
void |
preInstall() |
void |
shutdown() |
getBundleContext, getPluginName, getStaticResource, getUri, init, publishFileSystem, serviceArrived, serviceGone, setCoreService, start, stop, toString
public Topic createWorkspace(String name, String uri, SharingMode sharingMode)
createWorkspace
in interface WorkspacesService
uri
- may be nullpublic void deleteWorkspace(long workspaceId)
deleteWorkspace
in interface WorkspacesService
public Topic getWorkspace(String uri)
WorkspacesService
getWorkspace
in interface WorkspacesService
public Topic getAssignedWorkspace(long objectId)
WorkspacesService
getAssignedWorkspace
in interface WorkspacesService
objectId
- a topic ID, or an association IDnull
if no workspace is assigned.public DirectivesResponse assignToWorkspace(long objectId, long workspaceId)
public void assignToWorkspace(DMXObject object, long workspaceId)
WorkspacesService
assignToWorkspace
in interface WorkspacesService
workspaceId
- The ID of the workspace to assign the object to.
If -1 is given an existing workspace assignment is removed.public void assignTypeToWorkspace(DMXType type, long workspaceId)
WorkspacesService
assignTypeToWorkspace
in interface WorkspacesService
workspaceId
- The ID of the workspace to assign the type (and its parts) to.
If -1 is given the existing workspace assignments are removed.public void assignRoleTypeToWorkspace(RoleType roleType, long workspaceId)
WorkspacesService
assignRoleTypeToWorkspace
in interface WorkspacesService
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.public List<Topic> getAssignedTopics(long workspaceId)
WorkspacesService
getAssignedTopics
in interface WorkspacesService
public List<Assoc> getAssignedAssocs(long workspaceId)
WorkspacesService
getAssignedAssocs
in interface WorkspacesService
public List<Topic> getAssignedTopics(long workspaceId, String topicTypeUri)
WorkspacesService
getAssignedTopics
in interface WorkspacesService
public List<Assoc> getAssignedAssocs(long workspaceId, String assocTypeUri)
WorkspacesService
getAssignedAssocs
in interface WorkspacesService
public void preInstall()
preInstall
in interface PluginContext
preInstall
in class PluginActivator
public void shutdown()
shutdown
in interface PluginContext
shutdown
in class PluginActivator
public void introduceTopicType(TopicType topicType)
introduceTopicType
in interface IntroduceTopicType
public void introduceAssocType(AssocType assocType)
introduceAssocType
in interface IntroduceAssocType
public void introduceRoleType(RoleType roleType)
introduceRoleType
in interface IntroduceRoleType
public void postCreateTopic(Topic topic)
postCreateTopic
in interface PostCreateTopic
public void postCreateAssoc(Assoc assoc)
postCreateAssoc
in interface PostCreateAssoc
Copyright © 2023. All Rights Reserved.