Class RepositoryAdminImpl

java.lang.Object
org.apache.felix.bundlerepository.impl.RepositoryAdminImpl
All Implemented Interfaces:
RepositoryAdmin

public class RepositoryAdminImpl extends Object implements RepositoryAdmin
  • Field Details

  • Constructor Details

    • RepositoryAdminImpl

      public RepositoryAdminImpl(org.osgi.framework.BundleContext context, org.apache.felix.utils.log.Logger logger)
  • Method Details

    • getHelper

      public DataModelHelper getHelper()
      Description copied from interface: RepositoryAdmin
      Return a helper to perform various operations on the data model
      Specified by:
      getHelper in interface RepositoryAdmin
      Returns:
    • getLocalRepository

      public Repository getLocalRepository()
      Description copied from interface: RepositoryAdmin
      Return the repository containing locally installed resources
      Specified by:
      getLocalRepository in interface RepositoryAdmin
      Returns:
    • getSystemRepository

      public Repository getSystemRepository()
      Description copied from interface: RepositoryAdmin
      Return the repository containing the system bundle
      Specified by:
      getSystemRepository in interface RepositoryAdmin
      Returns:
    • dispose

      public void dispose()
    • addRepository

      public Repository addRepository(String uri) throws Exception
      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 interface RepositoryAdmin
      Returns:
      Throws:
      Exception
    • addRepository

      public Repository addRepository(URL url) throws Exception
      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 interface RepositoryAdmin
      Returns:
      Throws:
      Exception
    • addRepository

      public RepositoryImpl addRepository(URL url, int hopCount) throws Exception
      Throws:
      Exception
    • removeRepository

      public boolean removeRepository(String uri)
      Description copied from interface: RepositoryAdmin
      Remove a repository from the federation The url must point to a repository XML file.
      Specified by:
      removeRepository in interface RepositoryAdmin
      Returns:
    • listRepositories

      public Repository[] listRepositories()
      Description copied from interface: RepositoryAdmin
      List all the repositories.
      Specified by:
      listRepositories in interface RepositoryAdmin
      Returns:
    • resolver

      public Resolver resolver()
      Description copied from interface: RepositoryAdmin
      Create a resolver.
      Specified by:
      resolver in interface RepositoryAdmin
      Returns:
    • resolver

      public Resolver resolver(Repository[] repositories)
      Description copied from interface: RepositoryAdmin
      Create a resolver on the given repositories.
      Specified by:
      resolver in interface RepositoryAdmin
      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:
      1. name
      2. version (uses filter matching rules)
      3. description
      4. category
      5. copyright
      6. license
      7. source
      Specified by:
      discoverResources in interface RepositoryAdmin
      Parameters:
      filterExpr - A standard OSGi filter
      Returns:
      List of resources matching the filters.
      Throws:
      org.osgi.framework.InvalidSyntaxException
    • discoverResources

      public Resource[] discoverResources(Requirement[] requirements)
      Description copied from interface: RepositoryAdmin
      Discover any resources that match the given requirements.
      Specified by:
      discoverResources in interface RepositoryAdmin
      Returns:
      List of resources matching the filter