|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.ivy.plugins.resolver.AbstractResolver
public abstract class AbstractResolver
This abstract resolver only provides handling for resolver name
| Constructor Summary | |
|---|---|
AbstractResolver()
|
|
| Method Summary | |
|---|---|
void |
abortPublishTransaction()
|
void |
beginPublishTransaction(ModuleRevisionId module,
boolean overwrite)
|
protected void |
checkInterrupted()
|
protected ResolvedModuleRevision |
checkLatest(DependencyDescriptor dd,
ResolvedModuleRevision newModuleFound,
ResolveData data)
|
void |
commitPublishTransaction()
|
protected boolean |
doValidate(ResolveData data)
|
ArtifactDownloadReport |
download(ArtifactOrigin artifact,
DownloadOptions options)
Default implementation downloads the artifact without taking advantage of its location |
void |
dumpSettings()
|
boolean |
exists(Artifact artifact)
Returns true if the given artifact can be located by this resolver and
actually exist. |
protected ResolvedModuleRevision |
findModuleInCache(DependencyDescriptor dd,
ResolveData data)
|
protected ResolvedModuleRevision |
findModuleInCache(DependencyDescriptor dd,
ResolveData data,
boolean anyResolver)
|
protected Artifact |
fromSystem(Artifact artifact)
|
protected DependencyDescriptor |
fromSystem(DependencyDescriptor dd)
|
protected CacheDownloadOptions |
getCacheDownloadOptions(DownloadOptions options)
|
protected CacheMetadataOptions |
getCacheOptions(ResolveData data)
|
protected java.lang.String |
getChangingMatcherName()
|
protected java.lang.String |
getChangingPattern()
|
protected DownloadOptions |
getDownloadOptions(ResolveOptions options)
|
EventManager |
getEventManager()
|
java.lang.String |
getLatest()
|
LatestStrategy |
getLatestStrategy()
|
java.lang.String |
getName()
|
Namespace |
getNamespace()
Returns the namespace associated with this resolver. |
ParserSettings |
getParserSettings()
|
RepositoryCacheManager |
getRepositoryCacheManager()
Returns the RepositoryCacheManager used to manage the repository cache associated
with this dependency resolver. |
ResolverSettings |
getSettings()
|
protected IvyNode |
getSystemNode(ResolveData data,
ModuleRevisionId resolvedMrid)
|
java.lang.String |
getTypeName()
|
java.lang.String |
hidePassword(java.lang.String name)
this method should remove sensitive information from a location to be displayed in a log |
protected boolean |
isAfter(ResolvedModuleRevision rmr1,
ResolvedModuleRevision rmr2,
java.util.Date date)
Returns true if rmr1 is after rmr2, using the latest strategy to determine which is the latest |
boolean |
isValidate()
|
ModuleEntry[] |
listModules(OrganisationEntry org)
|
OrganisationEntry[] |
listOrganisations()
|
RevisionEntry[] |
listRevisions(ModuleEntry module)
|
java.util.Map[] |
listTokenValues(java.lang.String[] tokens,
java.util.Map criteria)
Same as DependencyResolver.listTokenValues(String, Map) but more generic. |
java.lang.String[] |
listTokenValues(java.lang.String token,
java.util.Map otherTokenValues)
List all the values the given token can take if other tokens are set as described in the otherTokenValues map. |
ArtifactOrigin |
locate(Artifact artifact)
Default implementation actually download the artifact Subclasses should overwrite this to avoid the download |
void |
reportFailure()
Reports last resolve failure as Messages |
void |
reportFailure(Artifact art)
Reports last artifact download failure as Messages |
protected void |
saveModuleRevisionIfNeeded(DependencyDescriptor dd,
ResolvedModuleRevision newModuleFound)
|
void |
setCache(java.lang.String cacheName)
|
void |
setChangingMatcher(java.lang.String changingMatcherName)
|
void |
setChangingPattern(java.lang.String changingPattern)
|
void |
setCheckmodified(boolean check)
|
void |
setEventManager(EventManager eventManager)
|
void |
setLatest(java.lang.String strategyName)
|
void |
setLatestStrategy(LatestStrategy latestStrategy)
|
void |
setName(java.lang.String name)
Should only be used by configurator |
void |
setNamespace(java.lang.String namespaceName)
|
void |
setRepositoryCacheManager(RepositoryCacheManager repositoryCacheManager)
|
void |
setSettings(ResolverSettings ivy)
|
void |
setValidate(boolean validate)
|
java.lang.String |
toString()
|
protected Artifact |
toSystem(Artifact artifact)
|
protected DependencyDescriptor |
toSystem(DependencyDescriptor dd)
|
protected MetadataArtifactDownloadReport |
toSystem(MetadataArtifactDownloadReport report)
|
protected ModuleDescriptor |
toSystem(ModuleDescriptor md)
|
protected ModuleRevisionId |
toSystem(ModuleRevisionId resolvedMrid)
|
protected ResolvedModuleRevision |
toSystem(ResolvedModuleRevision rmr)
|
void |
validate()
Validates the Validatable, throwing an IllegalStateException if the current state is
not valid. |
| 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 |
|---|
download, findIvyFileRef, getDependency, publish |
| Constructor Detail |
|---|
public AbstractResolver()
| Method Detail |
|---|
public ResolverSettings getSettings()
public ParserSettings getParserSettings()
public void setSettings(ResolverSettings ivy)
setSettings in interface DependencyResolverpublic java.lang.String getName()
getName in interface DependencyResolverpublic void setName(java.lang.String name)
DependencyResolver
setName in interface DependencyResolvername - the new name of the resolverpublic java.lang.String hidePassword(java.lang.String name)
name - location
protected boolean doValidate(ResolveData data)
public boolean isValidate()
public void setValidate(boolean validate)
protected void checkInterrupted()
public void reportFailure()
DependencyResolver
reportFailure in interface DependencyResolverpublic void reportFailure(Artifact art)
DependencyResolver
reportFailure in interface DependencyResolver
public java.lang.String[] listTokenValues(java.lang.String token,
java.util.Map otherTokenValues)
DependencyResolver
Note that listing does not take into account namespaces, and return raw
information without any namespace transformation. The caller is responsible for calling
namespace transformation with the Namespace returned by DependencyResolver.getNamespace().
listTokenValues in interface DependencyResolver
public java.util.Map[] listTokenValues(java.lang.String[] tokens,
java.util.Map criteria)
DependencyResolverDependencyResolver.listTokenValues(String, Map) but more generic.
listTokenValues in interface DependencyResolvertokens - the tokens of the querycriteria - the token which have values
nullpublic OrganisationEntry[] listOrganisations()
listOrganisations in interface DependencyResolverpublic ModuleEntry[] listModules(OrganisationEntry org)
listModules in interface DependencyResolverpublic RevisionEntry[] listRevisions(ModuleEntry module)
listRevisions in interface DependencyResolverpublic java.lang.String toString()
toString in class java.lang.Objectpublic void dumpSettings()
dumpSettings in interface DependencyResolverpublic java.lang.String getTypeName()
public ArtifactDownloadReport download(ArtifactOrigin artifact,
DownloadOptions options)
download in interface DependencyResolverartifact - the location of the artifact to download. Must not be null.options - options to apply for this download. Must not be null.
null.public boolean exists(Artifact artifact)
DependencyResolvertrue if the given artifact can be located by this resolver and
actually exist.
exists in interface DependencyResolverartifact - the artifact which should be tested.
true if the given artifact can be located by this resolver and
actually exist.public ArtifactOrigin locate(Artifact artifact)
locate in interface DependencyResolverartifact - the artifact which should be located
null if it can't be located by this resolver
or doesn't exist.public LatestStrategy getLatestStrategy()
getLatestStrategy in interface HasLatestStrategypublic void setLatestStrategy(LatestStrategy latestStrategy)
setLatestStrategy in interface HasLatestStrategypublic void setLatest(java.lang.String strategyName)
public java.lang.String getLatest()
getLatest in interface HasLatestStrategypublic Namespace getNamespace()
DependencyResolver
getNamespace in interface DependencyResolverpublic void setNamespace(java.lang.String namespaceName)
protected ModuleDescriptor toSystem(ModuleDescriptor md)
protected Artifact fromSystem(Artifact artifact)
protected Artifact toSystem(Artifact artifact)
protected MetadataArtifactDownloadReport toSystem(MetadataArtifactDownloadReport report)
protected ResolvedModuleRevision toSystem(ResolvedModuleRevision rmr)
protected ModuleRevisionId toSystem(ModuleRevisionId resolvedMrid)
protected DependencyDescriptor fromSystem(DependencyDescriptor dd)
protected DependencyDescriptor toSystem(DependencyDescriptor dd)
protected IvyNode getSystemNode(ResolveData data,
ModuleRevisionId resolvedMrid)
protected ResolvedModuleRevision findModuleInCache(DependencyDescriptor dd,
ResolveData data)
protected ResolvedModuleRevision findModuleInCache(DependencyDescriptor dd,
ResolveData data,
boolean anyResolver)
public void setChangingMatcher(java.lang.String changingMatcherName)
protected java.lang.String getChangingMatcherName()
public void setChangingPattern(java.lang.String changingPattern)
protected java.lang.String getChangingPattern()
public void setCheckmodified(boolean check)
public RepositoryCacheManager getRepositoryCacheManager()
DependencyResolverRepositoryCacheManager used to manage the repository cache associated
with this dependency resolver.
getRepositoryCacheManager in interface DependencyResolverRepositoryCacheManager used to manage the repository cache associated
with this dependency resolver.public void setRepositoryCacheManager(RepositoryCacheManager repositoryCacheManager)
public void setCache(java.lang.String cacheName)
public void setEventManager(EventManager eventManager)
public EventManager getEventManager()
public void validate()
ValidatableIllegalStateException if the current state is
not valid.
validate in interface Validatableprotected CacheMetadataOptions getCacheOptions(ResolveData data)
protected CacheDownloadOptions getCacheDownloadOptions(DownloadOptions options)
protected DownloadOptions getDownloadOptions(ResolveOptions options)
public void abortPublishTransaction()
throws java.io.IOException
abortPublishTransaction in interface DependencyResolverjava.io.IOException
public void commitPublishTransaction()
throws java.io.IOException
commitPublishTransaction in interface DependencyResolverjava.io.IOException
public void beginPublishTransaction(ModuleRevisionId module,
boolean overwrite)
throws java.io.IOException
beginPublishTransaction in interface DependencyResolverjava.io.IOException
protected boolean isAfter(ResolvedModuleRevision rmr1,
ResolvedModuleRevision rmr2,
java.util.Date date)
rmr1 - rmr2 -
protected ResolvedModuleRevision checkLatest(DependencyDescriptor dd,
ResolvedModuleRevision newModuleFound,
ResolveData data)
protected void saveModuleRevisionIfNeeded(DependencyDescriptor dd,
ResolvedModuleRevision newModuleFound)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||