[Yanel-dev] Get all repositories within realm

Michael Wechner michael.wechner at wyona.com
Wed Jan 5 10:10:48 CET 2011


Hi Cedric

On 1/5/11 9:54 AM, Cedric Staub wrote:
> Hi there
>
> I'm currently trying to build a re-indexing functionality into the
> search resource in src/contributions/resources/search. I've already got
> the basics, but now I have the following question: How can I get a list
> of all repositories within a realm?
>
> The Realm interface only defines getRepository() (default repo) and
> getRepository(String id) (some specific repo), but I can't figure out
> how to find out which repositories exist at all.

good point. I am afraid we need to introduce this by either enhancing 
the realm interface:

http://127.0.0.1:8080/yanel/yanel-website/javadoc/org/wyona/yanel/core/map/Realm.html

whereas this would break backwards compatibility or introduce some 
"utility" class, which is also
accessible from within a resource, either by another interface or by the 
Environment.

Also it is not clear to me what methods we should introduce, e.g.

Repository[] getRepositories()

String[] getRepositoryIDs()
(whereas this will lead to the problem, that the default repositories of 
realm (data, ac-identities, ac-policies, res-configs) have no IDs 
assigned internally IIRC)

Map getRepositoryMap() (e.g. see 
http://download.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getParameterMap%28%29)

WDYT?

Btw, welcome back :-)

Cheers

Michael
> Thanks for the help,
> Cedric



More information about the Yanel-development mailing list