Skip to Content.
Sympa Menu

notify-dpml - r975 - in trunk/main/metro: exec/src/main/net/dpml/metro/exec model/src/main/net/dpml/metro model/src/main/net/dpml/metro/control model/src/main/net/dpml/metro/model model/src/test/net/dpml/metro model/src/test/net/dpml/metro/model model/src/test/net/dpml/metro/test runtime/src/main/net/dpml/metro/runtime test/src/main/net/dpml/test/app test/src/main/net/dpml/test/composite test/src/test/net/dpml/metro/runtime/test

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r975 - in trunk/main/metro: exec/src/main/net/dpml/metro/exec model/src/main/net/dpml/metro model/src/main/net/dpml/metro/control model/src/main/net/dpml/metro/model model/src/test/net/dpml/metro model/src/test/net/dpml/metro/model model/src/test/net/dpml/metro/test runtime/src/main/net/dpml/metro/runtime test/src/main/net/dpml/test/app test/src/main/net/dpml/test/composite test/src/test/net/dpml/metro/runtime/test
  • Date: Thu, 26 Jan 2006 04:55:12 +0100

Author: mcconnell
Date: 2006-01-26 04:55:03 +0100 (Thu, 26 Jan 2006)
New Revision: 975

Added:
trunk/main/metro/model/src/main/net/dpml/metro/ComponentHandler.java
trunk/main/metro/model/src/main/net/dpml/metro/ComponentManager.java

trunk/main/metro/model/src/main/net/dpml/metro/ComponentModelOperations.java
trunk/main/metro/model/src/main/net/dpml/metro/ContextManager.java
trunk/main/metro/model/src/main/net/dpml/metro/ContextModelOperations.java
trunk/main/metro/model/src/main/net/dpml/metro/PartsManager.java
trunk/main/metro/model/src/main/net/dpml/metro/ValidationException.java
trunk/main/metro/model/src/test/net/dpml/metro/test/
Removed:

trunk/main/metro/model/src/main/net/dpml/metro/control/ComponentHandler.java

trunk/main/metro/model/src/main/net/dpml/metro/control/ComponentManager.java
trunk/main/metro/model/src/main/net/dpml/metro/control/ContextManager.java
trunk/main/metro/model/src/main/net/dpml/metro/control/PartsManager.java

trunk/main/metro/model/src/main/net/dpml/metro/model/ComponentModelOperations.java

trunk/main/metro/model/src/main/net/dpml/metro/model/ContextModelOperations.java

trunk/main/metro/model/src/main/net/dpml/metro/model/ValidationException.java
trunk/main/metro/model/src/test/net/dpml/metro/model/test/
Modified:
trunk/main/metro/exec/src/main/net/dpml/metro/exec/ComponentAdapter.java
trunk/main/metro/model/src/main/net/dpml/metro/model/ComponentModel.java
trunk/main/metro/model/src/main/net/dpml/metro/model/ContextModel.java

trunk/main/metro/model/src/test/net/dpml/metro/test/ValidationExceptionTestCase.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/PartsInvocationHandler.java
trunk/main/metro/test/src/main/net/dpml/test/app/Demo.java
trunk/main/metro/test/src/main/net/dpml/test/composite/PartsComponent.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/CompositeTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ContextModelTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ObserverTestCase.java
Log:
internal parts stuff - enhancement to naming

Modified:
trunk/main/metro/exec/src/main/net/dpml/metro/exec/ComponentAdapter.java
===================================================================
--- trunk/main/metro/exec/src/main/net/dpml/metro/exec/ComponentAdapter.java
2006-01-25 11:17:50 UTC (rev 974)
+++ trunk/main/metro/exec/src/main/net/dpml/metro/exec/ComponentAdapter.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -44,8 +44,8 @@

import net.dpml.metro.model.ComponentModel;
import net.dpml.metro.model.ContextModel;
-import net.dpml.metro.control.ComponentManager;
-import net.dpml.metro.control.ContextManager;
+import net.dpml.metro.ComponentManager;
+import net.dpml.metro.ContextManager;

import net.dpml.configuration.Configurable;
import net.dpml.configuration.Configuration;

Copied: trunk/main/metro/model/src/main/net/dpml/metro/ComponentHandler.java
(from rev 974,
trunk/main/metro/model/src/main/net/dpml/metro/control/ComponentHandler.java)
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/control/ComponentHandler.java
2006-01-25 11:17:50 UTC (rev 974)
+++ trunk/main/metro/model/src/main/net/dpml/metro/ComponentHandler.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2005 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.metro;
+
+import java.util.Map;
+
+import net.dpml.part.ComponentOperations;
+
+import net.dpml.metro.model.ComponentModel;
+
+/**
+ * Local interface through which a component implementation may
+ * interact with subsidary parts.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public interface ComponentHandler extends ComponentOperations
+{
+ /**
+ * Return a mutible context map.
+ *
+ * @return the context map
+ */
+ Map getContextMap();
+
+ /**
+ * Return the component model manager associated with the component
handler.
+ * @return the component model manager
+ */
+ ComponentManager getComponentManager();
+
+ /**
+ * Return the internal parts manager.
+ * @return the parts manager
+ */
+ PartsManager getPartsManager();
+}
+

