Skip to main content
Level 2
Oct 16, 2015 2:29 AM UTC
Solved

Usage of com.adobe.granite.comments API to add comments programatically

Hi,

Any one used com.adobe.granite.comments API's to add comments to assets?

I have a requirement to add comments to some assets programatically.

Any help highly appreciated.

Thanks LM

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 16, 2015 2:29 AM UTC

Here is another way of working with comments mentioned by some internal Adobe community members:

Another view on this question would be to POST the comment to the asset path. For instance, to a comment to this mountain picture that is part of the Geometrixx samples

POST to: http://localhost:4502/content/dam/geometrixx-outdoors/activities/snowboarding/PDP_1_c05.jpg

With the following request attributes:
1.    :operation:
granite:comment
2.    path:
/content/dam/geometrixx-outdoors/activities/snowboarding/PDP_1_c05.jpg
3.    message:
Posting a comment programmatically....
This results in a new Granite comment on the asset.

[img]AComment.png[/img]

3 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 16, 2015 2:29 AM UTC

Here is another way of working with comments mentioned by some internal Adobe community members:

Another view on this question would be to POST the comment to the asset path. For instance, to a comment to this mountain picture that is part of the Geometrixx samples

POST to: http://localhost:4502/content/dam/geometrixx-outdoors/activities/snowboarding/PDP_1_c05.jpg

With the following request attributes:
1.    :operation:
granite:comment
2.    path:
/content/dam/geometrixx-outdoors/activities/snowboarding/PDP_1_c05.jpg
3.    message:
Posting a comment programmatically....
This results in a new Granite comment on the asset.

[img]AComment.png[/img]

Translate
Live_MoreAuthor
Level 2
Oct 16, 2015 2:29 AM UTC

Thanks for your quick reply.

Eagerly waiting for some sample codebase.

Regards LM

Translate
smacdonald2008
Level 10
Oct 16, 2015 2:29 AM UTC

Here is the Javadoc for this API: 

https://docs.adobe.com/docs/en/cq/5-6-1/javadoc/com/adobe/granite/comments/package-summary.html

I am going to look to see if there are any examples showing this API in action. 

Translate