/** * Adds to the master set of properties contributed objects that don't match an already existing * key. * * @param map * map of {@link org.apache.tapestry.services.impl.InfrastructureContribution}keyed * on property name (String). */ private void addToProperties(Map map) { Iterator i = map.values().iterator(); while (i.hasNext()) { InfrastructureContribution ic = (InfrastructureContribution) i.next(); String propertyName = ic.getProperty(); if (_properties.containsKey(propertyName)) continue; _properties.put(propertyName, ic.getObject()); } }
/** * Adds to the master set of properties contributed objects that don't match an already existing * key. * * @param map * map of {@link org.apache.tapestry.services.impl.InfrastructureContribution}keyed * on property name (String). */ private void addToProperties(Map map) { Iterator i = map.values().iterator(); while (i.hasNext()) { InfrastructureContribution ic = (InfrastructureContribution) i.next(); String propertyName = ic.getProperty(); if (_properties.containsKey(propertyName)) continue; _properties.put(propertyName, ic.getObject()); } }
static String duplicateInfrastructureContribution(InfrastructureContribution conflict, Location existingLocation) { return _formatter.format( "duplicate-infrastructure-contribution", conflict.getProperty(), conflict.getMode(), existingLocation); }
static String duplicateInfrastructureContribution(InfrastructureContribution conflict, Location existingLocation) { return _formatter.format( "duplicate-infrastructure-contribution", conflict.getProperty(), conflict.getMode(), existingLocation); }
private Map buildMapFromContributions(List contributions, String mode) { Map result = new HashMap(); Iterator i = contributions.iterator(); while (i.hasNext()) { InfrastructureContribution ic = (InfrastructureContribution) i.next(); if (!ic.matchesMode(mode)) continue; String propertyName = ic.getProperty(); InfrastructureContribution existing = (InfrastructureContribution) result .get(propertyName); if (existing != null) { _errorLog.error(ImplMessages.duplicateInfrastructureContribution(ic, existing .getLocation()), ic.getLocation(), null); continue; } result.put(propertyName, ic); } return result; }
private Map buildMapFromContributions(List contributions, String mode) { Map result = new HashMap(); Iterator i = contributions.iterator(); while (i.hasNext()) { InfrastructureContribution ic = (InfrastructureContribution) i.next(); if (!ic.matchesMode(mode)) continue; String propertyName = ic.getProperty(); InfrastructureContribution existing = (InfrastructureContribution) result .get(propertyName); if (existing != null) { _errorLog.error(ImplMessages.duplicateInfrastructureContribution(ic, existing .getLocation()), ic.getLocation(), null); continue; } result.put(propertyName, ic); } return result; }