This wiki is locked. Future workgroup activity and specification development must take place at our new wiki. For more information, see this blog post about the new governance model and this post about changes to the website.

DRAFT Comment Specification

ChangeRequest? .comments -> Comments.comment *-> Comment

Additional property on ChangeRequest resource shape:

  • Name: discussion
  • Description: The discussion property holds a reference to the set of all comments on a ChangeRequest?
  • Occurs: at-most-one
  • Value-type: Resource Comments
  • Version: 2.0

Resource: Discussion

Resource: Comment

  • Name: Comment
  • Type URI: http://open-services.net/xmlns/cm/2.0#Comment
  • Version: 2.0
  • Description: Data necessary to represent a comment
  • Properties:
    • dc:identifier (exactly-one)
    • dc:creator (exactly-one)
    • dc:created (exactly-one)
    • oslc_cm:body (XMLLiteral xhtml, exactly-one)
    • oslc_cm:changeRequest (exactly-one) reference to associated change request
    • dc:title (XMLLiteral xhtml, zero-or-one)
    • oslc_cm:inReply-to (URI, zero-or-one) reference to comment this comment is in reply to

Sample

ChangeRequest? with discussion inlined (RDF/XML)

Click HERE to see RDF/XML validation results

<?xml version="1.0" encoding="UTF-8"?>
<oslc_cm:ChangeRequest
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/terms/"
  xmlns:oslc_cm="http://open-services.net/xmlns/cm/2.0#" 

  rdf:about="http://example.com/bugs/2314">
  
  <oslc_cm:discussion>
    <oslc_cm:Discussion rdf:about= [[http://myserver/mycmapp/bugs/2314/discussion][http://myserver/mycmapp/bugs/2314/discussion]]>
      <oslc_cm:comment>
       <oslc_cm:Comment rdf:about="http://myserver/mycmapp/bugs/2314/comments/1">
        <dc:identifier>comment1</dc:identifier>
        <dc:creator rdf:resource="http://myserver/mycmapp/users/joe" />
        <dc:title>comment title 1</dc:title>
        <dc:created>2008-07-04T11:00:00.000Z</dc:created>
        <oslc_cm:body rdf:parseType="Literal">
          This is my comment
        </oslc_cm:body>
        <oslc_cm:changeRequest rdf:resource="http://example.com/bugs/2314" />
        <oslc_cm:inReplyTo rdf:resource="" />
       </oslc_cm:Comment>
      </oslc_cm:comment>
      <oslc_cm:comment>
       <oslc_cm:Comment rdf:about="http://myserver/mycmapp/bugs/2314/comments/2">
        <dc:identifier>Comment 2</dc:identifier>
        <dc:creator rdf:resource="http://myserver/mycmapp/users/joe" />
        <dc:title>comment title 2</dc:title>
        <dc:created>2008-07-05T11:00:00.000Z</dc:created>
        <oslc_cm:body rdf:parseType="Literal">
          This is my 2nd comment
        </oslc_cm:body>
        <oslc_cm:changeRequest rdf:resource="http://example.com/bugs/2314" />
        <oslc_cm:inReplyTo rdf:resource="http://myserver/mycmapp/bugs/2314/comments/1" />
       </oslc_cm:Comment>
      </oslc_cm:comment>
    </oslc_cm:Discussion>
  </oslc_cm:discussion>
      
</oslc_cm:ChangeRequest>
 

Retrieving all Discussion

Get {CR URI}/discussion

Code Content Description
200 OK Comments resource Comments resource with a number of comment resources
404 Not Found Error message Either the root URI is invalid or the service can't locate the specified change request resource
405 Not Acceptable Error message Server can not fulfill the request due to it's Accept headers

Comment Creation

POST {CR URI}/comments
Posting a well formed comment shape results in creation of a comment resource resource. A service provider MUST support at least the following HTTP response status codes:
Status CodeResponse Content
Description
201 CreatedHTTP-Header > Location: {New Comment URI}A new comment resource has been created at the URI returned
400 Bad Request
Error message
Malformed content (comment xml invalid)
404 Not Found
Error messageThe request URL does not represent a URL on the serve
409 Conflict
Error message

Possible reasons:

  • inReplyTo not supported
  • referencd comment uri invalid

Comment Deletion

 DELETE {Comment URI}

Delete the comment represented by the given URL. Service providers MAY support a DELETE request on Comment resources. Further GET requests on this resource SHOULD result in a "410 Gone" or a "404 Not Found" response.

A service provider MUST support at least the following HTTP response status codes:

Code Content Description
200 OK none The service has marked the resource as deleted or physically has deleted the resource

Comment Update

 PUT {Comment URI}

Response: 501 Not Implemented

Topic attachments
I Attachment Action Size Date Who Comment
xmlxml cr_v2.xml manage 1.7 K 13 Apr 2010 - 19:38 SteveSpeicher  
Edit | Attach | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r6 - 19 Apr 2010 - 21:30:03 - RobertElves
 
This site is powered by the TWiki collaboration platform Copyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our Terms of Use
Ideas, requests, problems regarding this site? Send feedback