|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.deepamehta.core.osgi.PluginActivator
de.deepamehta.plugins.workspaces.WorkspacesPlugin
public class WorkspacesPlugin
| Field Summary | |
|---|---|
private FacetsService |
facetsService
|
private Logger |
logger
|
private static String |
PARAM_NO_WORKSPACE_ASSIGNMENT
|
private static String |
PROP_WORKSPACE_ID
|
private TopicmapsService |
topicmapsService
|
private javax.ws.rs.core.UriInfo |
uriInfo
|
| Fields inherited from class de.deepamehta.core.osgi.PluginActivator |
|---|
bundle, dms |
| Fields inherited from interface de.deepamehta.plugins.workspaces.service.WorkspacesService |
|---|
DEEPAMEHTA_WORKSPACE_NAME, DEEPAMEHTA_WORKSPACE_SHARING_MODE, DEEPAMEHTA_WORKSPACE_URI |
| Constructor Summary | |
|---|---|
WorkspacesPlugin()
|
|
| Method Summary | |
|---|---|
private void |
_assignToWorkspace(DeepaMehtaObject object,
long workspaceId)
|
private boolean |
abortAssignment(DeepaMehtaObject object)
|
private void |
applyWorkspaceFilter(Iterator<? extends Topic> topics,
long workspaceId)
|
void |
assignToWorkspace(DeepaMehtaObject object,
long workspaceId)
Assigns the given object to the given workspace. |
Directives |
assignToWorkspace(long objectId,
long workspaceId)
|
void |
assignTypeToWorkspace(Type type,
long workspaceId)
Assigns the given type and all its view configuration topics to the given workspace. |
private void |
checkArgument(long topicId)
Checks if the topic with the specified ID exists and is a Workspace. |
Topic |
createWorkspace(String name,
String uri,
SharingMode sharingMode)
|
ResultList<RelatedTopic> |
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 |
getDeepaMehtaWorkspace()
Returns the DeepaMehta workspace or throws an exception if it doesn't exist. |
Topic |
getWorkspace(String uri)
Returns a workspace by URI. |
private String |
info(DeepaMehtaObject object)
|
void |
introduceAssociationType(AssociationType assocType)
Takes care the DeepaMehta standard types (and their parts) get an assignment to the DeepaMehta workspace. |
void |
introduceTopicType(TopicType topicType)
Takes care the DeepaMehta standard types (and their parts) get an assignment to the DeepaMehta workspace. |
boolean |
isAssignedToWorkspace(long objectId,
long workspaceId)
Checks weather the given topic or association is assigned to the given workspace. |
private boolean |
isDeepaMehtaStandardType(Type 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. |
private long |
workspaceId()
|
private long |
workspaceIdForType(Type type)
Returns the ID of the DeepaMehta workspace or -1 to signal abortion of type introduction. |
| Methods inherited from class de.deepamehta.core.osgi.PluginActivator |
|---|
getBundleContext, getPluginName, getStaticResource, getUri, init, publishDirectory, serviceArrived, serviceGone, setCoreService, shutdown, start, stop, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final String PROP_WORKSPACE_ID
private static final String PARAM_NO_WORKSPACE_ASSIGNMENT
private FacetsService facetsService
private TopicmapsService topicmapsService
@Context private javax.ws.rs.core.UriInfo uriInfo
private Logger logger
| Constructor Detail |
|---|
public WorkspacesPlugin()
| Method Detail |
|---|
public Topic createWorkspace(String name,
String uri,
SharingMode sharingMode)
createWorkspace in interface WorkspacesServiceuri - may be nullpublic Topic getWorkspace(String uri)
WorkspacesService
getWorkspace in interface WorkspacesService
public ResultList<RelatedTopic> getAssignedTopics(long workspaceId,
String topicTypeUri)
WorkspacesService
getAssignedTopics in interface WorkspacesServicepublic Topic getAssignedWorkspace(long objectId)
WorkspacesService
getAssignedWorkspace in interface WorkspacesServicenull if no workspace is assigned.
public boolean isAssignedToWorkspace(long objectId,
long workspaceId)
WorkspacesService
isAssignedToWorkspace in interface WorkspacesService
public Directives assignToWorkspace(long objectId,
long workspaceId)
public void assignToWorkspace(DeepaMehtaObject object,
long workspaceId)
WorkspacesService
assignToWorkspace in interface WorkspacesService
public void assignTypeToWorkspace(Type type,
long workspaceId)
WorkspacesService
assignTypeToWorkspace in interface WorkspacesServicepublic 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 PostCreateAssociationListenerprivate long workspaceId()
private long workspaceIdForType(Type type)
private long getAssignedWorkspaceId(long objectId)
private void _assignToWorkspace(DeepaMehtaObject object,
long workspaceId)
private boolean isDeepaMehtaStandardType(Type type)
private boolean isWorkspaceDescription(Topic topic)
private boolean isWorkspaceAssignment(Association assoc)
private Topic getDeepaMehtaWorkspace()
private void applyWorkspaceFilter(Iterator<? extends Topic> topics,
long workspaceId)
private void checkArgument(long topicId)
private boolean abortAssignment(DeepaMehtaObject object)
private String info(DeepaMehtaObject object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||