Package org.apache.ivy.osgi.repo
Class AbstractOSGiResolver
java.lang.Object
org.apache.ivy.plugins.resolver.AbstractResolver
org.apache.ivy.plugins.resolver.BasicResolver
org.apache.ivy.osgi.repo.AbstractOSGiResolver
- All Implemented Interfaces:
Validatable
,DependencyResolver
,HasLatestStrategy
- Direct Known Subclasses:
AggregatedOSGiResolver
,OBRResolver
,UpdateSiteResolver
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.apache.ivy.plugins.resolver.BasicResolver
DATE_FORMAT, DESCRIPTOR_OPTIONAL, DESCRIPTOR_REQUIRED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkModuleDescriptorRevision
(ModuleDescriptor systemMd, ModuleRevisionId systemMrid) protected void
protected Collection<String>
filterNames
(Collection<String> names) Filters names before returning them in the findXXXNames or findTokenValues method.findArtifactRef
(Artifact artifact, Date date) findBundle
(DependencyDescriptor dd, ResolveData data, Collection<ModuleDescriptor> mds) findCapability
(DependencyDescriptor dd, ResolveData data, Collection<ModuleDescriptor> mds) findIvyFileRef
(DependencyDescriptor dd, ResolveData data) Finds the module descriptor for the specified DependencyDescriptor.protected Collection<String>
findResource
(ResolvedResource[] rress, ResourceMDParser rmdparser, ModuleRevisionId mrid, Date date) When the resolver has many choices, this function helps choosing oneprotected long
protected Resource
getResource
(String source) protected abstract void
init()
boolean
listTokenValues
(String[] tokens, Map<String, Object> criteria) Same asDependencyResolver.listTokenValues(String, Map)
but more generic.void
protected void
setRepoDescriptor
(RepoDescriptor repoDescriptor) void
setRequirementStrategy
(String strategy) void
setRequirementStrategy
(AbstractOSGiResolver.RequirementStrategy importPackageStrategy) Methods inherited from class org.apache.ivy.plugins.resolver.BasicResolver
acceptLatest, clearArtifactAttempts, clearIvyAttempts, doFindArtifactRef, download, download, exists, findFirstArtifactRef, getAndCheck, getArtifactRef, getChecksumAlgorithms, getDefaultRMDParser, getDependency, getPublicationDate, getRMDParser, getWorkspaceName, 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, dumpSettings, 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
-
Field Details
-
FAILING_REPO_DESCRIPTOR
-
-
Constructor Details
-
AbstractOSGiResolver
public AbstractOSGiResolver()
-
-
Method Details
-
setRequirementStrategy
-
setRequirementStrategy
-
setRepoDescriptor
-
getRepository
-
ensureInit
protected void ensureInit() -
init
protected abstract void init() -
getRepoDescriptor
-
isAllownomd
public boolean isAllownomd()- Overrides:
isAllownomd
in classBasicResolver
-
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
-
findBundle
public ResolvedResource[] findBundle(DependencyDescriptor dd, ResolveData data, Collection<ModuleDescriptor> mds) -
findCapability
public ResolvedResource[] findCapability(DependencyDescriptor dd, ResolveData data, Collection<ModuleDescriptor> mds) -
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
-
findArtifactRef
- Specified by:
findArtifactRef
in classBasicResolver
-
checkModuleDescriptorRevision
protected void checkModuleDescriptorRevision(ModuleDescriptor systemMd, ModuleRevisionId systemMrid) - Overrides:
checkModuleDescriptorRevision
in classBasicResolver
-
filterNames
Description copied from class:BasicResolver
Filters names before returning them in the findXXXNames or findTokenValues method.Remember to call the super implementation when overriding this method.
- Overrides:
filterNames
in classBasicResolver
- Parameters:
names
- the list to filter.- Returns:
- the filtered list
-
findNames
- Specified by:
findNames
in classBasicResolver
-
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
-
get
- Specified by:
get
in classBasicResolver
- Throws:
IOException
-
getResource
- Specified by:
getResource
in classBasicResolver
- Throws:
IOException
-
publish
- Throws:
IOException
-