Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2152 - in development/main/metro: composition/api/src/main/net/dpml/composition/data composition/api/src/test/net/dpml/composition/data/test composition/builder/src/main/net/dpml/composition/builder composition/impl/src/main/net/dpml/composition/model/impl composition/testing/unit/src/test/net/dpml/composition/test meta/api/src/main/net/dpml/meta/info meta/api/src/test/net/dpml/meta/info/test meta/impl/src/main/net/dpml/meta/info/builder/impl meta/impl/src/main/net/dpml/meta/info/verifier meta/tools/src/main/net/dpml/meta/info/tags

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2152 - in development/main/metro: composition/api/src/main/net/dpml/composition/data composition/api/src/test/net/dpml/composition/data/test composition/builder/src/main/net/dpml/composition/builder composition/impl/src/main/net/dpml/composition/model/impl composition/testing/unit/src/test/net/dpml/composition/test meta/api/src/main/net/dpml/meta/info meta/api/src/test/net/dpml/meta/info/test meta/impl/src/main/net/dpml/meta/info/builder/impl meta/impl/src/main/net/dpml/meta/info/verifier meta/tools/src/main/net/dpml/meta/info/tags
  • Date: Sat, 26 Mar 2005 16:05:41 -0500

Author: mcconnell AT dpml.net
Date: Sat Mar 26 16:05:41 2005
New Revision: 2152

Removed:

development/main/metro/meta/api/src/main/net/dpml/meta/info/ParameterDescriptor.java

development/main/metro/meta/api/src/test/net/dpml/meta/info/test/ParameterDescriptorTestCase.java
development/main/metro/meta/impl/src/main/net/dpml/meta/info/verifier/
Modified:

development/main/metro/composition/api/src/main/net/dpml/composition/data/ComponentProfile.java

development/main/metro/composition/api/src/test/net/dpml/composition/data/test/ComponentProfileTestCase.java

development/main/metro/composition/api/src/test/net/dpml/composition/data/test/ContainmentProfileTestCase.java

development/main/metro/composition/builder/src/main/net/dpml/composition/builder/ComponentBuilderTask.java

development/main/metro/composition/builder/src/main/net/dpml/composition/builder/TypeBuilderTask.java

development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultComponentModel.java

development/main/metro/composition/testing/unit/src/test/net/dpml/composition/test/FreightTestCase.java
development/main/metro/meta/api/src/main/net/dpml/meta/info/Type.java

development/main/metro/meta/api/src/test/net/dpml/meta/info/test/TypeTestCase.java

development/main/metro/meta/impl/src/main/net/dpml/meta/info/builder/impl/XMLTypeCreator.java

development/main/metro/meta/tools/src/main/net/dpml/meta/info/tags/TypeTag.java
Log:
sync with changes to meta

Modified:
development/main/metro/composition/api/src/main/net/dpml/composition/data/ComponentProfile.java
==============================================================================
---
development/main/metro/composition/api/src/main/net/dpml/composition/data/ComponentProfile.java
(original)
+++
development/main/metro/composition/api/src/main/net/dpml/composition/data/ComponentProfile.java
Sat Mar 26 16:05:41 2005
@@ -151,7 +151,7 @@
throws NullArgumentException
{
this(
- name, DeploymentProfile.DEFAULT, InfoDescriptor.UNDEFINED,
classname, null, null, null,
+ name, DeploymentProfile.DEFAULT,
InfoDescriptor.UNDEFINED_COLLECTION, classname, null, null, null,
null, null, Mode.IMPLICIT );
}


Modified:
development/main/metro/composition/api/src/test/net/dpml/composition/data/test/ComponentProfileTestCase.java
==============================================================================
---
development/main/metro/composition/api/src/test/net/dpml/composition/data/test/ComponentProfileTestCase.java
(original)
+++
development/main/metro/composition/api/src/test/net/dpml/composition/data/test/ComponentProfileTestCase.java
Sat Mar 26 16:05:41 2005
@@ -75,7 +75,7 @@
m_activation = DeploymentProfile.ENABLED;
m_mode = Mode.IMPLICIT;
m_categories = new CategoriesDirective( new CategoryDirective[0] );
- m_collection = InfoDescriptor.SOFT;
+ m_collection = InfoDescriptor.SOFT_COLLECTION;
}

