org.apache.ivy.plugins.conflict

## Class RegexpConflictManager

- java.lang.Object
- - org.apache.ivy.plugins.conflict.AbstractConflictManager
  - - org.apache.ivy.plugins.conflict.RegexpConflictManager

All Implemented Interfaces:
  ConflictManager, IvySettingsAware

    public class RegexpConflictManager
    extends AbstractConflictManager

A ConflictManager that can be used to resolve conflicts based on regular expressions of the revision of the module. The conflict manager is added like this:

        <!-- Match all revisions, but ignore the last dot(.) and the character after it.
            Used to match api changes in out milestones. -->
        <conflict-managers>
            <regexp-cm name="regexp"
                       regexp="(.*)\..$" ignoreNonMatching="true"/>
        </conflict-managers>

The regular expression must contain a capturing group. The group will be used to resolve the conflicts by an String.equals() test. If ignoreNonMatching is false non matching modules will result in an exception. If it is true they will be compaired by their full revision.

### Constructor Summary

Constructors
Constructor and Description
`RegexpConflictManager()`

### Method Summary

Methods
`java.util.Collection` `resolveConflicts(IvyNode parent, java.util.Collection conflicts)` Resolves the eventual conflicts found in the given collection of IvyNode.
`void` `setIgnoreNonMatching(boolean ignoreNonMatching)`
`void` `setRegexp(java.lang.String regexp)`

### Methods inherited from class org.apache.ivy.plugins.conflict.AbstractConflictManager

`getName, getSettings, handleAllBlacklistedRevisions, setName, setSettings, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### RegexpConflictManager

    public RegexpConflictManager()

### Method Detail

#### setRegexp

    public void setRegexp(java.lang.String regexp)

#### setIgnoreNonMatching

    public void setIgnoreNonMatching(boolean ignoreNonMatching)

#### resolveConflicts

    public java.util.Collection resolveConflicts(IvyNode parent,
                                        java.util.Collection 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 resolved
  `conflicts` - 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