Interface PackageOperation

    • Method Detail

      • getPackage

        @NonNull
        RepoPackage getPackage()
        The package (local or remote) that's being affected.
      • getLocation

        @NonNull
        java.nio.file.Path getLocation​(@NonNull
                                       ProgressIndicator progress)
        The filesystem path affected by this operation.
      • prepare

        boolean prepare​(@NonNull
                        ProgressIndicator progress)
        Perform any preparatory work that can be done in the background prior to (un)installing a package.
        Returns:
        true if the preparation was successful, false otherwise.
      • complete

        boolean complete​(@NonNull
                         ProgressIndicator progress)
        Install/Uninstall the package.
        Parameters:
        progress - A ProgressIndicator.
        Returns:
        true if the install/uninstall was successful, false otherwise.
      • getRepoManager

        @NonNull
        RepoManager getRepoManager()
        Gets the RepoManager for which we're installing/uninstalling a package.
      • getName

        @NonNull
        java.lang.String getName()
        Gets the name of this operation, suitable for using in user-facing messages. e.g. "Install Foo" or "Uninstall Bar".
      • getFallbackOperation

        @Nullable
        PackageOperation getFallbackOperation()
        If this operation fails, it might be possible to try the install a different way. Specifically, if we have a fallback factory, this could be an operation created by that factory.