org.apache.ivy.plugins.resolver

Class BasicResolver

public abstract class BasicResolver extends AbstractResolver

Field Summary
static SimpleDateFormatDATE_FORMAT
static StringDESCRIPTOR_OPTIONAL
static StringDESCRIPTOR_REQUIRED
Constructor Summary
BasicResolver()
Method Summary
protected booleanacceptLatest()
protected voidclearArtifactAttempts()
protected voidclearIvyAttempts()
DownloadReportdownload(Artifact[] artifacts, DownloadOptions options)
ArtifactDownloadReportdownload(ArtifactOrigin origin, DownloadOptions options)
booleanexists(Artifact artifact)
protected abstract ResolvedResourcefindArtifactRef(Artifact artifact, Date date)
protected ResolvedResourcefindFirstArtifactRef(ModuleDescriptor md, DependencyDescriptor dd, ResolveData data)
protected abstract CollectionfindNames(Map tokenValues, String token)
protected abstract longget(Resource resource, File dest)
protected longgetAndCheck(Resource resource, File dest)
protected ResolvedResourcegetArtifactRef(Artifact artifact, Date date)
String[]getChecksumAlgorithms()
protected ResourceMDParsergetDefaultRMDParser(ModuleId mid)
ResolvedModuleRevisiongetDependency(DependencyDescriptor dd, ResolveData data)
protected longgetPublicationDate(ModuleDescriptor md, DependencyDescriptor dd, ResolveData data)
protected abstract ResourcegetResource(String source)
protected ResourceMDParsergetRMDParser(DependencyDescriptor dd, ResolveData data)
StringgetWorkspaceName()
booleanisAllownomd()
booleanisCheckconsistency()
booleanisEnvDependent()
booleanisForce()
ModuleEntry[]listModules(OrganisationEntry org)
OrganisationEntry[]listOrganisations()
RevisionEntry[]listRevisions(ModuleEntry mod)
String[]listTokenValues(String token, Map otherTokenValues)
ArtifactOriginlocate(Artifact artifact)
protected voidlogArtifactAttempt(Artifact art, String attempt)
protected voidlogAttempt(String attempt)
protected voidlogIvyAttempt(String attempt)
ResolvedModuleRevisionparse(ResolvedResource mdRef, DependencyDescriptor dd, ResolveData data)
voidreportFailure()
voidreportFailure(Artifact art)
voidsetAllownomd(boolean b)
voidsetCheckconsistency(boolean checkConsitency)
voidsetChecksums(String checksums)
voidsetDescriptor(String descriptorRule)
Sets the module descriptor presence rule.
voidsetEnvDependent(boolean envDependent)
voidsetForce(boolean force)
voidsetWorkspaceName(String workspaceName)
protected booleanshouldReturnResolvedModule(DependencyDescriptor dd, ResolvedModuleRevision mr)
StringtoString()

Field Detail

DATE_FORMAT

public static final SimpleDateFormat DATE_FORMAT

DESCRIPTOR_OPTIONAL

public static final String DESCRIPTOR_OPTIONAL

DESCRIPTOR_REQUIRED

public static final String DESCRIPTOR_REQUIRED

Constructor Detail

BasicResolver

public BasicResolver()

Method Detail

acceptLatest

protected boolean acceptLatest()

clearArtifactAttempts

protected void clearArtifactAttempts()

clearIvyAttempts

protected void clearIvyAttempts()

download

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

download

public ArtifactDownloadReport download(ArtifactOrigin origin, DownloadOptions options)

exists

public boolean exists(Artifact artifact)

findArtifactRef

protected abstract ResolvedResource findArtifactRef(Artifact artifact, Date date)

findFirstArtifactRef

protected ResolvedResource findFirstArtifactRef(ModuleDescriptor md, DependencyDescriptor dd, ResolveData data)

findNames

protected abstract Collection findNames(Map tokenValues, String token)

get

protected abstract long get(Resource resource, File dest)

getAndCheck

protected long getAndCheck(Resource resource, File dest)

getArtifactRef

protected ResolvedResource getArtifactRef(Artifact artifact, Date date)

getChecksumAlgorithms

public String[] getChecksumAlgorithms()

getDefaultRMDParser

protected ResourceMDParser getDefaultRMDParser(ModuleId mid)

getDependency

public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data)

getPublicationDate

protected long getPublicationDate(ModuleDescriptor md, DependencyDescriptor dd, ResolveData data)

getResource

protected abstract Resource getResource(String source)

getRMDParser

protected ResourceMDParser getRMDParser(DependencyDescriptor dd, ResolveData data)

getWorkspaceName

public String getWorkspaceName()

isAllownomd

public boolean isAllownomd()

isCheckconsistency

public boolean isCheckconsistency()

isEnvDependent

public boolean isEnvDependent()

isForce

public boolean isForce()

listModules

public ModuleEntry[] listModules(OrganisationEntry org)

listOrganisations

public OrganisationEntry[] listOrganisations()

listRevisions

public RevisionEntry[] listRevisions(ModuleEntry mod)

listTokenValues

public String[] listTokenValues(String token, Map otherTokenValues)

locate

public ArtifactOrigin locate(Artifact artifact)

logArtifactAttempt

protected void logArtifactAttempt(Artifact art, String attempt)

logAttempt

protected void logAttempt(String attempt)

logIvyAttempt

protected void logIvyAttempt(String attempt)

parse

public ResolvedModuleRevision parse(ResolvedResource mdRef, DependencyDescriptor dd, ResolveData data)

reportFailure

public void reportFailure()

reportFailure

public void reportFailure(Artifact art)

setAllownomd

public void setAllownomd(boolean b)

setCheckconsistency

public void setCheckconsistency(boolean checkConsitency)

setChecksums

public void setChecksums(String checksums)

setDescriptor

public void setDescriptor(String descriptorRule)
Sets the module descriptor presence rule. Should be one of DESCRIPTOR_REQUIRED or DESCRIPTOR_OPTIONAL.

Parameters: descriptorRule the descriptor rule to use with this resolver.

setEnvDependent

public void setEnvDependent(boolean envDependent)

setForce

public void setForce(boolean force)

setWorkspaceName

public void setWorkspaceName(String workspaceName)

shouldReturnResolvedModule

protected boolean shouldReturnResolvedModule(DependencyDescriptor dd, ResolvedModuleRevision mr)

toString

public String toString()