public void testProfile() throws Exception

Modified:
development/main/metro/composition/api/src/test/net/dpml/composition/data/test/ContainmentProfileTestCase.java
==============================================================================
---
development/main/metro/composition/api/src/test/net/dpml/composition/data/test/ContainmentProfileTestCase.java
(original)
+++
development/main/metro/composition/api/src/test/net/dpml/composition/data/test/ContainmentProfileTestCase.java
Sat Mar 26 16:05:41 2005
@@ -97,7 +97,7 @@
m_activation = DeploymentProfile.ENABLED;
m_mode = Mode.IMPLICIT;
m_categories = new CategoriesDirective( new CategoryDirective[0] );
- m_collection = InfoDescriptor.SOFT;
+ m_collection = InfoDescriptor.SOFT_COLLECTION;
return new ComponentProfile(
name, m_activation, m_collection, m_classname, m_categories,
m_context, m_dependencies, m_parameters,

Modified:
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/ComponentBuilderTask.java
==============================================================================
---
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/ComponentBuilderTask.java
(original)
+++
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/ComponentBuilderTask.java
Sat Mar 26 16:05:41 2005
@@ -377,7 +377,6 @@
try
{
URL url = classloader.getResource( path );
- System.out.println( "# resource url: " + url );
InputStream input = url.openStream();
if( null == input )
{
@@ -474,22 +473,22 @@
{
if( null == m_collection )
{
- return InfoDescriptor.UNDEFINED;
+ return InfoDescriptor.UNDEFINED_COLLECTION;
}
else
{
String spec = m_collection.toLowerCase();
if( "hard".equals( spec ) )
{
- return InfoDescriptor.HARD;
+ return InfoDescriptor.HARD_COLLECTION;
}
else if( "soft".equals( spec ) )
{
- return InfoDescriptor.SOFT;
+ return InfoDescriptor.SOFT_COLLECTION;
}
else if( "weak".equals( spec ) )
{
- return InfoDescriptor.WEAK;
+ return InfoDescriptor.WEAK_COLLECTION;
}
else
{

Modified:
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/TypeBuilderTask.java
==============================================================================
---
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/TypeBuilderTask.java
(original)
+++
development/main/metro/composition/builder/src/main/net/dpml/composition/builder/TypeBuilderTask.java
Sat Mar 26 16:05:41 2005
@@ -40,7 +40,6 @@
import net.dpml.meta.info.EntryDescriptor;
import net.dpml.meta.info.CategoryDescriptor;
import net.dpml.meta.info.PartDescriptor;
-import net.dpml.meta.info.ParameterDescriptor;

import net.dpml.builder.IntrospectionException;

@@ -139,8 +138,7 @@
ContextDescriptor context = createContextDescriptor( subject );
PartDescriptor[] parts = createPartDescriptors( subject );
Configuration config = null;
- ParameterDescriptor[] params = new ParameterDescriptor[0];
- return new Type( info, categories, context, services, dependencies,
config, params, parts );
+ return new Type( info, categories, context, services, dependencies,
config, parts );
}

//---------------------------------------------------------------

Modified:
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultComponentModel.java
==============================================================================
---
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultComponentModel.java
(original)
+++
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultComponentModel.java
Sat Mar 26 16:05:41 2005
@@ -362,14 +362,14 @@
* underlying component type will be used.
*
* @return the collection policy
- * @see InfoDescriptor#WEAK
- * @see InfoDescriptor#SOFT
- * @see InfoDescriptor#HARD
- * @see InfoDescriptor#UNDEFINED
+ * @see InfoDescriptor#WEAK_COLLECTION
+ * @see InfoDescriptor#SOFT_COLLECTION
+ * @see InfoDescriptor#HARD_COLLECTION
+ * @see InfoDescriptor#UNDEFINED_COLLECTION
*/
public int getCollectionPolicy()
{
- if ( m_collection == InfoDescriptor.UNDEFINED )
+ if ( m_collection == InfoDescriptor.UNDEFINED_COLLECTION )
{
return getTypeCollectionPolicy();
}
@@ -384,15 +384,15 @@
*
* @param policy
* the collection policy
- * @see InfoDescriptor#WEAK
- * @see InfoDescriptor#SOFT
- * @see InfoDescriptor#HARD
+ * @see InfoDescriptor#WEAK_COLLECTION
+ * @see InfoDescriptor#SOFT_COLLECTION
+ * @see InfoDescriptor#HARD_COLLECTION
*/
public void setCollectionPolicy( int policy )
{
- if ( policy == InfoDescriptor.UNDEFINED )
+ if ( policy == InfoDescriptor.UNDEFINED_COLLECTION )
{
- m_collection = InfoDescriptor.UNDEFINED;
+ m_collection = policy;
}
else
{

Modified:
development/main/metro/composition/testing/unit/src/test/net/dpml/composition/test/FreightTestCase.java
==============================================================================
---
development/main/metro/composition/testing/unit/src/test/net/dpml/composition/test/FreightTestCase.java
(original)
+++
development/main/metro/composition/testing/unit/src/test/net/dpml/composition/test/FreightTestCase.java
Sat Mar 26 16:05:41 2005
@@ -45,7 +45,7 @@
* Validate that the hello component is deployable and resolvable.
* @exception if a deployment error occurs
*/
- public void testFreight() throws Throwable
+ public void testFreightTrain() throws Throwable
{
try
{

Modified:
development/main/metro/meta/api/src/main/net/dpml/meta/info/Type.java
==============================================================================
--- development/main/metro/meta/api/src/main/net/dpml/meta/info/Type.java
(original)
+++ development/main/metro/meta/api/src/main/net/dpml/meta/info/Type.java
Sat Mar 26 16:05:41 2005
@@ -23,8 +23,6 @@

import net.dpml.configuration.Configuration;

-import net.dpml.parameters.Parameters;
-
/**
* This class contains the meta information about a particular
* component type. It describes;
@@ -55,7 +53,6 @@
private final ServiceDescriptor[] m_services;
private final DependencyDescriptor[] m_dependencies;
private final CategoryDescriptor[] m_loggers;
- private final ParameterDescriptor[] m_parameters;
private final PartDescriptor[] m_parts;

/**
@@ -82,7 +79,6 @@
final ServiceDescriptor[] services,
final DependencyDescriptor[] dependencies,
final Configuration defaults,
- final ParameterDescriptor[] params,
final PartDescriptor[] parts )
throws NullPointerException
{
@@ -114,15 +110,6 @@
m_dependencies = dependencies;
m_configuration = defaults;

- if( null == params )
- {
- m_parameters = new ParameterDescriptor[0];
- }
- else
- {
- m_parameters = params;
- }
-
if( null == parts )
{
m_parts = new PartDescriptor[0];
@@ -271,16 +258,6 @@
}

/**
- * Returns the parameter descriptors for the type.
- *
- * @return the parameter descriptors
- */
- public ParameterDescriptor[] getParameters()
- {
- return m_parameters;
- }
-
- /**
* Returns the part dependencies declared by this compoent type.
*
* @return the part descriptors
@@ -327,21 +304,6 @@
return false;
}

- if( m_parameters.length != t.m_parameters.length )
- {
- return false;
- }
- else
- {
- for( int i=0; i<m_parameters.length; i++ )
- {
- if( ! m_parameters[i].equals( t.m_parameters[i] ) )
- {
- return false;
- }
- }
- }
-
if( m_parts.length != t.m_parts.length )
{
return false;
@@ -390,11 +352,6 @@
{
hash ^= m_configuration.hashCode();
}
- for( int i = 0; i < m_parameters.length; i++ )
- {
- hash ^= m_parameters[i].hashCode();
- hash = hash - 163611323;
- }
for( int i = 0; i < m_parts.length; i++ )
{
hash ^= m_parts[i].hashCode();

Modified:
development/main/metro/meta/api/src/test/net/dpml/meta/info/test/TypeTestCase.java
==============================================================================
---
development/main/metro/meta/api/src/test/net/dpml/meta/info/test/TypeTestCase.java
(original)
+++
development/main/metro/meta/api/src/test/net/dpml/meta/info/test/TypeTestCase.java
Sat Mar 26 16:05:41 2005
@@ -37,7 +37,6 @@
import net.dpml.meta.info.InfoDescriptor;
import net.dpml.meta.info.ReferenceDescriptor;
import net.dpml.meta.info.ServiceDescriptor;
-import net.dpml.meta.info.ParameterDescriptor;
import net.dpml.meta.info.PartDescriptor;
import net.dpml.meta.info.Type;

@@ -45,8 +44,6 @@

import net.dpml.configuration.impl.DefaultConfiguration;

-import net.dpml.parameters.impl.DefaultParameters;
-

/**
* TypeTestCase does XYZ
@@ -62,7 +59,6 @@
private ServiceDescriptor[] m_services;
private DependencyDescriptor[] m_dependencies;
private Configuration m_defaults;
- private ParameterDescriptor[] m_parameters;
private PartDescriptor[] m_parts;
private ReferenceDescriptor m_reference;
private String m_key;
@@ -88,9 +84,6 @@
m_dependencies = new DependencyDescriptor[] {
new DependencyDescriptor("role", m_reference)
};
- m_parameters = new ParameterDescriptor[] {
- new ParameterDescriptor( "key",
ReferenceDescriptor.class.getName() )
- };
m_defaults = new DefaultConfiguration("default");
m_parts = new PartDescriptor[] {
new PartDescriptor( "key", ReferenceDescriptor.class.getName() )
@@ -102,7 +95,6 @@
assertNotNull(type);
checkArray( m_loggers, type.getCategories());
assertEquals( m_defaults, type.getConfiguration() );
- checkArray( m_parameters , type.getParameters() );
assertEquals( m_context, type.getContext());
checkArray( m_dependencies, type.getDependencies());
assertEquals( m_dependencies[0],
type.getDependency(m_dependencies[0].getKey()));
@@ -129,7 +121,7 @@
Type type =
new Type(
m_descriptor, m_loggers, m_context, m_services, m_dependencies,
- m_defaults, m_parameters, m_parts );
+ m_defaults, m_parts );
checkType(type);
}

@@ -138,7 +130,7 @@
Type type =
new Type(
m_descriptor, m_loggers, m_context, m_services, m_dependencies,
- m_defaults, m_parameters, m_parts );
+ m_defaults, m_parts );

checkType( type );


Modified:
development/main/metro/meta/impl/src/main/net/dpml/meta/info/builder/impl/XMLTypeCreator.java
==============================================================================
---
development/main/metro/meta/impl/src/main/net/dpml/meta/info/builder/impl/XMLTypeCreator.java
(original)
+++
development/main/metro/meta/impl/src/main/net/dpml/meta/info/builder/impl/XMLTypeCreator.java
Sat Mar 26 16:05:41 2005
@@ -42,7 +42,6 @@
import net.dpml.meta.info.CategoryDescriptor;
import net.dpml.meta.info.ReferenceDescriptor;
import net.dpml.meta.info.ServiceDescriptor;
-import net.dpml.meta.info.ParameterDescriptor;
import net.dpml.meta.info.PartDescriptor;
import net.dpml.meta.info.Type;

@@ -136,9 +135,6 @@
configuration = info.getChild( "services" );
final ServiceDescriptor[] services = buildServices( configuration );

- configuration = info.getChild( "parameters" );
- final ParameterDescriptor[] params = buildParameters( configuration
);
-
configuration = info.getChild( "parts" );
final PartDescriptor[] parts = buildParts( configuration );

@@ -147,7 +143,7 @@
buildDependencies( configuration );

return new Type(
- descriptor, loggers, context, services, dependencies, defaults,
params, parts );
+ descriptor, loggers, context, services, dependencies, defaults,
parts );
}


@@ -442,61 +438,11 @@
}

/**
- * A utility method to build an array of {@link ParameterDescriptor}
+ * A utility method to build an array of {@link PartDescriptor}
* objects from specified configuration.
*
- * @param configuration the parameters configuration
- * @return the created ParameterDescriptor
- * @throws BuildException if an error occurs
- */
- public ParameterDescriptor[] buildParameters( final Configuration
configuration )
- throws BuildException
- {
- final Configuration[] elements = configuration.getChildren(
"parameter" );
- final ArrayList dependencies = new ArrayList();
-
- for( int i = 0; i < elements.length; i++ )
- {
- final ParameterDescriptor param =
- buildParameterDescriptor( elements[ i ] );
- dependencies.add( param );
- }
-
- return (ParameterDescriptor[])dependencies.toArray( new
ParameterDescriptor[ 0 ] );
- }
-
- /**
- * A utility method to build a {@link ParameterDescriptor}
- * object from specified configuration.
- *
- * @param parameter the parameter configuration
- * @return the created DependencyDescriptor
- * @throws BuildException if an error occurs
- */
- protected ParameterDescriptor buildParameterDescriptor( final
Configuration config )
- throws BuildException
- {
- try
- {
- String key = config.getAttribute( "key" );
- String type = config.getAttribute( "type" );
- boolean required = config.getAttributeAsBoolean( "required",
true );
- return new ParameterDescriptor( key, type, required );
- }
- catch( ConfigurationException e )
- {
- final String error =
- "Mallformed configuration - check usage of key, type and/or
required attributes.";
- throw new BuildException( error, e );
- }
- }
-
- /**
- * A utility method to build an array of {@link ParameterDescriptor}
- * objects from specified configuration.
- *
- * @param configuration the parameters configuration
- * @return the created ParameterDescriptor
+ * @param configuration the parts configuration
+ * @return the created PartDescriptor
* @throws BuildException if an error occurs
*/
public PartDescriptor[] buildParts( final Configuration configuration )
@@ -516,11 +462,11 @@
}

/**
- * A utility method to build a {@link ParameterDescriptor}
+ * A utility method to build a {@link PartDescriptor}
* object from specified configuration.
*
- * @param parameter the parameter configuration
- * @return the created DependencyDescriptor
+ * @param parameter the part configuration
+ * @return the created PartDescriptor
* @throws BuildException if an error occurs
*/
protected PartDescriptor buildPartDescriptor( final Configuration config
)

Modified:
development/main/metro/meta/tools/src/main/net/dpml/meta/info/tags/TypeTag.java
==============================================================================
---
development/main/metro/meta/tools/src/main/net/dpml/meta/info/tags/TypeTag.java
(original)
+++
development/main/metro/meta/tools/src/main/net/dpml/meta/info/tags/TypeTag.java
Sat Mar 26 16:05:41 2005
@@ -27,7 +27,6 @@
import net.dpml.meta.info.InfoDescriptor;
import net.dpml.meta.info.CategoryDescriptor;
import net.dpml.meta.info.ServiceDescriptor;
-import net.dpml.meta.info.ParameterDescriptor;
import net.dpml.meta.info.PartDescriptor;
import net.dpml.meta.info.Type;

@@ -137,11 +136,10 @@
// unsuppported elements
//

- final ParameterDescriptor[] params = new ParameterDescriptor[0];
final PartDescriptor[] parts = new PartDescriptor[0];

return new Type(
- info, loggers, context, services, dependencies, null, params,
parts );
+ info, loggers, context, services, dependencies, null, parts );
}

private String getName(DocletTag tag)



  • svn commit: r2152 - in development/main/metro: composition/api/src/main/net/dpml/composition/data composition/api/src/test/net/dpml/composition/data/test composition/builder/src/main/net/dpml/composition/builder composition/impl/src/main/net/dpml/composition/model/impl composition/testing/unit/src/test/net/dpml/composition/test meta/api/src/main/net/dpml/meta/info meta/api/src/test/net/dpml/meta/info/test meta/impl/src/main/net/dpml/meta/info/builder/impl meta/impl/src/main/net/dpml/meta/info/verifier meta/tools/src/main/net/dpml/meta/info/tags, mcconnell, 03/26/2005

Archive powered by MHonArc 2.6.24.

Top of Page