LibreOffice Module xmerge (master) 1
|
Provides an interface for plug-in registration. More...
Classes | |
class | ConverterInfo |
Class for storing the information about a converter plug-in. More... | |
class | ConverterInfoMgr |
Manages the converter plug-ins that are currently active. More... | |
class | ConverterInfoReader |
The ConverterInfoReader pulls a META-INF/converter.xml file out of a jar file and parses it, providing access to this information in a Vector of ConverterInfo objects. More... | |
class | RegistryException |
This Exception is thrown by converter registry algorithms. More... | |
Provides an interface for plug-in registration.
Each plug-in must have a corresponding Plug-in Configuration XML File which is named converter.xml. If the plug-in is stored in a jarfile, this converter.xml file is typically stored in the following location in the jarfile:
META-INF/converter.xml
The Plug-in Configuration XML File must validate against the converter.dtd file provided with this package. Since a jarfile can contain multiple plug-ins, this DTD supports specifying multiple plug-ins per jarfile. Please refer to the SDK document for more information about how to implement a Plug-in Configuration XML File for a specific plug-in.
All information in the Plug-in Configuration XML File is bundled into one or more ConverterInfo
object. The ConverterInfoReader
object is used to build a Vector
of ConverterInfo
objects from a jarfile.
The ConverterInfoMgr
manages the registry of ConverterInfo
. It is a singleton class, so that only one registry manager will ever exist. It is the client program's responsibility to register ConverterInfo
objects that correspond to the plug-ins that are to be used.
ConverterInfo
object could contain org.w3c.dom.Document
fragments that are accessed in a generic fashion rather than get/set methods for each item in the DTD. This would provide a more flexible approach, especially for adding custom tags to a specific Plug-in Configuration XML file (tags that are only used by its associated plug-in). ConverterInfo
should allow the merge/serialize/deserialize logic to be included in separate plug-ins, if desired. ConverterInfoMgr
could use the Java Activation Framework (JAF) to manage registration.