Skip to content
Architecture

Custom Java Plugins

3forge supports Java plugins for alternative datasources, authentication, custom objects, and more. There are a few guidelines to follow for extending the platform to suit your needs.

Overview

If you require specific plugins from 3forge, we will assign them to you as zips or .jar files that you can download from the client portal. Otherwise, you are welcome to write your own custom Java plugins.

To see a full list of the types of plugins that 3forge supports and more in-depth guides on how to configure them accordingly, see the end of this document.

General Setup

Plugins that we provide and any that you write should be written in Java and then exported as .jar files. Some setup is required, otherwise the 3forge client will not launch correctly. In both cases, you should be aware of the following requirements:

Requirements

Plugins should:

  • Follow the correct plugin interface from our list
  • Be packaged and then exported as .jar files. We recommend using an IDE like eclipse
  • Be correctly included in the local.properties configuration file. This will vary depending on your specific case
  • Have a universally unique ID
  • Implement and extend classes and methods in 3forge's autocode.jar and out.jar files

Creating and Importing Plugins

  1. Navigate to your client portal and download the assigned plugin .jar files.
  2. In the root directory of your 3forge installation, go to amione/lib and paste the .jar files into there.
  3. In your local.properties file (located in amione/config), add the appropriate configuration line which will be given to you.
  1. Identify which plugin interface you wish to use, e.g: a custom object.

  2. In your chosen Java IDE, e.g: eclipse, create a new package and your Java files.

  3. Each plugin interface will require you to import different methods from 3forge. You will need to include these in your build path using the autocode.jar and out.jar files, which are located in amione/lib.

  4. Add the compiled classes to the classpath. You can do this by saving and exporting your package as a .jar file into the amione/lib directory.

  5. Update your local.properties file with the appropriate properties. For example, for the custom object TestClass:

    ami.web.amiscript.custom.classes=my_package.TestClass
    ami.center.amiscript.custom.classes=my_package.TestClass
    
    You can then use this plugin the next time you run 3forge.

Note

Plugins are initialized during startup. Failure of a plugin to start will cause 3forge to hard fail on startup. The exact reason for failure can be found in the log files.

More detail on each plugin type and their corresponding properties is in the plugin list below.

Plugin List