Copied: trunk/main/metro/model/src/main/net/dpml/metro/ComponentManager.java
(from rev 974,
trunk/main/metro/model/src/main/net/dpml/metro/control/ComponentManager.java)
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/control/ComponentManager.java
2006-01-25 11:17:50 UTC (rev 974)
+++ trunk/main/metro/model/src/main/net/dpml/metro/ComponentManager.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2005 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.metro;
+
+import java.rmi.RemoteException;
+
+import net.dpml.metro.info.CollectionPolicy;
+
+import net.dpml.part.ActivationPolicy;
+
+import net.dpml.metro.ComponentModelOperations;
+
+import net.dpml.lang.UnknownKeyException;
+
+/**
+ * The MutableComponentModel interface extends ComponentModel with a set of
+ * operations supporting model changes.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public interface ComponentManager extends ComponentModelOperations
+{
+ /**
+ * Return the set of component model keys.
+ * @return the component part keys
+ */
+ String[] getPartKeys();
+
+ /**
+ * Return the set of component model keys.
+ * @return the component part keys
+ */
+ ComponentManager getComponentManager( String key ) throws
UnknownKeyException;
+
+ /**
+ * Return the context model manager.
+ * @return the context model manager
+ */
+ ContextManager getContextManager();
+
+ /**
+ * Set the component activation policy to the supplied value.
+ * @param policy the new activation policy
+ * @exception RemoteException if a remote exception occurs
+ */
+ void setActivationPolicy( ActivationPolicy policy );
+
+ /**
+ * Override the assigned collection policy.
+ * @param policy the collection policy value
+ * @exception RemoteException if a remote exception occurs
+ */
+ void setCollectionPolicy( CollectionPolicy policy );
+}
+

Copied:
trunk/main/metro/model/src/main/net/dpml/metro/ComponentModelOperations.java
(from rev 973,
trunk/main/metro/model/src/main/net/dpml/metro/model/ComponentModelOperations.java)
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/model/ComponentModelOperations.java
2006-01-25 11:14:50 UTC (rev 973)
+++
trunk/main/metro/model/src/main/net/dpml/metro/ComponentModelOperations.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2005 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.metro;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+import net.dpml.metro.info.LifestylePolicy;
+import net.dpml.metro.info.CollectionPolicy;
+import net.dpml.metro.data.ClassLoaderDirective;
+import net.dpml.metro.data.CategoryDirective;
+
+import net.dpml.part.remote.Model;
+
+import net.dpml.configuration.Configuration;
+
+import net.dpml.parameters.Parameters;
+
+import net.dpml.lang.UnknownKeyException;
+
+/**
+ * The ComponentModel interface defines the remotely accessible aspects of a
component
+ * configuration.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public interface ComponentModelOperations
+{
+ /**
+ * Return the component name.
+ * @return the name
+ * @exception RemoteException if a remote exception occurs
+ */
+ String getName() throws RemoteException;
+
+ /**
+ * Return the component implementation class name.
+ *
+ * @return the classname of the implementation
+ * @exception RemoteException if a remote exception occurs
+ */
+ String getImplementationClassName() throws RemoteException;
+
+ /**
+ * Return the component classloader directive.
+ *
+ * @return the classloader directive for the component
+ * @exception RemoteException if a remote exception occurs
+ */
+ ClassLoaderDirective getClassLoaderDirective() throws RemoteException;
+
+ /**
+ * Return the component lifestyle policy.
+ *
+ * @return the lifestyle policy value
+ * @exception RemoteException if a remote exception occurs
+ */
+ LifestylePolicy getLifestylePolicy() throws RemoteException;
+
+ /**
+ * Return the current component collection policy. If null, the component
+ * type collection policy will be returned.
+ *
+ * @return a HARD, WEAK, SOFT or SYSTEM
+ * @exception RemoteException if a remote exception occurs
+ */
+ CollectionPolicy getCollectionPolicy() throws RemoteException;
+
+ /**
+ * Return the set of component model keys.
+ * @return the component part keys
+ * @exception RemoteException if a remote exception occurs
+ */
+ //String[] getPartKeys() throws RemoteException;
+
+ /**
+ * Return the component model of an internal part referenced by the
supplied key.
+ * @param key the part key
+ * @return the internal part component model
+ * @exception UnknownKeyException if the key is unknown
+ * @exception RemoteException if a remote exception occurs
+ */
+ //ComponentModel getComponentModel( String key ) throws
UnknownKeyException, RemoteException;
+
+ /**
+ * Return the component configuration.
+ * @return the configuration
+ * @exception RemoteException if a remote exception occurs
+ */
+ Configuration getConfiguration() throws RemoteException;
+
+ /**
+ * Return the component parameters.
+ * @return the parameters
+ * @exception RemoteException if a remote exception occurs
+ */
+ Parameters getParameters() throws RemoteException;
+
+ /**
+ * Return the component logging categories.
+ * @return the categories
+ * @exception RemoteException if a remote exception occurs
+ */
+ CategoryDirective[] getCategoryDirectives() throws RemoteException;
+
+}
+

