Skip to Content.
Sympa Menu

notify-dpml - r1309 - in trunk/main: depot/build/src/main/net/dpml/library/console depot/library/src/main/net/dpml/library/impl depot/tools/builder/src/main/net/dpml/tools/tasks metro/component/src/main/net/dpml/component metro/content/src/main/net/dpml/metro/content metro/model/src/main/net/dpml/metro metro/model/src/main/net/dpml/metro/data metro/runtime/src/main/net/dpml/metro/runtime metro/test/src/test/net/dpml/test/part metro/tools/src/main/net/dpml/metro/tools planet/http/test/src/test/net/dpml/http/test transit/core/src/main/net/dpml/part

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1309 - in trunk/main: depot/build/src/main/net/dpml/library/console depot/library/src/main/net/dpml/library/impl depot/tools/builder/src/main/net/dpml/tools/tasks metro/component/src/main/net/dpml/component metro/content/src/main/net/dpml/metro/content metro/model/src/main/net/dpml/metro metro/model/src/main/net/dpml/metro/data metro/runtime/src/main/net/dpml/metro/runtime metro/test/src/test/net/dpml/test/part metro/tools/src/main/net/dpml/metro/tools planet/http/test/src/test/net/dpml/http/test transit/core/src/main/net/dpml/part
  • Date: Tue, 4 Apr 2006 20:45:18 +0200

Author: mcconnell
Date: 2006-04-04 20:45:07 +0200 (Tue, 04 Apr 2006)
New Revision: 1309

Modified:
trunk/main/depot/build/src/main/net/dpml/library/console/BuilderPlugin.java

trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultResource.java
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultType.java

trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/GenericTask.java
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PartTask.java
trunk/main/metro/component/src/main/net/dpml/component/Composition.java

trunk/main/metro/content/src/main/net/dpml/metro/content/PartContentHandler.java
trunk/main/metro/model/src/main/net/dpml/metro/ComponentContext.java
trunk/main/metro/model/src/main/net/dpml/metro/data/Composite.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/CompositionController.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComposition.java
trunk/main/metro/test/src/test/net/dpml/test/part/PartLoadingTestCase.java

trunk/main/metro/tools/src/main/net/dpml/metro/tools/ComponentBuilderTask.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/PartDataType.java
trunk/main/planet/http/test/src/test/net/dpml/http/test/ServerTestCase.java
trunk/main/transit/core/src/main/net/dpml/part/Builder.java
trunk/main/transit/core/src/main/net/dpml/part/DecoderFactory.java
trunk/main/transit/core/src/main/net/dpml/part/Part.java
Log:
checkstyle

Modified:
trunk/main/depot/build/src/main/net/dpml/library/console/BuilderPlugin.java
===================================================================
---
trunk/main/depot/build/src/main/net/dpml/library/console/BuilderPlugin.java
2006-04-04 18:02:18 UTC (rev 1308)
+++
trunk/main/depot/build/src/main/net/dpml/library/console/BuilderPlugin.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -30,10 +30,7 @@
import net.dpml.lang.Logger;

import net.dpml.part.Part;
-import net.dpml.part.Plugin;

-import net.dpml.transit.Transit;
-
import net.dpml.library.Module;
import net.dpml.library.Resource;
import net.dpml.library.Builder;

Modified:
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultResource.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultResource.java
2006-04-04 18:02:18 UTC (rev 1308)
+++
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultResource.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -75,6 +75,12 @@
private final Logger m_logger;
private final String m_version;

+ /**
+ * Creation of a new default resource.
+ * @param logger the assigned logging channel
+ * @param library the reference library
+ * @param directive the directive
+ */
DefaultResource( Logger logger, DefaultLibrary library,
AbstractDirective directive )
{
super( null, directive );
@@ -90,6 +96,13 @@
m_version = resolveVersion();
}

