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.void
dispose()
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.boolean
removeRepository
(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:RepositoryAdmin
Return a helper to perform various operations on the data model- Specified by:
getHelper
in interfaceRepositoryAdmin
- Returns:
-
getLocalRepository
Description copied from interface:RepositoryAdmin
Return the repository containing locally installed resources- Specified by:
getLocalRepository
in interfaceRepositoryAdmin
- Returns:
-
getSystemRepository
Description copied from interface:RepositoryAdmin
Return the repository containing the system bundle- Specified by:
getSystemRepository
in interfaceRepositoryAdmin
- Returns:
-
dispose
public void dispose() -
addRepository
Description copied from interface:RepositoryAdmin
Add a new repository to the federation. The url must point to a repository XML file.- Specified by:
addRepository
in interfaceRepositoryAdmin
- Returns:
- Throws:
Exception
-
addRepository
Description copied from interface:RepositoryAdmin
Add a new repository to the federation. The url must point to a repository XML file.- Specified by:
addRepository
in interfaceRepositoryAdmin
- Returns:
- Throws:
Exception
-
addRepository
- Throws:
Exception
-
removeRepository
Description copied from interface:RepositoryAdmin
Remove a repository from the federation The url must point to a repository XML file.- Specified by:
removeRepository
in interfaceRepositoryAdmin
- Returns:
-
listRepositories
Description copied from interface:RepositoryAdmin
List all the repositories.- Specified by:
listRepositories
in interfaceRepositoryAdmin
- Returns:
-
resolver
Description copied from interface:RepositoryAdmin
Create a resolver.- Specified by:
resolver
in interfaceRepositoryAdmin
- Returns:
-
resolver
Description copied from interface:RepositoryAdmin
Create a resolver on the given repositories.- Specified by:
resolver
in 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:RepositoryAdmin
Discover 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:
discoverResources
in interfaceRepositoryAdmin
- Parameters:
filterExpr
- A standard OSGi filter- Returns:
- List of resources matching the filters.
- Throws:
org.osgi.framework.InvalidSyntaxException
-
discoverResources
Description copied from interface:RepositoryAdmin
Discover any resources that match the given requirements.- Specified by:
discoverResources
in interfaceRepositoryAdmin
- Returns:
- List of resources matching the filter
-