1 6 package fr.jayasoft.ivy.conflict; 7 8 import java.util.ArrayList ; 9 import java.util.Arrays ; 10 import java.util.Collection ; 11 import java.util.Iterator ; 12 13 import fr.jayasoft.ivy.IvyNode; 14 15 public class FixedConflictManager extends AbstractConflictManager { 16 private Collection _revs; 17 public FixedConflictManager(String [] revs) { 18 _revs = Arrays.asList(revs); 19 setName("fixed"+_revs); 20 } 21 public Collection resolveConflicts(IvyNode parent, Collection conflicts) { 22 Collection resolved = new ArrayList (conflicts.size()); 23 for (Iterator iter = conflicts.iterator(); iter.hasNext();) { 24 IvyNode node = (IvyNode)iter.next(); 25 String revision = node.getResolvedId().getRevision(); 26 if (_revs.contains(revision)) { 27 resolved.add(node); 28 } 29 } 30 return resolved; 31 } 32 33 public Collection getRevs() { 34 return _revs; 35 } 36 37 } 38 | Popular Tags |