+ /**
+ * Creation of a new default resource.
+ * @param logger the assigned logging channel
+ * @param library the reference library
+ * @param module the parent module
+ * @directive the resource directive
+ */
DefaultResource( Logger logger, DefaultLibrary library, DefaultModule
module, ResourceDirective directive )
{
super( module, directive );
@@ -1171,6 +1184,10 @@
}
}

+ /**
+ * Return the logging channel.
+ * @return the logging channel
+ */
protected Logger getLogger()
{
return m_logger;

Modified:
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultType.java
===================================================================
--- trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultType.java
2006-04-04 18:02:18 UTC (rev 1308)
+++ trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultType.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -18,19 +18,12 @@

package net.dpml.library.impl;

-import java.net.URI;
-import java.util.Map;
-import java.util.Hashtable;
-
import net.dpml.library.info.TypeDirective;
import net.dpml.library.Type;

-import net.dpml.part.Decoder;
-import net.dpml.part.DecoderFactory;
import net.dpml.lang.Logger;

import org.w3c.dom.Element;
-import org.w3c.dom.TypeInfo;

/**
* Internal exception throw to indicate a bad name reference.
@@ -76,56 +69,15 @@
return m_directive.getAlias();
}

+ /**
+ * Get the DOM element defining the produced datatype.
+ * @return the DOM element
+ */
public Element getElement()
{
return m_directive.getElement();
}

- /**
- * Get the type specific datastructure.
- * @return the datastructure
- */
- /*
- public Object getData()
- {
- Element element = m_directive.getElement();
- if( null == element )
- {
- return null;
- }
- try
- {
- TypeInfo info = element.getSchemaTypeInfo();
- String namespace = info.getTypeNamespace();
- String builderURI = m_resource.getProperty(
"project.xsd.builder." + namespace );
- Map map = new Hashtable();
- if( null != builderURI )
- {
- try
- {
- map.put( namespace, new URI( builderURI ) );
- }
- catch( Throwable e )
- {
- final String error =
- "Bad builder uri [" + builderURI + "].";
- throw new IllegalStateException( error );
- }
- }
- Logger logger = getLogger();
- DecoderFactory factory = new DecoderFactory( logger, map );
- Decoder decoder = factory.loadDecoder( element );
- return decoder.decode( element );
- }
- catch( Throwable e )
- {
- final String error =
- "Unexpected error while attempting to data.";
- throw new RuntimeException( error, e );
- }
- }
- */
-
Logger getLogger()
{
return m_logger;

Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/GenericTask.java
===================================================================
---
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/GenericTask.java
2006-04-04 18:02:18 UTC (rev 1308)
+++
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/GenericTask.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -30,8 +30,6 @@

import net.dpml.lang.Logger;

-import net.dpml.part.StandardClassLoader;
-
import net.dpml.transit.monitor.LoggingAdapter;

import org.apache.tools.ant.BuildException;

Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PartTask.java
===================================================================
---
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PartTask.java
2006-04-04 18:02:18 UTC (rev 1308)
+++
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PartTask.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -26,7 +26,6 @@
import java.util.ArrayList;
import java.util.List;

-import net.dpml.lang.Logger;
import net.dpml.lang.Classpath;
import net.dpml.lang.Category;

@@ -44,7 +43,6 @@
import org.apache.tools.ant.BuildException;

import net.dpml.transit.Artifact;
-import net.dpml.transit.monitor.LoggingAdapter;

import org.w3c.dom.Element;

@@ -169,8 +167,9 @@
}

/**
- * Build the plugin definition.
- * @exception exception if a build related error occurs
+ * Build the part definition.
+ * @param resource the resource
+ * @return the part
*/
protected Part build( Resource resource )
{
@@ -192,6 +191,12 @@
}
}

