[oslc-cm] State Predicates

Samuel Padgett spadgett at us.ibm.com
Mon Mar 26 15:00:38 EDT 2012


Hi, Samit. Thanks. My comments below.

> > An attempt to update read-only
> > predicates SHOULD be answered with a 409 Conflict HTTP status code.
Their
> > presence in a resource representation used for an update via PUT MUST
NOT
> > prevent the resource from being updated.
> Would the first sentence above be applicable to update via PARTIAL
> PUT only?  If yes, then let's add that to Sam's suggested update to the
spec.
>
> Similarly, is the second sentence above be applicable to update via
> PUT where the entire resource is provided in the request?  What is
> the general recommendation (i.e. what's spec'd in the CORE spec) for
> a PUT with regards to read-only properties?  I couldn't find a clear
> indication in CORE spec on how a provider should handle read-only
> properties being specified in the request document for an update of
> resources via PUT.  It may be a good idea to be more clear about
> this in the CORE spec, and possibly repeat it in the OSLC CM spec
> for predicates to be more clear for someone reading the CM spec only.

Maybe these statements could also be clearer, but the idea is that an
attempt to actually modify a state predicate value SHOULD result in a 409
error, but just having the value in the PUT request MUST NOT cause if an
error if it's unchanged. This is true for both full and partial update.

> > There is a second issue...
> > It's also not clear how providers should respond to requests for
> > state predicates when they're not supported.
>
> +1 on the specification needing to be clear on how consumers can
> know whether a provider supports a specific state predicate.  I
> don't think it is relevant for the consumer to find out whether the
> provider has support for state predicates in general, just a specific
one.
>
> How are the current providers (e.g. ClearQuest, RTC, and Change)
> handling this currently?

I believe ClearQuest returns a 400 Bad Request if you ask for a property
that is not defined. I'm not sure about RTC and Change. The JIRA provider
just leaves it out of the response.

My preference is to simply leave it out of the response.

- Sam





More information about the Oslc-Cm mailing list