Copied: trunk/main/metro/model/src/main/net/dpml/metro/ContextManager.java
(from rev 974,
trunk/main/metro/model/src/main/net/dpml/metro/control/ContextManager.java)
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/control/ContextManager.java
2006-01-25 11:17:50 UTC (rev 974)
+++ trunk/main/metro/model/src/main/net/dpml/metro/ContextManager.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2005 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.metro;
+
+import java.rmi.RemoteException;
+
+import net.dpml.metro.info.PartReference;
+import net.dpml.part.Directive;
+
+import net.dpml.lang.UnknownKeyException;
+
+import net.dpml.metro.ContextModelOperations;
+
+/**
+ * The MutableContextModel interface extends ContextModel with operations
supporting
+ * context entry value mutation.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public interface ContextManager extends ContextModelOperations
+{
+ /**
+ * Set a context entry value.
+ * @param key the context entry key
+ * @param value the context entry value
+ * @exception UnknownKeyException if the key is unknown
+ */
+ //void setEntry( String key, Object value ) throws UnknownKeyException;
+
+ /**
+ * Return a context entry value.
+ * @return the context entry value
+ * @exception UnknownKeyException if the key is unknown
+ */
+ //Object getEntry( String key ) throws UnknownKeyException;
+
+ /**
+ * Set a context entry directive value.
+ * @param key the context entry key
+ * @param directive the context entry directive
+ * @exception UnknownKeyException if the key is unknown
+ */
+ void setEntryDirective( String key, Directive directive ) throws
UnknownKeyException;
+
+ /**
+ * Apply an array of tagged directive as an atomic operation.
Application of
+ * directives to the context model is atomic such that changes are
applied under a
+ * 'all-or-nothing' policy.
+ *
+ * @param directives an array of part references
+ * @exception UnknownKeyException if a key within the array does not
match a key within
+ * the context model.
+ */
+ void setEntryDirectives( PartReference[] directives ) throws
UnknownKeyException;
+
+}

Copied:
trunk/main/metro/model/src/main/net/dpml/metro/ContextModelOperations.java
(from rev 973,
trunk/main/metro/model/src/main/net/dpml/metro/model/ContextModelOperations.java)
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/model/ContextModelOperations.java
2006-01-25 11:14:50 UTC (rev 973)
+++
trunk/main/metro/model/src/main/net/dpml/metro/ContextModelOperations.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2005 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.metro;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+import net.dpml.metro.info.EntryDescriptor;
+import net.dpml.part.Directive;
+
+import net.dpml.lang.UnknownKeyException;
+
+/**
+ * The ContextModelOperations interface defines the common local and
remotely accessible component context.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public interface ContextModelOperations
+{
+ /**
+ * Return the set of context entries descriptors.
+ *
+ * @return context entry descriptor array
+ * @exception RemoteException if a remote exception occurs
+ */
+ EntryDescriptor[] getEntryDescriptors() throws RemoteException;
+
+ /**
+ * Return a of context entry descriptor.
+ *
+ * @param key the entry key
+ * @return the entry descriptor
+ * @exception UnknownKeyException if the key is unknown
+ * @exception RemoteException if a remote exception occurs
+ */
+ EntryDescriptor getEntryDescriptor( String key ) throws
UnknownKeyException, RemoteException;
+
+ /**
+ * Return the current directive assigned to a context entry.
+ * @param key the context entry key
+ * @return the directive
+ * @exception UnknownKeyException if the key is unknown
+ * @exception RemoteException if a remote exception occurs
+ */
+ Directive getEntryDirective( String key ) throws UnknownKeyException,
RemoteException;
+
+ /**
+ * Validate the model.
+ * @exception ValidationException if one or more issues exist within the
model
+ * @exception RemoteException if a remote exception occurs
+ */
+ void validate() throws ValidationException, RemoteException;
+}

Copied: trunk/main/metro/model/src/main/net/dpml/metro/PartsManager.java
(from rev 973,
trunk/main/metro/model/src/main/net/dpml/metro/control/PartsManager.java)
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/control/PartsManager.java
2006-01-25 11:14:50 UTC (rev 973)
+++ trunk/main/metro/model/src/main/net/dpml/metro/PartsManager.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2005 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.metro;
+
+import net.dpml.part.ControlException;
+import net.dpml.part.remote.Component;
+import net.dpml.part.remote.Model;
+
+import net.dpml.lang.UnknownKeyException;
+
+/**
+ * Local interface through which a component implementation may
+ * interact with subsidary parts.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public interface PartsManager
+{
+ /**
+ * Return the array of keys used to idenetity internal parts.
+ * @return the part key array
+ */
+ String[] getKeys();
+
+ /**
+ * Return a local component handler.
+ * @param key the internal part key
+ * @return the local component handler
+ * @exception UnknownKeyException the key is not recognized
+ */
+ ComponentHandler getComponentHandler( String key ) throws
UnknownKeyException;
+
+ /**
+ * Return the commissioned state of the part collection.
+ * @return true if commissioned else false
+ */
+ boolean isCommissioned();
+
+ /**
+ * Initiate the oprdered activation of all internal parts.
+ * @exception ControlException if an activation error occurs
+ */
+ void commission() throws ControlException;
+
+ /**
+ * Initiate deactivation of all internal parts.
+ */
+ void decommission();
+}
+

