Package org.apache.ivy.plugins.resolver
Class AbstractPatternsBasedResolver
java.lang.Object
org.apache.ivy.plugins.resolver.AbstractResolver
org.apache.ivy.plugins.resolver.BasicResolver
org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver
- All Implemented Interfaces:
Validatable
,DependencyResolver
,HasLatestStrategy
- Direct Known Subclasses:
RepositoryResolver
-
Field Summary
Fields inherited from class org.apache.ivy.plugins.resolver.BasicResolver
DATE_FORMAT, DESCRIPTOR_OPTIONAL, DESCRIPTOR_REQUIRED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addArtifactPattern
(String pattern) void
void
void
addIvyPattern
(String pattern) example of pattern : ~/Workspace/[module]/[module].ivy.xmlprotected void
convertM2CriteriaForResourceSearch
(Map<String, Object> criteria) protected ModuleRevisionId
protected String
protected ModuleRevisionId
protected void
convertM2TokenValuesForResourceSearch
(Map<String, String> tokenValues) void
protected abstract boolean
protected Collection<String>
findArtifactNames
(Map<String, String> tokenValues, String token) findArtifactRef
(Artifact artifact, Date date) findIvyFileRef
(DependencyDescriptor dd, ResolveData data) Finds the module descriptor for the specified DependencyDescriptor.protected Collection<String>
findIvyNames
(Map<String, String> tokenValues, String token) protected Collection<String>
findResource
(ResolvedResource[] rress, ResourceMDParser rmdparser, ModuleRevisionId mrid, Date date) When the resolver has many choices, this function helps choosing oneprotected abstract ResolvedResource
findResourceUsingPattern
(ModuleRevisionId mrid, String pattern, Artifact artifact, ResourceMDParser rmdparser, Date date) protected ResolvedResource
findResourceUsingPatterns
(ModuleRevisionId moduleRevision, List<String> patternList, Artifact artifact, ResourceMDParser rmdparser, Date date) protected void
findTokenValues
(Collection<String> names, List<String> patterns, Map<String, String> tokenValues, String token) protected String
boolean
listTokenValues
(String[] tokens, Map<String, Object> criteria) Same asDependencyResolver.listTokenValues(String, Map)
but more generic.protected abstract String[]
listTokenValues
(String pattern, String token) protected void
setArtifactPatterns
(List<String> patterns) protected void
setIvyPatterns
(List<String> patterns) void
setM2compatible
(boolean compatible) Methods inherited from class org.apache.ivy.plugins.resolver.BasicResolver
acceptLatest, checkModuleDescriptorRevision, clearArtifactAttempts, clearIvyAttempts, doFindArtifactRef, download, download, exists, filterNames, findFirstArtifactRef, get, getAndCheck, getArtifactRef, getChecksumAlgorithms, getDefaultRMDParser, getDependency, getPublicationDate, getResource, getRMDParser, getWorkspaceName, isAllownomd, isCheckconsistency, isEnvDependent, isForce, listModules, listOrganisations, listRevisions, listTokenValues, locate, logArtifactAttempt, logAttempt, logIvyAttempt, parse, reportFailure, reportFailure, setAllownomd, setCheckconsistency, setChecksums, setDescriptor, setEnvDependent, setForce, setWorkspaceName, shouldReturnResolvedModule, toString
Methods inherited from class org.apache.ivy.plugins.resolver.AbstractResolver
abortPublishTransaction, beginPublishTransaction, checkInterrupted, checkLatest, commitPublishTransaction, doValidate, findModuleInCache, findModuleInCache, fromSystem, fromSystem, getCacheDownloadOptions, getCacheOptions, getChangingMatcherName, getChangingPattern, getDownloadOptions, getEventManager, getLatest, getLatestStrategy, getName, getNamespace, getParserSettings, getRepositoryCacheManager, getSettings, getSystemNode, getTimeoutConstraint, getTypeName, hidePassword, isAfter, isValidate, saveModuleRevisionIfNeeded, setCache, setChangingMatcher, setChangingPattern, setCheckmodified, setEventManager, setLatest, setLatestStrategy, setName, setNamespace, setRepositoryCacheManager, setSettings, setTimeoutConstraint, setValidate, toSystem, toSystem, toSystem, toSystem, toSystem, toSystem, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.ivy.plugins.resolver.DependencyResolver
publish
-
Constructor Details
-
AbstractPatternsBasedResolver
public AbstractPatternsBasedResolver()
-
-
Method Details
-
findIvyFileRef
Description copied from interface:DependencyResolver
Finds the module descriptor for the specified DependencyDescriptor. If this resolver can't find the module descriptor, null is returned.- Parameters:
dd
- the dependency descriptordata
- the resolve data- Returns:
- the module descriptor, or null
-
findArtifactRef
- Specified by:
findArtifactRef
in classBasicResolver
-
findResource
public ResolvedResource findResource(ResolvedResource[] rress, ResourceMDParser rmdparser, ModuleRevisionId mrid, Date date) Description copied from class:BasicResolver
When the resolver has many choices, this function helps choosing one- Overrides:
findResource
in classBasicResolver
- Parameters:
rress
- the list of resolved resource which the resolver found to fit the requirementrmdparser
- the parser of module descriptormrid
- the module being resolveddate
- the current date- Returns:
- the selected resource
-
findResourceUsingPatterns
protected ResolvedResource findResourceUsingPatterns(ModuleRevisionId moduleRevision, List<String> patternList, Artifact artifact, ResourceMDParser rmdparser, Date date) -
findResourceUsingPattern
protected abstract ResolvedResource findResourceUsingPattern(ModuleRevisionId mrid, String pattern, Artifact artifact, ResourceMDParser rmdparser, Date date) -
findNames
- Specified by:
findNames
in classBasicResolver
-
findIvyNames
-
findArtifactNames
-
listTokenValues
Description copied from interface:DependencyResolver
Same asDependencyResolver.listTokenValues(String, Map)
but more generic.- Specified by:
listTokenValues
in interfaceDependencyResolver
- Overrides:
listTokenValues
in classAbstractResolver
- Parameters:
tokens
- the tokens of the querycriteria
- the token which have values- Returns:
- the list of token values, must not be
null
-
getModuleDescriptorExtension
-
listTokenValues
-
exist
-
findTokenValues
-
addIvyPattern
example of pattern : ~/Workspace/[module]/[module].ivy.xml- Parameters:
pattern
- String
-
addArtifactPattern
-
getIvyPatterns
-
getArtifactPatterns
-
setIvyPatterns
-
setArtifactPatterns
-
addConfiguredIvy
-
addConfiguredArtifact
-
dumpSettings
public void dumpSettings()- Specified by:
dumpSettings
in interfaceDependencyResolver
- Overrides:
dumpSettings
in classAbstractResolver
-
isM2compatible
public boolean isM2compatible() -
setM2compatible
public void setM2compatible(boolean compatible) -
convertM2ResourceSearchIdToNormal
-
convertM2IdForResourceSearch
-
convertM2OrganizationForResourceSearch
-
convertM2TokenValuesForResourceSearch
-
convertM2CriteriaForResourceSearch
-