CVS: jcontainer/loom/engine/src/java/org/jcontainer/loom/components/util/factory ComponentBundle.java,1.1,1.2 DefaultComponentBundle.java,1.1,1.2 DefaultComponentFactory.java,1.1,1.2
Peter Donald <pdonald-yCVjj/[email protected]> Mon, 3 Nov 2003 00:11:28 -0600
| Newsgroups | gmane.comp.java.jcontainer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/util/factory
In directory hogshead.codehaus.org:/tmp/cvs-serv21252/engine/src/java/org/jcontainer/loom/components/util/factory
Modified Files:
ComponentBundle.java DefaultComponentBundle.java
DefaultComponentFactory.java
Log Message:
Start to remove unused code in Bundle
Index: ComponentBundle.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/util/factory/ComponentBundle.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ComponentBundle.java 16 Oct 2003 14:45:46 -0000 1.1
+++ ComponentBundle.java 3 Nov 2003 06:11:26 -0000 1.2
@@ -7,7 +7,6 @@
*/
package org.jcontainer.loom.components.util.factory;
-import java.io.InputStream;
import org.jcontainer.loom.components.util.info.ComponentInfo;
/**
@@ -34,32 +33,10 @@
public interface ComponentBundle
{
/**
- * Return the {@link org.jcontainer.loom.components.util.info.ComponentInfo} that describes the
+ * Return the ComponentInfo that describes the
* component.
*
- * @return the {@link org.jcontainer.loom.components.util.info.ComponentInfo} that describes the component.
+ * @return the ComponentInfo that describes the component.
*/
ComponentInfo getComponentInfo();
-
- /**
- * Return an input stream for a resource associated with
- * component. The resource name can be relative or absolute.
- * Absolute names being with a '/' character.
- *
- * <p>When the component is implemented via a Java class (as
- * opposed to a remote SOAP/RMI/JMX/other service), the resources
- * are loaded from the same <code>ClassLoader</code> as
- * implementation. The resources are loaded relative to the
- * implementaion classes package and are often named after the
- * classname of the component.</p>
- *
- * <p>For example, a component <code>com.biz.Foo</code> may have
- * resources such as <code>com/biz/Foo-schema.xsd</code>,
- * <code>com/biz/Foo.mxinfo</code> or
- * <code>com/biz/Foo-profile.xml</code>.</p>
- *
- * @return the input stream for associated resource, or null
- * if no such resource
- */
- InputStream getResourceAsStream( String resource );
}
Index: DefaultComponentBundle.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/util/factory/DefaultComponentBundle.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- DefaultComponentBundle.java 16 Oct 2003 14:45:46 -0000 1.1
+++ DefaultComponentBundle.java 3 Nov 2003 06:11:26 -0000 1.2
@@ -20,30 +20,18 @@
implements ComponentBundle
{
private final ComponentInfo m_componentInfo;
- private final ClassLoader m_classLoader;
- public DefaultComponentBundle( final ComponentInfo componentInfo,
- final ClassLoader classLoader )
+ public DefaultComponentBundle( final ComponentInfo componentInfo )
{
if( null == componentInfo )
{
throw new NullPointerException( "componentInfo" );
}
- if( null == classLoader )
- {
- throw new NullPointerException( "classLoader" );
- }
m_componentInfo = componentInfo;
- m_classLoader = classLoader;
}
public ComponentInfo getComponentInfo()
{
return m_componentInfo;
- }
-
- public InputStream getResourceAsStream( final String resource )
- {
- return m_classLoader.getResourceAsStream( resource );
}
}
Index: DefaultComponentFactory.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/util/factory/DefaultComponentFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- DefaultComponentFactory.java 16 Oct 2003 14:45:46 -0000 1.1
+++ DefaultComponentFactory.java 3 Nov 2003 06:11:26 -0000 1.2
@@ -13,8 +13,8 @@
import org.jcontainer.loom.components.util.infobuilder.BlockInfoReader;
/**
- * The default implementation of {@link ComponentFactory}
- * that simply creates components from a {@link ClassLoader}.
+ * The default implementation of ComponentFactory
+ * that simply creates components from a ClassLoader.
*
* @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
* @version $Revision$ $Date$
@@ -96,14 +96,14 @@
throws Exception
{
final ComponentInfo info = createComponentInfo( implementationKey );
- return new DefaultComponentBundle( info, getClassLoader() );
+ return new DefaultComponentBundle( info );
}
/**
- * Create a {@link org.jcontainer.loom.components.util.info.ComponentInfo} for component with specified implementationKey.
+ * Create a ComponentInfo for component with specified implementationKey.
*
* @param implementationKey the implementationKey
- * @return the created {@link org.jcontainer.loom.components.util.info.ComponentInfo}
+ * @return the created ComponentInfo
* @throws Exception if unabel to create componentInfo
*/
protected ComponentInfo createComponentInfo( final String implementationKey )