|
Knopflerfish OSGi 6.0.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface RepositoryManager
KF repository manager service for interaction with OSGI repositories. Registered as service factory. The service factory has two properties num_repositories that tells how many repositories are available and change_count that tells how many times the configuration of repositories has changed. The services is updated whenever there is change in any repository. When a service is fetched you get a service local configuration of how the repositories are used and searched.
| Nested Class Summary | |
|---|---|
static class |
RepositoryManager.InstallationResult
Return value from the install operation. |
| Field Summary | |
|---|---|
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. |
| Method Summary | |
|---|---|
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)
Install, and optionally start, a list of Resource, and optionally try to find, install and start any
Resource needed for them to resolve. |
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. |
| Field Detail |
|---|
static final java.lang.String CHANGE_COUNT
Integer.
static final java.lang.String NUM_REPOSITORIES
Integer.
| Method Detail |
|---|
java.util.List<Capability> findProviders(Requirement requirement)
requirement - Requirement to find providers for.
org.osgi.service.resolve.ResolverContext.findProviders
java.util.Set<Resource> findResolution(java.util.List<Resource> resources)
throws java.lang.Exception
resources - List of Resource to find a resolution for.
Resource that will allow the given list
of resources to resolve.
java.lang.Exception - If we failed to find a resolution.
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.
|
Knopflerfish OSGi 6.0.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||