Are there java functions that can detect if someone added a comment or like to your uploaded file ?
If not is there a way to.
There is OOTB property 'cm:likesRatingSchemeCount' to fetch the number of likes per document.
You can fetch the value of this property to get the number of likes for that document.
You can also check with 'cm:likesRatingSchemeTotal' property for total.
Regards
Kintu
Thanks Kintu.
Riadh, is your question about checking if a specific node has comments or is favorited or that you want a “web hook” to be notified each time anything is commented upon or favorited?
Yes, I asked if there is a function to check if a specific node has comments or is favorited so I can implement a behaviour following that event.
For example, if someone add a comment to a file, a notification should appear to other users.
You should be able to create a behavior on the type used for comments and then follow them back to the docs being commented upon and then determine if you want to send a notification.
Favorites are a little more tricky. They are stored in a JSON preferences file per user. As such you could create a behavior that monitors for changes in these, but it likely would be challenging to know what changed unless you cache the previous state somehow. For example you make a copy of each user profile and then when a profile is updated you compare it to the copy. Perform your business logic and then replace the copy with the current profile.
So I think you can acheive what you want, but I don't think there is a per-baked way to do either of these things.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.