Package org.jboss.gm.analyzer.alignment
Class DependencyOverrideCustomizer
- java.lang.Object
-
- org.jboss.gm.analyzer.alignment.DependencyOverrideCustomizer
-
- All Implemented Interfaces:
AlignmentService.ResponseCustomizer
public class DependencyOverrideCustomizer extends java.lang.Object implements AlignmentService.ResponseCustomizer
AlignmentService.ResponseCustomizerthat changes the versions of aligned dependencies.The implementation is very simple and takes Map as a constructor argument and uses the map keys to check if a dependency matches. If so, the map's value is used as the new version.
-
-
Constructor Summary
Constructors Constructor Description DependencyOverrideCustomizer(java.util.Map<org.commonjava.maven.atlas.ident.ref.ProjectRef,java.lang.String> overrideMap)Creates a new dependency override customizer with the given override map.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AlignmentService.Responsecustomize(AlignmentService.Response response)Changes the response after it is returned by the alignment service.static AlignmentService.ResponseCustomizerfromConfigurationForModule(org.jboss.gm.common.Configuration configuration, java.util.Set<org.gradle.api.Project> projects)This is created by theAlignmentServiceFactorywhen creating the request/response customizers.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.gm.analyzer.alignment.AlignmentService.ResponseCustomizer
order
-
-
-
-
Constructor Detail
-
DependencyOverrideCustomizer
public DependencyOverrideCustomizer(java.util.Map<org.commonjava.maven.atlas.ident.ref.ProjectRef,java.lang.String> overrideMap)
Creates a new dependency override customizer with the given override map.- Parameters:
overrideMap- the map to use to check if a dependency matches
-
-
Method Detail
-
customize
public AlignmentService.Response customize(AlignmentService.Response response)
Description copied from interface:AlignmentService.ResponseCustomizerChanges the response after it is returned by the alignment service.- Specified by:
customizein interfaceAlignmentService.ResponseCustomizer- Parameters:
response- the resulting aligned dependencies from the dependency analyzer- Returns:
- the resulting aligned dependencies from the dependency analyzer
-
fromConfigurationForModule
public static AlignmentService.ResponseCustomizer fromConfigurationForModule(org.jboss.gm.common.Configuration configuration, java.util.Set<org.gradle.api.Project> projects)
This is created by theAlignmentServiceFactorywhen creating the request/response customizers.- Parameters:
configuration- the Configuration objectprojects- the collection of projects- Returns:
- an initiated ResponseCustomizer
-
-