org.knopflerfish.service.repositorymanager
public interface RepositoryManager
| Modifier and Type | Interface and Description |
|---|---|
static class |
RepositoryManager.InstallationResult
Return value from the install operation.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CHANGE_COUNT
Service property that is incremented whenever the
configuration changes.
|
static java.lang.String |
NUM_REPOSITORIES
Service property that tells the number of available
repositories.
|
| Modifier and Type | Method and Description |
|---|---|
RepositoryInfo |
addXmlRepository(java.lang.String url,
java.util.Dictionary<java.lang.String,java.lang.Object> props)
Add a repository based on a repository XML file.
|
java.util.List<Capability> |
findProviders(Requirement requirement)
Find providers for a requirement.
|
java.util.Set<Resource> |
findResolution(java.util.List<Resource> resources)
Find a set of resources given the current state of the framework and
using the currently enabled Repositories that will allow the given list of
resources to resolve.
|
java.util.SortedSet<RepositoryInfo> |
getAllRepositories()
Get all repositories available.
|
java.util.SortedSet<RepositoryInfo> |
getRepositories()
Get all enabled repositories.
|
RepositoryManager.InstallationResult |
install(java.util.List<Resource> resources,
boolean resolve,
boolean start)
|
boolean |
isEnabled(RepositoryInfo ri)
Check if repository is enabled.
|
boolean |
resolverAvailable()
Check if the Repository Manager has access to a Resolver service.
|
boolean |
setRepositoryEnabled(RepositoryInfo ri,
boolean enabled)
Enable or disable repository.
|
boolean |
setRepositoryRank(RepositoryInfo ri,
int rank)
Change ranking of a repository.
|
static final java.lang.String CHANGE_COUNT
Integer.static final java.lang.String NUM_REPOSITORIES
Integer.java.util.List<Capability> findProviders(Requirement requirement)
requirement - Requirement to find providers for.org.osgi.service.resolve.ResolverContext.findProvidersjava.util.Set<Resource> findResolution(java.util.List<Resource> resources) throws java.lang.Exception
RepositoryManager.InstallationResult install(java.util.List<Resource> resources, boolean resolve, boolean start) throws java.lang.Exception
Resource, and optionally try to find, install and start any
Resource needed for them to resolve.resources - List of Resource to install and optionally start and/or find a resolution for.resolve - If true try to find a resolution for the given resources.start - If true start all resources and any dependencies found during resolution.java.lang.Exception - If we failed to find a resolution or if install or start
operations failed.RepositoryInfo addXmlRepository(java.lang.String url, java.util.Dictionary<java.lang.String,java.lang.Object> props) throws java.lang.Exception
url - The URL to the repository file.props - Optional service properties that are registered
with the Repository service. If null
then no extra properties are added.java.lang.Exception - If we failed to get or parse the XML file.java.util.SortedSet<RepositoryInfo> getAllRepositories()
java.util.SortedSet<RepositoryInfo> getRepositories()
boolean isEnabled(RepositoryInfo ri)
ri - Repository to check.True if repository is enabled, otherwise
false if repository is disabled or wasn't
found.boolean setRepositoryEnabled(RepositoryInfo ri, boolean enabled)
ri - enabled - True if repository was enabled/disabled,
otherwise false if repository wasn't
found.boolean setRepositoryRank(RepositoryInfo ri, int rank)
ri - Repository to update, this RepositoryInfo will
become defunct if rank change succeed.rank - New rank for repository.True if repository was updated with new
rank, otherwise false if repository wasn't
found.boolean resolverAvailable()
True if repository has access to a Resolver service,
false otherwise.