Copied:
trunk/main/metro/model/src/main/net/dpml/metro/ValidationException.java (from
rev 973,
trunk/main/metro/model/src/main/net/dpml/metro/model/ValidationException.java)
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/model/ValidationException.java
2006-01-25 11:14:50 UTC (rev 973)
+++ trunk/main/metro/model/src/main/net/dpml/metro/ValidationException.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -0,0 +1,207 @@
+/*
+ * Copyright 2005 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.metro;
+
+import java.io.Serializable;
+import java.net.URI;
+
+import net.dpml.part.remote.ModelException;
+
+/**
+ * Exception that describes a series of validation issues.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public final class ValidationException extends ModelException
+{
+
//--------------------------------------------------------------------------
+ // static
+
//--------------------------------------------------------------------------
+
+ /**
+ * Serial version identifier.
+ */
+ static final long serialVersionUID = 1L;
+
+
//--------------------------------------------------------------------------
+ // state
+
//--------------------------------------------------------------------------
+
+ private final Object m_source;
+ private final Issue[] m_issues;
+
+
//--------------------------------------------------------------------------
+ // constructor
+
//--------------------------------------------------------------------------
+
+ /**
+ * Creation of a new <tt>ValidationException</tt>.
+ * @param uri controller uri
+ * @param source the source object
+ * @param issues the array of issues
+ */
+ public ValidationException( URI uri, Object source, Issue[] issues )
+ {
+ super( uri, createMessage( source, issues ) );
+ if( null == source )
+ {
+ throw new NullPointerException( "source" );
+ }
+ if( null == issues )
+ {
+ throw new NullPointerException( "issues" );
+ }
+ m_source = source;
+ m_issues = issues;
+ }
+
+ /**
+ * Return the source object.
+ * @return the source of the validation errors
+ */
+ public Object getSource()
+ {
+ return m_source;
+ }
+
+ /**
+ * Return the array iof issues.
+ * @return the issues array
+ */
+ public Issue[] getIssues()
+ {
+ return m_issues;
+ }
+
+
//--------------------------------------------------------------------------
+ // utilities
+
//--------------------------------------------------------------------------
+
+ private static String createMessage( final Object source, final Issue[]
issues )
+ {
+ if( null == source )
+ {
+ throw new NullPointerException( "source" );
+ }
+ if( null == issues )
+ {
+ throw new NullPointerException( "issues" );
+ }
+ String message =
+ "Validation failure in ["
+ + source.getClass().getName()
+ + "#"
+ + System.identityHashCode( source )
+ + "] due to ["
+ + issues.length
+ + "] unresolved issue(s).";
+ return message;
+ }
+
+ /**
+ * Issue implementation.
+ */
+ public static final class Issue implements Serializable
+ {
+ private final String m_issueKey;
+ private final String m_issueMessage;
+
+ /**
+ * Creation of a new issue.
+ * @param key the key
+ * @param message the message
+ */
+ public Issue( String key, String message )
+ {
+ if( null == key )
+ {
+ throw new NullPointerException( "key" );
+ }
+ if( null == message )
+ {
+ throw new NullPointerException( "message" );
+ }
+ m_issueKey = key;
+ m_issueMessage = message;
+ }
+
+ /**
+ * Return the issue key.
+ * @return the key
+ */
+ public String getKey()
+ {
+ return m_issueKey;
+ }
+
+ /**
+ * Return the issue message.
+ * @return the message
+ */
+ public String getMessage()
+ {
+ return m_issueMessage;
+ }
+
+ /**
+ * Test is the supplied object is equal to this object.
+ * @param other the other object
+ * @return true if the object are equivalent
+ */
+ public boolean equals( Object other )
+ {
+ if( null == other )
+ {
+ return false;
+ }
+ else if( other instanceof Issue )
+ {
+ Issue issue = (Issue) other;
+ if( !m_issueKey.equals( issue.m_issueKey ) )
+ {
+ return false;
+ }
+ return m_issueMessage.equals( issue.m_issueMessage );
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Return the hashcode for the object.
+ * @return the hashcode value
+ */
+ public int hashCode()
+ {
+ return m_issueKey.hashCode() + m_issueMessage.hashCode();
+ }
+
+ /**
+ * Return a string representation of the type.
+ * @return the stringified type
+ */
+ public String toString()
+ {
+ return "issue:[" + m_issueKey + "] " + m_issueMessage;
+ }
+ }
+}

Deleted:
trunk/main/metro/model/src/main/net/dpml/metro/control/ComponentHandler.java
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/control/ComponentHandler.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/model/src/main/net/dpml/metro/control/ComponentHandler.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -1,61 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.metro.control;
-
-import java.util.Map;
-
-import net.dpml.part.ComponentOperations;
-
-import net.dpml.metro.model.ComponentModel;
-
-/**
- * Local interface through which a component implementation may
- * interact with subsidary parts.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public interface ComponentHandler extends ComponentOperations
-{
- /**
- * Return a mutible context map.
- *
- * @return the context map
- */
- Map getContextMap();
-
- /**
- * Return the component model associated with the component handler.
- * @return the component model
- */
- //ComponentModel getComponentModel();
-
- /**
- * Return the component model manager associated with the component
handler.
- * @return the component model manager
- */
- ComponentManager getComponentManager();
-
- /**
- * Return the internal parts manager.
- * @return the parts manager
- */
- PartsManager getPartsManager();
-}
-

Deleted:
trunk/main/metro/model/src/main/net/dpml/metro/control/ComponentManager.java
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/control/ComponentManager.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/model/src/main/net/dpml/metro/control/ComponentManager.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -1,58 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.metro.control;
-
-import java.rmi.RemoteException;
-
-import net.dpml.metro.info.CollectionPolicy;
-
-import net.dpml.part.ActivationPolicy;
-
-import net.dpml.metro.model.ComponentModelOperations;
-
-/**
- * The MutableComponentModel interface extends ComponentModel with a set of
- * operations supporting model changes.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public interface ComponentManager extends ComponentModelOperations
-{
- /**
- * Return the context model manager.
- * @return the context model manager
- */
- ContextManager getContextManager();
-
- /**
- * Set the component activation policy to the supplied value.
- * @param policy the new activation policy
- * @exception RemoteException if a remote exception occurs
- */
- void setActivationPolicy( ActivationPolicy policy );
-
- /**
- * Override the assigned collection policy.
- * @param policy the collection policy value
- * @exception RemoteException if a remote exception occurs
- */
- void setCollectionPolicy( CollectionPolicy policy );
-}
-

