From 6a213e2b45299c766d0a451f47f507b7c67d0ec3 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Thu, 6 Nov 2008 05:42:43 +0000 Subject: [PATCH] * added first draft of documentation for metadata module git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@3259 5a64d73e-33d6-4ccc-9058-23f8668ecac9 --- hera-metadata/src/doc/metadata.xml | 54 ++++++++++++++++++++++++++++-- src/doc/hera-reference.xml | 21 +++++++++--- 2 files changed, 68 insertions(+), 7 deletions(-) diff --git a/hera-metadata/src/doc/metadata.xml b/hera-metadata/src/doc/metadata.xml index 57451c0..2c4fea1 100644 --- a/hera-metadata/src/doc/metadata.xml +++ b/hera-metadata/src/doc/metadata.xml @@ -1,6 +1,54 @@ - + Metadata - TODO - \ No newline at end of file + For plugin architectures it is essential to capture metadata + information about plugin instances. A very core set of metadata (name, + version) also serves as identifier of a plugin and thus can be used. The + Hera metadata module provides support to capture metadata. + +
+ Core concepts + + The metadata module actually builds around two core interfaces, + PluginMetadata and + MetadataProvider: + + + Core concepts + + public interface PluginMetadata { + + String getName(); + + String getVersion(); +} + + +public interface MetadataProvider { + + PluginMetadata getMetadata(); +} + + + The PluginMetadata interface captures + the required properties to define an identifyable plugin. This means, that + implementations should ensure uniqueness through these two properties. + With SimplePluginMetadata Hera provides a Java bean + style class to capture metadata. Of course applications can and should + provide extended metadata information according to their needs. The very + narrow interface is only targeted at integrating the metadata concept with + the PluginRegistry (see ) without bothering developers with too + much information required. + + The MetadataProvider interface is to be used in application plugin + interfaces to indicate that they can provide metadata. To ease plugin + implementation we provide AbstractMetadataBasedPlugin that uses the + internal metadata to implement supports(..) method of Plugin. Extending + this base class plugins with metadata as selection criteria can easily be + build. This way you could store the metadata in user specific + configuration files and use this to select a distinct plugin specific to a + given user. +
+
diff --git a/src/doc/hera-reference.xml b/src/doc/hera-reference.xml index 2218341..6fa16f2 100644 --- a/src/doc/hera-reference.xml +++ b/src/doc/hera-reference.xml @@ -1,7 +1,7 @@ - - + + ]> @@ -49,7 +49,19 @@ Gierke - Initial draft + Initial draft + + + + 05.11.2008 + + + Oliver + + Gierke + + + Added metadata module documentation @@ -127,6 +139,7 @@ &core; + &metadata;