[Registry-dev] Minor change to Registry interface tag related
methods
Chathura C. Ekanayake
chathura at wso2.com
Sat Sep 29 08:20:20 PDT 2007
Currently we are having below two methods to search tags in the Registry
interface.
String[] getResourcePathsWithTag(String tag) throws RegistryException;
String[] getTags(String resourcePath) throws RegistryException;
In both these methods we are missing the tag count value. In most
scenarios we need the tag count along with those results.
So I propose to change them as follows:
TaggedResourcePath[] getResourcePathsWithTag(String tag) throws
RegistryException;
Tag[] getTags(String resourcePath) throws RegistryException;
where,
class TaggedResourcePath {
String resourcePath;
int tagCount;
}
class Tag {
String tagName;
int tagCount;
}
We can get the above results using the extensible search API as well.
But for that, we have to introduce some strange resources whose content
are (resourcePath, tagCount) tuples and (tagName, tagCount) tuples.
While implementing the extensible search API, I realized that all other
current search scenarios can be covered by resource collections, which
contain paths for
normal resources, comments, tags and ratings. But above is an exception
for that, if we try to do this with search API.
Comments ...
Thanks,
Chathura
More information about the Registry-dev
mailing list