On Mon, Oct 1, 2012 at 12:04 PM, Paul Libbrecht <[email protected]> wrote: > > Le 1 oct. 2012 à 09:25, Thomas Mortagne a écrit : > >> The canonical way to check if you are called by a remote event is by >> using the component >> org.xwiki.observation.remote.RemoteObservationManagerContex#isRemoteState() >> (from xwiki-platform-observation-remote). > > How do I get an instance of this from Groovy?
If you know how to get a component in Groovy already you can do lookup the component with role org.xwiki.observation.remote.RemoteObservationManagerContex and default hint. > >> LazyXWikiDocument is what is used when emulating a document event from >> the remote observation module. It's actually supposed to behave like a >> XWikiDocument except that it actually load the document from the >> database only if something actually need to manipulate it. The only >> thing for which it's not supposed to work well is if you try to save >> it directly but it's not recommended for a document coming in a local >> event anyway since it's creating an events mess. So unless you really >> have a specific logic that need to do different things from local and >> remote events the best would be that we fix what's wrong with >> LazyXWikiDocument in your use case. > > It was the request of previous versions which has failed. > > All that seems quite curriki specific in there is a simple listener, using > the old-style-notification, which analyzes the document and indexes it and > maybe "related" documents (for example reindexes the user-document so as to > display the count of contributions, or reindexes all of the resources of the > user if the user has changed his name...). The IndexUpdater of the > LucenePlugin does not seem to care for this (but then, it doesn't seem to > measure differences). What version of XWiki is that ? Actually there is several other listener that look at previous version (for example there is listener that check differences and produce more precise event about object, object properties, classes, attachments, etc.) so at least in most recent versions it's supposed to work. > > thanks in advance > > Paul > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs -- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

