Class RepositoryAdminImpl
java.lang.Object
org.apache.felix.bundlerepository.impl.RepositoryAdminImpl
- All Implemented Interfaces:
RepositoryAdmin
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRepositoryAdminImpl(org.osgi.framework.BundleContext context, org.apache.felix.utils.log.Logger logger) -
Method Summary
Modifier and TypeMethodDescriptionaddRepository(String uri) Add a new repository to the federation.addRepository(URL url) Add a new repository to the federation.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.voiddispose()Return a helper to perform various operations on the data modelReturn the repository containing locally installed resourcesReturn the repository containing the system bundleList all the repositories.booleanremoveRepository(String uri) Remove a repository from the federation The url must point to a repository XML file.resolver()Create a resolver.resolver(Repository[] repositories) Create a resolver on the given repositories.
-
Field Details
-
REPOSITORY_URL_PROP
- See Also:
-
EXTERN_REPOSITORY_TAG
- See Also:
-
-
Constructor Details
-
RepositoryAdminImpl
public RepositoryAdminImpl(org.osgi.framework.BundleContext context, org.apache.felix.utils.log.Logger logger)
-
-
Method Details
-
getHelper
Description copied from interface:RepositoryAdminReturn a helper to perform various operations on the data model- Specified by:
getHelperin interfaceRepositoryAdmin- Returns:
-
getLocalRepository
Description copied from interface:RepositoryAdminReturn the repository containing locally installed resources- Specified by:
getLocalRepositoryin interfaceRepositoryAdmin- Returns:
-
getSystemRepository
Description copied from interface:RepositoryAdminReturn the repository containing the system bundle- Specified by:
getSystemRepositoryin interfaceRepositoryAdmin- Returns:
-
dispose
public void dispose() -
addRepository
Description copied from interface:RepositoryAdminAdd a new repository to the federation. The url must point to a repository XML file.- Specified by:
addRepositoryin interfaceRepositoryAdmin- Parameters:
uri-- Returns:
- Throws:
Exception
-
addRepository
Description copied from interface:RepositoryAdminAdd a new repository to the federation. The url must point to a repository XML file.- Specified by:
addRepositoryin interfaceRepositoryAdmin- Parameters:
url-- Returns:
- Throws:
Exception
-
addRepository
- Throws:
Exception
-
removeRepository
Description copied from interface:RepositoryAdminRemove a repository from the federation The url must point to a repository XML file.- Specified by:
removeRepositoryin interfaceRepositoryAdmin- Parameters:
uri-- Returns:
-
listRepositories
Description copied from interface:RepositoryAdminList all the repositories.- Specified by:
listRepositoriesin interfaceRepositoryAdmin- Returns:
-
resolver
Description copied from interface:RepositoryAdminCreate a resolver.- Specified by:
resolverin interfaceRepositoryAdmin- Returns:
-
resolver
Description copied from interface:RepositoryAdminCreate a resolver on the given repositories.- Specified by:
resolverin interfaceRepositoryAdmin- Parameters:
repositories- the list of repositories to use for the resolution- Returns:
-
discoverResources
public Resource[] discoverResources(String filterExpr) throws org.osgi.framework.InvalidSyntaxException Description copied from interface:RepositoryAdminDiscover any resources that match the given filter. This is not a detailed search, but a first scan of applicable resources. ### Checking the capabilities of the filters is not possible because that requires a new construct in the filter. The filter expression can assert any of the main headers of the resource. The attributes that can be checked are:- name
- version (uses filter matching rules)
- description
- category
- copyright
- license
- source
- Specified by:
discoverResourcesin interfaceRepositoryAdmin- Parameters:
filterExpr- A standard OSGi filter- Returns:
- List of resources matching the filters.
- Throws:
org.osgi.framework.InvalidSyntaxException
-
discoverResources
Description copied from interface:RepositoryAdminDiscover any resources that match the given requirements.- Specified by:
discoverResourcesin interfaceRepositoryAdmin- Parameters:
requirements-- Returns:
- List of resources matching the filter
-