public class WorkspacesPlugin extends PluginActivator implements WorkspacesService, IntroduceTopicTypeListener, IntroduceAssociationTypeListener, PostCreateTopicListener, PostCreateAssociationListener, PreDeleteTopicListener
| Modifier and Type | Class and Description |
|---|---|
private class |
WorkspacesPlugin.Messenger |
| Modifier and Type | Field and Description |
|---|---|
private ConfigService |
configService |
private FacetsService |
facetsService |
private Logger |
logger |
private WorkspacesPlugin.Messenger |
me |
private javax.servlet.http.HttpServletRequest |
request |
private static boolean |
SHARING_MODE_COLLABORATIVE_ENABLED |
private static boolean |
SHARING_MODE_COMMON_ENABLED |
private static boolean |
SHARING_MODE_CONFIDENTIAL_ENABLED |
private static boolean |
SHARING_MODE_PRIVATE_ENABLED |
private static boolean |
SHARING_MODE_PUBLIC_ENABLED |
private TopicmapsService |
topicmapsService |
bundle, dmx, mfDMX_WORKSPACE_NAME, DMX_WORKSPACE_SHARING_MODE, DMX_WORKSPACE_URI, PROP_WORKSPACE_ID| Constructor and Description |
|---|
WorkspacesPlugin() |
| Modifier and Type | Method and Description |
|---|---|
private void |
_assignToWorkspace(DMXObject object,
long workspaceId) |
private void |
applyWorkspaceFilter(Iterator<? extends DMXObject> objects,
long workspaceId) |
void |
assignToWorkspace(DMXObject object,
long workspaceId)
Assigns the given object to the given workspace.
|
DirectivesResponse |
assignToWorkspace(long objectId,
long workspaceId) |
void |
assignTypeToWorkspace(DMXType type,
long workspaceId)
Assigns the given type and all its view configuration topics to the given workspace.
|
private void |
checkWorkspaceId(long topicId)
Checks if the topic with the specified ID exists and is a Workspace.
|
Topic |
createWorkspace(String name,
String uri,
SharingMode sharingMode) |
private void |
deleteWorkspaceContent(long workspaceId) |
List<Association> |
getAssignedAssociations(long workspaceId)
Returns all associations assigned to the given workspace.
|
List<Association> |
getAssignedAssociations(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 a topic or association is assigned to.
|
private long |
getAssignedWorkspaceId(long objectId) |
private Topic |
getDMXWorkspace()
Returns the DMX workspace or throws an exception if it doesn't exist.
|
Topic |
getWorkspace(String uri)
Returns a workspace by URI.
|
private String |
info(DMXObject object) |
void |
introduceAssociationType(AssociationType assocType)
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.
|
private boolean |
isDMXStandardType(DMXType type) |
private boolean |
isWorkspaceAssignment(Association assoc) |
private boolean |
isWorkspaceDescription(Topic topic) |
void |
postCreateAssociation(Association assoc)
Assigns every created association to the current workspace.
|
void |
postCreateTopic(Topic topic)
Assigns every created topic to the current workspace.
|
void |
preDeleteTopic(Topic topic)
When a workspace is about to be deleted its entire content must be deleted.
|
void |
preInstall() |
void |
shutdown() |
private boolean |
workspaceAssignmentIsSuppressed(DMXObject object)
Returns true if standard workspace assignment is currently suppressed for the current thread.
|
private long |
workspaceId() |
private long |
workspaceIdForType(DMXType type)
Returns the ID of the DMX workspace or -1 to signal abortion of type introduction.
|
getBundleContext, getPluginName, getStaticResource, getUri, init, publishFileSystem, serviceArrived, serviceGone, setCoreService, start, stop, toStringprivate static final boolean SHARING_MODE_PRIVATE_ENABLED
private static final boolean SHARING_MODE_CONFIDENTIAL_ENABLED
private static final boolean SHARING_MODE_COLLABORATIVE_ENABLED
private static final boolean SHARING_MODE_PUBLIC_ENABLED
private static final boolean SHARING_MODE_COMMON_ENABLED
private FacetsService facetsService
private TopicmapsService topicmapsService
private ConfigService configService
@Context private javax.servlet.http.HttpServletRequest request
private WorkspacesPlugin.Messenger me
public WorkspacesPlugin()
public Topic createWorkspace(String name, String uri, SharingMode sharingMode)
createWorkspace in interface WorkspacesServiceuri - may be nullpublic Topic getWorkspace(String uri)
WorkspacesServicegetWorkspace in interface WorkspacesServicepublic Topic getAssignedWorkspace(long objectId)
WorkspacesServicegetAssignedWorkspace in interface WorkspacesServicenull if no workspace is assigned.public DirectivesResponse assignToWorkspace(long objectId, long workspaceId)
public void assignToWorkspace(DMXObject object, long workspaceId)
WorkspacesServiceassignToWorkspace in interface WorkspacesServicepublic void assignTypeToWorkspace(DMXType type, long workspaceId)
WorkspacesServiceassignTypeToWorkspace in interface WorkspacesServicepublic List<Topic> getAssignedTopics(long workspaceId)
WorkspacesServicegetAssignedTopics in interface WorkspacesServicepublic List<Association> getAssignedAssociations(long workspaceId)
WorkspacesServicegetAssignedAssociations in interface WorkspacesServicepublic List<Topic> getAssignedTopics(long workspaceId, String topicTypeUri)
WorkspacesServicegetAssignedTopics in interface WorkspacesServicepublic List<Association> getAssignedAssociations(long workspaceId, String assocTypeUri)
WorkspacesServicegetAssignedAssociations in interface WorkspacesServicepublic void preInstall()
preInstall in interface PluginContextpreInstall in class PluginActivatorpublic void shutdown()
shutdown in interface PluginContextshutdown in class PluginActivatorpublic void introduceTopicType(TopicType topicType)
introduceTopicType in interface IntroduceTopicTypeListenerpublic void introduceAssociationType(AssociationType assocType)
introduceAssociationType in interface IntroduceAssociationTypeListenerpublic void postCreateTopic(Topic topic)
postCreateTopic in interface PostCreateTopicListenerpublic void postCreateAssociation(Association assoc)
postCreateAssociation in interface PostCreateAssociationListenerpublic void preDeleteTopic(Topic topic)
preDeleteTopic in interface PreDeleteTopicListenerprivate long workspaceId()
private long workspaceIdForType(DMXType type)
private long getAssignedWorkspaceId(long objectId)
private void _assignToWorkspace(DMXObject object, long workspaceId)
private void deleteWorkspaceContent(long workspaceId)
private boolean isDMXStandardType(DMXType type)
private boolean isWorkspaceDescription(Topic topic)
private boolean isWorkspaceAssignment(Association assoc)
private Topic getDMXWorkspace()
private void applyWorkspaceFilter(Iterator<? extends DMXObject> objects, long workspaceId)
private void checkWorkspaceId(long topicId)
private boolean workspaceAssignmentIsSuppressed(DMXObject object)
Copyright © 2018. All Rights Reserved.