|
||||||||||
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.webclient.WebclientPlugin
public class WebclientPlugin
Field Summary | |
---|---|
private boolean |
hasWebclientLaunched
|
private Logger |
logger
|
private static String |
VIEW_CONFIG_LABEL
|
Fields inherited from class de.deepamehta.core.osgi.PluginActivator |
---|
bundle, dms |
Constructor Summary | |
---|---|
WebclientPlugin()
|
Method Summary | |
---|---|
void |
allPluginsActive()
|
private Topic |
createSearchTopic(String searchTerm,
Collection<? extends Topic> resultItems,
ClientState clientState)
Creates a "Search" topic. |
private Set<Topic> |
findSearchableUnits(List<? extends Topic> topics)
|
ResultList |
getRelatedTopics(long topicId)
|
Topic |
getTopics(String typeUri,
int maxResultSize,
ClientState clientState)
Performs a by-type search and creates a search result topic. |
private Object |
getViewConfig(TopicType topicType,
String setting)
Read out a view configuration setting. |
private String |
getWebclientUrl()
|
void |
introduceAssociationType(AssociationType assocType,
ClientState clientState)
|
void |
introduceTopicType(TopicType topicType,
ClientState clientState)
|
private boolean |
isDirectModelledChildTopic(RelatedTopic childTopic,
Topic parentTopic)
|
void |
postUpdateTopic(Topic topic,
TopicModel newModel,
TopicModel oldModel,
ClientState clientState,
Directives directives)
Once a view configuration is updated in the DB we must update the cached view configuration model. |
void |
preUpdateTopic(Topic topic,
TopicModel newModel,
Directives directives)
|
private boolean |
searchableAsUnit(Topic topic)
|
Topic |
searchTopics(String searchTerm,
String fieldUri,
ClientState clientState)
Performs a fulltext search and creates a search result topic. |
private void |
setConfigTopicLabel(Topic viewConfig)
|
private void |
setViewConfigLabel(ViewConfiguration viewConfig)
|
private void |
updateAssociationType(Topic type,
Topic viewConfig,
Directives directives)
|
private void |
updateTopicType(Topic type,
Topic viewConfig,
Directives directives)
|
private void |
updateType(Topic viewConfig,
Directives directives)
|
private void |
updateViewConfig(Type type,
Topic viewConfig)
|
Methods inherited from class de.deepamehta.core.osgi.PluginActivator |
---|
getBundleContext, getUri, init, postInstall, 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 VIEW_CONFIG_LABEL
private boolean hasWebclientLaunched
private Logger logger
Constructor Detail |
---|
public WebclientPlugin()
Method Detail |
---|
public Topic searchTopics(String searchTerm, String fieldUri, @HeaderParam(value="Cookie") ClientState clientState)
public Topic getTopics(String typeUri, int maxResultSize, @HeaderParam(value="Cookie") ClientState clientState)
Note: this resource method is actually part of the Type Search plugin. TODO: proper modularization. Either let the Type Search plugin provide its own REST resource (with another namespace again) or make the Type Search plugin an integral part of the Webclient plugin.
public ResultList getRelatedTopics(long topicId)
public void allPluginsActive()
allPluginsActive
in interface AllPluginsActiveListener
public void preUpdateTopic(Topic topic, TopicModel newModel, Directives directives)
preUpdateTopic
in interface PreUpdateTopicListener
public void postUpdateTopic(Topic topic, TopicModel newModel, TopicModel oldModel, ClientState clientState, Directives directives)
postUpdateTopic
in interface PostUpdateTopicListener
public void introduceTopicType(TopicType topicType, ClientState clientState)
introduceTopicType
in interface IntroduceTopicTypeListener
public void introduceAssociationType(AssociationType assocType, ClientState clientState)
introduceAssociationType
in interface IntroduceAssociationTypeListener
private Set<Topic> findSearchableUnits(List<? extends Topic> topics)
private Topic createSearchTopic(String searchTerm, Collection<? extends Topic> resultItems, ClientState clientState)
private boolean searchableAsUnit(Topic topic)
private Object getViewConfig(TopicType topicType, String setting)
Compare to client-side counterpart: function get_view_config() in webclient.js
topicType
- The topic type whose view configuration is read out.setting
- Last component of the setting URI, e.g. "icon".
null
if there is no such settingprivate void updateType(Topic viewConfig, Directives directives)
private void updateTopicType(Topic type, Topic viewConfig, Directives directives)
private void updateAssociationType(Topic type, Topic viewConfig, Directives directives)
private void updateViewConfig(Type type, Topic viewConfig)
private void setViewConfigLabel(ViewConfiguration viewConfig)
private void setConfigTopicLabel(Topic viewConfig)
private String getWebclientUrl()
private boolean isDirectModelledChildTopic(RelatedTopic childTopic, Topic parentTopic)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |