• queryOpen

    By Fero Kossuth 1 decade ago

    Could you, please, give a hint how to implement application specific (so not in plugin, but in application hosting documents with attachments) code triggered upon opening or saving files?

    • Quite some work needed

      By Stephan H. Wissel 1 decade ago

      Currently the webDAV plug-in doesn't have an event API you could hook into for Open or Save events. The backend classes don't provide events. It works the same as when you open your file directly using ..nsf/view/docid/$File/Filename.txt -> this also doesn't trigger an event.

      Having said that, one could implement a subscription hook so the servlet would call an external class on such an event. The challenge with aiming for inside the NSF: the class would not necessarily be loaded. Even if you put it into an applicationContext and preload the XPages app, it might time out.

      The recommended way would to implement 2 classes in the plug-in that do the specifics you are looking for.

      What are you trying to do?

      • use case: change log

        By Fero Kossuth 1 decade ago

        The simplest use case is to log that some user edited attachment inside. That means to append message like "date/time stamp: User XY edited attachment filename.doc".

        I see the problem, that application code is out of plugin's scope. What about callback urls for every supported event defined in some .properties file in application? Just a thought...