org.apache.ivy.plugins.resolver
Class AbstractResourceResolver

java.lang.Object
  extended by org.apache.ivy.plugins.resolver.AbstractResolver
      extended by org.apache.ivy.plugins.resolver.BasicResolver
          extended by org.apache.ivy.plugins.resolver.AbstractResourceResolver
All Implemented Interfaces:
IvySettingsAware, DependencyResolver, HasLatestStrategy
Direct Known Subclasses:
RepositoryResolver

public abstract class AbstractResourceResolver
extends BasicResolver

Author:
Xavier Hanin

Field Summary
 
Fields inherited from class org.apache.ivy.plugins.resolver.BasicResolver
_workspaceName, DATE_FORMAT
 
Constructor Summary
AbstractResourceResolver()
           
 
Method Summary
 void addArtifactPattern(java.lang.String pattern)
           
 void addConfiguredArtifact(IvyPattern p)
           
 void addConfiguredIvy(IvyPattern p)
           
 void addIvyPattern(java.lang.String pattern)
          example of pattern : ~/Workspace/[module]/[module].ivy.xml
protected  ModuleRevisionId convertM2IdForResourceSearch(ModuleRevisionId mrid)
           
 void dumpSettings()
           
protected  java.util.Collection findArtifactNames(java.util.Map tokenValues, java.lang.String token)
           
protected  ResolvedResource findArtifactRef(Artifact artifact, java.util.Date date)
           
protected  ResolvedResource findIvyFileRef(DependencyDescriptor dd, ResolveData data)
           
protected  java.util.Collection findIvyNames(java.util.Map tokenValues, java.lang.String token)
           
protected  java.util.Collection findNames(java.util.Map tokenValues, java.lang.String token)
           
static ResolvedResource findResource(ResolvedResource[] rress, java.lang.String name, LatestStrategy strategy, VersionMatcher versionMatcher, ResourceMDParser rmdparser, ModuleRevisionId mrid, java.util.Date date)
           
protected abstract  ResolvedResource findResourceUsingPattern(ModuleRevisionId mrid, java.lang.String pattern, Artifact artifact, ResourceMDParser rmdparser, java.util.Date date)
           
protected  ResolvedResource findResourceUsingPatterns(ModuleRevisionId moduleRevision, java.util.List patternList, Artifact artifact, ResourceMDParser rmdparser, java.util.Date date)
           
protected  void findTokenValues(java.util.Collection names, java.util.List patterns, java.util.Map tokenValues, java.lang.String token)
           
 java.util.List getArtifactPatterns()
           
 java.util.List getIvyPatterns()
           
 boolean isM2compatible()
           
protected  void setArtifactPatterns(java.util.List artifactPatterns)
           
protected  void setIvyPatterns(java.util.List ivyPatterns)
           
 void setM2compatible(boolean m2compatible)
           
 
Methods inherited from class org.apache.ivy.plugins.resolver.BasicResolver
acceptLatest, clearArtifactAttempts, clearIvyAttempts, download, exists, findFirstArtifactRef, get, getAndCheck, getArtifactRef, getChecksumAlgorithms, getDefaultRMDParser, getDependency, getPublicationDate, getRMDParser, getWorkspaceName, isAllownomd, isCheckconsistency, isCheckmodified, isEnvDependent, listModules, listOrganisations, listRevisions, listTokenValues, logArtifactAttempt, logAttempt, logIvyAttempt, parse, reportFailure, reportFailure, searchedRmr, setAllownomd, setCheckconsistency, setCheckmodified, setChecksums, setEnvDependent, setWorkspaceName, toString
 
Methods inherited from class org.apache.ivy.plugins.resolver.AbstractResolver
checkInterrupted, doValidate, findModuleInCache, fromSystem, fromSystem, getChangingMatcher, getChangingMatcherName, getChangingPattern, getLatest, getLatestStrategy, getName, getNamespace, getSettings, getSystemNode, getTypeName, hidePassword, isValidate, setChangingMatcher, setChangingPattern, setLatest, setLatestStrategy, setName, setNamespace, setSettings, setValidate, toSystem, toSystem, toSystem, toSystem
 
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 Detail

AbstractResourceResolver

public AbstractResourceResolver()
Method Detail

findIvyFileRef

protected ResolvedResource findIvyFileRef(DependencyDescriptor dd,
                                          ResolveData data)
Specified by:
findIvyFileRef in class BasicResolver

findArtifactRef

protected ResolvedResource findArtifactRef(Artifact artifact,
                                           java.util.Date date)
Specified by:
findArtifactRef in class BasicResolver

findResourceUsingPatterns

protected ResolvedResource findResourceUsingPatterns(ModuleRevisionId moduleRevision,
                                                     java.util.List patternList,
                                                     Artifact artifact,
                                                     ResourceMDParser rmdparser,
                                                     java.util.Date date)

findResourceUsingPattern

protected abstract ResolvedResource findResourceUsingPattern(ModuleRevisionId mrid,
                                                             java.lang.String pattern,
                                                             Artifact artifact,
                                                             ResourceMDParser rmdparser,
                                                             java.util.Date date)

findResource

public static ResolvedResource findResource(ResolvedResource[] rress,
                                            java.lang.String name,
                                            LatestStrategy strategy,
                                            VersionMatcher versionMatcher,
                                            ResourceMDParser rmdparser,
                                            ModuleRevisionId mrid,
                                            java.util.Date date)

findNames

protected java.util.Collection findNames(java.util.Map tokenValues,
                                         java.lang.String token)
Specified by:
findNames in class BasicResolver

findIvyNames

protected java.util.Collection findIvyNames(java.util.Map tokenValues,
                                            java.lang.String token)

findArtifactNames

protected java.util.Collection findArtifactNames(java.util.Map tokenValues,
                                                 java.lang.String token)

findTokenValues

protected void findTokenValues(java.util.Collection names,
                               java.util.List patterns,
                               java.util.Map tokenValues,
                               java.lang.String token)

addIvyPattern

public void addIvyPattern(java.lang.String pattern)
example of pattern : ~/Workspace/[module]/[module].ivy.xml

Parameters:
pattern -

addArtifactPattern

public void addArtifactPattern(java.lang.String pattern)

getIvyPatterns

public java.util.List getIvyPatterns()

getArtifactPatterns

public java.util.List getArtifactPatterns()

setIvyPatterns

protected void setIvyPatterns(java.util.List ivyPatterns)

setArtifactPatterns

protected void setArtifactPatterns(java.util.List artifactPatterns)

addConfiguredIvy

public void addConfiguredIvy(IvyPattern p)

addConfiguredArtifact

public void addConfiguredArtifact(IvyPattern p)

dumpSettings

public void dumpSettings()
Specified by:
dumpSettings in interface DependencyResolver
Overrides:
dumpSettings in class AbstractResolver

isM2compatible

public boolean isM2compatible()

setM2compatible

public void setM2compatible(boolean m2compatible)

convertM2IdForResourceSearch

protected ModuleRevisionId convertM2IdForResourceSearch(ModuleRevisionId mrid)