Create new comment API, probably expose it as an adapter.
We need the following endpoints:
- POST comment
- GET commentId
- GET documentId (this endpoint should be paginable)
- PUT commentId + comment
- DELETE commentId
Note: replying to a comment is the same thing than commenting this comment, also getting children of a comment is the same thing than getting comment of a document.
Technical Specifications
Comment JSON format
Here the Comment JSON format used to handle Comment in Nuxeo REST API:
{ "id": "00000000-0000-0000-0000-000000000000", // comment id "documentId": "00000000-0000-0000-0000-000000000000", // commented document model id "author": "Joe", "text": "A comment example", "creationdDate": "1970-01-01T00:00:00Z", "modificationDate": "1970-01-01T00:00:00Z", "entityId": "...", // the entity id in external system (present when comment is created from another system) "origin": "...", // the entity origin (present when comment is created from another system) "entity": "..." // the serialized external entity (present when comment is created from another system) }
REST Endpoints
Several endpoints are added, here the exhaustive list:
HTTP Method | Path | Request Body | Response |
---|---|---|---|
POST | /nuxeo/api/v1/id/{docId}/@comment |
Comment | created Comment |
GET | /nuxeo/api/v1/id/{docId}/@comment?pageSize=10¤tPageIndex=0 |
x | partial list of Comment |
GET | /nuxeo/api/v1/id/{docId}/@comment/{commentId} |
x | Comment |
GET | /nuxeo/api/v1/id/{docId}/@comment/external/{entityId} |
x | external Comment |
PUT | /nuxeo/api/v1/id/{docId}/@comment/{commentId} |
Comment with updates | updated Comment |
PUT | /nuxeo/api/v1/id/{docId}/@comment/external/{entityId} |
Comment with updates | updated external Comment |
DELETE | /nuxeo/api/v1/id/{docId}/@comment/{commentId} |
x | no content |
DELETE | /nuxeo/api/v1/id/{docId}/@comment/external/{entityId} |
x | no content |
- depends on
-
NXP-25070 Create a Facet to handle external entity
- Resolved
-
NXP-25405 Create a Comment interface for CommentService needs
- Resolved
- is duplicated by
-
NXP-25614 Add a Web Document Adapter to fetch, create and delete comments
- Resolved
- is related to
-
NXP-24104 ARender SPI bridge to Nuxeo
- Resolved
-
NXP-25425 Improve CommentManager implementation
- Resolved
- is required by
-
NXP-25513 Comments
- Resolved
-
JAVACLIENT-165 Add comment adapter
- Resolved
-
NXP-25445 ARender Nuxeo Connector should handle comments
- Resolved
-
NXP-25535 View document comments/replies
- Resolved
-
NXP-25536 Create document comment/reply
- Resolved
-
NXP-25537 Delete/edit comment/reply
- Resolved