Deleted:
trunk/main/metro/model/src/main/net/dpml/metro/control/ContextManager.java
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/control/ContextManager.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/model/src/main/net/dpml/metro/control/ContextManager.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -1,73 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.metro.control;
-
-import java.rmi.RemoteException;
-
-import net.dpml.metro.info.PartReference;
-import net.dpml.part.Directive;
-
-import net.dpml.lang.UnknownKeyException;
-
-import net.dpml.metro.model.ContextModelOperations;
-
-/**
- * The MutableContextModel interface extends ContextModel with operations
supporting
- * context entry value mutation.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public interface ContextManager extends ContextModelOperations
-{
- /**
- * Set a context entry value.
- * @param key the context entry key
- * @param value the context entry value
- * @exception UnknownKeyException if the key is unknown
- */
- //void setEntry( String key, Object value ) throws UnknownKeyException;
-
- /**
- * Return a context entry value.
- * @return the context entry value
- * @exception UnknownKeyException if the key is unknown
- */
- //Object getEntry( String key ) throws UnknownKeyException;
-
- /**
- * Set a context entry directive value.
- * @param key the context entry key
- * @param directive the context entry directive
- * @exception UnknownKeyException if the key is unknown
- */
- void setEntryDirective( String key, Directive directive ) throws
UnknownKeyException;
-
- /**
- * Apply an array of tagged directive as an atomic operation.
Application of
- * directives to the context model is atomic such that changes are
applied under a
- * 'all-or-nothing' policy.
- *
- * @param directives an array of part references
- * @exception UnknownKeyException if a key within the array does not
match a key within
- * the context model.
- */
- void setEntryDirectives( PartReference[] directives ) throws
UnknownKeyException;
-
-}

Deleted:
trunk/main/metro/model/src/main/net/dpml/metro/control/PartsManager.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/control/PartsManager.java
2006-01-25 11:17:50 UTC (rev 974)
+++ trunk/main/metro/model/src/main/net/dpml/metro/control/PartsManager.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -1,67 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.metro.control;
-
-import net.dpml.part.ControlException;
-import net.dpml.part.remote.Component;
-import net.dpml.part.remote.Model;
-
-import net.dpml.lang.UnknownKeyException;
-
-/**
- * Local interface through which a component implementation may
- * interact with subsidary parts.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public interface PartsManager
-{
- /**
- * Return the array of keys used to idenetity internal parts.
- * @return the part key array
- */
- String[] getKeys();
-
- /**
- * Return a local component handler.
- * @param key the internal part key
- * @return the local component handler
- * @exception UnknownKeyException the key is not recognized
- */
- ComponentHandler getComponentHandler( String key ) throws
UnknownKeyException;
-
- /**
- * Return the commissioned state of the part collection.
- * @return true if commissioned else false
- */
- boolean isCommissioned();
-
- /**
- * Initiate the oprdered activation of all internal parts.
- * @exception ControlException if an activation error occurs
- */
- void commission() throws ControlException;
-
- /**
- * Initiate deactivation of all internal parts.
- */
- void decommission();
-}
-

Modified:
trunk/main/metro/model/src/main/net/dpml/metro/model/ComponentModel.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/model/ComponentModel.java
2006-01-25 11:17:50 UTC (rev 974)
+++ trunk/main/metro/model/src/main/net/dpml/metro/model/ComponentModel.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -25,6 +25,7 @@
import net.dpml.metro.info.CollectionPolicy;
import net.dpml.metro.data.ClassLoaderDirective;
import net.dpml.metro.data.CategoryDirective;
+import net.dpml.metro.ComponentModelOperations;

import net.dpml.part.remote.Model;


Deleted:
trunk/main/metro/model/src/main/net/dpml/metro/model/ComponentModelOperations.java
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/model/ComponentModelOperations.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/model/src/main/net/dpml/metro/model/ComponentModelOperations.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -1,124 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.metro.model;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-import net.dpml.metro.info.LifestylePolicy;
-import net.dpml.metro.info.CollectionPolicy;
-import net.dpml.metro.data.ClassLoaderDirective;
-import net.dpml.metro.data.CategoryDirective;
-
-import net.dpml.part.remote.Model;
-
-import net.dpml.configuration.Configuration;
-
-import net.dpml.parameters.Parameters;
-
-import net.dpml.lang.UnknownKeyException;
-
-/**
- * The ComponentModel interface defines the remotely accessible aspects of a
component
- * configuration.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public interface ComponentModelOperations
-{
- /**
- * Return the component name.
- * @return the name
- * @exception RemoteException if a remote exception occurs
- */
- String getName() throws RemoteException;
-
- /**
- * Return the component implementation class name.
- *
- * @return the classname of the implementation
- * @exception RemoteException if a remote exception occurs
- */
- String getImplementationClassName() throws RemoteException;
-
- /**
- * Return the component classloader directive.
- *
- * @return the classloader directive for the component
- * @exception RemoteException if a remote exception occurs
- */
- ClassLoaderDirective getClassLoaderDirective() throws RemoteException;
-
- /**
- * Return the component lifestyle policy.
- *
- * @return the lifestyle policy value
- * @exception RemoteException if a remote exception occurs
- */
- LifestylePolicy getLifestylePolicy() throws RemoteException;
-
- /**
- * Return the current component collection policy. If null, the component
- * type collection policy will be returned.
- *
- * @return a HARD, WEAK, SOFT or SYSTEM
- * @exception RemoteException if a remote exception occurs
- */
- CollectionPolicy getCollectionPolicy() throws RemoteException;
-
- /**
- * Return the set of component model keys.
- * @return the component part keys
- * @exception RemoteException if a remote exception occurs
- */
- String[] getPartKeys() throws RemoteException;
-
- /**
- * Return the component model of an internal part referenced by the
supplied key.
- * @param key the part key
- * @return the internal part component model
- * @exception UnknownKeyException if the key is unknown
- * @exception RemoteException if a remote exception occurs
- */
- ComponentModel getComponentModel( String key ) throws
UnknownKeyException, RemoteException;
-
- /**
- * Return the component configuration.
- * @return the configuration
- * @exception RemoteException if a remote exception occurs
- */
- Configuration getConfiguration() throws RemoteException;
-
- /**
- * Return the component parameters.
- * @return the parameters
- * @exception RemoteException if a remote exception occurs
- */
- Parameters getParameters() throws RemoteException;
-
- /**
- * Return the component logging categories.
- * @return the categories
- * @exception RemoteException if a remote exception occurs
- */
- CategoryDirective[] getCategoryDirectives() throws RemoteException;
-
-}
-

