JDBCRegistry supports URIs for comments. Comments have the URIs of the
form /projects/esb/synapse.xml;comments:12. When a comment is added, its
URI is returned. This URI can be used to refer that comment later (e.g.
when editing a comment). Also it is possible to do a get(...) with a
comment URI, which returns the resource representation of the comment.
This resource representation is generated by the CommentURLHandler,
which accesses the relevant database tables and constructs a resource
for the comment.
We dropped the idea of deleting comments as it would affect the comments
posted referring the deleted comment. But as Jonathan mentioned, there
are use cases for deleting comments. So, shall I add functionality to
remove comments using the API method,
void removeComment(String commentPath);
Thanks,
Chathura
Sanjiva Weerawarana wrote:
Glen Daniels wrote:
Hm. Well, they MUST have a URI so that the remote stuff will work
(i.e. referencing, editing or deleting, as per the protocol). If
they're going to have a remote URI, that has to evince itself somehow
in the API (whether surfacing all the way to the user or hiding
somewhere). It seems to me returning the URI from addComment() is
the right way to do that, so it can be used as a valid path to
delete() at least. I'm certainly not saying Comments need to be
versioned and taggable and all that, but they are "things with a
URI", i.e. resources. I like that the same pattern would work with
local or remote registries.
I wasn't disagreeing with your proposed API- returning the location
of the comment looks good. I was only arguing against the actual URI
.. if I add a comment against resource /r1, I'd like the URI of that
comment to be /r1;comments?n=113 (where 113 is the comment number/id).
How would you suggest deleting a comment via the Java API?
Per above, no disagreement with the Java API.
/tag/foo and /tags is different - those are really queries.
I'm not sure what you mean here?
What I meant is that /tag/foo is really a query meaning give me a list
of all resources that are tagged foo. And /tags is a "special URI"
which returns a list of tags. (I forget whether we even support that.)
Sanjiva.
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev