|
||||||||||
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 static String |
DEFAULT_WORKSPACE_NAME
|
private static String |
DEFAULT_WORKSPACE_URI
|
private FacetsService |
facetsService
|
private Logger |
logger
|
Fields inherited from class de.deepamehta.core.osgi.PluginActivator |
---|
bundle, dms |
Constructor Summary | |
---|---|
WorkspacesPlugin()
|
Method Summary | |
---|---|
private void |
_assignToWorkspace(DeepaMehtaObject object,
long workspaceId)
|
void |
assignToWorkspace(DeepaMehtaObject object,
long workspaceId)
Assigns the specified object to a workspace. |
void |
assignTypeToWorkspace(Type type,
long workspaceId)
Assigns the specified type and all its view configuration topics to a workspace. |
private void |
checkArgument(long topicId)
Checks if the topic with the specified ID exists and is a Workspace. |
Topic |
createWorkspace(String name)
|
Topic |
createWorkspace(String name,
String uri)
|
private Topic |
fetchDefaultWorkspace()
|
List<RelatedTopic> |
getAssignedWorkspaces(DeepaMehtaObject object)
Fetches the workspaces the specified object is assigned to. |
Topic |
getDefaultWorkspace()
Fetches the default workspace ("DeepaMehta"). |
void |
introduceAssociationType(AssociationType assocType,
ClientState clientState)
|
void |
introduceTopicType(TopicType topicType,
ClientState clientState)
|
boolean |
isAssignedToWorkspace(Topic topic,
long workspaceId)
Checks weather the specified topic is assigned to the specified workspace |
private boolean |
isDeepaMehtaStandardType(Type type)
|
void |
postCreateAssociation(Association assoc,
ClientState clientState,
Directives directives)
Every created association is assigned to the current workspace. |
void |
postCreateTopic(Topic topic,
ClientState clientState,
Directives directives)
Every created topic is assigned to the current workspace. |
void |
postInstall()
Creates the "Default" workspace. |
void |
serviceArrived(PluginService service)
|
void |
serviceGone(PluginService service)
|
private long |
workspaceId(ClientState clientState)
|
private long |
workspaceIdForType(Type type,
ClientState clientState)
|
Methods inherited from class de.deepamehta.core.osgi.PluginActivator |
---|
getBundleContext, getUri, init, publishDirectory, 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 DEFAULT_WORKSPACE_NAME
private static final String DEFAULT_WORKSPACE_URI
private FacetsService facetsService
private Logger logger
Constructor Detail |
---|
public WorkspacesPlugin()
Method Detail |
---|
public List<RelatedTopic> getAssignedWorkspaces(DeepaMehtaObject object)
WorkspacesService
getAssignedWorkspaces
in interface WorkspacesService
public boolean isAssignedToWorkspace(Topic topic, long workspaceId)
WorkspacesService
isAssignedToWorkspace
in interface WorkspacesService
public Topic getDefaultWorkspace()
WorkspacesService
getDefaultWorkspace
in interface WorkspacesService
null
if it doesn't exist.
Note: the default workspace is NOT required to exist ### TODO: think about itpublic void assignToWorkspace(DeepaMehtaObject object, long workspaceId)
WorkspacesService
assignToWorkspace
in interface WorkspacesService
public void assignTypeToWorkspace(Type type, long workspaceId)
WorkspacesService
assignTypeToWorkspace
in interface WorkspacesService
public Topic createWorkspace(String name)
createWorkspace
in interface WorkspacesService
public Topic createWorkspace(String name, String uri)
createWorkspace
in interface WorkspacesService
public void postInstall()
postInstall
in interface PluginContext
postInstall
in class PluginActivator
public void serviceArrived(PluginService service)
serviceArrived
in interface PluginContext
serviceArrived
in class PluginActivator
public void serviceGone(PluginService service)
serviceGone
in interface PluginContext
serviceGone
in class PluginActivator
public void introduceTopicType(TopicType topicType, ClientState clientState)
introduceTopicType
in interface IntroduceTopicTypeListener
public void introduceAssociationType(AssociationType assocType, ClientState clientState)
introduceAssociationType
in interface IntroduceAssociationTypeListener
public void postCreateTopic(Topic topic, ClientState clientState, Directives directives)
postCreateTopic
in interface PostCreateTopicListener
public void postCreateAssociation(Association assoc, ClientState clientState, Directives directives)
postCreateAssociation
in interface PostCreateAssociationListener
private long workspaceId(ClientState clientState)
private long workspaceIdForType(Type type, ClientState clientState)
private void _assignToWorkspace(DeepaMehtaObject object, long workspaceId)
private Topic fetchDefaultWorkspace()
private boolean isDeepaMehtaStandardType(Type type)
private void checkArgument(long topicId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |