Custom Extensions


In todo4teams, there are numerous ways to configure custom workflows and connections using scripts. A clear separation is always maintained between the core of todo4teams and the extensions. Should you nevertheless need to add custom Java code, you can dynamically integrate it in the form of Java libraries, i.e., files with the .jar extension. To do this, proceed as follows:

1. Configuring Custom Extensions

Create or edit the system property CUSTOM_JARS. This contains a comma-separated list of URLs in Java notation. In our example, the files demo1.jar and demo2.jar are referenced in the file system in the server's /tmp directory:

custom_jars_en.png

2. Loading Custom Extensions

In todo4teams, these files can be added at runtime, i.e., without restarting todo4teams. To do so, you must click the "Reload Custom Jars" button in the Control Center:

reload_custom_jars_en.png

The next time you start todo4teams, the extensions declared in the CUSTOM_JARS system property will be automatically reloaded.

3. Using Custom Extensions

You can now access the custom extensions in your scripts using the getInstanceForClass method of the Helper object. In this example, if the Java class CustomExtension is stored in the demo1.jar file in the com.demo package, then an instance of this class can be created as follows:

var a = helper.getInstanceForClass("com.demo.CustomExtension");