PluS XML format

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(New page: This is the current format of an XML plugin description for PluS. So far, the description has not altered since finishing the first prototype design. However, for future versions it may ch...)
 
Line 30: Line 30:
 
<dt>extender<dd>The class which is extending an extension point
 
<dt>extender<dd>The class which is extending an extension point
 
</dl>
 
</dl>
 +
 +
== Further Notes ==
 +
 +
Minimally, the plugin ID, library, and entry point are required.
 +
 +
ID is a unique identifier for this plugin. For the purposes of the design study, this is not an issue. In practice, a system will need to be set in place to deal with conflicts of namespace, or regulation of namespace.
 +
 +
Prerequisites are the dependencies a plugin relies on. In time, that will probably switch to just calling them dependencies.
 +
 +
Plugins can extend other plugins through the extension points, and extensions which attach at those points. Extension points will need to implement an ExtensionPoint interface. PluS itself doesn't need to deal with exactly how extension occurs. It can simply call the addExtension() method of the extension point. All compatibility checking can be done by the individual extension point. Guidelines will be put in place, so the system is standardised.
 +
 +
Extension points can optionally be given an ID. This must be unique within the extension points of the particular plugin. The default ID is to use the fully qualified class name of the extension point. Either name can be used to register extensions to this point.

Revision as of 10:30, 3 October 2009

This is the current format of an XML plugin description for PluS. So far, the description has not altered since finishing the first prototype design. However, for future versions it may change.

DTD

<!ELEMENT plugin (library, entrypoint, prerequisites?, extensions?, extensionpoints?)>
<!ATTLIST plugin ID CDATA #REQUIRED
				vendor CDATA #IMPLIED>

<!ELEMENT library (#PCDATA)>
<!ELEMENT entrypoint (#PCDATA)>
<!ELEMENT prerequisites (prerequisite*)>
<!ELEMENT prerequisite (#PCDATA)>
<!ELEMENT extensions (extension*)>
<!ELEMENT extension (extensionpoint, extender)>
<!ATTLIST extension hostID CDATA #REQUIRED>
<!ELEMENT extensionpoints (extensionpoint*)>
<!ELEMENT extensionpoint (#PCDATA)>
<!ATTLIST extensionpoint ID CDATA #IMPLIED>
<!ELEMENT extender (#PCDATA)>

Textual Description of Elements

plugin
The root element of a plugin description
ID
The ID of this plugin
vendor
The creator of the plugin
library
The jar file containing the classes for this plugin
entrypoint
The entry point of the plugin, the class which needs to be instantiated to run the plugin
prerequisites
Dependencies. Other plugins which this plugin relies on
extensions
A list of extensions this plugin provides
extension
An extension to an existing plugin which this plugin provides
hostID
The ID of the plugin which this is extending
extensionpoint
The class from which a plugin may be extended, or the class (or ID of extension point) which is being extended
ID
An ID for this extension point
extender
The class which is extending an extension point

Further Notes

Minimally, the plugin ID, library, and entry point are required.

ID is a unique identifier for this plugin. For the purposes of the design study, this is not an issue. In practice, a system will need to be set in place to deal with conflicts of namespace, or regulation of namespace.

Prerequisites are the dependencies a plugin relies on. In time, that will probably switch to just calling them dependencies.

Plugins can extend other plugins through the extension points, and extensions which attach at those points. Extension points will need to implement an ExtensionPoint interface. PluS itself doesn't need to deal with exactly how extension occurs. It can simply call the addExtension() method of the extension point. All compatibility checking can be done by the individual extension point. Guidelines will be put in place, so the system is standardised.

Extension points can optionally be given an ID. This must be unique within the extension points of the particular plugin. The default ID is to use the fully qualified class name of the extension point. Either name can be used to register extensions to this point.

Personal tools