Status | Proposed |
Target Release | 4.1 |
Issue | |
Original Authors | Dave Johnson |
Abstract
Make Enhance Roller's existing AtomPub support to make it possible for an AtomPub client application to create, retrieve update and delete comments for each weblog entries.
Requirements
- CRUD Create, retrieve, update and delete on weblog entry comments
- Build on the Atom Threading Extension, hereinafter referer referred to as ATE
Issues
- What about entries that do not allow comments or limit time that they are allowed
Design
TBD: no issues raised yet.
Design
In summary: we will model Comments as Atom Entries. Each Weblog Entry will provide a link to it's Comment collection and each Comment will contain a link back to it's entry. In addition, Weblog Entry <entry> elements will include extension elements to indicate if/when comments are allowed and Comment <entry> elements will include extension elements to indicate approval/spam status.
New comment collections
...
Currently, these URIs are supported for entries collections:
...
Code Block |
---|
/roller-services/app/[weblog-handle]/entry/[id]/comments Comments collection for entry with id /roller-services/app/[weblog-handle]/entry/[id]/comments/[offset] Comments collection for entry with id, with offset /roller-services/app/[weblog-handle]/entry/[id]/comment/[id] Individual comment |
...
Code Block |
---|
<entry> <!-- representing a comment--> ... <thr:in-reply-to relref="replies545" type="application/atom+xml" href="http://examples.com/roller/roller-services/app/myblog/entry/454" /> </entry> |
Entry <entry> extensions to indicate if/when comments are allowed
We will add new elements to Weblog Entry <entry> elements to indicate if and when comments are allowed. These are read/write elements that can be change by clients. First, the comments-allowed element will contain either 'true' or 'false' indicating if comments are allowed on this entry. Entries MAY contain this element but never more than once.
Code Block |
---|
<rol:comments-allowed>true</rol:comments-allowed>
|
Second, the comment-days element will indicate the total number of days after the entry publication date that comments will be allowed on this entry. Entries MAY contain this element but never more than once.
Code Block |
---|
<rol:comment-days>15</rol:comments-days>
|
Comment <entry> extensions to indicate spam/approval status
We will add new elements to Comment <entry> elements to indicate the status of each comment. This is a read/write element that can be changed by clients. Possible values are defined in the Roller WeblogEntryComment POJO: PENDING, UNAPPROVED, APPROVED and SPAM. Comments MAY contain this element but never more than once.
Code Block |
---|
<rol:comment-status>SPAM</rol:comment-status>
|
That's all, folks.
Comments
Please comment on the Roller dev mailing list.