notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r1289 - in trunk/main: . central/src/docs/transit/parts/strategy lang/component/etc metro/builder/etc/test metro/builder/etc/test/parts metro/builder/src/main/net/dpml/metro/builder planet/http/server transit/core/src/main/net/dpml/lang
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r1289 - in trunk/main: . central/src/docs/transit/parts/strategy lang/component/etc metro/builder/etc/test metro/builder/etc/test/parts metro/builder/src/main/net/dpml/metro/builder planet/http/server transit/core/src/main/net/dpml/lang
- Date: Wed, 29 Mar 2006 07:07:05 +0200
Author: mcconnell
Date: 2006-03-29 07:06:57 +0200 (Wed, 29 Mar 2006)
New Revision: 1289
Modified:
trunk/main/central/src/docs/transit/parts/strategy/index.xml
trunk/main/lang/component/etc/component.xsd
trunk/main/library.xml
trunk/main/metro/builder/etc/test/minimal-component.xml
trunk/main/metro/builder/etc/test/parts/array.xml
trunk/main/metro/builder/etc/test/parts/lookup.xml
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentDecoder.java
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentEncoder.java
trunk/main/planet/http/server/project.xml
trunk/main/transit/core/src/main/net/dpml/lang/Category.java
Log:
normalize the usage of 'type' versus 'class' on component definitions - this
change locks all code down to the usage of 'type' when referencing a
component type
Modified: trunk/main/central/src/docs/transit/parts/strategy/index.xml
===================================================================
--- trunk/main/central/src/docs/transit/parts/strategy/index.xml
2006-03-29 05:05:20 UTC (rev 1288)
+++ trunk/main/central/src/docs/transit/parts/strategy/index.xml
2006-03-29 05:06:57 UTC (rev 1289)
@@ -29,7 +29,7 @@
</section>
- <section name="Example">
+ <section name="Examples">
<p>
The <tt><strategy></tt> element represents an abstract schema
type as
Modified: trunk/main/lang/component/etc/component.xsd
===================================================================
--- trunk/main/lang/component/etc/component.xsd 2006-03-29 05:05:20 UTC (rev
1288)
+++ trunk/main/lang/component/etc/component.xsd 2006-03-29 05:06:57 UTC (rev
1289)
@@ -39,7 +39,7 @@
<element name="parts" type="this:parts" minOccurs="0"
maxOccurs="1"/>
</sequence>
<attribute name="name" type="string"/>
- <attribute name="class" type="string" use="required"/>
+ <attribute name="type" type="string" use="required"/>
<attribute name="lifestyle" type="this:lifestyle"/>
<attribute name="collection" type="this:collection"/>
<attribute name="activation" type="this:activation"/>
Modified: trunk/main/library.xml
===================================================================
--- trunk/main/library.xml 2006-03-29 05:05:20 UTC (rev 1288)
+++ trunk/main/library.xml 2006-03-29 05:06:57 UTC (rev 1289)
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<library xmlns="artifact:xsd:dpml/lang/dpml-module#1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:part="artifact:xsd:dpml/lang/dpml-part#1.0">
<imports>
Modified: trunk/main/metro/builder/etc/test/minimal-component.xml
===================================================================
--- trunk/main/metro/builder/etc/test/minimal-component.xml 2006-03-29
05:05:20 UTC (rev 1288)
+++ trunk/main/metro/builder/etc/test/minimal-component.xml 2006-03-29
05:06:57 UTC (rev 1289)
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<component xmlns="@COMPONENT-XSD-URI@" name="widget" class="acme.Widget"/>
+<component xmlns="@COMPONENT-XSD-URI@" name="widget" type="acme.Widget"/>
Modified: trunk/main/metro/builder/etc/test/parts/array.xml
===================================================================
--- trunk/main/metro/builder/etc/test/parts/array.xml 2006-03-29 05:05:20
UTC (rev 1288)
+++ trunk/main/metro/builder/etc/test/parts/array.xml 2006-03-29 05:06:57
UTC (rev 1289)
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<component xmlns="@COMPONENT-XSD-URI@"
- class="net.dpml.test.array.ArrayTestComponent"
+ type="net.dpml.test.array.ArrayTestComponent"
name="array"
lifestyle="thread"
collection="system"
Modified: trunk/main/metro/builder/etc/test/parts/lookup.xml
===================================================================
--- trunk/main/metro/builder/etc/test/parts/lookup.xml 2006-03-29 05:05:20
UTC (rev 1288)
+++ trunk/main/metro/builder/etc/test/parts/lookup.xml 2006-03-29 05:06:57
UTC (rev 1289)
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<component xmlns="@COMPONENT-XSD-URI@"
- class="net.dpml.test.array.ArrayTestComponent">
+ type="net.dpml.test.array.ArrayTestComponent">
<context>
<entry key="test" lookup="acme.Widget"/>
</context>
Modified:
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentDecoder.java
===================================================================
---
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentDecoder.java
2006-03-29 05:05:20 UTC (rev 1288)
+++
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentDecoder.java
2006-03-29 05:06:57 UTC (rev 1289)
@@ -123,7 +123,7 @@
private String buildComponentClassname( Element element ) throws
DecodingException
{
- String classname = ElementHelper.getAttribute( element, "class" );
+ String classname = ElementHelper.getAttribute( element, "type" );
if( null == classname )
{
final String error =
Modified:
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentEncoder.java
===================================================================
---
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentEncoder.java
2006-03-29 05:05:20 UTC (rev 1288)
+++
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentEncoder.java
2006-03-29 05:06:57 UTC (rev 1289)
@@ -158,7 +158,7 @@
Writer writer, ComponentDirective directive, String pad ) throws
IOException
{
String classname = directive.getClassname();
- writer.write( " class=\"" + classname + "\"" );
+ writer.write( " type=\"" + classname + "\"" );
String name = directive.getName();
if( null != name )
{
Modified: trunk/main/planet/http/server/project.xml
===================================================================
--- trunk/main/planet/http/server/project.xml 2006-03-29 05:05:20 UTC (rev
1288)
+++ trunk/main/planet/http/server/project.xml 2006-03-29 05:06:57 UTC (rev
1289)
@@ -3,13 +3,13 @@
<types>
<component xmlns="artifact:xsd:dpml/lang/dpml-component#1.0"
- class="net.dpml.http.Server"
+ type="net.dpml.http.Server"
alias="true">
<parts>
<!--
Add a select channel connector to 8080.
-->
- <component key="plain" class="net.dpml.http.SelectChannelConnector">
+ <component key="plain" type="net.dpml.http.SelectChannelConnector">
<context>
<entry key="port" value="8080"/>
<entry key="maxIdleTime" value="50000"/>
@@ -19,7 +19,7 @@
<!--
Add a SSL connector to 8443.
-->
- <component key="ssl" class="net.dpml.http.SslSocketConnector">
+ <component key="ssl" type="net.dpml.http.SslSocketConnector">
<context>
<entry key="port" value="8443"/>
<entry key="maxIdleTime" value="30000"/>
@@ -31,7 +31,7 @@
<!--
Add a user realm.
-->
- <component key="realm" class="net.dpml.http.HashUserRealm">
+ <component key="realm" type="net.dpml.http.HashUserRealm">
<context>
<entry key="name" value="Test Realm"/>
<entry key="URI"
value="local:properties:dpml/planet/http/realm"/>
@@ -40,7 +40,7 @@
<!--
Add a web application.
-->
- <component key="webapp" class="net.dpml.http.WebAppContextHandler">
+ <component key="webapp" type="net.dpml.http.WebAppContextHandler">
<context>
<entry key="contextPath" value="/"/>
<entry key="war"
value="link:war:dpml/planet/http/dpml-http-app"/>
@@ -50,7 +50,7 @@
Creation of a HTTP server configured to present static content in
the ${dpml.share}/docs directory.
-->
- <component key="context"
class="net.dpml.http.ResourceContextHandler">
+ <component key="context" type="net.dpml.http.ResourceContextHandler">
<context>
<entry key="resourceBase" value="${dpml.share}/docs"/>
<entry key="contextPath" value="/docs"/>
@@ -62,7 +62,7 @@
per-component threads - currently limited to classes declared within
the part classloader).
-->
- <component key="servlets"
class="net.dpml.http.ServletContextHandler">
+ <component key="servlets" type="net.dpml.http.ServletContextHandler">
<context>
<entry key="resourceBase" value="${dpml.data}"/>
<entry key="contextPath" value="/data"/>
Modified: trunk/main/transit/core/src/main/net/dpml/lang/Category.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/lang/Category.java
2006-03-29 05:05:20 UTC (rev 1288)
+++ trunk/main/transit/core/src/main/net/dpml/lang/Category.java
2006-03-29 05:06:57 UTC (rev 1289)
@@ -48,10 +48,22 @@
public static final Category PRIVATE = new Category( "private", 3 );
/**
+ * Implied category.
+ */
+ public static final Category IMPLICIT = new Category( "implicit", 3 );
+
+ /**
* Array of scope enumeration values.
*/
private static final Category[] ENUM_VALUES =
- new Category[]{SYSTEM, PUBLIC, PROTECTED, PRIVATE};
+ new Category[]
+ {
+ SYSTEM,
+ PUBLIC,
+ PROTECTED,
+ PRIVATE,
+ IMPLICIT
+ };
/**
* Returns an array of activation enum values.
@@ -106,6 +118,10 @@
{
return PRIVATE;
}
+ else if( value.equalsIgnoreCase( "implicit" ) )
+ {
+ return IMPLICIT;
+ }
else
{
final String error =
- r1289 - in trunk/main: . central/src/docs/transit/parts/strategy lang/component/etc metro/builder/etc/test metro/builder/etc/test/parts metro/builder/src/main/net/dpml/metro/builder planet/http/server transit/core/src/main/net/dpml/lang, mcconnell at BerliOS, 03/29/2006
Archive powered by MHonArc 2.6.24.