|
||||||||||
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)
|
void |
introduceTopicType(TopicType topicType)
|
boolean |
isAssignedToWorkspace(Topic topic,
long workspaceId)
Checks weather the specified topic is assigned to the specified workspace |
private boolean |
isDeepaMehtaStandardType(Type type)
|
private boolean |
isOwnAssociation(Association assoc)
|
private boolean |
isOwnTopic(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 |
postInstall()
Creates the "Default" workspace. |
private long |
workspaceId()
|
private long |
workspaceIdForType(Type type)
|
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 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 introduceTopicType(TopicType topicType)
introduceTopicType
in interface IntroduceTopicTypeListener
public void introduceAssociationType(AssociationType assocType)
introduceAssociationType
in interface IntroduceAssociationTypeListener
public void postCreateTopic(Topic topic)
postCreateTopic
in interface PostCreateTopicListener
public void postCreateAssociation(Association assoc)
postCreateAssociation
in interface PostCreateAssociationListener
private long workspaceId()
private long workspaceIdForType(Type type)
private void _assignToWorkspace(DeepaMehtaObject object, long workspaceId)
private boolean isDeepaMehtaStandardType(Type type)
private boolean isOwnTopic(Topic topic)
private boolean isOwnAssociation(Association assoc)
private Topic fetchDefaultWorkspace()
private void checkArgument(long topicId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |