Interface ContributionPersistenceManager

    • Method Detail

      • getContributions

        List<Contribution> getContributions()
        Gets a list with all persisted contributions.
      • getContribution

        Contribution getContribution​(String name)
        Gets a contribution given its name.
      • removeContribution

        boolean removeContribution​(Contribution contrib)
        Removes a persisted contribution given its name. The contribution will not be uninstalled before being removed. You need to explicitly call uninstallContribution(Contribution) to uninstall it.
        Returns:
        true if the contribution was removed, false if the contribution was not found in persistence.
      • installContribution

        boolean installContribution​(Contribution contrib)
        Installs the contribution given its name. Return true if contribution install succeeds, false if the contribution is already installed.

        To be able to install a contribution you need to persist it first.

      • uninstallContribution

        boolean uninstallContribution​(Contribution contrib)
        Uninstalls a contribution given is name. If not already installed return false otherwise return true. The contribution persisted state is not modified by this operation.
      • updateContribution

        Contribution updateContribution​(Contribution contribution)
        Updates in the storage the given contribution modifications.

        A contribution cannot be renamed. The only permitted modifications are changing the description and the auto start status.

        Return back the contribution object.

      • isInstalled

        boolean isInstalled​(Contribution contrib)
        Checks whether a contribution is currently installed.
      • isPersisted

        boolean isPersisted​(Contribution contrib)
        Checks whether a contribution is currently persisted.
      • start

        void start()
        Starts the service. This will install all persisted contributions that are marked as auto-install. See Contribution.isDisabled()
      • stop

        void stop()
        Stops the service. This will uninstall all installed contributions.