• Icon: Suggestion Suggestion
    • Resolution: Answered
    • None
    • None
    • None
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      The inline comments plugin shipped with Confluence 5.7 appears to have some service interfaces that would be useful to plugins:

      • com.atlassian.confluence.plugins.inlinecomments.service.InlineCommentService
      • com.atlassian.confluence.plugins.inlinecomments.service.ReplyCommentService

      But these are not exposed as OSGI public services.

      If these classes are intended to form part of a plugin API this issue is to make them public and export the required packages at the OSGI level. If these interfaces are intended to be internal this issue is about making a proper java api for this bundled plugin.

            [CONFSERVER-36645] Inline comments java API

            @ndang that does actually look helpful, thanks for pointing it out.

            Shannon Krebs added a comment - @ndang that does actually look helpful, thanks for pointing it out.

            Hi shannon,

            You can use commentManager to get all the comments in a page

            final List<Comment> comments commentManager.getPageComments(pageId, new Date(0));
            
                    for (final Comment comment : comments)
                    {
                        if (comment.isInlineComment())
                        {
                            // do something
                        }
                       /* or do something with status:
                        comment.getStatus().isDangling();
                        comment.getStatus().isOpen();
                        comment.getStatus().isResolved();
                        comment.getStatus().isReopened();
                        */ 
                    }
            

            Hope that help

            Nguyen Dang added a comment - Hi shannon , You can use commentManager to get all the comments in a page final List<Comment> comments commentManager.getPageComments(pageId, new Date(0)); for ( final Comment comment : comments) { if (comment.isInlineComment()) { // do something } /* or do something with status: comment.getStatus().isDangling(); comment.getStatus().isOpen(); comment.getStatus().isResolved(); comment.getStatus().isReopened(); */ } Hope that help

            Khoa Pham added a comment -

            Sorry shannon1. This ticket (https://jira.atlassian.com/browse/CONFDEV-33214) is still open.
            ndang Do you have any plan to implement it ?

            Thanks

            Khoa Pham added a comment - Sorry shannon1 . This ticket ( https://jira.atlassian.com/browse/CONFDEV-33214 ) is still open. ndang Do you have any plan to implement it ? Thanks

            @kpham, has there been any updates on this in regards to documentation on how to get information on inline comments from a java api?

            Shannon Krebs added a comment - @kpham, has there been any updates on this in regards to documentation on how to get information on inline comments from a java api?

            Khoa Pham added a comment -

            Hi shannon1,

            We can use ContentService and ChildContentService to do stuffs on Inline comment.
            I created a ticket to document how to use it https://jira.atlassian.com/browse/CONFDEV-33214

            Thanks

            Khoa Pham added a comment - Hi shannon1 , We can use ContentService and ChildContentService to do stuffs on Inline comment. I created a ticket to document how to use it https://jira.atlassian.com/browse/CONFDEV-33214 Thanks

            @kpham if those services are not intended to be public please read this issue as a request for a proper public java api for this plugin.

            Shannon Krebs added a comment - @kpham if those services are not intended to be public please read this issue as a request for a proper public java api for this plugin.

            Khoa Pham added a comment - - edited

            The reason that we didn't make it public is because we're moving away from it (these services could be removed anytime in the next releases) and use the Content Rest API instead, all the functionality is available in the REST API now.

            Khoa Pham added a comment - - edited The reason that we didn't make it public is because we're moving away from it (these services could be removed anytime in the next releases) and use the Content Rest API instead, all the functionality is available in the REST API now.

              kpham Khoa Pham
              931615b5eee2 Shannon Krebs
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: