Languages

The application provides an plugin interface. Plugins are shipped as an zipped file usually named like the java package name + the version (e.g. de.jcon.jproject.reports.timerecord_0.0.1.zip ).

You have to provide a main plugin class which implements the de.jcon.jproject.plugin.JProjectPlugin interface. Check the Java Doc of this class for additional information.

Your plugin class together with all depended classes have to be packed in an standard JAR file. This file and the plugin deployment descriptor needs to be packed together in the above mentioned ZIP archive.

Your plugin archive structure should therefore look like this example:

[de.jcon.jproject.reports.timerecord_0.0.1.zip]             // zip archive
   |
   -- [de.jcon.jproject.reports.timerecord_0.0.1]           // directory
         |
         -- [de.jcon.jproject.reports.timerecord_0.0.1.jar] // jar file
               |
               -- ...                                       // plugin class structure
               -- [jProjectPlugin.xml]                      // deployment descriptor
               -- [pluginsrc.zip]                           // optional sources

The deployment descriptor should look like:

<plugin>
   <!-- Name of the plugin -->
   <name>Project Time Report</name>
   <!-- Plugin class -->
   <class>de.jcon.jproject.reports.timerecord.ProjectTimeReport</class>
</plugin>

The Plugin Manager will install the plugins once use start the application automatically. The initialize() method is called during startup. Any initialization needed should be placed there.

The report plugin provides a way to add additional reports automatically to the system. In addition to the standard plugin needs, a report plugin consists of following items (the same example as above is used):

ProjectTimeReport class

The report class. You need to extend the de.jcon.jproject.reports.Report.

ProjectTimeReport XML Jasper Report File

This is the Jasper Report file. This file needs to get compiled that it can be used with in the system. This is needed only once and can be achieved by the compile link within the application.

[Note] Note

If you changed a report xml file or a report has been new installed, you need to compile this report. You need to have the compile permission to be able to compile reports (e.g. travel.compile.report, timeRec.compile.report, ...).

ProjectTimeReport_XX properties

Language property files to support internationalization. This properties should be used (although the are not mandatory).

ProjectTimeReportDataSource class

If you need an own DataSource (this is not an standard Java DataSource but an Jasper Report class!) to access your data, you can ship this with your report.

report.xml

Report deployment descriptor.

<report>
	<name>ProjectTimeReport</name>
	<description>Standard Time Record Report</description>
	<!-- e.g. invoice, travel, timeRecord, person, company, ... -->
	<category>timeRecord</category>
	<datasource>de.jcon.jproject.reports.timerecord.ProjectTimeReportDataSource</datasource>
	<file>ProjectTimeReport.xml</file>
	<!-- e.g.  category.'report'.name -->
	<permission>timeRecord.report.projectTimeReport</permission>
</report>

You just need to copy your plugin ZIP archive to the plugin folder defined in your Section 3.1, “Project property file [jproject.properties]” file (Property: property.plugin.dir). The plugin gets automatically installed during the next server start.

[Note] Note

At the moment you still need to "compile" the report provided by the report plugin manually via the application feature itself.