org.apache.ivy.plugins.resolver
Class ChainResolver

java.lang.Object
  extended by org.apache.ivy.plugins.resolver.AbstractResolver
      extended by org.apache.ivy.plugins.resolver.ChainResolver
All Implemented Interfaces:
IvySettingsAware, DependencyResolver, HasLatestStrategy

public class ChainResolver
extends AbstractResolver

Author:
Hanin

Nested Class Summary
static class ChainResolver.ResolvedModuleRevisionArtifactInfo
           
 
Constructor Summary
ChainResolver()
           
 
Method Summary
 void add(DependencyResolver resolver)
           
 DownloadReport download(Artifact[] artifacts, DownloadOptions options)
           
 void dumpSettings()
           
 boolean exists(Artifact artifact)
          Default implementation actually download the artifact Subclasses should overwrite this to avoid the download
 ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data)
          Resolve a module by id, getting its module descriptor and resolving the revision if it's a latest one (i.e. a revision uniquely identifying the revision of a module in the current environment - If this revision is not able to identify uniquelely the revision of the module outside of the current environment, then the resolved revision must begin by ##)
 java.util.List getResolvers()
           
 boolean isDual()
           
 boolean isReturnFirst()
           
 void publish(Artifact artifact, java.io.File src, boolean overwrite)
           
 void reportFailure()
          Reports last resolve failure as Messages
 void reportFailure(Artifact art)
          Reports last artifact download failure as Messages
 void setDual(boolean b)
           
 void setReturnFirst(boolean returnFirst)
           
 
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, listModules, listOrganisations, listRevisions, listTokenValues, setChangingMatcher, setChangingPattern, setLatest, setLatestStrategy, setName, setNamespace, setSettings, setValidate, toString, toSystem, toSystem, toSystem, toSystem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChainResolver

public ChainResolver()
Method Detail

add

public void add(DependencyResolver resolver)

getDependency

public ResolvedModuleRevision getDependency(DependencyDescriptor dd,
                                            ResolveData data)
                                     throws java.text.ParseException
Description copied from interface: DependencyResolver
Resolve a module by id, getting its module descriptor and resolving the revision if it's a latest one (i.e. a revision uniquely identifying the revision of a module in the current environment - If this revision is not able to identify uniquelely the revision of the module outside of the current environment, then the resolved revision must begin by ##)

Throws:
java.text.ParseException

reportFailure

public void reportFailure()
Description copied from interface: DependencyResolver
Reports last resolve failure as Messages

Specified by:
reportFailure in interface DependencyResolver
Overrides:
reportFailure in class AbstractResolver

reportFailure

public void reportFailure(Artifact art)
Description copied from interface: DependencyResolver
Reports last artifact download failure as Messages

Specified by:
reportFailure in interface DependencyResolver
Overrides:
reportFailure in class AbstractResolver

download

public DownloadReport download(Artifact[] artifacts,
                               DownloadOptions options)

getResolvers

public java.util.List getResolvers()

publish

public void publish(Artifact artifact,
                    java.io.File src,
                    boolean overwrite)
             throws java.io.IOException
Throws:
java.io.IOException

isReturnFirst

public boolean isReturnFirst()

setReturnFirst

public void setReturnFirst(boolean returnFirst)

dumpSettings

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

exists

public boolean exists(Artifact artifact)
Description copied from class: AbstractResolver
Default implementation actually download the artifact Subclasses should overwrite this to avoid the download

Specified by:
exists in interface DependencyResolver
Overrides:
exists in class AbstractResolver

setDual

public void setDual(boolean b)

isDual

public boolean isDual()