PluginInstallEngine (Grails 2.4.4)
Date: 2014-10-28

Package: org.codehaus.groovy.grails.resolve

## [Groovy] Class PluginInstallEngine

- org.codehaus.groovy.grails.resolve.PluginInstallEngine

- Manages the installation and uninstallation of plugins from a Grails project.

  Authors:
    Graeme Rocher
  Since:
    1.3

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected java.lang.Object` | `ant` |
    `protected java.lang.Object` | `applicationPluginsLocation` |
    `protected Metadata` | `metadata` |
    `protected PluginBuildSettings` | `pluginSettings` |
    `protected PluginResolveEngine` | `resolveEngine` |
    `protected BuildSettings` | `settings` |

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `static java.util.List` | `CORE_PLUGINS`
    `groovy.lang.Closure` | `errorHandler`
    `groovy.lang.Closure` | `eventHandler`
    `java.util.List` | `installedPlugins` plugins that were installed in the last execution of installPlugin
    `boolean` | `isInteractive`
    `java.lang.Object` | `pluginDirVariableStore`
    `groovy.lang.Closure` | `pluginScriptRunner`
    `groovy.lang.Closure` | `postInstallEvent`
    `groovy.lang.Closure` | `postUninstallEvent`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `PluginInstallEngine (BuildSettings settings, PluginBuildSettings pbs = GrailsPluginUtils.getPluginBuildSettings(settings, Metadata md = Metadata.getCurrent(, groovy.util.AntBuilder ant = new AntBuilder()`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `protected void` | `assertNoExistingInlinePlugin(java.lang.String name)`
    `protected boolean` | `checkExistingPluginInstall(java.lang.String name, java.lang.Object version, java.io.File pluginZip, boolean isResolve = true)` Checks an existing plugin path to install and returns true if the installation should be aborted or false if it should continue
    `void` | `checkPluginsToUninstall()`
    `void` | `checkPluginsToUninstall(java.util.List<java.io.File> pluginZips)`
    `boolean` | `installPlugin(java.lang.String name, java.lang.String version = null)` Installs a plugin for the given name and optional version.
    `boolean` | `installPlugin(java.io.File zipFile, boolean overwrite = false)` Installs a plugin from the given ZIP file
    `boolean` | `installPlugin(java.net.URL zipURL)` Installs a plugin from the given URL
    `protected boolean` | `installPluginZipInternal(java.lang.String name, java.lang.String version, java.io.File pluginZip, boolean overwrite = false, boolean isResolve = false)`
    `protected boolean` | `installResolvePlugins(java.util.Collection<java.io.File> pluginZips)`
    `boolean` | `installResolvedPlugin(java.io.File zipFile)` Installs a plugin from the given ZIP file.
    `boolean` | `installedResolvedPlugins()`
    `boolean` | `isNotInlinePluginLocation(java.io.File pluginDir)` Check to see if the plugin directory is in plugins home.
    `protected java.lang.Object` | `postInstall(java.lang.String pluginInstallPath)`
    `protected java.lang.Object` | `postUninstall()`
    `java.util.List` | `readMetadataFromZip(java.lang.String zipLocation)` Reads plugin metadata from a plugin zip file and returns a list containing the plugin name, version and XML metadata.
    `GrailsPluginInfo` | `readPluginInfoFromZip(java.lang.String zipLocation)` Reads plugin info from the zip file location
    `boolean` | `resolveAndInstallDepdendencies()`
    `void` | `uninstallPlugin(java.lang.String name, java.lang.String version = null)` Uninstalls a plugin for the given name and optional version

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### protected java.lang.Object ant

    - #### protected java.lang.Object applicationPluginsLocation

    - #### protected Metadata metadata

    - #### protected PluginBuildSettings pluginSettings

    - #### protected PluginResolveEngine resolveEngine

    - #### protected BuildSettings settings

  - ### Property Detail

    - #### static final java.util.List CORE_PLUGINS

    - #### groovy.lang.Closure errorHandler

    - #### groovy.lang.Closure eventHandler

    - #### java.util.List installedPlugins

      plugins that were installed in the last execution of installPlugin

    - #### boolean isInteractive

    - #### java.lang.Object pluginDirVariableStore

    - #### groovy.lang.Closure pluginScriptRunner

    - #### groovy.lang.Closure postInstallEvent

    - #### groovy.lang.Closure postUninstallEvent

  - ### Constructor Detail

    - #### PluginInstallEngine(BuildSettings settings, PluginBuildSettings pbs = GrailsPluginUtils.getPluginBuildSettings(settings, Metadata md = Metadata.getCurrent(, groovy.util.AntBuilder ant = new AntBuilder()

  - ### Method Detail

    - #### protected void assertNoExistingInlinePlugin(java.lang.String name)

    - #### protected boolean checkExistingPluginInstall(java.lang.String name, java.lang.Object version, java.io.File pluginZip, boolean isResolve = true)

      Checks an existing plugin path to install and returns true if the installation should be aborted or false if it should continue If an error occurs the errorHandler is invoked.

      Parameters:
        `name` - The plugin name
        `version` - The plugin version
      Returns:
        true if the installation should be aborted

    - #### @groovy.transform.CompileStatic void checkPluginsToUninstall()

    - #### @groovy.transform.CompileStatic void checkPluginsToUninstall(java.util.List<java.io.File> pluginZips)

    - #### boolean installPlugin(java.lang.String name, java.lang.String version = null)

      Installs a plugin for the given name and optional version.

      Parameters:
        `name` - The plugin name
        `version` - The plugin version (optional)
      Returns:
        true if installed and not cancelled by user

    - #### boolean installPlugin(java.io.File zipFile, boolean overwrite = false)

      Installs a plugin from the given ZIP file

      Parameters:
        `zipFile` - The plugin zip file

    - #### boolean installPlugin(java.net.URL zipURL)

      Installs a plugin from the given URL

      Parameters:
        `zipURL` - The zip URL

    - #### protected boolean installPluginZipInternal(java.lang.String name, java.lang.String version, java.io.File pluginZip, boolean overwrite = false, boolean isResolve = false)

    - #### @groovy.transform.CompileStatic protected boolean installResolvePlugins(java.util.Collection<java.io.File> pluginZips)

    - #### boolean installResolvedPlugin(java.io.File zipFile)

      Installs a plugin from the given ZIP file. Differs from #installPlugin(zipFile) in that the plugin to be installed is assumed to already be resolved and hence not placed in the users local cache

      Parameters:
        `zipFile` - The plugin zip file

    - #### @groovy.transform.CompileStatic boolean installedResolvedPlugins()

    - #### boolean isNotInlinePluginLocation(java.io.File pluginDir)

      Check to see if the plugin directory is in plugins home.

    - #### protected java.lang.Object postInstall(java.lang.String pluginInstallPath)

    - #### protected java.lang.Object postUninstall()

    - #### java.util.List readMetadataFromZip(java.lang.String zipLocation)

      Reads plugin metadata from a plugin zip file and returns a list containing the plugin name, version and XML metadata. Designed for use with Groovy's multiple assignment operator

      Parameters:
        `zipLocation` - The zip location
      Returns:
        A list

    - #### GrailsPluginInfo readPluginInfoFromZip(java.lang.String zipLocation)

      Reads plugin info from the zip file location

      Parameters:
        `zipLocation` - The zip location
      Returns:

    - #### @groovy.transform.CompileStatic boolean resolveAndInstallDepdendencies()

    - #### void uninstallPlugin(java.lang.String name, java.lang.String version = null)

      Uninstalls a plugin for the given name and optional version

      Parameters:
        `name` - The plugin name
        `version` - The version