[Registry-dev] Extensible search API - coming back
Chathura C. Ekanayake
chathura at wso2.com
Thu Sep 27 11:20:12 PDT 2007
Paul Fremantle wrote:
>>> public Resource[] executeQuery(String queryPath, Object[] parameters);
>>
>> Why do we need to return an array? I thought we're dealing with a
>> collection as simply another type of resource ... so its simply a
>> Resource but with the "isDirectory" flag set and with a fixed type of
>> content (an array of strings IIRC?).
>
> From an APP perspective, a query is a read-only collection - correct?
> (I can't post a new entry to a query is what I mean by read-only). So
> in other words from a pure APP/REST perspective, I think the following
> is true.
>
> To create a query, I post a new thing to an existing collection (e.g.
> /users/paul/queries). The thing has a content-type of whatever we
> define for queries. Our registry now auto-creates a "query collection"
> based on that. Now if I GET the returned Location, I get back a
> collection dynamically formed by executing the query - correct? So I
> think the above is correct - the interface should be
>
> public Resource executeQuery(String queryPath, Object[] parameters)
+1
Thanks,
Chathura
>
> Maybe the query parameters should all be Strings? Since basically we
> are going to pass them as ?a=b&c=d&e=f I assume on the end of the URL.
>
> Paul
>
More information about the Registry-dev
mailing list