RepositoryAdmin
public class RepositoryAdminImpl extends Object implements RepositoryAdmin
Modifier and Type | Field | Description |
---|---|---|
static String |
EXTERN_REPOSITORY_TAG |
|
static String |
REPOSITORY_URL_PROP |
Constructor | Description |
---|---|
RepositoryAdminImpl(org.osgi.framework.BundleContext context,
org.apache.felix.utils.log.Logger logger) |
Modifier and Type | Method | Description |
---|---|---|
Repository |
addRepository(String uri) |
Add a new repository to the federation.
|
Repository |
addRepository(URL url) |
Add a new repository to the federation.
|
RepositoryImpl |
addRepository(URL url,
int hopCount) |
|
Resource[] |
discoverResources(String filterExpr) |
Discover any resources that match the given filter.
|
Resource[] |
discoverResources(Requirement[] requirements) |
Discover any resources that match the given requirements.
|
void |
dispose() |
|
DataModelHelper |
getHelper() |
Return a helper to perform various operations on the data model
|
Repository |
getLocalRepository() |
Return the repository containing locally installed resources
|
Repository |
getSystemRepository() |
Return the repository containing the system bundle
|
Repository[] |
listRepositories() |
List all the repositories.
|
boolean |
removeRepository(String uri) |
Remove a repository from the federation
The url must point to a repository XML file.
|
Resolver |
resolver() |
Create a resolver.
|
Resolver |
resolver(Repository[] repositories) |
Create a resolver on the given repositories.
|
public static final String REPOSITORY_URL_PROP
public static final String EXTERN_REPOSITORY_TAG
public RepositoryAdminImpl(org.osgi.framework.BundleContext context, org.apache.felix.utils.log.Logger logger)
public DataModelHelper getHelper()
RepositoryAdmin
getHelper
in interface RepositoryAdmin
public Repository getLocalRepository()
RepositoryAdmin
getLocalRepository
in interface RepositoryAdmin
public Repository getSystemRepository()
RepositoryAdmin
getSystemRepository
in interface RepositoryAdmin
public void dispose()
public Repository addRepository(String uri) throws Exception
RepositoryAdmin
addRepository
in interface RepositoryAdmin
Exception
public Repository addRepository(URL url) throws Exception
RepositoryAdmin
addRepository
in interface RepositoryAdmin
Exception
public RepositoryImpl addRepository(URL url, int hopCount) throws Exception
Exception
public boolean removeRepository(String uri)
RepositoryAdmin
removeRepository
in interface RepositoryAdmin
public Repository[] listRepositories()
RepositoryAdmin
listRepositories
in interface RepositoryAdmin
public Resolver resolver()
RepositoryAdmin
resolver
in interface RepositoryAdmin
public Resolver resolver(Repository[] repositories)
RepositoryAdmin
resolver
in interface RepositoryAdmin
repositories
- the list of repositories to use for the resolutionpublic Resource[] discoverResources(String filterExpr) throws org.osgi.framework.InvalidSyntaxException
RepositoryAdmin
discoverResources
in interface RepositoryAdmin
filterExpr
- A standard OSGi filterorg.osgi.framework.InvalidSyntaxException
public Resource[] discoverResources(Requirement[] requirements)
RepositoryAdmin
discoverResources
in interface RepositoryAdmin
Copyright © 2018. All rights reserved.