|
Knopflerfish OSGi 5.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.
| 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.SortedSet<RepositoryInfo> |
getAllRepositories()
Get all repositories available. |
java.util.SortedSet<RepositoryInfo> |
getRepositories()
Get all enabled repositories. |
boolean |
isEnabled(RepositoryInfo ri)
Check if repository is enabled. |
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
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.
|
Knopflerfish OSGi 5.0.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||