[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] Updated: (ODATA-351) Define ID, ReadLink and EditLink in Part 1: Protocol, define representation in Atom and JSON
[ http://tools.oasis-open.org/issues/browse/ODATA-351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Pizzo updated ODATA-351:
--------------------------------
Proposal:
JSON Services:
-MUST write the odata.id annotation for the object if it does not follow convention OR full metadata is specified
-MUST write odata.id=null for "transient" entities (that cannot be refetched or updated) (in minimal or full metadata)
-MUST write the odata.editlink annotation if entity is updatable and (editlink is different from the id OR full metadata)
-MUST write the odata.readlink annotation if entity is read-only and (readlink is different from id OR full metadata) or (entity is updatable but readlink is different from editlink)
-MAY write the odata.readlink annotation to signal that an entity is read-only but other entities in the set may be updatable
-MAY write odata.readlink annotation to feed, in which case it MUST represent the original query
-MUST NOT write odata.editlink or odata.id for feeds as the meaning of these annotations has not been defined
JSON Clients:
-MAY assume an entity with odata.id=null cannot be compared to other entities, refetched, or updated
-MAY generate the id for an entity by convention if it is not present in the entity
-MAY use the id for an entity as an editlink if it is not transient and no editlink or readlink is present
-SHOULD NOT attempt to update an entity with a readlink and no editlink, (i.e., should not "fabricate" an editlink if a readlink is present) or if the entity is annotated with the odata.readonly annotation set to false
-MAY use the editlink for an entity as a readlink if no readlink is present
-MAY use the id for an entity as a readlink if it is not transient and no readlink or editlink is present
ATOM, services
-MUST write an <id> for the entry (this is required by ATOM)
-SHOULD follow the naming pattern <id>odata:transient:{some-generated-unique-identifier-to-not-break-atom-parsers}</id> for transient ids
-MUST write an edit link if, and only if the entry is updatable
-MUST write a self link if, and only if, the entry is can be fetched and is read-only or the read link is different from the editlink
-MUST write write an <id> for the feed that uniquely identifies the collection from which the feed was generated (required by ATOM).
-MAY write a self link in a feed, in which case it MUST represent the original query
-MUST write an <id> for a feed (this is required by ATOM)
-MAY write a self link for a feed, in which case it MUST represent the original query
-MUST NOT write edit link for a feed
ATOM Clients:
-MAY assume an entity with an id that matches the transient pattern cannot be compared to other entities, refetched, or updated
-MAY interpret the edit link as a self link if no self link is present
-SHOULD NOT attempt to update an entity without an editlink
was:
Part 1: Protocol
- Define concept of "transient" entities and feeds in addition to the already defined "addressable" entities and feeds.
- Define concepts ID, ReadLink and EditLink.
- Feeds and entities MUST have ID which MUST be IRI.
- Feeds and entities MAY have ReadLink which MAY be identical to ID. Feeds and entities without ReadLink are transient.
- Entities MAY have EditLink which MAY be identical to ReadLink. Entities without EditLink are read-only.
Atom
- ID in <atom:id>
- Feed:
-- ReadLink as <link rel="self"> to re-read feed, MUST be complete request URL with options OR "shortened" URL that allows reconstructing original request URL
-- No <link rel="self"> => transient feed
- Entity
-- EditLink as <link rel="edit"> present: updatable and readable
-- ReadLink as <link rel="self"> present without EditLink: read-only entity, with EditLink: different URL
-- No EditLink and no ReadLink: transient entity
Mapping to JSON
- EditLink as odata.editLink present for entity: updatable and readable
- EditLink absent: read-only or transient
- ReadLink present: reabable
- ReadLink absent: if EditLink present: ReadLink=EditLink, otherwise transient
- ID present: different from ReadLink (or EditLink if this is present and ReadLink absent)
- ID absent: identical to ReadLink (or EditLink if this is present and ReadLink absent)
> Define ID, ReadLink and EditLink in Part 1: Protocol, define representation in Atom and JSON
> --------------------------------------------------------------------------------------------
>
> Key: ODATA-351
> URL: http://tools.oasis-open.org/issues/browse/ODATA-351
> Project: OASIS Open Data Protocol (OData) TC
> Issue Type: Improvement
> Components: OData ATOM Format , OData JSON Format, OData Protocol
> Affects Versions: V4.0_WD01, V4.0_CSD01
> Environment: [Proposed]
> Reporter: Ralf Handl
> Fix For: V4.0_CSD02
>
>
> In certain situations, especially Data Aggregation, we need the concept of "transient" entities and feeds in addition to the already defined "addressable" entities and feeds.
> Protocol should define the concepts ID, ReadLink and EditLink.
> Restrictions due to Atom and AtomPub
> - ID required, MUST be IRI
> - Feed: MAY have Self-Link to re-retrieve THIS feed
> - Entry
> -- Links are optional
> -- <link rel="self"> identifies resource equivalent to current resource
> -- AtomPub: <link rel="edit"> can be used to retrieve, update, and delete the Resource represented by that Entry
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]