+ /**
+ * Construct the info object based on properties declared by the
+ * supplied resource.
+ * @param resource the resource
+ * @return the info descriptor
+ */
protected Info getInfo( Resource resource )
{
Artifact artifact = resource.getArtifact( TYPE );

Modified:
trunk/main/metro/component/src/main/net/dpml/component/Composition.java
===================================================================
--- trunk/main/metro/component/src/main/net/dpml/component/Composition.java
2006-04-04 18:02:18 UTC (rev 1308)
+++ trunk/main/metro/component/src/main/net/dpml/component/Composition.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -19,7 +19,6 @@
package net.dpml.component;

import java.io.IOException;
-import java.io.Writer;
import java.net.URI;

import net.dpml.lang.Classpath;
@@ -40,6 +39,14 @@
private Controller m_controller;
private Model m_model;

+ /**
+ * Creation of a new abstract composition instance.
+ * @param logger the assigned logging channel
+ * @param info the part info descriptor
+ * @param classpath the part classpath definition
+ * @param controller the part controller
+ * @param directive the part deployment strategy directive3
+ */
public Composition( Logger logger, Info info, Classpath classpath,
Controller controller, Directive directive )
throws IOException
{
@@ -49,11 +56,19 @@
m_controller = controller;
}

+ /**
+ * Get the deployment directive.
+ * @return the deployment directive
+ */
public Directive getDirective()
{
return m_directive;
}

+ /**
+ * Get the deployment model.
+ * @return the deployment model
+ */
public Model getModel()
{
if( null == m_model )
@@ -74,6 +89,10 @@
return m_model;
}

+ /**
+ * Create and return a new component using the deplyment model
established by the part.
+ * @return the component
+ */
public Component newComponent()
{
Model model = getModel();

Modified:
trunk/main/metro/content/src/main/net/dpml/metro/content/PartContentHandler.java
===================================================================
---
trunk/main/metro/content/src/main/net/dpml/metro/content/PartContentHandler.java
2006-04-04 18:02:18 UTC (rev 1308)
+++
trunk/main/metro/content/src/main/net/dpml/metro/content/PartContentHandler.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -24,7 +24,6 @@
import java.net.URL;
import java.io.IOException;

-import net.dpml.component.Directive;
import net.dpml.component.Controller;
import net.dpml.component.Model;
import net.dpml.component.Component;

Modified: trunk/main/metro/model/src/main/net/dpml/metro/ComponentContext.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/ComponentContext.java
2006-04-04 18:02:18 UTC (rev 1308)
+++ trunk/main/metro/model/src/main/net/dpml/metro/ComponentContext.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -18,7 +18,6 @@

package net.dpml.metro;

-import java.net.URI;
import java.rmi.RemoteException;

import net.dpml.component.Controller;

Modified: trunk/main/metro/model/src/main/net/dpml/metro/data/Composite.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/data/Composite.java
2006-04-04 18:02:18 UTC (rev 1308)
+++ trunk/main/metro/model/src/main/net/dpml/metro/data/Composite.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -19,7 +19,6 @@
package net.dpml.metro.data;

import java.io.IOException;
-import java.net.URI;

import net.dpml.lang.Logger;
import net.dpml.lang.Classpath;
@@ -38,6 +37,14 @@
{
private final ComponentDirective m_directive;

+ /**
+ * Creation of a new composite instance.
+ * @param logger the assigned logging channel
+ * @param info the info descriptor
+ * @param classpath the classpath descriptor
+ * @param directive the deployment directive
+ * @exception IOException if an I/O error occurs
+ */
public Composite(
Logger logger, Info info, Classpath classpath, ComponentDirective
directive )
throws IOException
@@ -47,6 +54,10 @@
m_directive = directive;
}

+ /**
+ * Get the deplyment directive.
+ * @return the deployment directive
+ */
public ComponentDirective getComponentDirective()
{
return m_directive;

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/CompositionController.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/CompositionController.java
2006-04-04 18:02:18 UTC (rev 1308)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/CompositionController.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -26,18 +26,13 @@
import java.util.EventObject;
import java.util.LinkedList;
import java.util.List;
-import java.util.Map;
-import java.util.Hashtable;

-
import net.dpml.metro.ComponentModel;
import net.dpml.metro.data.ComponentDirective;
-import net.dpml.metro.data.Composite;
import net.dpml.metro.builder.ComponentDecoder;

import net.dpml.component.Controller;
import net.dpml.component.ControlException;
-import net.dpml.component.Directive;
import net.dpml.component.ControllerContext;
import net.dpml.component.ControllerContextListener;
import net.dpml.component.ControllerContextEvent;
@@ -50,16 +45,11 @@
import net.dpml.part.StandardClassLoader;
import net.dpml.part.Info;

-import net.dpml.part.DecoderFactory;
import net.dpml.lang.Category;
import net.dpml.lang.Classpath;
import net.dpml.lang.Logger;
import net.dpml.lang.DefaultLogger;

-import net.dpml.transit.Repository;
-import net.dpml.transit.Transit;
-import net.dpml.transit.monitor.LoggingAdapter;
-
import org.w3c.dom.Element;

/**
@@ -131,6 +121,13 @@
// Builder
//--------------------------------------------------------------------

+ /**
+ * Construct the deployment infomation for a part definition.
+ * @param info the part info definition
+ * @param classpath the part classpath definition
+ * @param strategy the DOM element definining the deplyment streategy
+ * @exception IOException if an I/O error occurs
+ */
public Part build( Info info, Classpath classpath, Element strategy )
throws IOException
{
ClassLoader context = Thread.currentThread().getContextClassLoader();

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
2006-04-04 18:02:18 UTC (rev 1308)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -38,7 +38,6 @@
import net.dpml.metro.info.CollectionPolicy;
import net.dpml.metro.info.Priority;
import net.dpml.metro.data.CategoryDirective;
-import net.dpml.metro.data.ComponentDirective;
import net.dpml.metro.ComponentModel;
import net.dpml.metro.ComponentHandler;
import net.dpml.metro.PartsManager;
@@ -47,7 +46,6 @@
import net.dpml.lang.Logger;

import net.dpml.component.Controller;
-import net.dpml.component.Directive;
import net.dpml.component.ActivationPolicy;
import net.dpml.component.Disposable;
import net.dpml.component.ControlException;
@@ -59,7 +57,6 @@
import net.dpml.component.ModelEvent;

import net.dpml.lang.Version;
-import net.dpml.lang.Classpath;
import net.dpml.lang.UnknownKeyException;

import net.dpml.state.State;

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComposition.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComposition.java
2006-04-04 18:02:18 UTC (rev 1308)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComposition.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -42,6 +42,15 @@
{
private ComponentDirective m_directive;

+ /**
+ * Creation of a new composition diefinition.
+ * @param logger the assigned logging channel
+ * @param info the part info definition
+ * @param classpath the part classpath definition
+ * @param controller the deployment controller
+ * @param directive the deployment directive
+ * @exception IOException if an I/O exception occurs
+ */
public DefaultComposition(
Logger logger, Info info, Classpath classpath, Controller controller,
ComponentDirective directive )
throws IOException
@@ -51,11 +60,21 @@
m_directive = directive;
}

+ /**
+ * Get the deployment directive.
+ * @return the deployment directive
+ */
public ComponentDirective getComponentDirective()
{
return m_directive;
}

+ /**
+ * Encode the deployment directive to XML.
+ * @param writer the output stream writer
+ * @param pad the outoput offset
+ * @exception IOException if an I/O exception occurs
+ */
protected void encodeStrategy( Writer writer, String pad ) throws
IOException
{
ComponentEncoder encoder = new ComponentEncoder();

Modified:
trunk/main/metro/test/src/test/net/dpml/test/part/PartLoadingTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/test/part/PartLoadingTestCase.java
2006-04-04 18:02:18 UTC (rev 1308)
+++
trunk/main/metro/test/src/test/net/dpml/test/part/PartLoadingTestCase.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -24,10 +24,6 @@

import junit.framework.TestCase;

-import net.dpml.component.Directive;
-import net.dpml.component.Controller;
-import net.dpml.component.InitialContext;
-
import net.dpml.part.Part;

import net.dpml.transit.DefaultTransitModel;

Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ComponentBuilderTask.java
===================================================================
---
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ComponentBuilderTask.java
2006-04-04 18:02:18 UTC (rev 1308)
+++
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ComponentBuilderTask.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -290,7 +290,8 @@

/**
* Build the plugin definition.
- * @exception exception if a build related error occurs
+ * @param resource the project resource definition
+ * @return the part definition
*/
protected Part build( Resource resource )
{

Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/PartDataType.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/PartDataType.java
2006-04-04 18:02:18 UTC (rev 1308)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/PartDataType.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -22,15 +22,12 @@
import java.net.URI;
import java.net.URISyntaxException;

+import net.dpml.component.Directive;
+
import net.dpml.metro.info.PartReference;
import net.dpml.metro.info.Type;
import net.dpml.metro.builder.ComponentDecoder;

-import net.dpml.component.Directive;
-import net.dpml.component.DelegationException;
-import net.dpml.component.PartNotFoundException;
-import net.dpml.component.Controller;
-
import org.apache.tools.ant.Task;
import org.apache.tools.ant.BuildException;


Modified:
trunk/main/planet/http/test/src/test/net/dpml/http/test/ServerTestCase.java
===================================================================
---
trunk/main/planet/http/test/src/test/net/dpml/http/test/ServerTestCase.java
2006-04-04 18:02:18 UTC (rev 1308)
+++
trunk/main/planet/http/test/src/test/net/dpml/http/test/ServerTestCase.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -22,7 +22,6 @@

import junit.framework.TestCase;

-import net.dpml.part.Part;
import net.dpml.transit.Transit;

/**

Modified: trunk/main/transit/core/src/main/net/dpml/part/Builder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/Builder.java 2006-04-04
18:02:18 UTC (rev 1308)
+++ trunk/main/transit/core/src/main/net/dpml/part/Builder.java 2006-04-04
18:45:07 UTC (rev 1309)
@@ -32,5 +32,12 @@
*/
public interface Builder
{
- Part build( Info information, Classpath classpath, Element strategy )
throws IOException;
+ /**
+ * Construct a new part.
+ * @param info the part information descriptor
+ * @param classpath the part classpath descriptor
+ * @param element the DOM element definining the deployment strategy
+ * @exception IOException if an I/O error occurs
+ */
+ Part build( Info info, Classpath classpath, Element strategy ) throws
IOException;
}

Modified: trunk/main/transit/core/src/main/net/dpml/part/DecoderFactory.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/DecoderFactory.java
2006-04-04 18:02:18 UTC (rev 1308)
+++ trunk/main/transit/core/src/main/net/dpml/part/DecoderFactory.java
2006-04-04 18:45:07 UTC (rev 1309)
@@ -20,7 +20,6 @@

import java.io.IOException;
import java.net.URI;
-import java.lang.reflect.InvocationTargetException;
import java.util.Map;
import java.util.Hashtable;


Modified: trunk/main/transit/core/src/main/net/dpml/part/Part.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/Part.java 2006-04-04
18:02:18 UTC (rev 1308)
+++ trunk/main/transit/core/src/main/net/dpml/part/Part.java 2006-04-04
18:45:07 UTC (rev 1309)
@@ -25,8 +25,6 @@
import java.net.URI;
import java.net.URL;
import java.net.URLClassLoader;
-import java.rmi.server.UnicastRemoteObject;
-import java.util.ArrayList;

import javax.xml.XMLConstants;

@@ -34,8 +32,6 @@
import net.dpml.lang.Classpath;
import net.dpml.lang.Logger;

-import net.dpml.transit.Artifact;
-
/**
* Part datastructure.
*
@@ -44,9 +40,24 @@
*/
public abstract class Part
{
+ /**
+ * A value encoder.
+ */
protected static final ValueEncoder VALUE_ENCODER = new ValueEncoder();
+
+ /**
+ * Default XML header.
+ */
protected static final String XML_HEADER = "<?xml version=\"1.0\"?>";
+
+ /**
+ * Part schema URN.
+ */
protected static final String PART_SCHEMA_URN = "@PART-XSD-URI@";
+
+ /**
+ * Part header.
+ */
protected static final String PART_HEADER =
"<part xmlns=\""
+ PART_SCHEMA_URN
@@ -54,6 +65,10 @@
+ "\n xmlns:xsi=\""
+ XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI
+ "\">";
+
+ /**
+ * Part footer.
+ */
protected static final String PART_FOOTER = "</part>";

private final Info m_info;
@@ -61,6 +76,12 @@
private final ClassLoader m_classloader;
private final Logger m_logger;

+ /**
+ * Load a part from an external XML source.
+ * @param uri the external part source
+ * @return the resolved part
+ * @exception IOException of an I/O error occurs
+ */
public static Part load( URI uri ) throws IOException
{
return PartDecoder.getInstance().loadPart( uri );
@@ -117,7 +138,12 @@
* @exception Exception if a deployment error occurs
*/
public abstract Object instantiate( Object[] args ) throws Exception;
-
+
+ /**
+ * Externalize the part to XML.
+ * @param output the output stream
+ * @exception IOException if an I/O error occurs
+ */
public void encode( OutputStream output ) throws IOException
{
final Writer writer = new OutputStreamWriter( output );
@@ -137,6 +163,12 @@
output.close();
}

+ /**
+ * Test is this part is equiovalent to the supplied part.
+ *
+ * @param other the other object
+ * @return true if the parts are equivalent
+ */
public boolean equals( Object other )
{
if( other instanceof Part )
@@ -157,6 +189,25 @@
}
}

+ /**
+ * Get the part hashcode.
+ *
+ * @return the hash value
+ */
+ public int hashCode()
+ {
+ int hash = m_info.hashCode();
+ hash ^= m_classpath.hashCode();
+ return hash;
+ }
+
+
+ /**
+ * Encode this part strategy to XML.
+ *
+ * @param writer the output stream writer
+ * @param pad the character offset
+ */
protected abstract void encodeStrategy( Writer writer, String pad )
throws IOException;

/**
@@ -168,7 +219,11 @@
{
return m_classloader;
}
-
+
+ /**
+ * Get the assigned logging channel.
+ * @return the logging channel
+ */
protected Logger getLogger()
{
return m_logger;
@@ -252,7 +307,7 @@
* @param category the classloader category
* @param classloader the new classloader to report
*/
- public void classloaderConstructed( Category category, ClassLoader
classloader )
+ private void classloaderConstructed( Category category, ClassLoader
classloader )
{
if( getLogger().isDebugEnabled() )
{
@@ -285,7 +340,7 @@
* Handle notification of system classloader expansion.
* @param uris the array of uris added to the system classloader
*/
- public void systemExpanded( URI[] uris )
+ private void systemExpanded( URI[] uris )
{
if( getLogger().isDebugEnabled() )
{




  • r1309 - in trunk/main: depot/build/src/main/net/dpml/library/console depot/library/src/main/net/dpml/library/impl depot/tools/builder/src/main/net/dpml/tools/tasks metro/component/src/main/net/dpml/component metro/content/src/main/net/dpml/metro/content metro/model/src/main/net/dpml/metro metro/model/src/main/net/dpml/metro/data metro/runtime/src/main/net/dpml/metro/runtime metro/test/src/test/net/dpml/test/part metro/tools/src/main/net/dpml/metro/tools planet/http/test/src/test/net/dpml/http/test transit/core/src/main/net/dpml/part, mcconnell at BerliOS, 04/04/2006

Archive powered by MHonArc 2.6.24.

Top of Page