incubator-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: Ivy List modules with extra attributes
Date Thu, 07 Dec 2006 15:19:42 GMT
On 12/7/06, Eran Bartenstein <ebarten1401@hotmail.com> wrote:
>
> Hello,
>
> I am trying to list a module for a specified organisation and revision
> with
> an extra attribute: kind.
> However, it seems that Ivy ignores the extra attribute.
>
> Also when checking into the code I can see no use of the extra attrbute
> specified in the passed ModuleReviosionId.
>
> I use the following:
>
>                         HashMap extraAttributes = new HashMap();
>                         extraAttributes.put("kind", "gsce");
>                         ModuleRevisionId currModuleRevisionId =
>
> ModuleRevisionId.newInstance(currOrganizationName, currModuleName,
>                                         currRevisionName,
> extraAttributes);
>                         PatternMatcher matcher =
> _ivy.getMatcher(PatternMatcher.EXACT);
>                         ModuleRevisionId[] moduleRevisionIds =
> _ivy.listModules(currModuleRevisionId, matcher);


The listModules   method do not take extra attributes into account because
it doesn't know if the extra attribute is mandatory or not, more important
than another field, or things like that. As I write that I realise that the
pattern could help to know that, and could be used to review the code to
take extra attribute into account depending on the pattern. But this is not
the case now. So what I suggest as workaround is to write your own
listModules method, inspired by the existing one in Ivy code, but using your
extra attribute.

Xavier

                        // Populate revisions array - with childs of type:
> revision
>                         RepositoryItem currRevisionRepositoryItem =
>                                 new RepositoryItem(currRevisionName,
> currModuleRepositoryItem);
>
> revisionRepositoryItemsList.add(currRevisionRepositoryItem);
>
>
> My main purpose is to try and list all modules under all organizations
> that
> match the specific extra attrbute.
>
> Does anyone know how I can do that ?
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@incubator.apache.org
> For additional commands, e-mail: general-help@incubator.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message