Modified:
trunk/main/metro/model/src/main/net/dpml/metro/model/ContextModel.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/model/ContextModel.java
2006-01-25 11:17:50 UTC (rev 974)
+++ trunk/main/metro/model/src/main/net/dpml/metro/model/ContextModel.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -19,14 +19,9 @@
package net.dpml.metro.model;

import java.rmi.Remote;
-import java.rmi.RemoteException;

-import net.dpml.metro.info.EntryDescriptor;
-import net.dpml.part.Directive;
+import net.dpml.metro.ContextModelOperations;

-import net.dpml.lang.UnknownKeyException;
-
-
/**
* The ContextModel interface defines the remotely accessible component
context.
*

Deleted:
trunk/main/metro/model/src/main/net/dpml/metro/model/ContextModelOperations.java
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/model/ContextModelOperations.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/model/src/main/net/dpml/metro/model/ContextModelOperations.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -1,70 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.metro.model;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-import net.dpml.metro.info.EntryDescriptor;
-import net.dpml.part.Directive;
-
-import net.dpml.lang.UnknownKeyException;
-
-/**
- * The ContextModelOperations interface defines the common local and
remotely accessible component context.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public interface ContextModelOperations
-{
- /**
- * Return the set of context entries descriptors.
- *
- * @return context entry descriptor array
- * @exception RemoteException if a remote exception occurs
- */
- EntryDescriptor[] getEntryDescriptors() throws RemoteException;
-
- /**
- * Return a of context entry descriptor.
- *
- * @param key the entry key
- * @return the entry descriptor
- * @exception UnknownKeyException if the key is unknown
- * @exception RemoteException if a remote exception occurs
- */
- EntryDescriptor getEntryDescriptor( String key ) throws
UnknownKeyException, RemoteException;
-
- /**
- * Return the current directive assigned to a context entry.
- * @param key the context entry key
- * @return the directive
- * @exception UnknownKeyException if the key is unknown
- * @exception RemoteException if a remote exception occurs
- */
- Directive getEntryDirective( String key ) throws UnknownKeyException,
RemoteException;
-
- /**
- * Validate the model.
- * @exception ValidationException if one or more issues exist within the
model
- * @exception RemoteException if a remote exception occurs
- */
- void validate() throws ValidationException, RemoteException;
-}

Deleted:
trunk/main/metro/model/src/main/net/dpml/metro/model/ValidationException.java
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/model/ValidationException.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/model/src/main/net/dpml/metro/model/ValidationException.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -1,207 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.metro.model;
-
-import java.io.Serializable;
-import java.net.URI;
-
-import net.dpml.part.remote.ModelException;
-
-/**
- * Exception that describes a series of validation issues.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public final class ValidationException extends ModelException
-{
-
//--------------------------------------------------------------------------
- // static
-
//--------------------------------------------------------------------------
-
- /**
- * Serial version identifier.
- */
- static final long serialVersionUID = 1L;
-
-
//--------------------------------------------------------------------------
- // state
-
//--------------------------------------------------------------------------
-
- private final Object m_source;
- private final Issue[] m_issues;
-
-
//--------------------------------------------------------------------------
- // constructor
-
//--------------------------------------------------------------------------
-
- /**
- * Creation of a new <tt>ValidationException</tt>.
- * @param uri controller uri
- * @param source the source object
- * @param issues the array of issues
- */
- public ValidationException( URI uri, Object source, Issue[] issues )
- {
- super( uri, createMessage( source, issues ) );
- if( null == source )
- {
- throw new NullPointerException( "source" );
- }
- if( null == issues )
- {
- throw new NullPointerException( "issues" );
- }
- m_source = source;
- m_issues = issues;
- }
-
- /**
- * Return the source object.
- * @return the source of the validation errors
- */
- public Object getSource()
- {
- return m_source;
- }
-
- /**
- * Return the array iof issues.
- * @return the issues array
- */
- public Issue[] getIssues()
- {
- return m_issues;
- }
-
-
//--------------------------------------------------------------------------
- // utilities
-
//--------------------------------------------------------------------------
-
- private static String createMessage( final Object source, final Issue[]
issues )
- {
- if( null == source )
- {
- throw new NullPointerException( "source" );
- }
- if( null == issues )
- {
- throw new NullPointerException( "issues" );
- }
- String message =
- "Validation failure in ["
- + source.getClass().getName()
- + "#"
- + System.identityHashCode( source )
- + "] due to ["
- + issues.length
- + "] unresolved issue(s).";
- return message;
- }
-
- /**
- * Issue implementation.
- */
- public static final class Issue implements Serializable
- {
- private final String m_issueKey;
- private final String m_issueMessage;
-
- /**
- * Creation of a new issue.
- * @param key the key
- * @param message the message
- */
- public Issue( String key, String message )
- {
- if( null == key )
- {
- throw new NullPointerException( "key" );
- }
- if( null == message )
- {
- throw new NullPointerException( "message" );
- }
- m_issueKey = key;
- m_issueMessage = message;
- }
-
- /**
- * Return the issue key.
- * @return the key
- */
- public String getKey()
- {
- return m_issueKey;
- }
-
- /**
- * Return the issue message.
- * @return the message
- */
- public String getMessage()
- {
- return m_issueMessage;
- }
-
- /**
- * Test is the supplied object is equal to this object.
- * @param other the other object
- * @return true if the object are equivalent
- */
- public boolean equals( Object other )
- {
- if( null == other )
- {
- return false;
- }
- else if( other instanceof Issue )
- {
- Issue issue = (Issue) other;
- if( !m_issueKey.equals( issue.m_issueKey ) )
- {
- return false;
- }
- return m_issueMessage.equals( issue.m_issueMessage );
- }
- else
- {
- return false;
- }
- }
-
- /**
- * Return the hashcode for the object.
- * @return the hashcode value
- */
- public int hashCode()
- {
- return m_issueKey.hashCode() + m_issueMessage.hashCode();
- }
-
- /**
- * Return a string representation of the type.
- * @return the stringified type
- */
- public String toString()
- {
- return "issue:[" + m_issueKey + "] " + m_issueMessage;
- }
- }
-}

