Class InMemoryRepositoryStorage<T>

    • Constructor Detail

      • InMemoryRepositoryStorage

        public InMemoryRepositoryStorage()
    • Method Detail

      • synchronizeServices

        public List<RepoData> synchronizeServices​(List<RepoData> currentServices)
        Description copied from interface: RepositoryStorage
        Responsible for synchronizing internal state of the storage with currently available services in the repository. This is the "default" set of services which will differ between releases and thus must be kept in sync with the storage.
        Specified by:
        synchronizeServices in interface RepositoryStorage<T>
        Parameters:
        currentServices - set of services that the repository comes with
        Returns:
        complete set of services in the storage
      • loadServices

        public List<RepoData> loadServices​(int start,
                                           int offset)
        Description copied from interface: RepositoryStorage
        Loads available services with pagination.
        Specified by:
        loadServices in interface RepositoryStorage<T>
        Parameters:
        start - start position to get the services from
        offset - number of services to retrieve
        Returns:
        list of found services
      • loadServices

        public List<RepoData> loadServices​(Predicate<RepoData> predicate,
                                           int start,
                                           int offset)
        Description copied from interface: RepositoryStorage
        Loads available services with pagination and filter
        Specified by:
        loadServices in interface RepositoryStorage<T>
        Parameters:
        predicate - filter criteria to load services
        start - start position to get the services from
        offset - number of services to retrieve
        Returns:
        list of found services
      • onAdded

        public void onAdded​(RepoData service)
        Description copied from interface: RepositoryStorage
        Performs processing of newly added service
        Specified by:
        onAdded in interface RepositoryStorage<T>
        Parameters:
        service - service that was added
      • onInstalled

        public void onInstalled​(RepoData service,
                                String target)
        Description copied from interface: RepositoryStorage
        Performs processing of installed service
        Specified by:
        onInstalled in interface RepositoryStorage<T>
        Parameters:
        service - service that was installed
        target - component which the service was installed to
      • onUninstalled

        public void onUninstalled​(RepoData service,
                                  String target)
        Description copied from interface: RepositoryStorage
        Performs processing of uninstalled service
        Specified by:
        onUninstalled in interface RepositoryStorage<T>
        Parameters:
        service - service that was uninstalled
        target - component which the service was uninstalled from
      • enforceId

        protected void enforceId​(RepoData service)
      • storeConfiguration

        public void storeConfiguration​(T configuration)
        Description copied from interface: RepositoryStorage
        Stores repository configuration of custom type
        Specified by:
        storeConfiguration in interface RepositoryStorage<T>
        Parameters:
        configuration - configuration to be stored