src/java/fr/jayasoft/ivy/Ivy.java
/**
	 * List module revision ids of the module accessible through the current resolvers
	 * matching the given mrid criteria according to the given matcher.
	 * 
	 * @param criteria
	 * @param matcher
	 * @return
	 */
List module revision ids of the module accessible through the current resolvers
matching the given mrid criteria according to the given matcher.

@param criteria
@param matcher
@return
List module revision ids of the module accessible through the current resolvers matching the given mrid criteria according to the given matcher . @param criteria @param matcher @return
public ModuleRevisionId[] listModules(ModuleRevisionId criteria, PatternMatcher matcher) {
		List ret = new ArrayList();
		Matcher orgMatcher = matcher.getMatcher(criteria.getOrganisation());
		Matcher modMatcher = matcher.getMatcher(criteria.getName());
		Matcher branchMatcher = matcher.getMatcher(criteria.getBranch());
		Matcher revMatcher = matcher.getMatcher(criteria.getRevision());
		Map tokenValues = new HashMap();
		String[] orgs = listTokenValues(IvyPatternHelper.ORGANISATION_KEY, tokenValues);
		for (int i = 0; i < orgs.length; i++) {
			if (orgMatcher.matches(orgs[i])) {
				tokenValues.put(IvyPatternHelper.ORGANISATION_KEY, orgs[i]);
				String[] mods = listTokenValues(IvyPatternHelper.MODULE_KEY, tokenValues);
				for (int j = 0; j < mods.length; j++) {
					if (modMatcher.matches(mods[j])) {
						tokenValues.put(IvyPatternHelper.MODULE_KEY, mods[j]);
						String[] branches = listTokenValues(IvyPatternHelper.BRANCH_KEY, tokenValues);
						if (branches == null || branches.length == 0) {
							branches = new String[]  {getDefaultBranch(new ModuleId(orgs[i], mods[j]))};
						}
						for (int k = 0; k < branches.length; k++) {
							if (branchMatcher.matches(branches[k])) {
								tokenValues.put(IvyPatternHelper.BRANCH_KEY, tokenValues);
								String[] revs = listTokenValues(IvyPatternHelper.REVISION_KEY, tokenValues);
								for (int l = 0; l < revs.length; l++) {
									if (revMatcher.matches(revs[l])) {
										ret.add(ModuleRevisionId.newInstance(orgs[i], mods[j], branches[k], revs[l]));
									}
								}
							}
						}
					}
				}
			}
		}
		return (ModuleRevisionId[]) ret.toArray(new ModuleRevisionId[ret.size()]);
	}
public ModuleRevisionId [ ] listModules ( ModuleRevisionId criteria , PatternMatcher matcher ) { List ret = new ArrayList ( ) ; Matcher orgMatcher = matcher . getMatcher ( criteria . getOrganisation ( ) ) ; Matcher modMatcher = matcher . getMatcher ( criteria . getName ( ) ) ; Matcher branchMatcher = matcher . getMatcher ( criteria . getBranch ( ) ) ; Matcher revMatcher = matcher . getMatcher ( criteria . getRevision ( ) ) ; Map tokenValues = new HashMap ( ) ; String [ ] orgs = listTokenValues ( IvyPatternHelper . ORGANISATION_KEY , tokenValues ) ; for ( int i = 0 ; i < orgs . length ; i ++ ) { if ( orgMatcher . matches ( orgs [ i ] ) ) { tokenValues . put ( IvyPatternHelper . ORGANISATION_KEY , orgs [ i ] ) ; String [ ] mods = listTokenValues ( IvyPatternHelper . MODULE_KEY , tokenValues ) ; for ( int j = 0 ; j < mods . length ; j ++ ) { if ( modMatcher . matches ( mods [ j ] ) ) { tokenValues . put ( IvyPatternHelper . MODULE_KEY , mods [ j ] ) ; String [ ] branches = listTokenValues ( IvyPatternHelper . BRANCH_KEY , tokenValues ) ; if ( branches == null || branches . length == 0 ) { branches = new String [ ] { getDefaultBranch ( new ModuleId ( orgs [ i ] , mods [ j ] ) ) } ; } for ( int k = 0 ; k < branches . length ; k ++ ) { if ( branchMatcher . matches ( branches [ k ] ) ) { tokenValues . put ( IvyPatternHelper . BRANCH_KEY , tokenValues ) ; String [ ] revs = listTokenValues ( IvyPatternHelper . REVISION_KEY , tokenValues ) ; for ( int l = 0 ; l < revs . length ; l ++ ) { if ( revMatcher . matches ( revs [ l ] ) ) { ret . add ( ModuleRevisionId . newInstance ( orgs [ i ] , mods [ j ] , branches [ k ] , revs [ l ] ) ) ; } } } } } } } } return ( ModuleRevisionId [ ] ) ret . toArray ( new ModuleRevisionId [ ret . size ( ) ] ) ; }
List module revision ids of the module accessible through the current resolvers
 matching the given mrid criteria according to the given matcher.
List module revision ids of the module accessible through the current resolvers matching the given mrid criteria according to the given matcher .