Class RemotePluginInstaller


  • public class RemotePluginInstaller
    extends Object
    A utility to install plugins remotely using the IIQ REST API.

    This class can has no external dependencies, so can be isolated.

    Usage: java com.identityworksllc.iiq.common.plugin.RemotePluginInstaller -p /path/to/properties install /path/to/file

    Commands exit with a non-zero exit code when problems occur.

    TODO when we migrate this library to minimum JDK 11, use the JDK HTTP client class

    • Method Detail

      • main

        public static void main​(String[] args)
                         throws Exception
        The main method for this utility.

        Parses the command line arguments, validates them, and optionally prompts the user for a password. Then, executes the command specified if the inputs are valid.

        Parameters:
        args - The arguments to the main method
        Throws:
        Exception - on any failures at all
      • output

        public static void output​(com.identityworksllc.iiq.common.plugin.RemotePluginInstaller.OutputLevel level,
                                  String output,
                                  Object... variables)
      • installPlugin

        public void installPlugin​(Path toUpload)
                           throws IOException
        Installs a plugin remotely using base Java8 classes
        Parameters:
        toUpload - The file to upload as a plugin
        Throws:
        IOException - on any send failures
      • isPluginInstalled

        public boolean isPluginInstalled​(String pluginName)
                                  throws IOException
        Makes a query to the Suggest Service to check whether the plugin is installed.

        The Suggest service is used because the basic plugin query API does not support names or display names, whereas the Suggester can take a filter.

        Parameters:
        pluginName - The plugin name
        Returns:
        The suggest service
        Throws:
        IOException - if any failures occur