Problem with onContentRead
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2008 06:28 AM
Hello there
I am currently working on a system that has to be able to catch CRUD events from Alfresco.
To do this I have used the built in PolicyComponent and the code which causes problems looks like this:
However for some reason this does not apply to images, that means that it works perfectly fine for
*.doc, *.pdf, *.txt and so on - it even works for *.exe files.
But when it comes to images mime-types like *.jpg, *.png and other image files the trigger is only fired
once and then never again (not even if I log out and back into the alfresco web).
EDIT:
I have tried the following aswell
Can someone please help me back on track here? Perhaps there is some mime-type configuration I have been
unable to find, or some special function i have not made use of?
I am using Alfresco 2.1 Community…
Any help would much appreciated.
Best Regards
Peter Nielsen
I am currently working on a system that has to be able to catch CRUD events from Alfresco.
To do this I have used the built in PolicyComponent and the code which causes problems looks like this:
this.policyComponent.bindClassBehaviour(QName.createQName(NamespaceService.ALFRESCO_URI, "onContentRead"), ContentModel.ASPECT_AUDITABLE, new JavaBehaviour(this, "onContentRead", NotificationFrequency.TRANSACTION_COMMIT));
What happens is that this function is triggered every time a piece of content (with the auditable aspect) is read.However for some reason this does not apply to images, that means that it works perfectly fine for
*.doc, *.pdf, *.txt and so on - it even works for *.exe files.
But when it comes to images mime-types like *.jpg, *.png and other image files the trigger is only fired
once and then never again (not even if I log out and back into the alfresco web).
EDIT:
I have tried the following aswell

this.policyComponent.bindClassBehaviour(QName.createQName(NamespaceService.ALFRESCO_URI, "onContentRead"), QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "cmobject"), new JavaBehaviour(this, "onContentRead", NotificationFrequency.EVERY_EVENT));
Can someone please help me back on track here? Perhaps there is some mime-type configuration I have been
unable to find, or some special function i have not made use of?

I am using Alfresco 2.1 Community…
Any help would much appreciated.
Best Regards
Peter Nielsen
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2016 02:58 AM
i have the same problem ,is it solve?
