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.
ROUGH DRAFT

What is an Attachment?

Here's our current definition of an attachment:

  • A resource that is related to another resource and adds supplemental information
  • For example:
    • A screen-shot attached to a Change Request
    • An office document attached to a Requirement

How should attachments work?

Attachments are Resources. A Resource links to its Attachments.

  • Attachment should be created via POST
  • Attachment should have URI
  • Resource links to its attachments

One issue: which spec will define the attachment link property, Core or domains?

Use case #1: Consumer associates Attachment with Resource

The consumer does the work: creating the Attachment if necessary and adding the link to the Resource being attached to.

WebSequence Diagrams page

Consumer->Service: POST attachment to be added
Service->Consumer: gets back URI of attachment 
Consumer->Resource: GET resource to be attached to 
Consumer->Resource: PUT back resource with new link to attachment

Nothing new here. This is how you'd expect things to work with HTTP and RDF.

Some notes:

  • Consumer may create Resource via POST (as shown above) or Consumer may use an existing Resource as the Attachment, if the Provider allows that
  • Provider may require that all Attachments be created via Provider’s Creation Factory, thus disallowing using of existing Resources

Use case #2: Consumer displays Resource and list of Attachments

Consumer can display Resource and list of attachments because, in addition to links to Attachments, Resources may contain:

  • Property values which are links to Attachments
  • Property values about the Attachments
  • Property values about the Attachments links

Either Provider or Consumer may add those properties.

A Consumer knows which property values are links to Attachments and how to find properties about each, so it can easily display a list of Attachments. Nothing new here either, just plain RDF

Use case #3: Consumer gets and updates an Attachment

To implement this use case, the Consumer gets a Resource, picks the Attachment to update, gets the Attachment and then puts back the updated Attachment. For example, here a Consumer gets and updates an image Attachment.

WebSequence Diagrams page

Consumer->Resource: GET
note left of Consumer: picks Attachment URI
Consumer->Attachment: GET on Attachment URI
Attachment->Consumer: sends back Attachment
note left of Consumer: edits Attachment image
Consumer->Attachment: PUT new image
Consumer->Resource: PUT with updated properties about Attachment
Edit | Attach | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 03 Feb 2011 - 03:13:33 - DaveJohnson
 
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