mcconnell 2002/11/18 19:12:21
Modified: assembly build.xml
assembly/src/java/org/apache/excalibur/assembly/appliance/builder
ApplianceBuilder.java
assembly/src/java/org/apache/excalibur/assembly/type
DefaultTypeManager.java TypeManager.java
assembly/src/java/org/apache/excalibur/merlin/assembly
ContainerManager.java ServiceRegistry.java
TypeManager.java TypeRegistry.java
assembly/src/java/org/apache/excalibur/merlin/model
ServiceAccessPoint.java
assembly/src/java/org/apache/excalibur/merlin/model/builder
ContainerBuilder.java
assembly/src/java/org/apache/excalibur/merlin/resource
DefaultResource.java DefaultServiceAccessPoint.java
DeploymentHelper.java
Log:
General housekeeping.
Revision Changes Path
1.74 +7 -2 jakarta-avalon-excalibur/assembly/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/build.xml,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- build.xml 18 Nov 2002 11:33:45 -0000 1.73
+++ build.xml 19 Nov 2002 03:12:20 -0000 1.74
@@ -317,8 +317,13 @@
<target name="patch">
<replace dir="src/java" summary="true"
- token="ComponentDescriptor"
- value="InfoDescriptor" >
+ token="getImplementationClassName"
+ value="getClassname" >
+ <include name="**/*.*"/>
+ </replace>
+ <replace dir="src/java" summary="true"
+ token="ServiceDefinition"
+ value="Service" >
<include name="**/*.*"/>
</replace>
</target>
1.2 +2 -2
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/assembly/appliance/builder/ApplianceBuilder.java
Index: ApplianceBuilder.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/assembly/appliance/builder/ApplianceBuilder.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ApplianceBuilder.java 18 Nov 2002 11:02:29 -0000 1.1
+++ ApplianceBuilder.java 19 Nov 2002 03:12:20 -0000 1.2
@@ -187,7 +187,7 @@
final Configuration conf = config.getChild("profile");
String classname = conf.getAttribute("type");
- Type type = m_typeManager.register( classname );
+ Type type = m_typeManager.registerType( classname );
final Profile profile = m_profileBuilder.build( type, conf );
return createAppliance( profile, enabled, activation );
}
1.3 +9 -9
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/assembly/type/DefaultTypeManager.java
Index: DefaultTypeManager.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/assembly/type/DefaultTypeManager.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DefaultTypeManager.java 18 Nov 2002 11:33:46 -0000 1.2
+++ DefaultTypeManager.java 19 Nov 2002 03:12:20 -0000 1.3
@@ -151,14 +151,14 @@
* @param path the component class name
* @return the component type
*/
- public Type register( String path ) throws TypeException
+ public Type registerType( String path ) throws TypeException
{
final String classname = path.replace( '/', '.' );
Type type;
try
{
- type = locate( classname );
+ type = getType( classname );
}
catch( UnknownTypeException ute )
{
@@ -205,7 +205,7 @@
* @return the type matching the supplied implementation classname.
* @exception UnknownTypeException if a matching type cannot be found
*/
- public Type locate( String classname ) throws UnknownTypeException
+ public Type getType( String classname ) throws UnknownTypeException
{
Type type = (Type) m_types.get( classname );
if( type == null )
@@ -221,12 +221,12 @@
* @param a service depedency descriptor
* @return a set of types capable of servicing the supplied dependency
*/
- public Type[] match( DependencyDescriptor dependency )
+ public Type[] getTypes( DependencyDescriptor dependency )
{
ArrayList list = new ArrayList();
if( m_parent != null )
{
- Type[] types = m_parent.match( dependency );
+ Type[] types = m_parent.getTypes( dependency );
for( int i=0; i<types.length; i++ )
{
list.add( types[i] );
@@ -253,12 +253,12 @@
* @param service a service descriptor
* @return a set of types that provide the supplied service
*/
- public Type[] match( StageDescriptor stage )
+ public Type[] getTypes( StageDescriptor stage )
{
ArrayList list = new ArrayList();
if( m_parent != null )
{
- Type[] types = m_parent.match( stage );
+ Type[] types = m_parent.getTypes( stage );
for( int i=0; i<types.length; i++ )
{
list.add( types[i] );
@@ -326,7 +326,7 @@
throw new NullPointerException( "type" );
}
- final String classname = type.getInfo().getImplementationClassName();
+ final String classname = type.getInfo().getClassname();
try
{
1.2 +5 -5
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/assembly/type/TypeManager.java
Index: TypeManager.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/assembly/type/TypeManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TypeManager.java 18 Nov 2002 10:57:21 -0000 1.1
+++ TypeManager.java 19 Nov 2002 03:12:20 -0000 1.2
@@ -79,7 +79,7 @@
* @return the component type
* @exception Exception if a registration failure occurs
*/
- Type register( String path ) throws TypeException;
+ Type registerType( String path ) throws TypeException;
/**
* Locate a {@link Type} instances associated with the
@@ -87,7 +87,7 @@
* @return the type matching the supplied implementation classname.
* @exception UnknownTypeException if a matching type cannot be found
*/
- Type locate( String classname ) throws UnknownTypeException;
+ Type getType( String classname ) throws UnknownTypeException;
/**
* Locate the set of component types capable of services the supplied
@@ -95,13 +95,13 @@
* @param a service depedency descriptor
* @return a set of types capable of servicing the supplied dependency
*/
- Type[] match( DependencyDescriptor dependency );
+ Type[] getTypes( DependencyDescriptor dependency );
/**
* Locate the set of component types that provide the supplied extension.
* @param service a service descriptor
* @return a set of types that provide the supplied service
*/
- Type[] match( StageDescriptor stage );
+ Type[] getTypes( StageDescriptor stage );
}
1.44 +4 -4
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ContainerManager.java
Index: ContainerManager.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ContainerManager.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- ContainerManager.java 18 Nov 2002 11:33:46 -0000 1.43
+++ ContainerManager.java 19 Nov 2002 03:12:20 -0000 1.44
@@ -364,7 +364,7 @@
for( int i = 0; i < types.length; i++ )
{
Type type = types[ i ];
- String classname = type.getInfo().getImplementationClassName();
+ String classname = type.getInfo().getClassname();
Class clazz = loadClass( classname );
Object[] profiles;
@@ -680,7 +680,7 @@
public void addProfile( Profile profile )
{
final String name = profile.getName();
- final String classname =
profile.getType().getInfo().getImplementationClassName();
+ final String classname = profile.getType().getInfo().getClassname();
getLocalLogger().debug( "adding: " + profile );
final Profile existing = (Profile)m_profiles.get( name );
@@ -1012,7 +1012,7 @@
try
{
if( Container.class.isAssignableFrom(
- loadClass(
profile.getType().getInfo().getImplementationClassName() ) ) )
+ loadClass( profile.getType().getInfo().getClassname() ) ) )
{
res = new ContainerResource( this, (ContainerDescriptor)
profile, c, handler );
}
1.9 +13 -13
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ServiceRegistry.java
Index: ServiceRegistry.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/ServiceRegistry.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ServiceRegistry.java 24 Oct 2002 04:12:44 -0000 1.8
+++ ServiceRegistry.java 19 Nov 2002 03:12:20 -0000 1.9
@@ -59,7 +59,7 @@
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.logger.Logger;
import org.apache.excalibur.meta.info.ReferenceDescriptor;
-import org.apache.excalibur.meta.info.ServiceDefinition;
+import org.apache.excalibur.meta.info.Service;
import org.apache.excalibur.meta.info.builder.ServiceBuilder;
/**
@@ -87,7 +87,7 @@
private ClassLoader m_classloader;
/**
- * ServiceDefinition types keyed by classname.
+ * Service types keyed by classname.
*/
private Hashtable m_table = new Hashtable();
@@ -137,7 +137,7 @@
* @param classname the service class name
* @return the service descriptor
*/
- public ServiceDefinition addService( String path ) throws Exception
+ public Service addService( String path ) throws Exception
{
if( path == null )
{
@@ -146,7 +146,7 @@
final String classname = path.replace( '/', '.' );
- ServiceDefinition service = getService( classname );
+ Service service = getService( classname );
if( service == null )
{
service = m_builder.build( classname, m_classloader );
@@ -177,7 +177,7 @@
* @param type the service defintion
* @exception VerifyException if the service fails verification
*/
- protected Class getServiceClass( ServiceDefinition service ) throws Exception
+ protected Class getServiceClass( Service service ) throws Exception
{
if( service == null )
{
@@ -190,24 +190,24 @@
* Returns the set of services know to the registry.
* @return the services
*/
- public ServiceDefinition[] getServices()
+ public Service[] getServices()
{
- return (ServiceDefinition[])m_table.values().toArray( new
ServiceDefinition[ 0 ] );
+ return (Service[])m_table.values().toArray( new Service[ 0 ] );
}
/**
* Returns the set of services matching a supplied phase.
* @return the set of types capable of supporting the stage.
*/
- public ServiceDefinition getService( ReferenceDescriptor reference )
+ public Service getService( ReferenceDescriptor reference )
{
if( reference == null )
{
throw new NullPointerException( "reference" );
}
- ServiceDefinition service =
- (ServiceDefinition)m_table.get( reference.getClassname() );
+ Service service =
+ (Service)m_table.get( reference.getClassname() );
if( service == null )
{
@@ -225,9 +225,9 @@
* Returns a registered component type.
* @return the component type from the registry or null if the type is unknown
*/
- public ServiceDefinition getService( String classname )
+ public Service getService( String classname )
{
- return (ServiceDefinition)m_table.get( classname );
+ return (Service)m_table.get( classname );
}
}
1.28 +7 -7
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/TypeManager.java
Index: TypeManager.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/TypeManager.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- TypeManager.java 24 Oct 2002 04:12:44 -0000 1.27
+++ TypeManager.java 19 Nov 2002 03:12:20 -0000 1.28
@@ -89,7 +89,7 @@
import org.apache.excalibur.merlin.model.IncludeDescriptor;
import org.apache.excalibur.merlin.model.LibraryDescriptor;
import org.apache.excalibur.meta.info.ReferenceDescriptor;
-import org.apache.excalibur.meta.info.ServiceDefinition;
+import org.apache.excalibur.meta.info.Service;
import org.apache.excalibur.meta.info.Type;
/**
@@ -643,15 +643,15 @@
}
/**
- * Resolve a {@link ServiceDefinition} from a classname.
+ * Resolve a {@link Service} from a classname.
*
* @param reference the reference descriptor
* @return the service descriptor
* @exception TypeException if the type is unknown
*/
- public ServiceDefinition getService( ReferenceDescriptor reference ) throws
TypeException
+ public Service getService( ReferenceDescriptor reference ) throws TypeException
{
- ServiceDefinition definition = m_services.getService( reference );
+ Service definition = m_services.getService( reference );
if( definition != null )
{
return definition;
@@ -696,7 +696,7 @@
* Returns the set of local service types know to the registry.
* @return the set of service types registered with the registry
*/
- protected ServiceDefinition[] getServices()
+ protected Service[] getServices()
{
return m_services.getServices();
}
@@ -707,7 +707,7 @@
* @param reference the service descriptor reference
* @return the set of candidate component types
*/
- //public ServiceDefinition getService( ReferenceDescriptor reference )
+ //public Service getService( ReferenceDescriptor reference )
//{
// return m_services.getService( reference );
//}
1.21 +3 -3
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/TypeRegistry.java
Index: TypeRegistry.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/assembly/TypeRegistry.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- TypeRegistry.java 18 Nov 2002 11:33:46 -0000 1.20
+++ TypeRegistry.java 19 Nov 2002 03:12:20 -0000 1.21
@@ -237,7 +237,7 @@
throw new NullPointerException( "Illegal null component type argument."
);
}
- final String classname = type.getInfo().getImplementationClassName();
+ final String classname = type.getInfo().getClassname();
try
{
return m_classloader.loadClass( classname );
@@ -339,7 +339,7 @@
*/
protected void register( Type type )
{
- String key = type.getInfo().getImplementationKey();
+ String key = type.getInfo().getClassname();
m_types.put( key, type );
getLogger().debug( "Type: '" + key + "' registered." );
ServiceDescriptor[] services = type.getServices();
1.5 +4 -4
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/ServiceAccessPoint.java
Index: ServiceAccessPoint.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/ServiceAccessPoint.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ServiceAccessPoint.java 23 Oct 2002 16:33:06 -0000 1.4
+++ ServiceAccessPoint.java 19 Nov 2002 03:12:21 -0000 1.5
@@ -55,7 +55,7 @@
package org.apache.excalibur.merlin.model;
-import org.apache.excalibur.meta.info.ServiceDefinition;
+import org.apache.excalibur.meta.info.Service;
import org.apache.excalibur.meta.info.ServiceDescriptor;
/**
@@ -76,11 +76,11 @@
ServiceDescriptor getServiceDescriptor();
/**
- * Returns the {@link ServiceDefinition} for this service.
+ * Returns the {@link Service} for this service.
*
* @return the service definition.
*/
- ServiceDefinition getServiceDefinition();
+ Service getService();
/**
* Return the resource instance.
1.12 +2 -2
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/ContainerBuilder.java
Index: ContainerBuilder.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/ContainerBuilder.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ContainerBuilder.java 18 Nov 2002 11:33:46 -0000 1.11
+++ ContainerBuilder.java 19 Nov 2002 03:12:21 -0000 1.12
@@ -103,7 +103,7 @@
throws Exception
{
final String xprofile =
- type.getInfo().getImplementationClassName().replace( '.', '/' ) +
".xprofile";
+ type.getInfo().getClassname().replace( '.', '/' ) + ".xprofile";
final InputStream inputStream =
loader.getResourceAsStream( xprofile );
1.14 +3 -3
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/resource/DefaultResource.java
Index: DefaultResource.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/resource/DefaultResource.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- DefaultResource.java 23 Oct 2002 16:33:08 -0000 1.13
+++ DefaultResource.java 19 Nov 2002 03:12:21 -0000 1.14
@@ -64,7 +64,7 @@
import org.apache.excalibur.merlin.model.Resource;
import org.apache.excalibur.merlin.model.ServiceAccessPoint;
import org.apache.excalibur.meta.info.ReferenceDescriptor;
-import org.apache.excalibur.meta.info.ServiceDefinition;
+import org.apache.excalibur.meta.info.Service;
import org.apache.excalibur.meta.info.ServiceDescriptor;
/**
@@ -223,7 +223,7 @@
{
try
{
- ServiceDefinition def = m_manager.getService( reference );
+ Service def = m_manager.getService( reference );
ServiceDescriptor des = m_profile.getType().getService( reference );
return new DefaultServiceAccessPoint( this, des, def );
}
1.6 +6 -6
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/resource/DefaultServiceAccessPoint.java
Index: DefaultServiceAccessPoint.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/resource/DefaultServiceAccessPoint.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DefaultServiceAccessPoint.java 23 Oct 2002 16:33:08 -0000 1.5
+++ DefaultServiceAccessPoint.java 19 Nov 2002 03:12:21 -0000 1.6
@@ -57,7 +57,7 @@
import org.apache.excalibur.merlin.model.Resource;
import org.apache.excalibur.merlin.model.ServiceAccessPoint;
-import org.apache.excalibur.meta.info.ServiceDefinition;
+import org.apache.excalibur.meta.info.Service;
import org.apache.excalibur.meta.info.ServiceDescriptor;
/**
@@ -73,7 +73,7 @@
private ServiceDescriptor m_descriptor;
- private ServiceDefinition m_definition;
+ private Service m_definition;
/**
* Creation of a new service access point.
@@ -84,7 +84,7 @@
public DefaultServiceAccessPoint(
Resource resource,
ServiceDescriptor descriptor,
- ServiceDefinition definition )
+ Service definition )
{
m_resource = resource;
m_descriptor = descriptor;
@@ -102,11 +102,11 @@
}
/**
- * Returns the {@link ServiceDefinition} for this service.
+ * Returns the {@link Service} for this service.
*
* @return the service definition.
*/
- public ServiceDefinition getServiceDefinition()
+ public Service getService()
{
return m_definition;
}
1.17 +1 -1
jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/resource/DeploymentHelper.java
Index: DeploymentHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/resource/DeploymentHelper.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- DeploymentHelper.java 18 Nov 2002 11:33:46 -0000 1.16
+++ DeploymentHelper.java 19 Nov 2002 03:12:21 -0000 1.17
@@ -162,7 +162,7 @@
String classname = null;
try
{
- classname = profile.getType().getInfo().getImplementationClassName();
+ classname = profile.getType().getInfo().getClassname();
getLogger().debug( "load profile: " + profile.getName()
+ "' in thread: '" + Thread.currentThread().getName()
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>