Plugin Overview
Platypus is divided into a core processor and plugins.
- The core processor reads an input file and generates a linked list of tokens plus a global document data (GDD.java) structure that contains important metadata and state data.
- The output plugin is selectedbased on the output format chosen by the user. This plugin is loaded by Platypus; and the tokens and GDD are passed to it. It then performs its outputmagic. When done, the returns control to Platypus, which does any post-document processing and closes down.
Output plugins are Java JAR files. They are located by convention in the PLATYPUS_HOME\plugins directory. The file PLATYPUS_HOME\config\Config.properties links a plugin JAR to a particular output format. This file also enables a plugin to specify certain aspects of how Platypus parses input files (for example, whether comments should be passed to the plugin).
What Platypus Expects From The Plugin
- Use of the Pluggable interface: – TK –
- Ability to handle all types of Tokens. These are: – TK –
- Exception autonomy: Platypus does not know about errors that occurred in the plugin. All exceptions should be caught by the plugin itself. This is important because plugin errors are transformed by the class loader and will be impenetrable to both the user and, in most cases, to the developer.
Highly Recommended Practices
- All unsupported commands generate a warning: – TK –
- Must support the
[dump:command in some form – TK – - Milestone events should be logged. For a sample of the kinds of milestones, create a PDF file and specify
-verboseon the command line.
Labels: