donaldp 2002/07/18 18:05:23
Modified:
containerkit/src/java/org/apache/excalibur/containerkit/dependency
DependencyMap.java
containerkit/src/java/org/apache/excalibur/containerkit/kernel
AbstractServiceKernel.java ComponentEntry.java
SimpleResourceProvider.java
SimpleServiceKernel.java
containerkit/src/java/org/apache/excalibur/containerkit/lifecycle/impl
AbstractResourceProvider.java
containerkit/src/java/org/apache/excalibur/containerkit/verifier
AssemblyVerifier.java MetaDataVerifier.java
Added: containerkit/src/java/org/apache/excalibur/containerkit/metadata
ComponentMetaData.java DependencyMetaData.java
Removed: containerkit/src/java/org/apache/excalibur/containerkit/metadata
Association.java ComponentProfile.java
Log:
Revert to old names for consistancy sake
Revision Changes Path
1.9 +33 -33
jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/dependency/DependencyMap.java
Index: DependencyMap.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/dependency/DependencyMap.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- DependencyMap.java 6 Jul 2002 01:13:01 -0000 1.8
+++ DependencyMap.java 19 Jul 2002 01:05:22 -0000 1.9
@@ -8,8 +8,8 @@
package org.apache.excalibur.containerkit.dependency;
import java.util.ArrayList;
-import org.apache.excalibur.containerkit.metadata.ComponentProfile;
-import org.apache.excalibur.containerkit.metadata.Association;
+import org.apache.excalibur.containerkit.metadata.ComponentMetaData;
+import org.apache.excalibur.containerkit.metadata.DependencyMetaData;
import org.apache.excalibur.containerkit.metainfo.DependencyDescriptor;
/**
@@ -76,57 +76,57 @@
*
* @param component the component
*/
- public void add( final ComponentProfile component )
+ public void add( final ComponentMetaData component )
{
m_components.add( component );
}
/**
- * Get the serilized graph of [EMAIL PROTECTED] ComponentProfile} objects
+ * Get the serilized graph of [EMAIL PROTECTED] ComponentMetaData}
objects
* required when starting up all the components. This makes sure
* that all providers occur before their coresponding
* consumers in graph.
*
* @return the ordered list of components
*/
- public ComponentProfile[] getStartupGraph()
+ public ComponentMetaData[] getStartupGraph()
{
return walkGraph( true );
}
/**
- * Get the serilized graph of [EMAIL PROTECTED] ComponentProfile} objects
+ * Get the serilized graph of [EMAIL PROTECTED] ComponentMetaData}
objects
* required when shutting down all the components. This makes
* sure that all consumers occur before their coresponding
* providers in graph.
*
* @return the ordered list of components
*/
- public ComponentProfile[] getShutdownGraph()
+ public ComponentMetaData[] getShutdownGraph()
{
return walkGraph( false );
}
/**
- * Get the serilized graph of [EMAIL PROTECTED] ComponentProfile} objects
+ * Get the serilized graph of [EMAIL PROTECTED] ComponentMetaData}
objects
* that use services of specified component.
*
* @param component the component
* @return the ordered list of consumers
*/
- public ComponentProfile[] getConsumerGraph( final ComponentProfile
component )
+ public ComponentMetaData[] getConsumerGraph( final ComponentMetaData
component )
{
return getComponentGraph( component, false );
}
/**
- * Get the serilized graph of [EMAIL PROTECTED] ComponentProfile} objects
+ * Get the serilized graph of [EMAIL PROTECTED] ComponentMetaData}
objects
* that provide specified component with services.
*
* @param component the component
* @return the ordered list of providers
*/
- public ComponentProfile[] getProviderGraph( final ComponentProfile
component )
+ public ComponentMetaData[] getProviderGraph( final ComponentMetaData
component )
{
return getComponentGraph( component, true );
}
@@ -138,7 +138,7 @@
* @param providers true if traversing providers, false if consumers
* @return the list of components in graph
*/
- private ComponentProfile[] getComponentGraph( final ComponentProfile
component, final boolean providers )
+ private ComponentMetaData[] getComponentGraph( final ComponentMetaData
component, final boolean providers )
{
final ArrayList result = new ArrayList();
visitcomponent( component,
@@ -146,8 +146,8 @@
new ArrayList(),
result );
- final ComponentProfile[] returnValue = new ComponentProfile[
result.size() ];
- return (ComponentProfile[])result.toArray( returnValue );
+ final ComponentMetaData[] returnValue = new ComponentMetaData[
result.size() ];
+ return (ComponentMetaData[])result.toArray( returnValue );
}
/**
@@ -158,7 +158,7 @@
* @param providers true if forward dependencys traced, false if
dependencies reversed
* @return the ordered node names
*/
- private ComponentProfile[] walkGraph( final boolean providers )
+ private ComponentMetaData[] walkGraph( final boolean providers )
{
final ArrayList result = new ArrayList();
final ArrayList done = new ArrayList();
@@ -166,16 +166,16 @@
final int size = m_components.size();
for( int i = 0; i < size; i++ )
{
- final ComponentProfile component =
- (ComponentProfile)m_components.get( i );
+ final ComponentMetaData component =
+ (ComponentMetaData)m_components.get( i );
visitcomponent( component,
providers,
done,
result );
}
- final ComponentProfile[] returnValue = new ComponentProfile[
result.size() ];
- return (ComponentProfile[])result.toArray( returnValue );
+ final ComponentMetaData[] returnValue = new ComponentMetaData[
result.size() ];
+ return (ComponentMetaData[])result.toArray( returnValue );
}
/**
@@ -187,7 +187,7 @@
* @param order the order in which nodes have already been
* traversed
*/
- private void visitcomponent( final ComponentProfile component,
+ private void visitcomponent( final ComponentMetaData component,
final boolean providers,
final ArrayList done,
final ArrayList order )
@@ -215,9 +215,9 @@
* Traverse graph of components that provide services to
* the specified component.
*
- * @param component the ComponentProfile
+ * @param component the ComponentMetaData
*/
- private void visitProviders( final ComponentProfile component,
+ private void visitProviders( final ComponentMetaData component,
final ArrayList done,
final ArrayList order )
{
@@ -226,7 +226,7 @@
for( int i = 0; i < descriptors.length; i++ )
{
- final Association dependency =
+ final DependencyMetaData dependency =
component.getDependency( descriptors[ i ].getRole() );
// added != null clause to catch cases where an optional
@@ -235,7 +235,7 @@
if( dependency != null )
{
- final ComponentProfile other =
+ final ComponentMetaData other =
getComponent( dependency.getProviderName() );
visitcomponent( other, true, done, order );
}
@@ -246,9 +246,9 @@
* Traverse all Consumers of component. ie Anyone that uses
* service provided by component.
*
- * @param component the ComponentProfile
+ * @param component the ComponentMetaData
*/
- private void visitConsumers( final ComponentProfile component,
+ private void visitConsumers( final ComponentMetaData component,
final ArrayList done,
final ArrayList order )
{
@@ -257,9 +257,9 @@
final int size = m_components.size();
for( int i = 0; i < size; i++ )
{
- final ComponentProfile other =
- (ComponentProfile)m_components.get( i );
- final Association[] roles = other.getDependencies();
+ final ComponentMetaData other =
+ (ComponentMetaData)m_components.get( i );
+ final DependencyMetaData[] roles = other.getDependencies();
for( int j = 0; j < roles.length; j++ )
{
@@ -285,13 +285,13 @@
* @param name the name of component
* @return the component
*/
- private ComponentProfile getComponent( final String name )
+ private ComponentMetaData getComponent( final String name )
{
final int size = m_components.size();
for( int i = 0; i < size; i++ )
{
- final ComponentProfile component =
- (ComponentProfile)m_components.get( i );
+ final ComponentMetaData component =
+ (ComponentMetaData)m_components.get( i );
if( component.getName().equals( name ) )
{
return component;
1.15 +10 -10
jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/kernel/AbstractServiceKernel.java
Index: AbstractServiceKernel.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/kernel/AbstractServiceKernel.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- AbstractServiceKernel.java 6 Jul 2002 01:13:01 -0000 1.14
+++ AbstractServiceKernel.java 19 Jul 2002 01:05:22 -0000 1.15
@@ -17,7 +17,7 @@
import org.apache.excalibur.containerkit.dependency.DependencyMap;
import org.apache.excalibur.containerkit.lifecycle.LifecycleHelper;
import org.apache.excalibur.containerkit.lifecycle.ResourceProvider;
-import org.apache.excalibur.containerkit.metadata.ComponentProfile;
+import org.apache.excalibur.containerkit.metadata.ComponentMetaData;
/**
* The <code>AbstractServiceKernel</code> defines an application scope
through
@@ -88,7 +88,7 @@
protected final void startupAllComponents()
throws Exception
{
- final ComponentProfile[] components =
m_dependencyMap.getStartupGraph();
+ final ComponentMetaData[] components =
m_dependencyMap.getStartupGraph();
processComponents( true, components );
}
@@ -99,7 +99,7 @@
protected final void shutdownAllComponents()
throws Exception
{
- final ComponentProfile[] components =
m_dependencyMap.getShutdownGraph();
+ final ComponentMetaData[] components =
m_dependencyMap.getShutdownGraph();
processComponents( false, components );
}
@@ -112,7 +112,7 @@
throws Exception
{
final ComponentEntry entry = (ComponentEntry)m_entrys.get( name );
- final ComponentProfile[] components =
+ final ComponentMetaData[] components =
m_dependencyMap.getProviderGraph( entry.getProfile() );
processComponents( true, components );
}
@@ -126,7 +126,7 @@
throws Exception
{
final ComponentEntry entry = (ComponentEntry)m_entrys.get( name );
- final ComponentProfile[] components =
+ final ComponentMetaData[] components =
m_dependencyMap.getConsumerGraph( entry.getProfile() );
processComponents( false, components );
}
@@ -138,7 +138,7 @@
*
* @param component the component
*/
- protected final void addComponent( final ComponentProfile component )
+ protected final void addComponent( final ComponentMetaData component )
{
final String name = component.getName();
final ComponentEntry entry = new ComponentEntry( component );
@@ -169,7 +169,7 @@
* through the phases
*/
private void processComponents( final boolean startup,
- final ComponentProfile[] components )
+ final ComponentMetaData[] components )
throws Exception
{
processComponentsNotice( components, startup );
@@ -193,7 +193,7 @@
* @throws Exception if there is error processing any of the components
* through the phases
*/
- private void processComponent( final ComponentProfile component,
+ private void processComponent( final ComponentMetaData component,
final boolean startup )
throws Exception
{
@@ -250,7 +250,7 @@
* @param order the order the components will be processed in
* @param startup true if application startup phase, false if shutdown
phase
*/
- private void processComponentsNotice( final ComponentProfile[] order,
+ private void processComponentsNotice( final ComponentMetaData[] order,
final boolean startup )
{
if( getLogger().isInfoEnabled() )
1.10 +8 -8
jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/kernel/ComponentEntry.java
Index: ComponentEntry.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/kernel/ComponentEntry.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ComponentEntry.java 6 Jul 2002 01:13:01 -0000 1.9
+++ ComponentEntry.java 19 Jul 2002 01:05:22 -0000 1.10
@@ -7,7 +7,7 @@
*/
package org.apache.excalibur.containerkit.kernel;
-import org.apache.excalibur.containerkit.metadata.ComponentProfile;
+import org.apache.excalibur.containerkit.metadata.ComponentMetaData;
/**
* This is the structure that components are contained within when
@@ -20,10 +20,10 @@
public class ComponentEntry
{
/**
- * The [EMAIL PROTECTED] ComponentProfile} that describes
+ * The [EMAIL PROTECTED] ComponentMetaData} that describes
* this component.
*/
- private final ComponentProfile m_profile;
+ private final ComponentMetaData m_profile;
/**
* The instance of this component.
@@ -32,18 +32,18 @@
/**
* Creation of a new <code>ComponentEntry</code> instance.
- * @param profile the [EMAIL PROTECTED] ComponentProfile} instance
defining the component.
+ * @param profile the [EMAIL PROTECTED] ComponentMetaData} instance
defining the component.
*/
- public ComponentEntry( final ComponentProfile profile )
+ public ComponentEntry( final ComponentMetaData profile )
{
m_profile = profile;
}
/**
- * Returns the underlying [EMAIL PROTECTED] ComponentProfile} instance.
+ * Returns the underlying [EMAIL PROTECTED] ComponentMetaData} instance.
* @return the component meta data instance
*/
- public ComponentProfile getProfile()
+ public ComponentMetaData getProfile()
{
return m_profile;
}
1.4 +5 -5
jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/kernel/SimpleResourceProvider.java
Index: SimpleResourceProvider.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/kernel/SimpleResourceProvider.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SimpleResourceProvider.java 6 Jul 2002 01:13:01 -0000 1.3
+++ SimpleResourceProvider.java 19 Jul 2002 01:05:22 -0000 1.4
@@ -8,7 +8,7 @@
package org.apache.excalibur.containerkit.kernel;
import
org.apache.excalibur.containerkit.lifecycle.impl.AbstractResourceProvider;
-import org.apache.excalibur.containerkit.metadata.ComponentProfile;
+import org.apache.excalibur.containerkit.metadata.ComponentMetaData;
import org.apache.excalibur.containerkit.metainfo.ComponentInfo;
import org.apache.excalibur.containerkit.metainfo.ComponentDescriptor;
import org.apache.avalon.framework.logger.Logger;
@@ -29,7 +29,7 @@
m_serviceKernel = serviceKernel;
}
- protected ComponentProfile getProfile( Object entry )
+ protected ComponentMetaData getProfile( Object entry )
{
return ( (ComponentEntry)entry ).getProfile();
}
@@ -50,7 +50,7 @@
public Object createObject( final Object entry )
throws Exception
{
- final ComponentProfile component = getProfile( entry );
+ final ComponentMetaData component = getProfile( entry );
final ComponentInfo info = component.getComponentInfo();
final ComponentDescriptor descriptor = info.getComponentDescriptor();
final String implementationKey = descriptor.getImplementationKey();
@@ -61,7 +61,7 @@
public Logger createLogger( final Object entry )
throws Exception
{
- final ComponentProfile component = getProfile( entry );
+ final ComponentMetaData component = getProfile( entry );
return getLogger().getChildLogger( component.getName() );
}
}
1.6 +9 -9
jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/kernel/SimpleServiceKernel.java
Index: SimpleServiceKernel.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/kernel/SimpleServiceKernel.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SimpleServiceKernel.java 6 Jul 2002 01:13:01 -0000 1.5
+++ SimpleServiceKernel.java 19 Jul 2002 01:05:22 -0000 1.6
@@ -15,8 +15,8 @@
import org.apache.avalon.framework.logger.Logger;
import org.apache.excalibur.containerkit.infobuilder.ComponentInfoBuilder;
import org.apache.excalibur.containerkit.lifecycle.ResourceProvider;
-import org.apache.excalibur.containerkit.metadata.ComponentProfile;
-import org.apache.excalibur.containerkit.metadata.Association;
+import org.apache.excalibur.containerkit.metadata.ComponentMetaData;
+import org.apache.excalibur.containerkit.metadata.DependencyMetaData;
import org.apache.excalibur.containerkit.metainfo.ComponentInfo;
/**
@@ -78,15 +78,15 @@
final String impl = component.getAttribute( "impl" );
final Configuration config = component.getChild( "config" );
final ComponentInfo info = getComponentInfo( impl );
- final Association[] dependencies =
+ final DependencyMetaData[] dependencies =
parseAssociations( component.getChildren( "provide" ) );
- final ComponentProfile profile =
- new ComponentProfile( name, dependencies, null, config, info );
+ final ComponentMetaData profile =
+ new ComponentMetaData( name, dependencies, null, config, info );
addComponent( profile );
}
- private Association[] parseAssociations( final Configuration[] provides )
+ private DependencyMetaData[] parseAssociations( final Configuration[]
provides )
throws ConfigurationException
{
final ArrayList associations = new ArrayList();
@@ -95,10 +95,10 @@
final Configuration provide = provides[ i ];
final String role = provide.getAttribute( "role" );
final String provider = provide.getAttribute( "name" );
- final Association association = new Association( role, provider
);
+ final DependencyMetaData association = new DependencyMetaData(
role, provider );
associations.add( association );
}
- return (Association[])associations.toArray( new Association[
associations.size() ] );
+ return (DependencyMetaData[])associations.toArray( new
DependencyMetaData[ associations.size() ] );
}
private ComponentInfo getComponentInfo( final String impl )
1.11 +14 -14
jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/lifecycle/impl/AbstractResourceProvider.java
Index: AbstractResourceProvider.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/lifecycle/impl/AbstractResourceProvider.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- AbstractResourceProvider.java 6 Jul 2002 01:13:01 -0000 1.10
+++ AbstractResourceProvider.java 19 Jul 2002 01:05:22 -0000 1.11
@@ -23,8 +23,8 @@
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.excalibur.containerkit.lifecycle.ResourceProvider;
-import org.apache.excalibur.containerkit.metadata.ComponentProfile;
-import org.apache.excalibur.containerkit.metadata.Association;
+import org.apache.excalibur.containerkit.metadata.ComponentMetaData;
+import org.apache.excalibur.containerkit.metadata.DependencyMetaData;
import org.apache.excalibur.containerkit.metainfo.ComponentInfo;
import org.apache.excalibur.containerkit.metainfo.ContextDescriptor;
import org.apache.excalibur.containerkit.metainfo.EntryDescriptor;
@@ -85,7 +85,7 @@
public Parameters createParameters( Object entry )
throws Exception
{
- final ComponentProfile component = getProfile( entry );
+ final ComponentMetaData component = getProfile( entry );
final Parameters parameters = component.getParameters();
if( null == parameters )
{
@@ -108,7 +108,7 @@
public Configuration createConfiguration( Object entry )
throws Exception
{
- final ComponentProfile component = getProfile( entry );
+ final ComponentMetaData component = getProfile( entry );
final Configuration configuration = component.getConfiguration();
if( null == configuration )
{
@@ -136,16 +136,16 @@
}
/**
- * Return the [EMAIL PROTECTED] ComponentProfile} for specified
component entry.
- * This implementation assumes that entry is instance of [EMAIL
PROTECTED] org.apache.excalibur.containerkit.metadata.ComponentProfile}
+ * Return the [EMAIL PROTECTED] ComponentMetaData} for specified
component entry.
+ * This implementation assumes that entry is instance of [EMAIL
PROTECTED] org.apache.excalibur.containerkit.metadata.ComponentMetaData}
* but subclasses should overide this method if this assumption does not
hold true.
*
* @param entry the component entry
- * @return the ComponentProfile
+ * @return the ComponentMetaData
*/
- protected ComponentProfile getProfile( final Object entry )
+ protected ComponentMetaData getProfile( final Object entry )
{
- return (ComponentProfile)entry;
+ return (ComponentMetaData)entry;
}
/**
@@ -158,7 +158,7 @@
public final Context createContext( final Object componentEntry )
throws Exception
{
- final ComponentProfile component = getProfile( componentEntry );
+ final ComponentMetaData component = getProfile( componentEntry );
final String componentName = component.getName();
final ContextDescriptor descriptor =
@@ -306,15 +306,15 @@
private Map createServiceMap( final Object componentEntry )
throws Exception
{
- final ComponentProfile component = getProfile( componentEntry );
+ final ComponentMetaData component = getProfile( componentEntry );
final ComponentInfo info = component.getComponentInfo();
- final Association[] dependencies = component.getDependencies();
+ final DependencyMetaData[] dependencies =
component.getDependencies();
final HashMap services = new HashMap();
for( int i = 0; i < dependencies.length; i++ )
{
- final Association dependency = dependencies[ i ];
+ final DependencyMetaData dependency = dependencies[ i ];
final String role = dependency.getRole();
final String providerName = dependency.getProviderName();
final boolean optional = info.getDependency( role ).isOptional();
1.11 +10 -10
jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metadata/ComponentMetaData.java
1.7 +10 -9
jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/metadata/DependencyMetaData.java
1.27 +39 -39
jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier/AssemblyVerifier.java
Index: AssemblyVerifier.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier/AssemblyVerifier.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- AssemblyVerifier.java 6 Jul 2002 01:13:01 -0000 1.26
+++ AssemblyVerifier.java 19 Jul 2002 01:05:23 -0000 1.27
@@ -12,8 +12,8 @@
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.excalibur.containerkit.metadata.ComponentProfile;
-import org.apache.excalibur.containerkit.metadata.Association;
+import org.apache.excalibur.containerkit.metadata.ComponentMetaData;
+import org.apache.excalibur.containerkit.metadata.DependencyMetaData;
import org.apache.excalibur.containerkit.metainfo.ComponentInfo;
import org.apache.excalibur.containerkit.metainfo.DependencyDescriptor;
import org.apache.excalibur.containerkit.metainfo.ServiceDescriptor;
@@ -60,7 +60,7 @@
* @param components the Components that make up assembly
* @throws VerifyException if an error occurs
*/
- public void verifyAssembly( final ComponentProfile[] components )
+ public void verifyAssembly( final ComponentMetaData[] components )
throws VerifyException
{
String message = null;
@@ -89,10 +89,10 @@
/**
* Verfiy that all Components have the needed dependencies specified
correctly.
*
- * @param components the ComponentProfile objects for the components
+ * @param components the ComponentMetaData objects for the components
* @throws VerifyException if an error occurs
*/
- public void verifyValidDependencies( final ComponentProfile[] components
)
+ public void verifyValidDependencies( final ComponentMetaData[]
components )
throws VerifyException
{
for( int i = 0; i < components.length; i++ )
@@ -104,15 +104,15 @@
/**
* Verfiy that there are no circular references between Components.
*
- * @param components the ComponentProfile objects for the components
+ * @param components the ComponentMetaData objects for the components
* @throws VerifyException if an circular dependency error occurs
*/
- protected void verifyNoCircularDependencies( final ComponentProfile[]
components )
+ protected void verifyNoCircularDependencies( final ComponentMetaData[]
components )
throws VerifyException
{
for( int i = 0; i < components.length; i++ )
{
- final ComponentProfile component = components[ i ];
+ final ComponentMetaData component = components[ i ];
final Stack stack = new Stack();
stack.push( component );
@@ -125,19 +125,19 @@
* Verfiy that there are no circular references between Components.
*
* @param component ???
- * @param components the ComponentProfile objects for the components
+ * @param components the ComponentMetaData objects for the components
* @param stack the ???
* @throws VerifyException if an error occurs
*/
- protected void verifyNoCircularDependencies( final ComponentProfile
component,
- final ComponentProfile[]
components,
+ protected void verifyNoCircularDependencies( final ComponentMetaData
component,
+ final ComponentMetaData[]
components,
final Stack stack )
throws VerifyException
{
- final ComponentProfile[] dependencies = getDependencies( component,
components );
+ final ComponentMetaData[] dependencies = getDependencies( component,
components );
for( int i = 0; i < dependencies.length; i++ )
{
- final ComponentProfile dependency = dependencies[ i ];
+ final ComponentMetaData dependency = dependencies[ i ];
if( stack.contains( dependency ) )
{
final String trace = getDependencyTrace( dependency, stack );
@@ -162,7 +162,7 @@
* @param stack the Stack
* @return the path of dependency
*/
- protected String getDependencyTrace( final ComponentProfile component,
+ protected String getDependencyTrace( final ComponentMetaData component,
final Stack stack )
{
final StringBuffer sb = new StringBuffer();
@@ -173,7 +173,7 @@
final int top = size - 1;
for( int i = top; i >= 0; i-- )
{
- final ComponentProfile other = (ComponentProfile)stack.get( i );
+ final ComponentMetaData other = (ComponentMetaData)stack.get( i
);
if( top != i )
{
sb.append( ", " );
@@ -201,29 +201,29 @@
* @param components the total set of components in application
* @return the dependencies of component
*/
- protected ComponentProfile[] getDependencies( final ComponentProfile
component,
- final ComponentProfile[]
components )
+ protected ComponentMetaData[] getDependencies( final ComponentMetaData
component,
+ final ComponentMetaData[]
components )
{
final ArrayList dependencies = new ArrayList();
- final Association[] deps = component.getDependencies();
+ final DependencyMetaData[] deps = component.getDependencies();
for( int i = 0; i < deps.length; i++ )
{
final String name = deps[ i ].getProviderName();
- final ComponentProfile other = getComponentProfile( name,
components );
+ final ComponentMetaData other = getComponentProfile( name,
components );
dependencies.add( other );
}
- return (ComponentProfile[])dependencies.toArray( new
ComponentProfile[ 0 ] );
+ return (ComponentMetaData[])dependencies.toArray( new
ComponentMetaData[ 0 ] );
}
/**
* Verfiy that the inter-Component dependencies are valid.
*
- * @param components the ComponentProfile objects for the components
+ * @param components the ComponentMetaData objects for the components
* @throws VerifyException if an error occurs
*/
- protected void verifyDependencyReferences( final ComponentProfile[]
components )
+ protected void verifyDependencyReferences( final ComponentMetaData[]
components )
throws VerifyException
{
for( int i = 0; i < components.length; i++ )
@@ -235,16 +235,16 @@
/**
* Verfiy that the inter-Component dependencies are valid for specified
Component.
*
- * @param component the ComponentProfile object for the component
- * @param others the ComponentProfile objects for the other components
+ * @param component the ComponentMetaData object for the component
+ * @param others the ComponentMetaData objects for the other components
* @throws VerifyException if an error occurs
*/
- protected void verifyDependencyReferences( final ComponentProfile
component,
- final ComponentProfile[]
others )
+ protected void verifyDependencyReferences( final ComponentMetaData
component,
+ final ComponentMetaData[]
others )
throws VerifyException
{
final ComponentInfo info = component.getComponentInfo();
- final Association[] roles = component.getDependencies();
+ final DependencyMetaData[] roles = component.getDependencies();
for( int i = 0; i < roles.length; i++ )
{
@@ -254,7 +254,7 @@
info.getDependency( roleName ).getService();
//Get the other component that is providing service
- final ComponentProfile provider = getComponentProfile(
providerName, others );
+ final ComponentMetaData provider = getComponentProfile(
providerName, others );
if( null == provider )
{
final String message =
@@ -287,8 +287,8 @@
* @param components the array of components to search
* @return the Component if found, else null
*/
- protected ComponentProfile getComponentProfile( final String name,
- final
ComponentProfile[] components )
+ protected ComponentMetaData getComponentProfile( final String name,
+ final
ComponentMetaData[] components )
{
for( int i = 0; i < components.length; i++ )
{
@@ -307,7 +307,7 @@
* @param components the Components Profile
* @throws VerifyException if an error occurs
*/
- protected void verifyValidNames( final ComponentProfile[] components )
+ protected void verifyValidNames( final ComponentMetaData[] components )
throws VerifyException
{
for( int i = 0; i < components.length; i++ )
@@ -352,7 +352,7 @@
* @param components the Components
* @throws VerifyException if an error occurs
*/
- protected void checkNamesUnique( final ComponentProfile[] components )
+ protected void checkNamesUnique( final ComponentMetaData[] components )
throws VerifyException
{
for( int i = 0; i < components.length; i++ )
@@ -370,7 +370,7 @@
* @param index the index of component in array (so we can skip it)
* @throws VerifyException if names are not unique
*/
- private void verifyUniqueName( final ComponentProfile[] components,
+ private void verifyUniqueName( final ComponentMetaData[] components,
final String name,
final int index )
throws VerifyException
@@ -388,18 +388,18 @@
}
/**
- * Retrieve a list of Association objects for ComponentProfile
+ * Retrieve a list of DependencyMetaData objects for ComponentMetaData
* and verify that there is a 1 to 1 map with dependencies specified
* in ComponentInfo.
*
- * @param component the ComponentProfile describing the component
+ * @param component the ComponentMetaData describing the component
* @throws VerifyException if an error occurs
*/
- protected void verifyDependenciesMap( final ComponentProfile component )
+ protected void verifyDependenciesMap( final ComponentMetaData component )
throws VerifyException
{
//Make sure all role entries specified in config file are valid
- final Association[] dependencySet = component.getDependencies();
+ final DependencyMetaData[] dependencySet =
component.getDependencies();
for( int i = 0; i < dependencySet.length; i++ )
{
@@ -424,7 +424,7 @@
for( int i = 0; i < dependencies.length; i++ )
{
final DependencyDescriptor dependency = dependencies[ i ];
- final Association role = component.getDependency(
dependency.getRole() );
+ final DependencyMetaData role = component.getDependency(
dependency.getRole() );
//If there is no Role then the user has failed
//to specify a needed dependency.
1.8 +16 -16
jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier/MetaDataVerifier.java
Index: MetaDataVerifier.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier/MetaDataVerifier.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- MetaDataVerifier.java 6 Jul 2002 01:13:02 -0000 1.7
+++ MetaDataVerifier.java 19 Jul 2002 01:05:23 -0000 1.8
@@ -14,7 +14,7 @@
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.framework.service.Serviceable;
-import org.apache.excalibur.containerkit.metadata.ComponentProfile;
+import org.apache.excalibur.containerkit.metadata.ComponentMetaData;
import org.apache.excalibur.containerkit.metainfo.ComponentInfo;
import org.apache.excalibur.containerkit.metainfo.ContextDescriptor;
import org.apache.excalibur.containerkit.metainfo.ServiceDescriptor;
@@ -23,7 +23,7 @@
/**
* This Class verifies that an implementation is valid wrt the
* ComponentMetaData. It performs a number of checks to make sure
- * that the implementation class is consistent with ComponentProfile.
+ * that the implementation class is consistent with ComponentMetaData.
* Some of the checks it performs include;
*
* <ul>
@@ -80,13 +80,13 @@
/**
* Verfiy that specified components designate classes that implement the
- * advertised interfaces. And confrorm to expectations of [EMAIL
PROTECTED] ComponentProfile}.
+ * advertised interfaces. And confrorm to expectations of [EMAIL
PROTECTED] ComponentMetaData}.
*
- * @param component the [EMAIL PROTECTED] ComponentProfile} object for
the components
+ * @param component the [EMAIL PROTECTED] ComponentMetaData} object for
the components
* @param classLoader the ClassLoader to load component from
* @throws VerifyException if an error occurs
*/
- public void verifyType( final ComponentProfile component,
+ public void verifyType( final ComponentMetaData component,
final ClassLoader classLoader )
throws VerifyException
{
@@ -96,12 +96,12 @@
/**
* Verfiy that specified components designate classes that implement the
- * advertised interfaces. And confrorm to expectations of [EMAIL
PROTECTED] ComponentProfile}.
+ * advertised interfaces. And confrorm to expectations of [EMAIL
PROTECTED] ComponentMetaData}.
*
- * @param component the [EMAIL PROTECTED] ComponentProfile} object for
the components
+ * @param component the [EMAIL PROTECTED] ComponentMetaData} object for
the components
* @throws VerifyException if an error occurs
*/
- public void verifyType( final ComponentProfile component,
+ public void verifyType( final ComponentMetaData component,
final Class clazz )
throws VerifyException
{
@@ -121,11 +121,11 @@
* Verify that the if the component is not Contextualizable that it
* does not declare Context Entrys.
*
- * @param component the [EMAIL PROTECTED] ComponentProfile}
+ * @param component the [EMAIL PROTECTED] ComponentMetaData}
* @param clazz the class implementing component
* @throws VerifyException if fails verification check
*/
- protected void verifyContextPresence( final ComponentProfile component,
+ protected void verifyContextPresence( final ComponentMetaData component,
final Class clazz )
throws VerifyException
{
@@ -153,11 +153,11 @@
* <p>or</p>
* <p>Is Composable/Serviceable and does declare dependencys</p>
*
- * @param component the [EMAIL PROTECTED] ComponentProfile}
+ * @param component the [EMAIL PROTECTED] ComponentMetaData}
* @param clazz the class implementing component
* @throws VerifyException if fails verification check
*/
- protected void verifyDependencyPresence( final ComponentProfile
component,
+ protected void verifyDependencyPresence( final ComponentMetaData
component,
final Class clazz )
throws VerifyException
{
@@ -218,7 +218,7 @@
}
/**
- * Load class object for specified [EMAIL PROTECTED] ComponentProfile}.
+ * Load class object for specified [EMAIL PROTECTED] ComponentMetaData}.
*
* @param classLoader the ClassLoader to use
* @param component the meta data associate with component
@@ -226,7 +226,7 @@
* @throws VerifyException if unable to aquire class object
*/
private Class getClass( final ClassLoader classLoader,
- final ComponentProfile component )
+ final ComponentMetaData component )
throws VerifyException
{
Class clazz = null;
@@ -252,7 +252,7 @@
* @param component the component
* @return the classname for component
*/
- private String getClassname( final ComponentProfile component )
+ private String getClassname( final ComponentMetaData component )
{
return
component.getComponentInfo().getComponentDescriptor().getImplementationKey();
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>