Deprecated Comment Class | Community
Skip to main content
Jai1122
New Participant
October 16, 2015
Solved

Deprecated Comment Class

  • October 16, 2015
  • 4 replies
  • 1662 views

    Hi Guys,

       I am using AEM5.6.1 with social packge 1.4 installed. When i use com.adobe.cq.social.commons.Comment i am getting a warning saying the Comment class is deprecated.

But the docs does not say something like that. Can someone please let me know if it is deprecated or not.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by JK_Kendall

Hi Jayapal,

The documentation for latest version for AEM 5.6.1 for communities package 1.4 mentions that you should use the AEM 6.0 communities documentation instead of 5.6.1.  In other words

this section http://docs.adobe.com/docs/en/cq/5-6-1/developing/DevelopingWithSocialCommunities.html#Social%20Communities%20Version%201.4

refers to this page http://docs.adobe.com/docs/en/aem/6-0/develop/social-communities.html

There is a page with basic information about components for developers, including links to the APIs.

  http://docs.adobe.com/docs/en/aem/6-0/develop/social-communities/essentials/comments.html

If you go to the APIs, http://docs.adobe.com/docs/en/aem/6-0/develop/ref/javadoc/index.html, and select Deprecated, you will see

 com.adobe.cq.social.commons.Comment
          @since AEM 6.0. Use CommentOperations and Comment instead. 

com.adobe.cq.social.commons.CommentSystem
          @since AEM 6.0. Use CommentOperations and CommentCollection instead. 

 

Just to be clear, AEM/CQ 5.6.1 shipped with communities package 1.3 and is documented in the 5.6.1 doc tree.

If you install communities package 1.4 on AEM 5.6.1, the communities functionality is documented in the 6.0 doc tree.

Hope this helps.

-JK

4 replies

JK_Kendall
JK_KendallAccepted solution
New Participant
October 16, 2015

Hi Jayapal,

The documentation for latest version for AEM 5.6.1 for communities package 1.4 mentions that you should use the AEM 6.0 communities documentation instead of 5.6.1.  In other words

this section http://docs.adobe.com/docs/en/cq/5-6-1/developing/DevelopingWithSocialCommunities.html#Social%20Communities%20Version%201.4

refers to this page http://docs.adobe.com/docs/en/aem/6-0/develop/social-communities.html

There is a page with basic information about components for developers, including links to the APIs.

  http://docs.adobe.com/docs/en/aem/6-0/develop/social-communities/essentials/comments.html

If you go to the APIs, http://docs.adobe.com/docs/en/aem/6-0/develop/ref/javadoc/index.html, and select Deprecated, you will see

 com.adobe.cq.social.commons.Comment
          @since AEM 6.0. Use CommentOperations and Comment instead. 

com.adobe.cq.social.commons.CommentSystem
          @since AEM 6.0. Use CommentOperations and CommentCollection instead. 

 

Just to be clear, AEM/CQ 5.6.1 shipped with communities package 1.3 and is documented in the 5.6.1 doc tree.

If you install communities package 1.4 on AEM 5.6.1, the communities functionality is documented in the 6.0 doc tree.

Hope this helps.

-JK

Lokesh_Shivalingaiah
New Participant
October 16, 2015

Many a times, doc may not have been updated !

Jai1122
Jai1122Author
New Participant
October 16, 2015

Thanks for the response JK. But i have the following code,

import com.adobe.cq.social.blog.Blog; import com.adobe.cq.social.blog.BlogEntry; import com.adobe.cq.social.blog.BlogManager; import java.util.Iterator; BlogManager blogMgr =     resource.getResourceResolver().adaptTo(BlogManager.class); Blog blog = blogMgr.getBlog(req, resource.getPath()); BlogEntry entry =   blog.getEntry();Iterator commentsIterator   =   entry.getComments();

The last line returns me AEM5.6.1 com.adobe.cq.social.commons.Comment. But it should have actually returned the AEM6.0 comments interface. 

If i have installed social package 1.4 why i still have this confusion.  Can you please comment on this. ?

JK_Kendall
New Participant
October 16, 2015

The Blog feature did not change from 5.6.1 to 6.0 because it needed to be reworked into the Social Communities Framework (SCF).   In AEM 6.1, the Blog components and templates are deprecated and the Journal components have been renamed the Blog feature (a feature named 'Journal' no longer exists).

Since the Blog feature was not updated in 6.0, it still uses the deprecated Comments code.

It's only a warning.

 

Why was this done?  The 6.0 and earlier implementation of the Blog feature was template based and only allowed content to be entered in the author environment.  In that sense, it was not a community expererience.

The re-implementation of the Blog feature, by re-using the Journal components, will allow user generated content (UGC) to be entered in the publish environment by members (signed in users) who are authorized to do so.

-JK