Copied: trunk/main/metro/model/src/test/net/dpml/metro/test (from rev 973,
trunk/main/metro/model/src/test/net/dpml/metro/model/test)

Modified:
trunk/main/metro/model/src/test/net/dpml/metro/test/ValidationExceptionTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/model/test/ValidationExceptionTestCase.java
2006-01-25 11:14:50 UTC (rev 973)
+++
trunk/main/metro/model/src/test/net/dpml/metro/test/ValidationExceptionTestCase.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -16,12 +16,12 @@
* limitations under the License.
*/

-package net.dpml.metro.model.test;
+package net.dpml.metro.test;

import java.net.URI;

-import net.dpml.metro.model.ValidationException;
-import net.dpml.metro.model.ValidationException.Issue;
+import net.dpml.metro.ValidationException;
+import net.dpml.metro.ValidationException.Issue;

import junit.framework.TestCase;


Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -38,7 +38,7 @@
import net.dpml.metro.data.ComponentDirective;
import net.dpml.metro.model.ComponentModel;
import net.dpml.metro.model.ContextModel;
-import net.dpml.metro.control.ContextManager;
+import net.dpml.metro.ContextManager;

import net.dpml.configuration.Configuration;

@@ -49,7 +49,7 @@
import net.dpml.part.Directive;
import net.dpml.part.ControlException;
import net.dpml.part.Version;
-import net.dpml.metro.control.PartsManager;
+import net.dpml.metro.PartsManager;
import net.dpml.part.remote.Component;
import net.dpml.part.remote.Model;
import net.dpml.part.ServiceNotFoundException;

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -41,9 +41,9 @@
import net.dpml.metro.info.Priority;
import net.dpml.metro.data.CategoryDirective;
import net.dpml.metro.model.ComponentModel;
-import net.dpml.metro.control.ComponentHandler;
-import net.dpml.metro.control.PartsManager;
-import net.dpml.metro.control.ComponentManager;
+import net.dpml.metro.ComponentHandler;
+import net.dpml.metro.PartsManager;
+import net.dpml.metro.ComponentManager;

import net.dpml.logging.Logger;


Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -34,8 +34,8 @@
import net.dpml.metro.info.PartReference;
import net.dpml.metro.model.ComponentModel;
import net.dpml.metro.model.ContextModel;
-import net.dpml.metro.control.ComponentManager;
-import net.dpml.metro.control.ContextManager;
+import net.dpml.metro.ComponentManager;
+import net.dpml.metro.ContextManager;

