Resource Writable Query? [message #1439107] |
Mon, 06 October 2014 22:09  |
Eclipse User |
|
|
|
Is there a way to perform a pre-check on an OSLC provider resource to determine if its in a state that can be written to?
Thanks,
Matt
|
|
|
Re: Resource Writable Query? [message #1439792 is a reply to message #1439107] |
Tue, 07 October 2014 14:12   |
Eclipse User |
|
|
|
Matt,
There might be a few ways, but it depends on the provider. If the provider has implemented HTTP OPTIONS, you could make an OPTIONS request on the URI to see if PUT is in the Allow header. This isn't required by the spec, however, and I suspect many providers haven't implemented OPTIONS. It also might not work if the resource is editable, but the user doesn't have the right authority.
It's possible the provider has its own property to indicate if the resource is read only, but there's no Core common property for it. There's an oslc:readOnly, but that's meant for resource shapes. I'd look at the resource RDF and see if there's anything in it you can use.
Good luck,
Sam
|
|
|
|
Powered by
FUDForum. Page generated in 0.01810 seconds