We are developing a semantic wiki and we have to get notified when the 
attachments change, because we have to update our semantic facts store.

If there is no possibility to get notified today, would it be sensible to add a 
listener mechanism to the AttachmentManager? Or better extend WikiPageEvent by 
event types "ATTACHMENT_UPLOADED" and "ATTACHMENT_DELETED"? Or create a new 
WikiEvent subclass WikiAttachmentEvent?

Regards Markus


Am 08.02.2012 um 07:19 schrieb Frank Fischer:

> What do you want the plugin to do?
> Your plugin could store the timestamp
> of the youngest attachment (for instance
> in an attachment itself). When the page is
> displayed your plugin could compare this
> timestamp with the attachment list,
> perform some action and update the timestamp.
> 
> Frank
> 
> 
> 
> 
> On Tue 07 Feb 2012 09:22:51 PM CET, Harry Metske wrote:
>> it depends on your definition of "easy".
>> The context in which plugins are called does not offer these kind of
>> notifications.
>> I haven't looked in detail but maybe there are some possibilities with
>> WikiEvents, see
>> http://people.apache.org/~metskem/JSPWiki/javadoc/index.html?org/apache/wiki/event/package-summary.html
>> ,
>> but plugins are instantiated and destroyed on each page request.
>> 
>> regards,
>> Harry
>> 
>> 2012/2/7 Markus Friedrich<[email protected]>
>> 
>>> Hi all,
>>> 
>>> is there an easy way for JSPWiki Plugins to get notified when a new
>>> attachment or a new version of an attachment is uploaded to an article?
>>> 
>>> Best regards,
>>> Markus Friedrich
>> 
> 
> 



Reply via email to