public class RepositoryAdminImpl extends java.lang.Object implements RepositoryAdmin
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EXTERN_REPOSITORY_TAG |
private org.osgi.framework.BundleContext |
m_context |
private DataModelHelper |
m_helper |
private boolean |
m_initialized |
private LocalRepositoryImpl |
m_local |
private org.apache.felix.utils.log.Logger |
m_logger |
private java.util.Comparator |
m_nameComparator |
private java.util.Map |
m_repoMap |
private SystemRepositoryImpl |
m_system |
static java.lang.String |
REPOSITORY_URL_PROP |
| Constructor and Description |
|---|
RepositoryAdminImpl(org.osgi.framework.BundleContext context,
org.apache.felix.utils.log.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
Repository |
addRepository(java.lang.String uri)
Add a new repository to the federation.
|
Repository |
addRepository(java.net.URL url)
Add a new repository to the federation.
|
RepositoryImpl |
addRepository(java.net.URL url,
int hopCount) |
Resource[] |
discoverResources(Requirement[] requirements)
Discover any resources that match the given requirements.
|
Resource[] |
discoverResources(java.lang.String filterExpr)
Discover any resources that match the given filter.
|
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
|
private void |
initialize() |
Repository[] |
listRepositories()
List all the repositories.
|
boolean |
removeRepository(java.lang.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.
|
private final org.osgi.framework.BundleContext m_context
private final org.apache.felix.utils.log.Logger m_logger
private final SystemRepositoryImpl m_system
private final LocalRepositoryImpl m_local
private final DataModelHelper m_helper
private java.util.Map m_repoMap
private boolean m_initialized
private java.util.Comparator m_nameComparator
public static final java.lang.String REPOSITORY_URL_PROP
public static final java.lang.String EXTERN_REPOSITORY_TAG
public RepositoryAdminImpl(org.osgi.framework.BundleContext context,
org.apache.felix.utils.log.Logger logger)
public DataModelHelper getHelper()
RepositoryAdmingetHelper in interface RepositoryAdminpublic Repository getLocalRepository()
RepositoryAdmingetLocalRepository in interface RepositoryAdminpublic Repository getSystemRepository()
RepositoryAdmingetSystemRepository in interface RepositoryAdminpublic void dispose()
public Repository addRepository(java.lang.String uri) throws java.lang.Exception
RepositoryAdminaddRepository in interface RepositoryAdminjava.lang.Exceptionpublic Repository addRepository(java.net.URL url) throws java.lang.Exception
RepositoryAdminaddRepository in interface RepositoryAdminjava.lang.Exceptionpublic RepositoryImpl addRepository(java.net.URL url, int hopCount) throws java.lang.Exception
java.lang.Exceptionpublic boolean removeRepository(java.lang.String uri)
RepositoryAdminremoveRepository in interface RepositoryAdminpublic Repository[] listRepositories()
RepositoryAdminlistRepositories in interface RepositoryAdminpublic Resolver resolver()
RepositoryAdminresolver in interface RepositoryAdminpublic Resolver resolver(Repository[] repositories)
RepositoryAdminresolver in interface RepositoryAdminrepositories - the list of repositories to use for the resolutionpublic Resource[] discoverResources(java.lang.String filterExpr) throws org.osgi.framework.InvalidSyntaxException
RepositoryAdmindiscoverResources in interface RepositoryAdminfilterExpr - A standard OSGi filterorg.osgi.framework.InvalidSyntaxExceptionpublic Resource[] discoverResources(Requirement[] requirements)
RepositoryAdmindiscoverResources in interface RepositoryAdminprivate void initialize()