Package org.apache.ivy.plugins.conflict
Class LatestConflictManager
- java.lang.Object
-
- org.apache.ivy.plugins.conflict.AbstractConflictManager
-
- org.apache.ivy.plugins.conflict.LatestConflictManager
-
- All Implemented Interfaces:
ConflictManager
,IvySettingsAware
- Direct Known Subclasses:
LatestCompatibleConflictManager
public class LatestConflictManager extends AbstractConflictManager
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
LatestConflictManager.IvyNodeArtifactInfo
static class
LatestConflictManager.NoConflictResolvedYetException
-
Constructor Summary
Constructors Constructor Description LatestConflictManager()
LatestConflictManager(java.lang.String name, LatestStrategy strategy)
LatestConflictManager(LatestStrategy strategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LatestStrategy
getStrategy()
java.util.Collection<IvyNode>
resolveConflicts(IvyNode parent, java.util.Collection<IvyNode> conflicts)
Resolves the eventual conflicts found in the given collection of IvyNode.void
setLatest(java.lang.String strategyName)
To conform to configurator APIvoid
setStrategy(LatestStrategy strategy)
protected ArtifactInfo[]
toArtifactInfo(java.util.Collection<IvyNode> conflicts)
java.lang.String
toString()
-
Methods inherited from class org.apache.ivy.plugins.conflict.AbstractConflictManager
getName, getSettings, handleAllBlacklistedRevisions, setName, setSettings
-
-
-
-
Constructor Detail
-
LatestConflictManager
public LatestConflictManager()
-
LatestConflictManager
public LatestConflictManager(LatestStrategy strategy)
-
LatestConflictManager
public LatestConflictManager(java.lang.String name, LatestStrategy strategy)
-
-
Method Detail
-
resolveConflicts
public java.util.Collection<IvyNode> resolveConflicts(IvyNode parent, java.util.Collection<IvyNode> conflicts)
Description copied from interface:ConflictManager
Resolves the eventual conflicts found in the given collection of IvyNode. This method return a Collection of IvyNode which have not been evicted. The given conflicts Collection contains at least one IvyNode. This method can be called with IvyNodes which are not yet loaded. If this conflict manager is not able to resolve conflicts with the current data found in the IvyNodes and need them to be fully loaded, it will return null to indicate that no conflict resolution has been done.- Parameters:
parent
- the ivy node parent for which the conflict is to be resolvedconflicts
- the collection of IvyNode to check for conflicts- Returns:
- a Collection of IvyNode which have not been evicted, or null if conflict management resolution is not possible yet
-
toArtifactInfo
protected ArtifactInfo[] toArtifactInfo(java.util.Collection<IvyNode> conflicts)
-
getStrategy
public LatestStrategy getStrategy()
-
setLatest
public void setLatest(java.lang.String strategyName)
To conform to configurator API- Parameters:
strategyName
- ditto
-
setStrategy
public void setStrategy(LatestStrategy strategy)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractConflictManager
-
-