Interface RepositoryCache
-
- All Known Implementing Classes:
RepositoryCacheImpl
public interface RepositoryCache
An interface for accessing repository/features information. Simple implementations may just map feature XMLs directly to JAXB model (see:
Features
).In more complex cases, additional processing (blacklisting, overrides, patching) may be performed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addRepository(Repository repository)
Adds existingRepository
to be tracked/managed by this cache and later be available e.g., viagetRepository(String)
Repository
create(URI uri, boolean validate)
CreatesRepository
without adding it to cacheRepository
getRepository(String uri)
GetsRepository
by itsURI
Repository
getRepositoryByName(String name)
GetsRepository
by its nameSet<Repository>
getRepositoryClosure(Repository repo)
Returns a set ofrepositories
including passed repository and all referenced repositories.Repository[]
listMatchingRepositories(Set<String> uris)
Returns an array of cachedrepositories
for a set ofrepository URIs
Repository[]
listRepositories()
Returns an array of all cachedrepositories
void
removeRepository(URI repositoryUri)
Removes existingRepository
by itsURI
-
-
-
Method Detail
-
create
Repository create(URI uri, boolean validate)
CreatesRepository
without adding it to cache- Parameters:
uri
- an URI (e.g.,mvn:groupId/artifactId/version/xml/features
of repositoryvalidate
- whether to perform XML Schema validation of loaded features XML- Returns:
- a
Repository
that may be inspected or added to cache
-
addRepository
void addRepository(Repository repository)
Adds existingRepository
to be tracked/managed by this cache and later be available e.g., viagetRepository(String)
- Parameters:
repository
- existing repository to add to cache
-
removeRepository
void removeRepository(URI repositoryUri)
Removes existingRepository
by itsURI
- Parameters:
repositoryUri
-URI
of theRepository
to remove
-
getRepository
Repository getRepository(String uri)
GetsRepository
by itsURI
- Parameters:
uri
-URI
of the repository- Returns:
Repository
as it's stored inside the cache
-
getRepositoryByName
Repository getRepositoryByName(String name)
GetsRepository
by its name- Parameters:
name
- Name of the repository- Returns:
Repository
as it's stored inside the cache
-
listRepositories
Repository[] listRepositories()
Returns an array of all cachedrepositories
- Returns:
- list of all
repositories
-
listMatchingRepositories
Repository[] listMatchingRepositories(Set<String> uris)
Returns an array of cachedrepositories
for a set ofrepository URIs
- Returns:
- list of matched
repositories
-
getRepositoryClosure
Set<Repository> getRepositoryClosure(Repository repo)
Returns a set ofrepositories
including passed repository and all referenced repositories.- Parameters:
repo
- ARepository
, that possibly references other feature repositories.- Returns:
- A closure of
repositories
-
-