hlship 2004/08/06 07:16:42
Modified: framework/src/documentation/content/xdocs/hivemind
FactoryDefaults.xml ServiceModels.xml
ObjectProviders.xml SymbolSources.xml
Translators.xml EagerLoad.xml
LoggingInterceptor.xml
src/documentation/content/xdocs index.xml hivedoc.xml
localization.xml configurations.xml
dependencies.xml interceptors.xml override.xml
Log:
More documentation updates re: removal of SDL.
Revision Changes Path
1.3 +3 -3
jakarta-hivemind/framework/src/documentation/content/xdocs/hivemind/FactoryDefaults.xml
Index: FactoryDefaults.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/framework/src/documentation/content/xdocs/hivemind/FactoryDefaults.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FactoryDefaults.xml 25 Jun 2004 20:20:00 -0000 1.2
+++ FactoryDefaults.xml 6 Aug 2004 14:16:40 -0000 1.3
@@ -35,9 +35,9 @@
is used to set default values for substitution symbols. Contributions look
like:
</p>
-<source>
- default (symbol=... value=...)
-</source>
+<source><![CDATA[
+<default symbol="..." value="..."/>
+]]></source>
<p>
1.3 +1 -1
jakarta-hivemind/framework/src/documentation/content/xdocs/hivemind/ServiceModels.xml
Index: ServiceModels.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/framework/src/documentation/content/xdocs/hivemind/ServiceModels.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ServiceModels.xml 25 Jun 2004 20:20:00 -0000 1.2
+++ ServiceModels.xml 6 Aug 2004 14:16:40 -0000 1.3
@@ -32,7 +32,7 @@
<p>The contribution format defines the name and class for each
service
model:</p>
<source><![CDATA[
- service-model (name=... class=...)]]> </source>
+<service-model name="..." class="..."/>]]> </source>
<p>An instance of the specified class will be instantiated. The
class must
implement the <link
href="&apiroot;/internal/ServiceModelFactory.html">
ServiceModelFactory</link> interface (which creates an
instance of the
1.3 +1 -1
jakarta-hivemind/framework/src/documentation/content/xdocs/hivemind/ObjectProviders.xml
Index: ObjectProviders.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/framework/src/documentation/content/xdocs/hivemind/ObjectProviders.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ObjectProviders.xml 17 Jul 2004 21:32:16 -0000 1.2
+++ ObjectProviders.xml 6 Aug 2004 14:16:40 -0000 1.3
@@ -33,7 +33,7 @@
<p>The contribution format defines the name and class for each
service
model:</p>
<source><![CDATA[
- provider (prefix=... service-id=...)]]> </source>
+<provider prefix="..." service-id="..."/>]]> </source>
<p>Prefixes must be unique.</p>
<p>
1.3 +1 -1
jakarta-hivemind/framework/src/documentation/content/xdocs/hivemind/SymbolSources.xml
Index: SymbolSources.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/framework/src/documentation/content/xdocs/hivemind/SymbolSources.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SymbolSources.xml 25 Jun 2004 20:20:00 -0000 1.2
+++ SymbolSources.xml 6 Aug 2004 14:16:40 -0000 1.3
@@ -31,7 +31,7 @@
values for substitution symbols).</p>
<p>Contributions are of the form:</p>
<source><![CDATA[
- source (name=... before=... after=... class=... service-id=...)
]]></source>
+<source name="..." before="..." after="..." class="..." service-id="..."/>
]]></source>
<p>Sources are ordering based on the <code>name</code>,
<code>before</code>
and <code>after</code> elements. <code>before</code>
and <code>after</code>
may be comma-seperated lists of other sources, may be
the simple value
1.3 +1 -1
jakarta-hivemind/framework/src/documentation/content/xdocs/hivemind/Translators.xml
Index: Translators.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/framework/src/documentation/content/xdocs/hivemind/Translators.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Translators.xml 25 Jun 2004 20:20:00 -0000 1.2
+++ Translators.xml 6 Aug 2004 14:16:41 -0000 1.3
@@ -31,7 +31,7 @@
<p>The contribution format defines the name and class for each
service
model:</p>
<source><![CDATA[
- translator (name=... class=...)]]> </source>
+<translator name="..." class="..."/>]]> </source>
<p>An instance of the specified class will be instantiated. The
class must
implement the <link
href="&apiroot;/schema/Translator.html">Translator</link>
interface. It should have a no-args and/or single
String constructor.</p>
1.3 +1 -1
jakarta-hivemind/framework/src/documentation/content/xdocs/hivemind/EagerLoad.xml
Index: EagerLoad.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/framework/src/documentation/content/xdocs/hivemind/EagerLoad.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- EagerLoad.xml 17 Jun 2004 15:16:10 -0000 1.2
+++ EagerLoad.xml 6 Aug 2004 14:16:41 -0000 1.3
@@ -53,6 +53,6 @@
Registry.</p>
<p>Contributions are as follows:</p>
<source><![CDATA[
- load (service-id=...)]]> </source>
+<load service-id="..."/>]]> </source>
</body>
</document>
1.3 +5 -7
jakarta-hivemind/framework/src/documentation/content/xdocs/hivemind/LoggingInterceptor.xml
Index: LoggingInterceptor.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/framework/src/documentation/content/xdocs/hivemind/LoggingInterceptor.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LoggingInterceptor.xml 25 Jun 2004 20:20:00 -0000 1.2
+++ LoggingInterceptor.xml 6 Aug 2004 14:16:41 -0000 1.3
@@ -35,13 +35,11 @@
service is used to add logging capability to a service, i.e.:
</p>
-<source>
- interceptor (service-id=hivemind.LoggingInterceptor)
- {
- include (method=...)
- exclude (method=...)
- }
-</source>
+<source><![CDATA[
+<interceptor service-id="hivemind.LoggingInterceptor">
+ <include method="..."/>
+ <exclude method="..."/>
+</interceptor>]]></source>
<p>
1.15 +4 -5
jakarta-hivemind/src/documentation/content/xdocs/index.xml
Index: index.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/src/documentation/content/xdocs/index.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- index.xml 28 Jul 2004 19:19:35 -0000 1.14
+++ index.xml 6 Aug 2004 14:16:41 -0000 1.15
@@ -217,11 +217,10 @@
<p>The following descriptor
snippet defines a service, provides a
core service implementation
(using &_create-instance;), and adds
method logging (using
&_interceptor;):</p> <source><![CDATA[
-service-point (id=MyService interface=com.myco.MyServiceInterface)
-{
- create-instance (class=com.myco.impl.MyServiceImpl)
- interceptor (service-id=hivemind.LoggingInterceptor)
-}]]> </source> </td>
+<service-point id="MyService" interface="com.myco.MyServiceInterface">
+ <create-instance class="com.myco.impl.MyServiceImpl"/>
+ <interceptor service-id="hivemind.LoggingInterceptor"/>
+</service-point>]]> </source> </td>
</tr>
<tr>
<td>Reference another service</td>
1.4 +4 -4
jakarta-hivemind/src/documentation/content/xdocs/hivedoc.xml
Index: hivedoc.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/src/documentation/content/xdocs/hivedoc.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- hivedoc.xml 25 Jun 2004 20:20:01 -0000 1.3
+++ hivedoc.xml 6 Aug 2004 14:16:41 -0000 1.4
@@ -41,10 +41,10 @@
</p>
<source><![CDATA[
-module (id=mymodule version="1.0.0")
-{
- "A module for my application with my services, etc."
-}]]>
+<module id="mymodule" version="1.0.0">
+
+ A module for my application with my services, etc.
+</module>]]>
</source>
1.5 +5 -7
jakarta-hivemind/src/documentation/content/xdocs/localization.xml
Index: localization.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/src/documentation/content/xdocs/localization.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- localization.xml 3 Aug 2004 14:02:13 -0000 1.4
+++ localization.xml 6 Aug 2004 14:16:41 -0000 1.5
@@ -39,13 +39,11 @@
elements, you can reference a localized message in an
attribute or element
content simply by prefixing the message key with '%'.
Examples:</p>
<source> <![CDATA[
-contribution (configuration-id=...)
-{
- some-item (message="%message.key")
- {
- "%other.message.key"
- }
-}]]> </source>
+<contribution configuration-id=...>
+ <some-item <message="%message.key">
+ %other.message.key
+ </some-item>
+</contribution>]]> </source>
<p>The two keys (<code>message.key</code> and
<code>other.message.key</code>
) are searched for in the <em>contributing</em>
module's messages.</p>
<p>HiveMind gracefully recovers from undefined messages. If a
message is not
1.7 +25 -33
jakarta-hivemind/src/documentation/content/xdocs/configurations.xml
Index: configurations.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/src/documentation/content/xdocs/configurations.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- configurations.xml 25 Jun 2004 23:27:21 -0000 1.6
+++ configurations.xml 6 Aug 2004 14:16:41 -0000 1.7
@@ -76,26 +76,21 @@
<p>Here's an example from the HiveMind test
suite. The <code>Datum</code>
object has two properties: key and
value.</p>
<source><![CDATA[
-configuration-point (id=Simple)
-{
- schema
- {
- element (name=datum)
- {
- attribute (name=key required=true)
- attribute (name=value required=true)
+<configuration-point id="Simple">
+ <schema>
+ <element name="datum">
+ <attribute name="key" required="true"/>
+ <attriute name="value" required="true"/>
- conversion (class=hivemind.test.config.impl.Datum)
- }
- }
-}
+ <conversion class="hivemind.test.config.impl.Datum"/>
+ </element>
+ </schema>
+</configuration-point>
-contribution (configuration-id=Simple)
-{
- datum (key=key1 value=value1)
- datum (key="another key" value=<<A value with a "quote" in it>>)
-}
-]]></source>
+<contribution configuration-id="Simple">
+ <datum key="key1" value="value1"/>
+ <datum key="key2" value="value2"/>
+</contribution>]]></source>
<p>The &conversion; element creates an instance
of the class, and
initializes its properties from the
attributes of the contributed
element (the <code>datum</code> and its
<code>key</code> and <code>
@@ -121,17 +116,15 @@
deployment descriptor accomplishes this
by defining a schema for one
configuration point, then referencing
it from another:</p>
<source><![CDATA[
-
-schema (id=Defaults)
-{
- element (name=default)
- {
- . . .
- }
-}
+<schema id="Defaults">
+ <element name="default">
+
+ . . .
+
+ </element>
+</schema>
-configuration-point (id=FactoryDefaults schema-id=Defaults)
-]]></source>
+<configuration-point id="FactoryDefaults" schema-id="Defaults"/>]]></source>
<p>Like service points and configuration
points, schemas may be
referenced within a single module using
an unqualified id, or
referenced between modules using a
fully qualified id (that is,
@@ -205,11 +198,10 @@
attributes, and as character data inside XML
elements.</p>
<p>Example:</p>
<source><![CDATA[
-contribution (configuration-id=com.myco.MyConfig)
-{
- value { "dir/foo.txt" }
- value { "${config.dir}/${config.file}" }
-}]]></source>
+<contribution configuration-id="com.myco.MyConfig">
+ <value> dir/foo.txt </value>
+ <value> ${config.dir}/${config.file} </value>
+</contribution>]]></source>
<p>This example contributes two elements to the
<code>com.myco.MyConfig</code>
configuration point. The first contribution is
simply the text <code>
dir/foo.txt</code>. In the second contribution,
the content contains
1.4 +6 -1
jakarta-hivemind/src/documentation/content/xdocs/dependencies.xml
Index: dependencies.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/src/documentation/content/xdocs/dependencies.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dependencies.xml 1 Aug 2004 17:40:37 -0000 1.3
+++ dependencies.xml 6 Aug 2004 14:16:41 -0000 1.4
@@ -86,10 +86,15 @@
</table>
<p>
- In most cases, HiveMind has been built against a "handy" version; in
most cases, you can vary
+ In most cases, HiveMind has been built against a "handy" version; in all
likelyhood you can vary
the exact version of a dependency to suite your existing environment.
Just remember to write
some tests!
</p>
+
+ <note>
+ HiveMind is explicitly designed to be used with JDK 1.3 and above. It
uses no features from JDK 1.4
+ that aren't also available on JDK 1.3.
+ </note>
</body>
</document>
1.5 +11 -13
jakarta-hivemind/src/documentation/content/xdocs/interceptors.xml
Index: interceptors.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/src/documentation/content/xdocs/interceptors.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- interceptors.xml 25 Jun 2004 20:20:01 -0000 1.4
+++ interceptors.xml 6 Aug 2004 14:16:41 -0000 1.5
@@ -137,20 +137,18 @@
<section>
<title>Declaring the Service</title>
<p>To use a service, it is necessary to declare
the service in a module
- deployment descriptor. The
AbstractServiceInterceptorFactory base
- class expects two properties to be set
when the service is
- constructed, <code>serviceId</code> and
<code>factory</code>:</p>
+ deployment descriptor:</p>
<source><![CDATA[
-service-point (id=NullInterceptor
interface=org.apache.hivemind.ServiceInterceptorFactory)
-{
- invoke-factory (service-id=hivemind.BuilderFactory)
- {
- construct (class=com.example.impl.NullInterceptor
service-id-property=serviceId)
- {
- set-service (property=factory service-id=hivemind.ClassFactory)
- }
- }
-}]]></source>
+<service-point id="NullInterceptor"
interface="org.apache.hivemind.ServiceInterceptorFactory">
+ <invoke-factory service-id="hivemind.BuilderFactory">
+ <construct class="com.example.impl.NullInterceptor"/>
+ </invoke-factory>
+</service-point>]]></source>
+
+<note>
+ The BuilderFactory will <em>autowire</em> the implementation's
<code>serviceId</code> and
+ <code>classFactory</code> properties (defined in the
AbstractServiceInterceptorFactory base class).
+</note>
</section>
</section>
<section>
1.3 +62 -87
jakarta-hivemind/src/documentation/content/xdocs/override.xml
Index: override.xml
===================================================================
RCS file:
/home/cvs/jakarta-hivemind/src/documentation/content/xdocs/override.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- override.xml 25 Jun 2004 20:20:01 -0000 1.2
+++ override.xml 6 Aug 2004 14:16:41 -0000 1.3
@@ -47,24 +47,18 @@
<p>To begin, we'll define the two services, and set
Provider as a property
of Consumer:</p>
<source><![CDATA[
-module (id=ex.override version="1.0.0")
-{
- service-point (id=Provider interface=ex.override.Provider)
- {
- create-instance (class=ex.override.impl.ProviderImpl)
- }
-
- service-point (id=Consumer interface=ex.override.Consumer)
- {
- invoke-factory (service-id=hivemind.BuilderFactory)
- {
- construct (class=ex.override.impl.Consumer)
- {
- set-service (property=provider service-id=Provider)
- }
- }
- }
-}]]> </source>
+<module id="ex.override" version="1.0.0">
+ <service-point id="Provider" interface="ex.override.Provider">
+ <create-instance class="ex.override.impl.ProviderImpl"/>
+ </service-point>
+
+ <service-point id="Consumer" interface="ex.override.Consumer">
+ <invoke-factory service-id="hivemind.BuilderFactory">
+ <construct class="ex.override.impl.Consumer">
+ <set-service property="provider" service-id="Provider"/>
+ </invoke-factory>
+ </service-point>
+</module>]]> </source>
</section>
<section>
<title>Step Two: Add some indirection</title>
@@ -72,31 +66,24 @@
Provider, but they are linked together less
explicitly, by using
substitution symbols.</p>
<source><![CDATA[
-module (id=ex.override version="1.0.0")
-{
- service-point (id=Provider interface=ex.override.Provider)
- {
- create-instance (class=ex.override.impl.ProviderImpl)
- }
-
- contribution (configuration-id=hivemind.FactoryDefaults)
- {
- default (symbol=ex.override.Provider value=ex.override.Provider)
- }
-
- service-point (id=Consumer interface=ex.override.consumer)
- {
- invoke-factory (service-id=hivemind.BuilderFactory)
- {
- construct (class=ex.override.impl.Consumer)
- {
- set-service (property=provider service-id=${ex.override.Provider})
- }
- }
- }
-}]]> </source>
- <p>The end result is the same ... the symbol
<code>ex.override.Provider</code>
- evaluates to the service id
<code>ex.override.Provider</code> and the
+<module id="ex.override" version="1.0.0">
+ <service-point id="Provider" interface="ex.override.Provider">
+ <create-instance class="ex.override.impl.ProviderImpl"/>
+ </service-point>
+
+ <contribution configuration-id="hivemind.FactoryDefaults">
+ <default symbol="ex.override.Provider" value="ex.override.Provider"/>
+ </contribution>
+
+ <service-point id="Consumer" interface="ex.override.Consumer">
+ <invoke-factory service-id="hivemind.BuilderFactory">
+ <construct class="ex.override.impl.Consumer">
+ <set-service property="provider"
service-id="${ex.override.Provider}"/>
+ </invoke-factory>
+ </service-point>
+</module> ]]> </source>
+ <p>The indirection is in the form of the symbol
<code>ex.override.Provider</code>,
+ which evaluates to the service id
<code>ex.override.Provider</code> and the
end result is the same as step one. We needed
to use a fully qualified
service id because, ultimately, we don't know
in which modules the
symbol will be referenced.</p>
@@ -107,50 +94,38 @@
For kicks, the OverrideProvider service will
get a reference to the
original Provider service.</p>
<source><![CDATA[
-module (id=ex.override version="1.0.0")
-{
- service-point (id=Provider interface=ex.override.Provider)
- {
- create-instance (class=ex.override.impl.ProviderImpl)
- }
-
- contribution (configuration-id=hivemind.FactoryDefaults)
- {
- default (symbol=ex.override.Provider value=ex.override.Provider)
- }
-
- service-point (id=OverrideProvider interface=ex.override.Provider)
- {
- invoke-factory (service-id=hivemind.BuilderFactory)
- {
- construct (class=ex.override.impl.OverrideProviderImpl)
- {
- set-service (property=defaultProvider service-id=Provider)
- }
- }
- }
-
- // ApplicationDefaults overrides FactoryDefaults
-
- contribution (configuration-id=hivemind.ApplicationDefaults)
- {
- // Must specify the fully qualified service id (the symbol
- // may be evaluated in an unknown context later)
-
- default (symbol=ex.override.Provider value=ex.override.OverrideProvider)
- }
-
- service-point (id=Consumer interface=ex.override.consumer)
- {
- invoke-factory (service-id=hivemind.BuilderFactory)
- {
- construct (class=ex.override.impl.Consumer)
- {
- set-service (property=provider service-id=${ex.override.Provider})
- }
- }
- }
-}]]> </source>
+<module id="ex.override" version="1.0.0">
+ <service-point id="Provider" interface="ex.override.Provider">
+ <create-instance class="ex.override.impl.ProviderImpl"/>
+ </service-point>
+
+ <contribution configuration-id="hivemind.FactoryDefaults">
+ <default symbol="ex.override.Provider" value="ex.override.Provider"/>
+ </contribution>
+
+ <service-point id="OverrideProvider" interface="ex.override.Provider">
+ <invoke-factory service-id="hivemind.BuilderFactory">
+ <construct class="ex.override.impl.OverrideProviderImpl">
+ <set-service property="defaultProvider" service-id="Provider"/>
+ </construct>
+ </invoke-factory>
+ </service-point>
+
+ <!-- ApplicationDefaults overrides FactoryDefaults -->
+
+ <contribution id="hivemind.ApplicationDefaults">
+ <default symbol="ex.override.Provider"
value="ex.override.OverrideProvider"/>
+ </contribution>
+
+ <!-- Consumer unchanged from step 2 -->
+
+ <service-point id="Consumer" interface="ex.override.Consumer">
+ <invoke-factory service-id="hivemind.BuilderFactory">
+ <construct class="ex.override.impl.Consumer">
+ <set-service property="provider"
service-id="${ex.override.Provider}"/>
+ </invoke-factory>
+ </service-point>
+</module> ]]> </source>
<p>The new service, OverrideProvider, gets a reference
to the original
service using its real id. It can't use the
symbol that the Consumer
service uses, because that would end up
pointing it at itself. Again, in
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]