|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.topicmaps.core.events.TopicMapEvents
public class TopicMapEvents
PUBLIC: Utility class for registering topic map life cycle events.
There is currently only listener support for topics added or removed. The listeners will receive callbacks after the transaction has been committed. This means that the listeners will only see committed changes.
Use the addTopicListener
and
removeTopicListener
methods to register and unregister
your listeners.
Here is an example of how you can register a listener:
TopicMapRepositoryIF rep = TopicMaps.getRepository(); String topicmapId = "mytopicmap"; TopicMapReferenceIF ref = repository.getReferenceByKey(topicmapId); TopicMapListenerIF myListener = new MyTopicListener(); TopicMapEvents.addTopicListener(ref, myListener);
Note that you should only register your listener once.
Method Summary | |
---|---|
static void |
addTopicListener(TopicMapReferenceIF topicmapRef,
TopicMapListenerIF listener)
PUBLIC: Call this method to register a topic listener with a given topic map. |
static void |
removeTopicListener(TopicMapReferenceIF topicmapRef,
TopicMapListenerIF listener)
PUBLIC: Call this method to unregister a topic listener with a given topic map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void addTopicListener(TopicMapReferenceIF topicmapRef, TopicMapListenerIF listener)
public static void removeTopicListener(TopicMapReferenceIF topicmapRef, TopicMapListenerIF listener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |