Class PluginDeployHelper


  • public class PluginDeployHelper
    extends Object
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • PluginDeployHelper

        public PluginDeployHelper​(Mandant client)
        Creates a new helper for deploying a plugin to formcycle.
        Parameters:
        client - Client scope where to deploy the plugin, null for the system scope.
    • Method Detail

      • delete

        public void delete​(IEntityContext ec,
                           long id)
                    throws IOException
        Deletes a plugin.
        Parameters:
        ec - An entity context for accessing the database.
        id - ID of the plugin to delete.
        Throws:
        IOException - When the plugin could not be deleted.
      • deploy

        public InstalledPlugin deploy​(IEntityContext ec,
                                      String jarFileName,
                                      byte[] jarFileData,
                                      Properties properties)
                               throws Exception
        Deploys a plugin, either installing it or updating it.
        Parameters:
        ec - An entity context for accessing the database.
        jarFileName - Name of the plugin JAR file.
        jarFileData - Binary data of the plugin JAR file.
        properties - Optional properties with the configuration for the plugin to install.
        Returns:
        Info about the installed plugin.
        Throws:
        Exception - When the plugin could not be deployed, such as when the JAR file is invalid.