Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

FlexDeploy plugins are implemented in Java and are installed on the FlexDeploy server for use within workflows.  These plugins are automatically distributed to the endpoints where they are defined to execute.  A plugin consists of four components:

  • Java Implementation (See Plugin SDK API documentation)
  • XML metadata describing its operations, properties, and other behavior
  • Setup scripts (optional) to initialize the environment prior to execution
  • Required 4.5.0 .3 FlexDeploy libraries (download here)

Reference Example 

A fully functional plugin example for Apache HTTP Server, including source code, is provided for reference throughout this documentation.  This plugin provides four operations

...

Code Block
languagejava
themeEclipse
firstline1
titleApache HTTP Server - AbstractPluginProvider implementation - build operation
linenumberstrue
public class Build
  extends AbstractPluginProvider
{
  private static final String CLZ_NAM = Build.class.getName();
  private static final FlexLogger LOG = FlexLogger.getLogger(CLZ_NAM);

  public Build()
  {
    super();
  }

  @Override
  public PluginResultvoid executevalidate()
    throws FlexCheckedException
  {
    //TODO
  }

  @Override
  public voidPluginResult validateexecute()
    throws FlexCheckedException
  {
    //TODO
  }

   @Override
  public void cleanup()
  {
    //TODO
  }
}

...

After you have finished developing and unit testing your plugin, you are ready to package it up into a JAR file in preparation for loading onto a FlexDeploy server.

To do that, cd to the folder that contains the files, and execute the following command: jar cvfM0 plugin.jar *

This will make "plugin.jar" which will contain the files and folders around it.

 The JAR file has the following structure:

...