import net.dpml.part.Directive;
import net.dpml.part.ActivationPolicy;
@@ -342,9 +342,9 @@
* Return the component model of an internal part referenced by the
supplied key.
* @return the internal part component model
*/
- public ComponentModel getComponentModel( String key ) throws
UnknownKeyException
+ public ComponentManager getComponentManager( String key ) throws
UnknownKeyException
{
- ComponentModel model = (ComponentModel) m_parts.get( key );
+ ComponentManager model = (ComponentManager) m_parts.get( key );
if( null == model )
{
throw new UnknownKeyException( key );

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -32,10 +32,10 @@
import net.dpml.metro.info.PartReference;
import net.dpml.metro.info.Type;

+import net.dpml.metro.ContextManager;
+import net.dpml.metro.ValidationException;
+import net.dpml.metro.ValidationException.Issue;
import net.dpml.metro.model.ContextModel;
-import net.dpml.metro.model.ValidationException;
-import net.dpml.metro.model.ValidationException.Issue;
-import net.dpml.metro.control.ContextManager;

import net.dpml.logging.Logger;


Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -25,13 +25,14 @@

import net.dpml.logging.Logger;

+import net.dpml.metro.PartsManager;
+import net.dpml.metro.ComponentHandler;
+import net.dpml.metro.ComponentManager;
import net.dpml.metro.model.ComponentModel;

import net.dpml.part.ControlException;
import net.dpml.part.remote.Component;
import net.dpml.part.remote.Model;
-import net.dpml.metro.control.PartsManager;
-import net.dpml.metro.control.ComponentHandler;

import net.dpml.lang.UnknownKeyException;

@@ -81,15 +82,16 @@
m_logger = logger;

ClassLoader classloader = handler.getClassLoader();
- ComponentModel model = handler.getComponentModel();
+ ComponentManager model = handler.getComponentManager();
String[] keys = model.getPartKeys();
for( int i=0; i<keys.length; i++ )
{
String key = keys[i];
try
{
- ComponentModel m = model.getComponentModel( key );
- Component h = control.createDefaultComponentHandler(
handler, classloader, m, true );
+ ComponentManager m = model.getComponentManager( key );
+ ComponentModel cm = (ComponentModel) m;
+ Component h = control.createDefaultComponentHandler(
handler, classloader, cm, true );
m_handlers.put( key, h );
}
catch( UnknownKeyException e )

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/PartsInvocationHandler.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/PartsInvocationHandler.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/PartsInvocationHandler.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -22,8 +22,8 @@
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

-import net.dpml.metro.control.ComponentHandler;
-import net.dpml.metro.control.PartsManager;
+import net.dpml.metro.ComponentHandler;
+import net.dpml.metro.PartsManager;
import net.dpml.part.remote.Component;

/**

Modified: trunk/main/metro/test/src/main/net/dpml/test/app/Demo.java
===================================================================
--- trunk/main/metro/test/src/main/net/dpml/test/app/Demo.java 2006-01-25
11:17:50 UTC (rev 974)
+++ trunk/main/metro/test/src/main/net/dpml/test/app/Demo.java 2006-01-26
03:55:03 UTC (rev 975)
@@ -20,8 +20,8 @@

import net.dpml.logging.Logger;

-import net.dpml.metro.control.PartsManager;
-import net.dpml.metro.control.ComponentHandler;
+import net.dpml.metro.PartsManager;
+import net.dpml.metro.ComponentHandler;

/**
* The demo class is used to aggregate a collection of components and

Modified:
trunk/main/metro/test/src/main/net/dpml/test/composite/PartsComponent.java
===================================================================
---
trunk/main/metro/test/src/main/net/dpml/test/composite/PartsComponent.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/test/src/main/net/dpml/test/composite/PartsComponent.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -25,10 +25,10 @@

import net.dpml.test.ColorManager;

-import net.dpml.metro.control.PartsManager;
-import net.dpml.metro.control.ComponentHandler;
-import net.dpml.metro.control.ComponentManager;
-import net.dpml.metro.control.ContextManager;
+import net.dpml.metro.PartsManager;
+import net.dpml.metro.ComponentHandler;
+import net.dpml.metro.ComponentManager;
+import net.dpml.metro.ContextManager;

import net.dpml.lang.UnknownKeyException;


Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/CompositeTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/CompositeTestCase.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/CompositeTestCase.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -27,8 +27,9 @@
import net.dpml.part.local.Controller;
import net.dpml.part.remote.Component;
import net.dpml.part.remote.Provider;
-import net.dpml.metro.control.ComponentHandler;

+import net.dpml.metro.ComponentHandler;
+
import net.dpml.test.composite.ChildComponent;
import net.dpml.test.composite.CompositeComponent;


Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ContextModelTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ContextModelTestCase.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ContextModelTestCase.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -25,13 +25,14 @@
import junit.framework.TestCase;

import net.dpml.part.local.Controller;
+
+import net.dpml.metro.ComponentManager;
+import net.dpml.metro.ContextManager;
+import net.dpml.metro.ValidationException;
+import net.dpml.metro.ValidationException.Issue;
+import net.dpml.metro.model.ContextModel;
import net.dpml.metro.data.ValueDirective;
import net.dpml.metro.info.EntryDescriptor;
-import net.dpml.metro.control.ComponentManager;
-import net.dpml.metro.control.ContextManager;
-import net.dpml.metro.model.ContextModel;
-import net.dpml.metro.model.ValidationException;
-import net.dpml.metro.model.ValidationException.Issue;

/**
* Test aspects of the component context model implementation.

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ObserverTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ObserverTestCase.java
2006-01-25 11:17:50 UTC (rev 974)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ObserverTestCase.java
2006-01-26 03:55:03 UTC (rev 975)
@@ -27,11 +27,12 @@
import net.dpml.part.remote.Component;
import net.dpml.part.local.Controller;
import net.dpml.part.remote.Provider;
+
import net.dpml.metro.data.ValueDirective;
import net.dpml.metro.model.ComponentModel;
import net.dpml.metro.model.ContextModel;
-import net.dpml.metro.control.ComponentManager;
-import net.dpml.metro.control.ContextManager;
+import net.dpml.metro.ComponentManager;
+import net.dpml.metro.ContextManager;

/**
* Test aspects of the component model implementation.




  • r975 - in trunk/main/metro: exec/src/main/net/dpml/metro/exec model/src/main/net/dpml/metro model/src/main/net/dpml/metro/control model/src/main/net/dpml/metro/model model/src/test/net/dpml/metro model/src/test/net/dpml/metro/model model/src/test/net/dpml/metro/test runtime/src/main/net/dpml/metro/runtime test/src/main/net/dpml/test/app test/src/main/net/dpml/test/composite test/src/test/net/dpml/metro/runtime/test, mcconnell at BerliOS, 01/25/2006

Archive powered by MHonArc 2.6.24.

Top of Page