Class RepositoryAdminImpl

    • Field Detail

      • m_context

        private final org.osgi.framework.BundleContext m_context
      • m_logger

        private final org.apache.felix.utils.log.Logger m_logger
      • m_repoMap

        private java.util.Map m_repoMap
      • m_initialized

        private boolean m_initialized
      • m_nameComparator

        private java.util.Comparator m_nameComparator
      • REPOSITORY_URL_PROP

        public static final java.lang.String REPOSITORY_URL_PROP
        See Also:
        Constant Field Values
      • EXTERN_REPOSITORY_TAG

        public static final java.lang.String EXTERN_REPOSITORY_TAG
        See Also:
        Constant Field Values
    • Constructor Detail

      • RepositoryAdminImpl

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

      • dispose

        public void dispose()
      • addRepository

        public Repository addRepository​(java.lang.String uri)
                                 throws java.lang.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:
        java.lang.Exception
      • addRepository

        public Repository addRepository​(java.net.URL url)
                                 throws java.lang.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:
        java.lang.Exception
      • addRepository

        public RepositoryImpl addRepository​(java.net.URL url,
                                            int hopCount)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • removeRepository

        public boolean removeRepository​(java.lang.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:
      • 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​(java.lang.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
      • initialize

        private void initialize()