You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2002/07/13 23:28:19 UTC
cvs commit: jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/doc-files uml.gif
mcconnell 2002/07/13 14:28:18
Modified: assembly/src/java/org/apache/excalibur/merlin/container
DefaultContainer.java ProfileRegistry.java
assembly/src/java/org/apache/excalibur/merlin/model
Association.java ContainerDescriptor.java
assembly/src/java/org/apache/excalibur/merlin/model/builder
XMLContainerCreator.java XMLKernelCreator.java
XMLProfileCreator.java
assembly/src/java/org/apache/excalibur/merlin/model/doc-files
uml.gif
Removed: assembly/src/java/org/apache/excalibur/merlin/model
ComponentProfile.java
Log:
cleaning up
Revision Changes Path
1.7 +5 -8 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultContainer.java
Index: DefaultContainer.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/DefaultContainer.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DefaultContainer.java 13 Jul 2002 15:35:25 -0000 1.6
+++ DefaultContainer.java 13 Jul 2002 21:28:18 -0000 1.7
@@ -65,7 +65,7 @@
import org.apache.excalibur.meta.info.ServiceDesignator;
import org.apache.excalibur.meta.verifier.VerifyException;
import org.apache.excalibur.merlin.model.Profile;
-import org.apache.excalibur.merlin.model.ComponentProfile;
+import org.apache.excalibur.merlin.model.Profile;
import org.apache.excalibur.merlin.model.ContainerDescriptor;
import org.apache.excalibur.merlin.model.CategoryDescriptor;
import org.apache.excalibur.merlin.model.verifier.AssemblyVerifier;
@@ -225,7 +225,7 @@
//
getLogger().debug("explicit profile registration");
- ComponentProfile[] children = m_descriptor.getComponents( Profile.EXPLICIT, true );
+ Profile[] children = m_descriptor.getComponents( Profile.EXPLICIT, true );
for( int i=0; i<children.length; i++ )
{
m_profiles.register( children[i] );
@@ -243,11 +243,8 @@
for( int j=0; j<profiles.length; j++ )
{
Profile profile = profiles[j];
- if( profile instanceof ComponentProfile )
- {
- m_descriptor.addComponent( (ComponentProfile) profile );
- m_profiles.register( profile );
- }
+ m_descriptor.addComponent( (Profile) profile );
+ m_profiles.register( profile );
}
}
1.7 +2 -3 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/ProfileRegistry.java
Index: ProfileRegistry.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/container/ProfileRegistry.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ProfileRegistry.java 13 Jul 2002 15:35:25 -0000 1.6
+++ ProfileRegistry.java 13 Jul 2002 21:28:18 -0000 1.7
@@ -32,7 +32,6 @@
import org.apache.excalibur.merlin.model.builder.TypeManager;
import org.apache.excalibur.merlin.model.Profile;
import org.apache.excalibur.merlin.model.ContainerDescriptor;
-import org.apache.excalibur.merlin.model.ComponentProfile;
import org.apache.excalibur.merlin.model.builder.ProfileBuilder;
/**
@@ -114,7 +113,7 @@
public Profile[] getProviders( ServiceDesignator designator )
{
ArrayList list = new ArrayList();
- ComponentProfile[] local = m_descriptor.getComponents( true );
+ Profile[] local = m_descriptor.getComponents( true );
for( int i=0; i<local.length; i++ )
{
Profile profile = local[i];
1.2 +3 -3 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/Association.java
Index: Association.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/Association.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Association.java 12 Jul 2002 12:04:55 -0000 1.1
+++ Association.java 13 Jul 2002 21:28:18 -0000 1.2
@@ -39,7 +39,7 @@
* Create Profile with specified name and role.
*
* @param role the name client uses to access component
- * @param providerName the name of <code>ComponentProfile</code> instance
+ * @param providerName the name of <code>Profile</code> instance
* that is associated as a service provider
*/
public Association( final String role,
@@ -62,7 +62,7 @@
}
/**
- * Return the name of a <code>ComponentProfile</code> instance that will used to
+ * Return the name of a <code>Profile</code> instance that will used to
* fulfill the dependency.
*
* @return the name of the Component that will provide the dependency.
1.5 +15 -15 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/ContainerDescriptor.java
Index: ContainerDescriptor.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/ContainerDescriptor.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ContainerDescriptor.java 13 Jul 2002 15:35:25 -0000 1.4
+++ ContainerDescriptor.java 13 Jul 2002 21:28:18 -0000 1.5
@@ -55,7 +55,7 @@
public ContainerDescriptor( final String name,
final CategoryDescriptor loggers,
final ClasspathDescriptor classpath,
- final ComponentProfile[] components,
+ final Profile[] components,
final ContainerDescriptor[] containers )
{
super( name, loggers );
@@ -112,7 +112,7 @@
*
* @param component the component profile to add to the container
*/
- public void addComponent( ComponentProfile component )
+ public void addComponent( Profile component )
{
if( !m_components.contains( component ) )
{
@@ -126,9 +126,9 @@
*
* @return the target descriptors
*/
- public ComponentProfile[] getComponents()
+ public Profile[] getComponents()
{
- return (ComponentProfile[]) m_components.toArray( new ComponentProfile[0] );
+ return (Profile[]) m_components.toArray( new Profile[0] );
}
/**
@@ -136,17 +136,17 @@
* @param enabled TRUE to select enabled components, FALSE returs disabled components
* @return the descriptors matching the supplied enabled status
*/
- public ComponentProfile[] getComponents( boolean enabled )
+ public Profile[] getComponents( boolean enabled )
{
ArrayList list = new ArrayList();
- ComponentProfile[] components = getComponents();
+ Profile[] components = getComponents();
for( int i=0; i<components.length; i++ )
{
- ComponentProfile component = components[i];
+ Profile component = components[i];
if( component.isEnabled() == enabled )
list.add( component );
}
- return (ComponentProfile[] ) list.toArray( new ComponentProfile[0] );
+ return (Profile[] ) list.toArray( new Profile[0] );
}
/**
@@ -157,10 +157,10 @@
* @param enabled TRUE to select enabled components, FALSE returs disabled compoents
* @return the descriptors matching the supplied creation mode
*/
- public ComponentProfile[] getComponents( int mode, boolean enabled )
+ public Profile[] getComponents( int mode, boolean enabled )
{
ArrayList list = new ArrayList();
- ComponentProfile[] components = getComponents( enabled );
+ Profile[] components = getComponents( enabled );
return selectComponentsByMode( components, mode );
}
@@ -171,21 +171,21 @@
* or {@link Profile#EXPLICIT},
* @return the descriptors matching the supplied creation mode
*/
- public ComponentProfile[] getComponents( int mode )
+ public Profile[] getComponents( int mode )
{
return selectComponentsByMode( getComponents(), mode );
}
- private ComponentProfile[] selectComponentsByMode( ComponentProfile[] components, int mode )
+ private Profile[] selectComponentsByMode( Profile[] components, int mode )
{
ArrayList list = new ArrayList();
for( int i=0; i<components.length; i++ )
{
- ComponentProfile component = components[i];
+ Profile component = components[i];
if( component.getMode() == mode )
list.add( component );
}
- return (ComponentProfile[] ) list.toArray( new ComponentProfile[0] );
+ return (Profile[] ) list.toArray( new Profile[0] );
}
/**
1.3 +4 -6 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLContainerCreator.java
Index: XMLContainerCreator.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLContainerCreator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLContainerCreator.java 12 Jul 2002 19:09:27 -0000 1.2
+++ XMLContainerCreator.java 13 Jul 2002 21:28:18 -0000 1.3
@@ -22,13 +22,11 @@
import org.apache.excalibur.meta.info.Type;
import org.apache.excalibur.configuration.ContextFactory;
import org.apache.excalibur.merlin.model.Profile;
-import org.apache.excalibur.merlin.model.Profile;
import org.apache.excalibur.merlin.model.CategoryDescriptor;
import org.apache.excalibur.merlin.model.IncludeDescriptor ;
import org.apache.excalibur.merlin.model.FilesetDescriptor;
import org.apache.excalibur.merlin.model.ClasspathDescriptor;
import org.apache.excalibur.merlin.model.ContainerDescriptor;
-import org.apache.excalibur.merlin.model.ComponentProfile;
import org.apache.excalibur.merlin.model.builder.TypeManager;
/**
@@ -73,7 +71,7 @@
ClasspathDescriptor classpath = createClasspathDescriptor( config.getChild("classpath") );
manager.addClasspath( classpath );
- ComponentProfile[] components = createComponentProfiles(
+ Profile[] components = createComponentProfiles(
manager, config.getChildren("component") );
ContainerDescriptor[] containers = createContainerDescriptors(
@@ -82,7 +80,7 @@
return new ContainerDescriptor( name, loggers, classpath, components, containers );
}
- public ComponentProfile[] createComponentProfiles( TypeManager manager, Configuration[] configs )
+ public Profile[] createComponentProfiles( TypeManager manager, Configuration[] configs )
throws Exception
{
ArrayList list = new ArrayList();
@@ -92,7 +90,7 @@
Type type = manager.lookup( config.getAttribute("class") );
list.add( super.createProfile( type, config ) );
}
- return (ComponentProfile[]) list.toArray( new ComponentProfile[0] );
+ return (Profile[]) list.toArray( new Profile[0] );
}
public ClasspathDescriptor createClasspathDescriptor( Configuration config )
1.3 +1 -3 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLKernelCreator.java
Index: XMLKernelCreator.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLKernelCreator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLKernelCreator.java 12 Jul 2002 19:09:27 -0000 1.2
+++ XMLKernelCreator.java 13 Jul 2002 21:28:18 -0000 1.3
@@ -18,13 +18,11 @@
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.excalibur.meta.info.Type;
import org.apache.excalibur.merlin.model.Profile;
-import org.apache.excalibur.merlin.model.Profile;
import org.apache.excalibur.merlin.model.CategoryDescriptor;
import org.apache.excalibur.merlin.model.IncludeDescriptor ;
import org.apache.excalibur.merlin.model.FilesetDescriptor;
import org.apache.excalibur.merlin.model.ClasspathDescriptor;
import org.apache.excalibur.merlin.model.ContainerDescriptor;
-import org.apache.excalibur.merlin.model.ComponentProfile;
import org.apache.excalibur.merlin.model.DirsetDescriptor;
import org.apache.excalibur.merlin.model.ExtensionsDescriptor;
import org.apache.excalibur.merlin.model.KernelDescriptor;
1.4 +3 -5 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLProfileCreator.java
Index: XMLProfileCreator.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/builder/XMLProfileCreator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XMLProfileCreator.java 13 Jul 2002 15:35:25 -0000 1.3
+++ XMLProfileCreator.java 13 Jul 2002 21:28:18 -0000 1.4
@@ -23,9 +23,7 @@
import org.apache.excalibur.meta.info.builder.XMLTypeCreator;
import org.apache.excalibur.meta.ConfigurationBuilder;
import org.apache.excalibur.merlin.model.Profile;
-import org.apache.excalibur.merlin.model.Profile;
import org.apache.excalibur.merlin.model.CategoryDescriptor;
-import org.apache.excalibur.merlin.model.ComponentProfile;
import org.apache.excalibur.configuration.ContextFactory;
import org.xml.sax.InputSource;
@@ -84,7 +82,7 @@
type.getInfo().getName(), null, null );
return new Profile[]{
- new ComponentProfile( null, null, null, null, loggers, type, true, Profile.IMPLICIT ) };
+ new Profile( null, null, null, null, loggers, type, true, Profile.IMPLICIT ) };
}
for( int i=0; i<profiles.length; i++ )
{
@@ -113,7 +111,7 @@
CategoryDescriptor loggers = createCategoryDescriptor( loggersConfig, name );
Context context = ContextFactory.createContextFromConfiguration(
null, profile.getChild("context") );
- return new ComponentProfile( name, params, config, context, loggers, type, enabled, mode );
+ return new Profile( name, params, config, context, loggers, type, enabled, mode );
}
public CategoryDescriptor createCategoryDescriptor( Configuration config, String fallback )
1.2 +18 -13 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/doc-files/uml.gif
<<Binary file>>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>