summaryrefslogtreecommitdiffstats
path: root/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly
diff options
context:
space:
mode:
Diffstat (limited to 'tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly')
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Aggregate.java117
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AggregatePart.java40
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyFactory.java162
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyModelContext.java64
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyModelObject.java45
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyModelVisitor.java32
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Binding.java40
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Component.java80
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ComponentImplementation.java40
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ComponentType.java66
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredPort.java57
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredProperty.java62
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredReference.java44
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredService.java36
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/EntryPoint.java64
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Extensible.java38
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ExternalService.java59
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ModelInitException.java43
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Module.java39
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ModuleComponent.java47
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ModuleFragment.java25
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Multiplicity.java47
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/OverrideOption.java40
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Port.java47
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Property.java91
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Reference.java36
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/RuntimeConfigurationHolder.java36
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Scope.java32
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Service.java24
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ServiceContract.java62
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ServiceURI.java53
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/SimpleComponent.java25
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Subsystem.java38
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Wire.java48
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AggregateImpl.java305
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AggregatePartImpl.java67
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AssemblyFactoryImpl.java204
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AssemblyModelContextImpl.java92
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AssemblyModelObjectImpl.java132
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/BindingImpl.java96
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentImpl.java222
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentImplementationImpl.java108
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentTypeImpl.java152
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredPortImpl.java142
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredPropertyImpl.java123
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredReferenceImpl.java72
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredServiceImpl.java48
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/EntryPointImpl.java145
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ExtensibleImpl.java92
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ExternalServiceImpl.java135
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleComponentImpl.java65
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleFragmentImpl.java32
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleImpl.java243
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PortImpl.java106
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PropertyImpl.java178
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ReferenceImpl.java50
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceContractImpl.java81
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceImpl.java32
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceURIImpl.java198
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SimpleComponentImpl.java32
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SubsystemImpl.java49
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/WireImpl.java66
-rw-r--r--tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/AssemblyModelLoader.java81
63 files changed, 0 insertions, 5127 deletions
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Aggregate.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Aggregate.java
deleted file mode 100644
index d313a087d0..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Aggregate.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-import java.util.List;
-
-import javax.wsdl.Import;
-
-/**
- * A model object that describes a container for other module objects, which must be {@link AggregatePart}s.
- */
-public interface Aggregate extends Extensible {
-
- /**
- * Returns the name of the aggregate.
- * @return the name of the aggregate
- */
- String getName();
-
- /**
- * Sets the name of the aggregate.
- * @param name the name of the aggregate
- */
- void setName(String name);
-
- /**
- * Returns the AggregatePart objects that are contained in this aggregate.
- * @return the AggregatePart objects that are contained in this aggregate
- */
- List<AggregatePart> getAggregateParts();
-
- /**
- * Helper method that returns all entry points contained in this aggregate.
- * @return a list of all EntryPoint model objects driectly contained in this aggregate
- */
- List<EntryPoint> getEntryPoints();
-
- /**
- * Returns the named entry point.
- * @param name
- * @return
- */
- EntryPoint getEntryPoint(String name);
-
- /**
- * Helper method that returns all entry points contained in this aggregate.
- * @return
- */
- List<Component> getComponents();
-
- /**
- * Returns the named component.
- * @param name
- * @return
- */
- Component getComponent(String name);
-
- /**
- * Returns external services contained in this aggregate.
- * @return
- */
- List<ExternalService> getExternalServices();
-
- /**
- * Returns the named external service.
- * @param name
- * @return
- */
- ExternalService getExternalService(String name);
-
- /**
- * Returns the configured service at the given address.
- * @param address
- * @return
- */
- ConfiguredService getConfiguredService(ServiceURI address);
-
- /**
- * Returns the wires.
- * @return
- */
- List<Wire> getWires();
-
- /**
- * Returns the WSDL imports.
- * @return
- */
- List<Import> getWSDLImports();
-
- /**
- * Returns the WSDL imports for the given namespace.
- * @param namespace
- * @return
- */
- List<Import> getWSDLImports(String namespace);
-
- /**
- * Returns the assembly model context used by this aggregate.
- * @return
- */
- AssemblyModelContext getAssemblyModelContext();
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AggregatePart.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AggregatePart.java
deleted file mode 100644
index f88458eaa8..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AggregatePart.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-/**
- * A configured object that is contained inside an {@link Aggregate}.
- */
-public interface AggregatePart extends AssemblyModelObject {
- /**
- * Returns the name that uniquely identifies this part within its containing aggregate.
- * @return the name that uniquely identifies this part within its containing aggregate
- */
- String getName();
-
- /**
- * Sets the name that uniquely identifies this part within its containing aggregate.
- * @param value the name that uniquely identifies this part within its containing aggregate
- */
- void setName(String value);
-
- /**
- * Returns the aggregate that contains this part.
- * @return the aggregate that contains this part
- */
- Aggregate getAggregate();
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyFactory.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyFactory.java
deleted file mode 100644
index 2f5715bd4e..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyFactory.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.model.types.java.JavaServiceContract;
-import org.apache.tuscany.model.types.wsdl.WSDLServiceContract;
-
-/**
- * The Factory for the assembly model.
- * Provides a create method for each non-abstract class of the model.
- */
-public interface AssemblyFactory {
-
- /**
- * Returns a new SimpleComponent.
- * @return
- */
- SimpleComponent createSimpleComponent();
-
- /**
- * Returns a new ComponentType.
- * @return
- */
- ComponentType createComponentType();
-
- /**
- * Returns a new EntryPoint.
- * @return
- */
- EntryPoint createEntryPoint();
-
- /**
- * Returns a new ExternalService.
- * @return
- */
- ExternalService createExternalService();
-
- /**
- * Returns a new JavaServiceContract.
- * @return
- */
- JavaServiceContract createJavaServiceContract();
-
- /**
- * Returns a new Module.
- * @return
- */
- Module createModule();
-
- /**
- * Returns a new ModuleComponent.
- * @return
- */
- ModuleComponent createModuleComponent();
-
- /**
- * Returns a new ModuleFragment.
- * @return
- */
- ModuleFragment createModuleFragment();
-
- /**
- * Returns a new Reference.
- * @return
- */
- Reference createReference();
-
- /**
- * Returns a new ConfiguredReference.
- * @return
- */
- ConfiguredReference createConfiguredReference();
-
- /**
- * Returns a new Service.
- * @return
- */
- Service createService();
-
- /**
- * Returns a new ConfiguredService.
- * @return
- */
- ConfiguredService createConfiguredService();
-
- /**
- * Returns a new Subsystem.
- * @return
- */
- Subsystem createSubsystem();
-
- /**
- * Returns Property.
- * @return
- */
- Property createProperty();
-
- /**
- * Returns a new ConfiguredProperty.
- * @return
- */
- ConfiguredProperty createConfiguredProperty();
-
- /**
- * Returns a new WSDLServiceContract.
- * @return
- */
- WSDLServiceContract createWSDLServiceContract();
-
- /**
- * Create a new ServiceURI from the given uri string.
- * @param uri
- * @return
- */
- ServiceURI createServiceURI(String uri);
-
- /**
- * Creates a new ServiceURI from a module component and a service name.
- * @param moduleComponent
- * @param serviceName
- * @return
- */
- ServiceURI createServiceURI(ModuleComponent moduleComponent, String serviceName);
-
- /**
- * Creates a new ServiceURI from a module component and configured port.
- * @param moduleComponent
- * @param aggregatePart
- * @param configuredPort
- * @return
- */
- ServiceURI createServiceURI(ModuleComponent moduleComponent, AggregatePart aggregatePart, ConfiguredPort configuredPort);
-
- /**
- * Create a qname from a URI
- * @param uri
- * @return
- */
- QName createQName(String uri);
-
- /**
- * Create a wire
- * @return
- */
- Wire createWire();
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyModelContext.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyModelContext.java
deleted file mode 100644
index 43e6766b8b..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyModelContext.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-import org.apache.tuscany.common.resource.ResourceLoader;
-import org.apache.tuscany.model.assembly.loader.AssemblyModelLoader;
-
-import commonj.sdo.helper.TypeHelper;
-
-/**
- * Context object supplied by visitors that are processing the model.
- */
-public interface AssemblyModelContext {
-
- /**
- * Returns a factory that can be used to create other model objects
- *
- * @return a factory for model objects
- */
- AssemblyFactory getAssemblyFactory();
-
- /**
- * Returns a loader for resources in the system environment
- *
- * @return a resource loader
- */
- ResourceLoader getSystemResourceLoader();
-
- /**
- * Returns a loader for resources in the application environment.
- *
- * @return a loader for resources in the system environment
- */
- ResourceLoader getApplicationResourceLoader();
-
- /**
- * Returns a loader that can be used to load sub-models.
- *
- * @return a loader for sub-models
- */
- AssemblyModelLoader getAssemblyLoader();
-
- /**
- * Returns an SDO type helper.
- *
- * @return an SDO type helper
- */
- TypeHelper getTypeHelper();
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyModelObject.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyModelObject.java
deleted file mode 100644
index e9a32ed4ce..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyModelObject.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-/**
- * Base interface for all assembly model objects providing methods for managing the model itself.
- */
-public interface AssemblyModelObject {
-
- /**
- * Initialize this model object.
- *
- * @param modelContext context providing access to the environment in which this model is being used
- * @throws ModelInitException if an error ocurrs initializing the artifact
- */
- void initialize(AssemblyModelContext modelContext) throws ModelInitException;
-
- /**
- * Freeze this model object preventing any additional changes.
- */
- void freeze();
-
- /**
- * Accept a visitor
- *
- * @param visitor a visitor that is visiting the model
- * @return true if processing is complete and the visitor should stop traversing the model
- */
- boolean accept(AssemblyModelVisitor visitor);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyModelVisitor.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyModelVisitor.java
deleted file mode 100644
index 9f3153e953..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/AssemblyModelVisitor.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-/**
- * A visitor that traverses the model performing some operation.
- */
-public interface AssemblyModelVisitor {
-
- /**
- * Visit the given model object.
- *
- * @param modelObject the assembly model object to visit
- * @return true if processing is complete
- */
- boolean visit(AssemblyModelObject modelObject);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Binding.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Binding.java
deleted file mode 100644
index 61207186e3..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Binding.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-
-/**
- * The binding of an entry point or external service to a transport.
- * This model object will typically by extended by binding implementations to allow
- * specification of binding/transport specific information.
- */
-public interface Binding extends AssemblyModelObject, RuntimeConfigurationHolder {
- /**
- * Returns the binding URI.
- * @return the binding uri
- * todo do we need this?
- */
- String getURI();
-
- /**
- * Sets binding URI.
- * @param value the binding uri
- * todo do we need this?
- */
- void setURI(String value);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Component.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Component.java
deleted file mode 100644
index 86dd1c5f12..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Component.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-import java.util.List;
-
-
-/**
- * A component is a configured instance of a generic {@link ComponentImplementation}.
- */
-public interface Component extends Extensible, AggregatePart {
-
- /**
- * Returns the ComponentImplementation for this configured instance.
- * @return the ComponentImplementation for this configured instance
- */
- ComponentImplementation getComponentImplementation();
-
- /**
- * Sets the ComponentImplementation for this configured instance
- * @param value the ComponentImplementation for this configured instance
- */
- void setComponentImplementation(ComponentImplementation value);
-
- /**
- * Returns a list of configured property values for this configured instance.
- * These values will be used to initialize the component when it is activated.
- * @return a list of ConfiguredProperty values
- */
- List<ConfiguredProperty> getConfiguredProperties();
-
- /**
- * Returns the ConfiguredProperty value for the specified property.
- *
- * @param name the name of the Property
- * @return the configured property value for the named property
- */
- ConfiguredProperty getConfiguredProperty(String name);
-
- /**
- * Returns a list of configured reference values for the configured instance.
- * @return a list of configured reference values for the configured instance
- */
- List<ConfiguredReference> getConfiguredReferences();
-
- /**
- * Returns the ConfiguredReference value for the specified reference.
- * @param name the name of the Property
- * @return the configured reference value for the named reference
- */
- ConfiguredReference getConfiguredReference(String name);
-
- /**
- * Returns the configured services for the configured instance.
- * @return the configured services for the configured instance
- */
- List<ConfiguredService> getConfiguredServices();
-
- /**
- * Returns the ConfiguredService value for the specified property.
- * @param name the name of the Property
- * @return the configured service value for the named service
- */
- ConfiguredService getConfiguredService(String name);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ComponentImplementation.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ComponentImplementation.java
deleted file mode 100644
index 9bae24522e..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ComponentImplementation.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-
-/**
- * The implementation for a specific component instance.
- * This interface will typically be extended by component type implementations to indicate the
- * specific implementation to be used by a runtime and to allow for additional runtime configuration
- * properties.
- */
-public interface ComponentImplementation extends Extensible, RuntimeConfigurationHolder {
-
- /**
- * Returns the generic component type corresponding to this implementation.
- * @return the generic component type corresponding to this implementation
- */
- ComponentType getComponentType();
-
- /**
- * Sets the generic component type corresponding to this implementation.
- * @param componentType the generic component type corresponding to this implementation
- */
- void setComponentType(ComponentType componentType);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ComponentType.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ComponentType.java
deleted file mode 100644
index 58ac9bc9de..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ComponentType.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-import java.util.List;
-
-
-/**
- * A logical definition of a type of component separate from any specific implementation.
- */
-public interface ComponentType extends Extensible {
-
- /**
- * Returns a list of services exposed by this component type.
- * @return a list of services exposed by this component type
- */
- List<Service> getServices();
-
- /**
- * Returns the specfied service if exposed by this component type.
- * @param name the name of the service
- * @return the service identified by the supplied name, or null if there is no service with that name
- */
- Service getService(String name);
-
- /**
- * Returns the list of references this component type consumes.
- * @return the list of references this component type consumes
- */
- List<Reference> getReferences();
-
- /**
- * Returns the specified reference.
- * @param name the name of the reference
- * @return the reference identified by the supplied name, or null if there is no reference with that name
- */
- Reference getReference(String name);
-
- /**
- * Returns the list of properties that can be used to configure components with this component type.
- * @return the list of properties that can be used to configure components with this component type
- */
- List<Property> getProperties();
-
- /**
- * Returns the specified property
- * @param name the name of the property
- * @return the property with the supplied name, or null if there is no property with that name
- */
- Property getProperty(String name);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredPort.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredPort.java
deleted file mode 100644
index d40e852e88..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredPort.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-
-/**
- * Represents a configured port (e.g. a configured reference or configured service).
- */
-public interface ConfiguredPort extends AssemblyModelObject, RuntimeConfigurationHolder {
-
- /**
- * Returns the port that is being configured.
- * @return the port that is being configured
- */
- Port getPort();
-
- /**
- * Sets the port that is being configured.
- * @param port the port that is being configured
- */
- void setPort(Port port);
-
- /**
- * Returns the aggregate part containing this port.
- * @return the aggregate part that contains this port
- */
- AggregatePart getAggregatePart();
-
- /**
- * Returns the port's proxy factory
- * @return the port's proxy factory
- * todo should this be here or should it be provided in a sub-interface?
- */
- Object getProxyFactory();
-
- /**
- * Sets the port's proxy factory
- * @param proxyFactory the port's proxy factory
- * todo should this be here or should it be provided in a sub-interface?
- */
- void setProxyFactory(Object proxyFactory);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredProperty.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredProperty.java
deleted file mode 100644
index 0a28c0a7bf..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredProperty.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-/**
- * The configured value of a {@link Property}.
- */
-public interface ConfiguredProperty extends AssemblyModelObject {
-
- /**
- * Returns the {@link Property} whose value is being set.
- * @return the {@link Property} whose value is being set
- */
- Property getProperty();
-
- /**
- * Sets the {@link Property} whose value is being set.
- * @param property the {@link Property} whose value is being set
- */
- void setProperty(Property property);
-
- /**
- * Returns the value being set for this usage of the {@link Property}.
- * @return the value being set for this usage of the {@link Property}
- */
- Object getValue();
-
- /**
- * Sets the value being set for this usage of the {@link Property}.
- * @param value the value being set for this usage of the {@link Property}
- */
- void setValue(Object value);
-
- /**
- * Returns the override option that determines if any configuration for this property
- * that is contained in this aggregate can be overridden by configuration supplied from outside.
- */
- OverrideOption getOverrideOption();
-
- /**
- * Set the override option that determines if any configuration for this property
- * that is contained in this aggregate can be overridden by configuration supplied from outside.
- *
- * @param value the option that determines how property configuration can be overriden
- */
- void setOverrideOption(OverrideOption value);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredReference.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredReference.java
deleted file mode 100644
index 972c6812d8..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredReference.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-import java.util.List;
-
-/**
- * A configured reference associated with a particular usage.
- */
-public interface ConfiguredReference extends ConfiguredPort {
-
- /**
- * Returns the {@link Reference} that is being configured.
- * @return the {@link Reference} that is being configured
- */
- Reference getReference();
-
- /**
- * Sets the {@link Reference} that is being configured.
- * @param reference the {@link Reference} that is being configured
- */
- void setReference(Reference reference);
-
- /**
- * Returns the list of configured services that are wired to this configured reference.
- * @return the list of configured services that are wired to this configured reference
- */
- List<ConfiguredService> getTargetConfiguredServices();
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredService.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredService.java
deleted file mode 100644
index 14b1c0abbe..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ConfiguredService.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-
-/**
- * A configured service associated with a particular usage.
- */
-public interface ConfiguredService extends ConfiguredPort {
- /**
- * Returns the {@link Service} that is being configured.
- * @return the {@link Service} that is being configured
- */
- Service getService();
-
- /**
- * Sets the {@link Service} that is being configured.
- * @param service the {@link Service} that is being configured
- */
- void setService(Service service);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/EntryPoint.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/EntryPoint.java
deleted file mode 100644
index 718ae996c5..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/EntryPoint.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-import java.util.List;
-
-
-/**
- * An entry point exposed by its containing {@link Aggregate}.
- * References from outside the Aggregate can only be connected to its entry points.
- */
-public interface EntryPoint extends AggregatePart, Extensible {
-
- /**
- * Returns the bindings supported by this entry point.
- * A single entry point may be bound to multiple transports.
- *
- * @return a list of bindings supported by this entry point
- */
- List<Binding> getBindings();
-
- /**
- * Returns the configured service exposed by this entry point.
- *
- * @return the configured service exposed by this entry point
- */
- ConfiguredService getConfiguredService();
-
- /**
- * Sets the configured service exposed by this entry point.
- *
- * @param configuredService the configured service exposed by this entry point
- */
- void setConfiguredService(ConfiguredService configuredService);
-
- /**
- * Returns the configured reference that wires this entry point to the published service inside the aggregate.
- *
- * @return the reference that wires this entry point to the published service
- */
- ConfiguredReference getConfiguredReference();
-
- /**
- * Sets the configured reference that wires this entry point to the published service inside the aggregate.
- *
- * @param configuredReference the configured reference that wires this entry point to the published service inside the aggregate
- */
- void setConfiguredReference(ConfiguredReference configuredReference);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Extensible.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Extensible.java
deleted file mode 100644
index 2a5b5878f8..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Extensible.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-import java.util.List;
-
-/**
- * An extensible model object.
- * TODO do we actually need this given we have the ability to load specializations of individual model objects
- * TODO is this the bext interface for this?
- */
-public interface Extensible extends AssemblyModelObject {
-
- /**
- * Returns the extensibility elements.
- */
- List getExtensibilityElements();
-
- /**
- * Returns the extensibility attributes.
- */
- List getExtensibilityAttributes();
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ExternalService.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ExternalService.java
deleted file mode 100644
index a30000f387..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ExternalService.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-import java.util.List;
-
-
-/**
- * An external service consumed by its containing {@link Aggregate}.
- * All references used by the aggregate are specified as external services.
- */
-public interface ExternalService extends AggregatePart, Extensible {
-
- /**
- * Returns the bindings that can be used by operations on this external service.
- * A single external service may be bound to multiple transports.
- */
- List<Binding> getBindings();
-
- /**
- * Returns the override option that determines if any wiring for this external service
- * that is contained in this aggregate can be overridden by wired supplied from outside.
- */
- OverrideOption getOverrideOption();
-
- /**
- * Set the override option that determines if any wiring for this external service
- * that is contained in this aggregate can be overridden by wired supplied from outside.
- *
- * @param value the option that determines how wires can be overriden
- */
- void setOverrideOption(OverrideOption value);
-
- /**
- * Returns the configured service that this external service provides to other parts of the containing aggregate.
- * @return the configured service that this external service provides to other parts of the containing aggregate
- */
- ConfiguredService getConfiguredService();
-
- /**
- * Sets the configured service that this external service provides to other parts of the containing aggregate
- * @param configuredService the configured service that this external service provides to other parts of the containing aggregate
- */
- void setConfiguredService(ConfiguredService configuredService);
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ModelInitException.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ModelInitException.java
deleted file mode 100644
index 4af3737a5d..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ModelInitException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-import org.apache.tuscany.model.ModelRuntimeException;
-
-/**
- * Denotes an exception initializing an assembly model artifact
- *
- * @version $Rev$ $Date$
- */
-public class ModelInitException extends ModelRuntimeException {
- // todo serialuid
-
- public ModelInitException() {
- super();
- }
-
- public ModelInitException(String message) {
- super(message);
- }
-
- public ModelInitException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public ModelInitException(Throwable cause) {
- super(cause);
- }
-
-}
-
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Module.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Module.java
deleted file mode 100644
index 90f9fbf9b2..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Module.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-import java.util.List;
-
-/**
- * A specialized {@link ComponentImplementation} that defines a modular unit of assembly.
- * A Module denotes the extent of assembly in which pass-by-reference semantics are supported.
- */
-public interface Module extends Aggregate, ComponentImplementation {
- /**
- * Returns a list of assembly fragments that combine to form a single module.
- * @return a list of assembly fragments that combine to form a single module
- */
- List<ModuleFragment> getModuleFragments();
-
- /**
- * Returns the specified assembly fragment.
- * @param name the name of the fragment
- * @return the fragment with the specified name, or null if there is no fragment with that name
- */
- ModuleFragment getModuleFragment(String name);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ModuleComponent.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ModuleComponent.java
deleted file mode 100644
index 13125076ea..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ModuleComponent.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-/**
- * Specialization of Component that represents a configured {@link Module}.
- */
-public interface ModuleComponent extends Component {
- // todo do we need this or can we just override getComponentImplementation() ?
- /**
- * Returns the module implementing this module component.
- * @return the module implementing this module component
- */
- Module getModuleImplementation();
-
- /**
- * Set the module implementing this module component.
- * @param module the module implementing this module component
- */
- void setModuleImplementation(Module module);
-
- /**
- * Returns the uri that uniquely identifies this module component.
- * @return the uri that uniquely identifies this module component
- */
- String getURI();
-
- /**
- * Sets the uri that uniquely identifies this module component.
- * @param uri the uri that uniquely identifies this module component
- */
- void setURI(String uri);
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ModuleFragment.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ModuleFragment.java
deleted file mode 100644
index f268524c3f..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ModuleFragment.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-/**
- * A fragment of assembly configuration within a module.
- * To support flexibility and reuse, modules can be defined in multiple fragments that are
- * then combined by the runtime to form the complete module definition.
- */
-public interface ModuleFragment extends Aggregate {
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Multiplicity.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Multiplicity.java
deleted file mode 100644
index 78ff6ede2f..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Multiplicity.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- *
- * Copyright 2005 BEA Systems Inc.
- * Copyright 2005 International Business Machines Corporation
- *
- * 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 org.apache.tuscany.model.assembly;
-
-/**
- * Enumeration for multiplicity.
- */
-public enum Multiplicity {
- /**
- * Indicates a relationship that is optionally connected to the requestor and which, if supplied,
- * must be connected to exactly one provider.
- */
- ZERO_ONE,
-
- /**
- * Indicates a relationship that must be connected between exactly one requestor and
- * exactly one provider.
- */
- ONE_ONE,
-
- /**
- * Indicates a relationship that is optionally connects the requestor to zero to unbounded providers.
- */
- ZERO_N,
-
- /**
- * Indicates a relationship that must be connected at the requestor and which connects it to
- * zero to unbounded providers.
- */
- ONE_N
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/OverrideOption.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/OverrideOption.java
deleted file mode 100644
index 62c7b3fb7a..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/OverrideOption.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- *
- * Copyright 2005 BEA Systems Inc.
- * Copyright 2005 International Business Machines Corporation
- *
- * 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 org.apache.tuscany.model.assembly;
-
-/**
- * Enumeration for override options that are used to control whether configuration information
- * can be overridden by larger grained definitions.
- */
-public enum OverrideOption {
- /**
- * Indicates that the supplied configuration cannot be overridden.
- */
- NO,
-
- /**
- * Indicates that the supplied configuration may be overriden.
- */
- MAY,
-
- /**
- * Indicates that the supplied configuration must be overriden.
- */
- MUST
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Port.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Port.java
deleted file mode 100644
index 5dadfa0d63..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Port.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-/**
- * Abstraction for the association of a service contract with a requestor or provider.
- */
-public interface Port extends AssemblyModelObject {
- /**
- * Returns the contract for invocations of a service using this port.
- * @return the oontract for invocations of a service using this port
- */
- ServiceContract getServiceContract();
-
- /**
- * Set the contract for invocations of a service using this port.
- * @param contract the contract for invocations of a service using this port
- */
- void setServiceContract(ServiceContract contract);
-
- /**
- * Returns the name of the port where it is associated with a requestor or provider.
- * @return the name of the port
- */
- String getName();
-
- /**
- * Sets the name of the port where it is associated with a requestor or provider.
- * @param name the name of the port where it is associated with a requestor or provider
- */
- void setName(String name);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Property.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Property.java
deleted file mode 100644
index cd6a918686..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Property.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-
-
-/**
- * A description of a property that can be used to configure a component.
- */
-public interface Property extends Extensible {
- // todo should we decalre this as Property<T> where T would be the type of this Property?
-
- /**
- * Returns the property name.
- * @return the property name
- */
- String getName();
-
- /**
- * Sets the property name.
- * @param name the property name
- */
- void setName(String name);
-
- /**
- * Returns the default value of the property.
- * @return the default value of ths property
- */
- Object getDefaultValue();
-
- /**
- * Sets the default value of the property.
- * @param value the default value of ths property
- */
- void setDefaultValue(Object value);
-
- /**
- * Returns true if the property allows multiple values.
- * @return true if the property allows multiple values
- */
- boolean isMany();
-
- /**
- * Sets whether or not the property allows multiple values.
- * @param value true if the property should allow multiple values
- */
- void setMany(boolean value);
-
- /**
- * Returns true if a value must be supplied for the property.
- * @return true is a value must be supplied for the property
- */
- boolean isRequired();
-
- /**
- * Sets whether a value must be supplied for the property.
- * For ease of use, it is recommended that a meaningful default value should
- * be supplied for all properties; users should only be required to specify
- * a value if there is no reasonable default.
- *
- * @param value set to true to require that a value be supplied for uses of this property
- */
- void setRequired(boolean value);
-
- /**
- * Returns the type of this property as used by the runtime.
- * @return the type of this property as used by the runtime
- */
- Class getType();
-
- /**
- * Sets the type of this property as used by the runtime
- * @param value the type of this property as used by the runtime
- */
- void setType(Class value);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Reference.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Reference.java
deleted file mode 100644
index 8cc13e98ec..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Reference.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-
-/**
- * The association of a port with a requestor.
- */
-public interface Reference extends Port {
- /**
- * Returns the multiplicity allowed for wires connected to this reference.
- * @return the multiplicity allowed for wires connected to this reference
- */
- Multiplicity getMultiplicity();
-
- /**
- * Sets the multiplicity allowed for wires connected to this reference.
- * @param multiplicity the multiplicity allowed for wires connected to this reference
- */
- void setMultiplicity(Multiplicity multiplicity);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/RuntimeConfigurationHolder.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/RuntimeConfigurationHolder.java
deleted file mode 100644
index 7b20f2db21..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/RuntimeConfigurationHolder.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-/**
- * A model object that can hold a runtime configuration object.
- */
-public interface RuntimeConfigurationHolder {
-
- /**
- * Sets the runtime configuration object.
- * @param configuration the runtime configuration object
- */
- void setRuntimeConfiguration(Object configuration);
-
- /**
- * Returns the runtime configuration object.
- * @return the runtime configuration object
- */
- Object getRuntimeConfiguration();
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Scope.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Scope.java
deleted file mode 100644
index e5209d05b5..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Scope.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- *
- * Copyright 2005 BEA Systems Inc.
- * Copyright 2005 International Business Machines Corporation
- *
- * 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 org.apache.tuscany.model.assembly;
-
-/**
- * The types of scope supported by assemblies.
- */
-public enum Scope {
- // todo define what these are
- INSTANCE,
- REQUEST,
- SESSION,
- MODULE,
- AGGREGATE,
- UNDEFINED
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Service.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Service.java
deleted file mode 100644
index c73002efba..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Service.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-
-/**
- * The association of a port with a provider.
- */
-public interface Service extends Port {
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ServiceContract.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ServiceContract.java
deleted file mode 100644
index 3284755ddb..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ServiceContract.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-/**
- * The contract specified by a requestor or provider for invocations across a port.
- */
-public interface ServiceContract extends Extensible {
-
- /**
- * Returns the interface for invocations from the requestor to the provider.
- * @return the interface for invocations from the requestor to the provider
- */
- Class getInterface();
-
- /**
- * Sets the interface for invocations from the requestor to the provider.
- * @param value the interface for invocations from the requestor to the provider
- */
- void setInterface(Class value);
-
- /**
- * Returns the callback interface for invocation from the provider back to its requestor.
- * @return the callback interface for invocation from the provider back to its requestor
- */
- Class getCallbackInterface();
-
- /**
- * Sets the callback interface for invocation from the provider back to its requestor.
- * @param value the callback interface for invocation from the provider back to its requestor
- */
- void setCallbackInterface(Class value);
-
- /**
- * Returns the scope of this service contract.
- * @return
- * todo missing javadoc
- */
- Scope getScope();
-
- /**
- * Sets the scope.
- * @param scope of this service contract.
- * todo missing javadoc
- */
- void setScope(Scope scope);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ServiceURI.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ServiceURI.java
deleted file mode 100644
index 3b9c1ec2a7..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/ServiceURI.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-/**
- * Represents a service URI.
- */
-public interface ServiceURI {
-
- /**
- * Returns true if the address scheme is sca
- * @return
- */
- public boolean isSCAScheme();
-
- /**
- * @return Returns the address.
- */
- public String getAddress();
-
- /**
- * Returns the module component name
- * @return
- */
- public String getModuleComponentName();
-
- /**
- * Returns the part name
- * @return
- */
- public String getPartName();
-
- /**
- * Returns the service name
- * @return
- */
- public String getServiceName();
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/SimpleComponent.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/SimpleComponent.java
deleted file mode 100644
index 059c6dbf2d..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/SimpleComponent.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-
-/**
- * A simple component, specifically not an {@link Aggregate}.
- */
-public interface SimpleComponent extends Component {
-}
- \ No newline at end of file
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Subsystem.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Subsystem.java
deleted file mode 100644
index 7a14847353..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Subsystem.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-
-
-/**
- * Represents a subsystem.
- */
-public interface Subsystem extends Aggregate {
-
- /**
- * Returns the subsystem uri.
- * @return
- */
- String getURI();
-
- /**
- * Sets the subsystem uri.
- * @param value
- */
- void setURI(String value);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Wire.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Wire.java
deleted file mode 100644
index dfe553210a..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/Wire.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly;
-
-
-/**
- * A connection between a requestor (source) and a provider (target).
- */
-public interface Wire extends Extensible {
- /**
- * Returns the URI for the source of the request.
- * @return the URI for the source of the request
- */
- ServiceURI getSource();
-
- /**
- * Sets the URI for the source of the request.
- * @param uri the URI for the source of the request
- */
- void setSource(ServiceURI uri);
-
- /**
- * Returns the URI for the target of the request.
- * @return the URI for the target of the request
- */
- ServiceURI getTarget();
-
- /**
- * Sets the URI for the target of the request.
- * @param uri the URI for the target of the request
- */
- void setTarget(ServiceURI uri);
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AggregateImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AggregateImpl.java
deleted file mode 100644
index 234fff6600..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AggregateImpl.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.wsdl.Definition;
-import javax.wsdl.Import;
-
-import org.apache.tuscany.common.resource.ResourceLoader;
-import org.apache.tuscany.model.assembly.Aggregate;
-import org.apache.tuscany.model.assembly.AggregatePart;
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
-import org.apache.tuscany.model.assembly.Component;
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.EntryPoint;
-import org.apache.tuscany.model.assembly.ExternalService;
-import org.apache.tuscany.model.assembly.ServiceURI;
-import org.apache.tuscany.model.assembly.Wire;
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import commonj.sdo.helper.XSDHelper;
-
-/**
- * An implementation of Aggregate.
- */
-public abstract class AggregateImpl extends ExtensibleImpl implements Aggregate {
-
- private String name;
- private List<Component> components=new ArrayList<Component>();
- private Map<String, Component> componentsMap;
- private List<EntryPoint> entryPoints=new ArrayList<EntryPoint>();
- private Map<String, EntryPoint> entryPointsMap;
- private List<ExternalService> externalServices=new ArrayList<ExternalService>();
- private Map<String, ExternalService> externalServicesMap;
- private List<AggregatePart> aggregateParts;
- private List<Wire> wires=new ArrayList<Wire>();
- private List<Import> wsdlImports=new ArrayList<Import>();
- private Map<String, List<Import>> wsdlImportsMap;
- private AssemblyModelContext modelContext;
-
- /**
- * Constructor
- */
- protected AggregateImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Aggregate#getName()
- */
- public String getName() {
- return name;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Aggregate#setName(java.lang.String)
- */
- public void setName(String newName) {
- checkNotFrozen();
- name=newName;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Aggregate#getComponents()
- */
- public List<Component> getComponents() {
- return components;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Aggregate#getComponent(java.lang.String)
- */
- public Component getComponent(String name) {
- checkInitialized();
- return componentsMap.get(name);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Aggregate#getEntryPoints()
- */
- public List<EntryPoint> getEntryPoints() {
- return entryPoints;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Aggregate#getEntryPoint(java.lang.String)
- */
- public EntryPoint getEntryPoint(String name) {
- checkInitialized();
- return entryPointsMap.get(name);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Aggregate#getExternalServices()
- */
- public List<ExternalService> getExternalServices() {
- return externalServices;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Aggregate#getExternalService(java.lang.String)
- */
- public ExternalService getExternalService(String name) {
- checkInitialized();
- return externalServicesMap.get(name);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Aggregate#getAggregateParts()
- */
- public List<AggregatePart> getAggregateParts() {
- checkInitialized();
- return aggregateParts;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Aggregate#getWires()
- */
- public List<Wire> getWires() {
- return wires;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Aggregate#getWSDLImports()
- */
- public List<Import> getWSDLImports() {
- return wsdlImports;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Aggregate#getWSDLImports(java.lang.String)
- */
- public List<Import> getWSDLImports(String namespace) {
- checkInitialized();
- return wsdlImportsMap.get(namespace);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Aggregate#getAssemblyModelContext()
- */
- public AssemblyModelContext getAssemblyModelContext() {
- checkInitialized();
- return modelContext;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Aggregate#getConfiguredService(org.apache.tuscany.model.assembly.ServiceURI)
- */
- public ConfiguredService getConfiguredService(ServiceURI address) {
- String partName = address.getPartName();
- String serviceName = address.getServiceName();
- Component component = getComponent(partName);
- if (component != null) {
- if (serviceName != null) {
- return component.getConfiguredService(serviceName);
- } else {
- if (!component.getConfiguredServices().isEmpty()) {
- return component.getConfiguredServices().get(0);
- } else {
- return null;
- }
- }
-
- } else {
- ExternalService externalService = getExternalService(partName);
- if (externalService != null) {
- return externalService.getConfiguredService();
- } else {
- return null;
- }
- }
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
- */
- public void initialize(AssemblyModelContext modelContext) {
- if (isInitialized())
- return;
- super.initialize(modelContext);
-
- // Save the model context
- this.modelContext=modelContext;
-
- // Populate map of WSDL imports
- ResourceLoader resourceLoader=modelContext.getApplicationResourceLoader();
- wsdlImportsMap = new HashMap<String, List<Import>>();
- for (Import wsdlImport : wsdlImports) {
- String namespace=wsdlImport.getNamespaceURI();
- List<Import> list=wsdlImportsMap.get(namespace);
- if (list==null) {
- list=new ArrayList<Import>();
- wsdlImportsMap.put(namespace, list);
- }
- list.add(wsdlImport);
-
- // Load the WSDL definition if necessary
- if (wsdlImport.getDefinition()==null) {
- String location=wsdlImport.getLocationURI();
- Definition definition;
- ClassLoader ccl=Thread.currentThread().getContextClassLoader();
- try {
- URL url=resourceLoader.getResource(location);
- if (url==null)
- throw new IllegalArgumentException("Cannot find "+location);
- definition = modelContext.getAssemblyLoader().loadDefinition(url.toString());
- Thread.currentThread().setContextClassLoader(modelContext.getApplicationResourceLoader().getClassLoader());
- XSDHelper xsdHelper=SDOUtil.createXSDHelper(modelContext.getTypeHelper());
- xsdHelper.define (url.openStream(), null);
- } catch (IOException e) {
- throw new IllegalArgumentException(e);
- } finally {
- Thread.currentThread().setContextClassLoader(ccl);
- }
- wsdlImport.setDefinition(definition);
- }
- }
-
- // Populate maps of components, entry points and external services
- aggregateParts = new ArrayList<AggregatePart>();
- componentsMap = new HashMap<String, Component>();
- for (Component component : components) {
- componentsMap.put(component.getName(), component);
- aggregateParts.add(component);
- component.initialize(modelContext);
- ((AggregatePartImpl)component).setAggregate(this);
- }
- entryPointsMap = new HashMap<String, EntryPoint>();
- for (EntryPoint entryPoint : entryPoints) {
- entryPointsMap.put(entryPoint.getName(), entryPoint);
- aggregateParts.add(entryPoint);
- entryPoint.initialize(modelContext);
- ((AggregatePartImpl)entryPoint).setAggregate(this);
- }
- externalServicesMap = new HashMap<String, ExternalService>();
- for (ExternalService externalService : externalServices) {
- externalServicesMap.put(externalService.getName(), externalService);
- aggregateParts.add(externalService);
- externalService.initialize(modelContext);
- ((AggregatePartImpl)externalService).setAggregate(this);
- }
- for (Wire wire : wires) {
- wire.initialize(modelContext);
- }
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#freeze()
- */
- public void freeze() {
- if (isFrozen())
- return;
- super.freeze();
-
- // Freeze lists
- wsdlImports=Collections.unmodifiableList(wsdlImports);
- freeze(wsdlImports);
- components=Collections.unmodifiableList(components);
- freeze(components);
- entryPoints=Collections.unmodifiableList(entryPoints);
- freeze(entryPoints);
- externalServices=Collections.unmodifiableList(externalServices);
- freeze(externalServices);
- wires=Collections.unmodifiableList(wires);
- freeze(wires);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
- */
- public boolean accept(AssemblyModelVisitor visitor) {
- if (!super.accept(visitor))
- return false;
-
- if (!accept(aggregateParts, visitor))
- return false;
-
- if (!accept(wires, visitor))
- return false;
-
- return true;
- }
-
-} //ModuleImpl
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AggregatePartImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AggregatePartImpl.java
deleted file mode 100644
index b9a4434c58..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AggregatePartImpl.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.Aggregate;
-import org.apache.tuscany.model.assembly.AggregatePart;
-
-/**
- * Implementation of AggregatePart.
- */
-public abstract class AggregatePartImpl extends ExtensibleImpl implements AggregatePart {
- private Aggregate aggregate;
- private String name;
-
- /**
- * Constructor
- */
- protected AggregatePartImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AggregatePart#getName()
- */
- public String getName() {
- return name;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AggregatePart#setName(java.lang.String)
- */
- public void setName(String value) {
- checkNotFrozen();
- name=value;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AggregatePart#getAggregate()
- */
- public Aggregate getAggregate() {
- checkInitialized();
- return aggregate;
- }
-
- /**
- * Sets the aggregate containing this aggregate part.
- * @param aggregate
- */
- protected void setAggregate(Aggregate aggregate) {
- checkNotFrozen();
- this.aggregate=aggregate;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AssemblyFactoryImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AssemblyFactoryImpl.java
deleted file mode 100644
index 0c2550ab10..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AssemblyFactoryImpl.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.model.assembly.AggregatePart;
-import org.apache.tuscany.model.assembly.AssemblyFactory;
-import org.apache.tuscany.model.assembly.ComponentType;
-import org.apache.tuscany.model.assembly.ConfiguredPort;
-import org.apache.tuscany.model.assembly.ConfiguredProperty;
-import org.apache.tuscany.model.assembly.ConfiguredReference;
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.EntryPoint;
-import org.apache.tuscany.model.assembly.ExternalService;
-import org.apache.tuscany.model.assembly.Module;
-import org.apache.tuscany.model.assembly.ModuleComponent;
-import org.apache.tuscany.model.assembly.ModuleFragment;
-import org.apache.tuscany.model.assembly.Property;
-import org.apache.tuscany.model.assembly.Reference;
-import org.apache.tuscany.model.assembly.Service;
-import org.apache.tuscany.model.assembly.ServiceURI;
-import org.apache.tuscany.model.assembly.SimpleComponent;
-import org.apache.tuscany.model.assembly.Subsystem;
-import org.apache.tuscany.model.assembly.Wire;
-import org.apache.tuscany.model.types.java.JavaServiceContract;
-import org.apache.tuscany.model.types.java.impl.JavaServiceContractImpl;
-import org.apache.tuscany.model.types.wsdl.WSDLServiceContract;
-import org.apache.tuscany.model.types.wsdl.impl.WSDLServiceContractImpl;
-
-/**
- * Default implementation of AssemblyFactory
- */
-public class AssemblyFactoryImpl implements AssemblyFactory {
-
- /**
- * Constructor
- */
- public AssemblyFactoryImpl() {
- super();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createSimpleComponent()
- */
- public SimpleComponent createSimpleComponent() {
- return new SimpleComponentImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createComponentType()
- */
- public ComponentType createComponentType() {
- return new ComponentTypeImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createEntryPoint()
- */
- public EntryPoint createEntryPoint() {
- return new EntryPointImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createExternalService()
- */
- public ExternalService createExternalService() {
- return new ExternalServiceImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createJavaServiceContract()
- */
- public JavaServiceContract createJavaServiceContract() {
- return new JavaServiceContractImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createModule()
- */
- public Module createModule() {
- return new ModuleImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createModuleFragment()
- */
- public ModuleFragment createModuleFragment() {
- return new ModuleFragmentImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createModuleComponent()
- */
- public ModuleComponent createModuleComponent() {
- return new ModuleComponentImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createProperty()
- */
- public Property createProperty() {
- return new PropertyImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createConfiguredProperty()
- */
- public ConfiguredProperty createConfiguredProperty() {
- return new ConfiguredPropertyImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createReference()
- */
- public Reference createReference() {
- return new ReferenceImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createConfiguredReference()
- */
- public ConfiguredReference createConfiguredReference() {
- return new ConfiguredReferenceImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createService()
- */
- public Service createService() {
- return new ServiceImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createConfiguredService()
- */
- public ConfiguredService createConfiguredService() {
- return new ConfiguredServiceImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createSubsystem()
- */
- public Subsystem createSubsystem() {
- return new SubsystemImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createWSDLServiceContract()
- */
- public WSDLServiceContract createWSDLServiceContract() {
- return new WSDLServiceContractImpl();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createServiceURI(java.lang.String)
- */
- public ServiceURI createServiceURI(String uri) {
- return new ServiceURIImpl(uri);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createServiceURI(org.apache.tuscany.model.assembly.ModuleComponent, java.lang.String)
- */
- public ServiceURI createServiceURI(ModuleComponent moduleComponent, String serviceName) {
- return new ServiceURIImpl(moduleComponent, serviceName);
- }
-
- /*
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createServiceURI(org.apache.tuscany.model.assembly.ModuleComponent, org.apache.tuscany.model.assembly.AggregatePart, org.apache.tuscany.model.assembly.ConfiguredPort)
- */
- public ServiceURI createServiceURI(ModuleComponent moduleComponent, AggregatePart aggregatePart, ConfiguredPort configuredPort) {
- return new ServiceURIImpl(moduleComponent, aggregatePart, configuredPort);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createQName(java.lang.String)
- */
- public QName createQName(String uri) {
- int h = uri.indexOf('#');
- return new QName(uri.substring(0, h), uri.substring(h + 1));
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyFactory#createWire()
- */
- public Wire createWire() {
- return new WireImpl();
- }
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AssemblyModelContextImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AssemblyModelContextImpl.java
deleted file mode 100644
index 221b3e0af6..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AssemblyModelContextImpl.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.common.resource.ResourceLoader;
-import org.apache.tuscany.model.assembly.AssemblyFactory;
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.loader.AssemblyModelLoader;
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import commonj.sdo.helper.TypeHelper;
-
-/**
- */
-public class AssemblyModelContextImpl implements AssemblyModelContext {
-
- private final AssemblyFactory assemblyFactory;
- private final AssemblyModelLoader assemblyLoader;
- private final ResourceLoader systemResourceLoader;
- private final ResourceLoader applicationResourceLoader;
- private final TypeHelper typeHelper;
-
- public AssemblyModelContextImpl(AssemblyModelLoader assemblyLoader, ResourceLoader resourceLoader) {
- this(new AssemblyFactoryImpl(), assemblyLoader, resourceLoader, resourceLoader);
- }
-
- public AssemblyModelContextImpl(AssemblyFactory assemblyFactory, AssemblyModelLoader assemblyLoader, ResourceLoader resourceLoader) {
- this(assemblyFactory, assemblyLoader, resourceLoader, resourceLoader);
- }
-
- public AssemblyModelContextImpl(AssemblyFactory assemblyFactory, AssemblyModelLoader assemblyLoader, ResourceLoader resourceLoader, ResourceLoader artifactLoader) {
- this(assemblyFactory, assemblyLoader, resourceLoader, artifactLoader, SDOUtil.createTypeHelper());
- }
-
- public AssemblyModelContextImpl(AssemblyFactory assemblyFactory, AssemblyModelLoader assemblyLoader, ResourceLoader resourceLoader, ResourceLoader artifactLoader, TypeHelper typeHelper) {
- this.assemblyFactory = assemblyFactory;
- this.assemblyLoader = assemblyLoader;
- this.systemResourceLoader = resourceLoader;
- this.applicationResourceLoader = artifactLoader;
- this.typeHelper=typeHelper;
-
- //FIXME the caller should configure the assemblyLoader himself
- if (assemblyLoader!=null)
- assemblyLoader.setModelContext(this);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelContext#getAssemblyFactory()
- */
- public AssemblyFactory getAssemblyFactory() {
- return assemblyFactory;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelContext#getSystemResourceLoader()
- */
- public ResourceLoader getSystemResourceLoader() {
- return systemResourceLoader;
- }
-
- public ResourceLoader getApplicationResourceLoader() {
- return applicationResourceLoader;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelContext#getAssemblyLoader()
- */
- public AssemblyModelLoader getAssemblyLoader() {
- return assemblyLoader;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelContext#getTypeHelper()
- */
- public TypeHelper getTypeHelper() {
- return typeHelper;
- }
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AssemblyModelObjectImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AssemblyModelObjectImpl.java
deleted file mode 100644
index 356fc4f0a9..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/AssemblyModelObjectImpl.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import java.util.Collection;
-
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.AssemblyModelObject;
-import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
-
-/**
- * A base class for assembly model objects.
- */
-public abstract class AssemblyModelObjectImpl implements AssemblyModelObject {
-
- private boolean frozen;
- private boolean initialized;
-
- /**
- * Constructor
- */
- protected AssemblyModelObjectImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
- */
- public boolean accept(AssemblyModelVisitor visitor) {
- return visitor.visit(this);
- }
-
- /**
- * Walk a visitor through a collection of model objects.
- * @param collection
- * @param visitor
- * @return
- */
- protected boolean accept(Collection collection, AssemblyModelVisitor visitor) {
- for (Object member : collection) {
- if (member instanceof AssemblyModelObject) {
- if (!((AssemblyModelObject)member).accept(visitor))
- return false;
- }
- }
- return true;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#freeze()
- */
- public void freeze() {
- if (!frozen)
- frozen=true;
- }
-
- /**
- * Returns true if the object is frozen
- */
- protected boolean isFrozen() {
- return frozen;
- }
-
- /**
- * Freeze members of a collection
- */
- protected void freeze(Collection collection) {
- for (Object member : collection) {
- if (member instanceof AssemblyModelObject) {
- ((AssemblyModelObject)member).freeze();
- }
- }
- }
-
- /**
- * Check that the current model object can be modified.
- * @throws IllegalStateException
- */
- protected void checkNotFrozen() {
- if (frozen)
- throw new IllegalStateException("Attempt to modify a frozen assembly model");
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
- */
- public void initialize(AssemblyModelContext modelContext) {
- if (!initialized)
- initialized=true;
- }
-
- /**
- * Returns true if the object is initialized
- */
- protected boolean isInitialized() {
- return initialized;
- }
-
- /**
- * Initialize members of a collection
- */
- protected void initialize(Collection collection, AssemblyModelContext modelContext) {
- for (Object member : collection) {
- if (member instanceof AssemblyModelObject) {
- ((AssemblyModelObject)member).initialize(modelContext);
- }
- }
- }
-
- /**
- * Check that the current model object is initialized.
- * @throws IllegalStateException
- */
- protected void checkInitialized() {
- if (!initialized)
- throw new IllegalStateException("Attempt to use an uninitialized assembly model");
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/BindingImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/BindingImpl.java
deleted file mode 100644
index cd1f0e2cb4..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/BindingImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
-import org.apache.tuscany.model.assembly.Binding;
-
-/**
- * An implementation of Binding.
- */
-public class BindingImpl extends ExtensibleImpl implements Binding {
-
- private String uri;
- private Object runtimeConfiguration;
-
- /**
- * Constructor
- */
- protected BindingImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Binding#getURI()
- */
- public String getURI() {
- return uri;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Binding#setURI(java.lang.String)
- */
- public void setURI(String value) {
- checkNotFrozen();
- uri=value;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
- */
- public void initialize(AssemblyModelContext modelContext) {
- if (isInitialized())
- return;
- super.initialize(modelContext);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#freeze()
- */
- public void freeze() {
- if (isFrozen())
- return;
- super.freeze();
-
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.RuntimeConfigurationHolder#getRuntimeConfiguration()
- */
- public Object getRuntimeConfiguration() {
- return runtimeConfiguration;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.RuntimeConfigurationHolder#setRuntimeConfiguration(java.lang.Object)
- */
- public void setRuntimeConfiguration(Object configuration) {
- checkNotFrozen();
- this.runtimeConfiguration = configuration;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AggregateImpl#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
- */
- public boolean accept(AssemblyModelVisitor visitor) {
- if (!super.accept(visitor))
- return false;
-
- return true;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentImpl.java
deleted file mode 100644
index 2033ebe7f7..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentImpl.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.tuscany.model.assembly.AssemblyFactory;
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
-import org.apache.tuscany.model.assembly.Component;
-import org.apache.tuscany.model.assembly.ComponentImplementation;
-import org.apache.tuscany.model.assembly.ConfiguredProperty;
-import org.apache.tuscany.model.assembly.ConfiguredReference;
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.Property;
-import org.apache.tuscany.model.assembly.Reference;
-import org.apache.tuscany.model.assembly.Service;
-
-/**
- * An implementation of Component.
- */
-public abstract class ComponentImpl extends AggregatePartImpl implements Component {
-
- private List<ConfiguredReference> configuredReferences=new ArrayList<ConfiguredReference>();
- private Map<String, ConfiguredReference> configuredReferencesMap;
- private List<ConfiguredService> configuredServices=new ArrayList<ConfiguredService>();
- private Map<String, ConfiguredService> configuredServicesMap;
- private List<ConfiguredProperty> configuredProperties=new ArrayList<ConfiguredProperty>();
- private Map<String, ConfiguredProperty> configuredPropertiesMap;
- private ComponentImplementation implementation;
-
- /**
- * @see org.apache.tuscany.model.assembly.Component#getComponentImplementation()
- */
- public ComponentImplementation getComponentImplementation() {
- return implementation;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Component#setComponentImplementation(org.apache.tuscany.model.assembly.ComponentImplementation)
- */
- public void setComponentImplementation(ComponentImplementation value) {
- checkNotFrozen();
- implementation=value;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Component#getConfiguredServices()
- */
- public List<ConfiguredService> getConfiguredServices() {
- return configuredServices;
- }
-
- public ConfiguredService getConfiguredService(String name) {
- checkInitialized();
- return configuredServicesMap.get(name);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Component#getConfiguredReferences()
- */
- public List<ConfiguredReference> getConfiguredReferences() {
- return configuredReferences;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Component#getConfiguredReference(java.lang.String)
- */
- public ConfiguredReference getConfiguredReference(String name) {
- checkInitialized();
- return configuredReferencesMap.get(name);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Component#getConfiguredProperties()
- */
- public List<ConfiguredProperty> getConfiguredProperties() {
- return configuredProperties;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Component#getConfiguredProperty(java.lang.String)
- */
- public ConfiguredProperty getConfiguredProperty(String name) {
- checkInitialized();
- return configuredPropertiesMap.get(name);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
- */
- public void initialize(AssemblyModelContext modelContext) {
- if (isInitialized())
- return;
- super.initialize(modelContext);
-
- // Initialize the implementation
- ComponentImplementation implementation = getComponentImplementation();
- if (implementation != null) {
- implementation.initialize(modelContext);
- }
-
- // Derive the configured services, references and properties from the component implementation
- //FIXME we have two options here: either just index the configured services, references and properties
- // that we find in the corresponding lists, or derive them from the services, references and properties on
- // the component type, for now just check if the lists are empty or not to determine which option to go with
- configuredServicesMap = new HashMap<String, ConfiguredService>();
- configuredReferencesMap = new HashMap<String, ConfiguredReference>();
- configuredPropertiesMap = new HashMap<String, ConfiguredProperty>();
- if (configuredServices.isEmpty() && configuredReferences.isEmpty() && configuredProperties.isEmpty()) {
- if (implementation != null) {
- AssemblyFactory factory = modelContext.getAssemblyFactory();
- for (Service service : implementation.getComponentType().getServices()) {
- ConfiguredService configuredService = factory.createConfiguredService();
- configuredService.setPort(service);
- configuredServices.add(configuredService);
- configuredServicesMap.put(service.getName(), configuredService);
- ((ConfiguredPortImpl)configuredService).setAggregatePart(this);
- configuredService.initialize(modelContext);
- }
-
- for (Reference reference : implementation.getComponentType().getReferences()) {
- ConfiguredReference configuredReference = factory.createConfiguredReference();
- configuredReference.setPort(reference);
- configuredReferences.add(configuredReference);
- configuredReferencesMap.put(reference.getName(), configuredReference);
- ((ConfiguredPortImpl)configuredReference).setAggregatePart(this);
- configuredReference.initialize(modelContext);
- }
-
- // Derive configured properties from the properties on the component type
- for (Property property : implementation.getComponentType().getProperties()) {
- ConfiguredProperty configuredProperty = factory.createConfiguredProperty();
- configuredProperty.setProperty(property);
- configuredProperties.add(configuredProperty);
- configuredPropertiesMap.put(property.getName(), configuredProperty);
- configuredProperty.initialize(modelContext);
- }
-
- }
- } else {
-
- // Just populate the maps of services, references and properties from the contents of
- // the corresponding lists
- for (ConfiguredService configuredService : configuredServices) {
- configuredServicesMap.put(configuredService.getService().getName(), configuredService);
- ((ConfiguredPortImpl)configuredService).setAggregatePart(this);
- configuredService.initialize(modelContext);
- }
-
- for (ConfiguredReference configuredReference : configuredReferences) {
- configuredReferencesMap.put(configuredReference.getReference().getName(), configuredReference);
- ((ConfiguredPortImpl)configuredReference).setAggregatePart(this);
- configuredReference.initialize(modelContext);
- }
-
- for (ConfiguredProperty configuredProperty : configuredProperties) {
- configuredPropertiesMap.put(configuredProperty.getProperty().getName(), configuredProperty);
- configuredProperty.initialize(modelContext);
- }
- }
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#freeze()
- */
- public void freeze() {
- if (isFrozen())
- return;
- super.freeze();
-
- // Freeze configured services, references and properties
- configuredServices=Collections.unmodifiableList(configuredServices);
- freeze(configuredServices);
- configuredReferences=Collections.unmodifiableList(configuredReferences);
- freeze(configuredReferences);
- configuredProperties=Collections.unmodifiableList(configuredProperties);
- freeze(configuredProperties);
- if (implementation!=null)
- implementation.freeze();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
- */
- public boolean accept(AssemblyModelVisitor visitor) {
- if (!super.accept(visitor))
- return false;
-
- if (!accept(configuredServices, visitor))
- return false;
- if (!accept(configuredReferences, visitor))
- return false;
- if (!accept(configuredProperties, visitor))
- return false;
- if (implementation!=null) {
- if (!implementation.accept(visitor))
- return false;
- }
-
- return true;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentImplementationImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentImplementationImpl.java
deleted file mode 100644
index f14a86c713..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentImplementationImpl.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
-import org.apache.tuscany.model.assembly.ComponentImplementation;
-import org.apache.tuscany.model.assembly.ComponentType;
-
-/**
- * An implementation of ComponentImplementation.
- */
-public class ComponentImplementationImpl extends ExtensibleImpl implements ComponentImplementation {
-
- private ComponentType componentType;
- private Object runtimeConfiguration;
-
- /**
- * Constructor
- */
- protected ComponentImplementationImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ComponentImplementation#getComponentType()
- */
- public ComponentType getComponentType() {
- return componentType;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ComponentImplementation#setComponentType(org.apache.tuscany.model.assembly.ComponentType)
- */
- public void setComponentType(ComponentType componentType) {
- checkNotFrozen();
- this.componentType=componentType;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
- */
- public void initialize(AssemblyModelContext modelContext) {
- if (isInitialized())
- return;
- super.initialize(modelContext);
-
- if (componentType!=null)
- componentType.initialize(modelContext);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#freeze()
- */
- public void freeze() {
- if (isFrozen())
- return;
- super.freeze();
-
- // Freeze component type
- if (componentType!=null)
- componentType.freeze();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.RuntimeConfigurationHolder#getRuntimeConfiguration()
- */
- public Object getRuntimeConfiguration() {
- return runtimeConfiguration;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.RuntimeConfigurationHolder#setRuntimeConfiguration(java.lang.Object)
- */
- public void setRuntimeConfiguration(Object configuration) {
- checkNotFrozen();
- this.runtimeConfiguration = configuration;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AggregateImpl#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
- */
- public boolean accept(AssemblyModelVisitor visitor) {
- if (!super.accept(visitor))
- return false;
-
- if (componentType!=null) {
- if (!componentType.accept(visitor))
- return false;
- }
-
- return true;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentTypeImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentTypeImpl.java
deleted file mode 100644
index baef2e9b2a..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ComponentTypeImpl.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
-import org.apache.tuscany.model.assembly.ComponentType;
-import org.apache.tuscany.model.assembly.Property;
-import org.apache.tuscany.model.assembly.Reference;
-import org.apache.tuscany.model.assembly.Service;
-
-/**
- * An implementation of ComponentType.
- */
-public class ComponentTypeImpl extends ExtensibleImpl implements ComponentType {
-
- private List<Reference> references=new ArrayList<Reference>();
- private Map<String, Reference> referencesMap;
- private List<Service> services=new ArrayList<Service>();
- private Map<String, Service> servicesMap;
- private List<Property> properties=new ArrayList<Property>();
- private Map<String, Property> propertiesMap;
-
- /**
- * Constructor
- */
- protected ComponentTypeImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ComponentType#getReferences()
- */
- public List<Reference> getReferences() {
- return references;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ComponentType#getReference(java.lang.String)
- */
- public Reference getReference(String name) {
- checkInitialized();
- return referencesMap.get(name);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ComponentType#getServices()
- */
- public List<Service> getServices() {
- return services;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ComponentType#getService(java.lang.String)
- */
- public Service getService(String name) {
- checkInitialized();
- return servicesMap.get(name);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ComponentType#getProperties()
- */
- public List<Property> getProperties() {
- return properties;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ComponentType#getProperty(java.lang.String)
- */
- public Property getProperty(String name) {
- checkInitialized();
- return propertiesMap.get(name);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
- */
- public void initialize(AssemblyModelContext modelContext) {
- if (isInitialized())
- return;
- super.initialize(modelContext);
-
- // Populate maps of references, properties and services
- referencesMap = new HashMap<String, Reference>();
- for (Reference reference : references) {
- referencesMap.put(reference.getName(), reference);
- reference.initialize(modelContext);
- }
- propertiesMap = new HashMap<String, Property>();
- for (Property property : properties) {
- propertiesMap.put(property.getName(), property);
- property.initialize(modelContext);
- }
- servicesMap = new HashMap<String, Service>();
- for (Service service : services) {
- servicesMap.put(service.getName(), service);
- service.initialize(modelContext);
- }
- }
-
- public void freeze() {
- if (isFrozen())
- return;
- super.freeze();
-
- // Freeze lists of services, references and properties
- services=Collections.unmodifiableList(services);
- freeze(services);
- references=Collections.unmodifiableList(references);
- freeze(references);
- properties=Collections.unmodifiableList(properties);
- freeze(properties);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
- */
- public boolean accept(AssemblyModelVisitor visitor) {
- if (!super.accept(visitor))
- return false;
-
- if (!accept(services, visitor))
- return false;
- if (!accept(references, visitor))
- return false;
- if (!accept(properties, visitor))
- return false;
-
- return true;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredPortImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredPortImpl.java
deleted file mode 100644
index 9662d13dc7..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredPortImpl.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.AggregatePart;
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
-import org.apache.tuscany.model.assembly.ConfiguredPort;
-import org.apache.tuscany.model.assembly.Port;
-
-/**
- * Implementation of ConfiguredPort.
- */
-public abstract class ConfiguredPortImpl extends AssemblyModelObjectImpl implements ConfiguredPort {
- private AggregatePart aggregatePart;
- private Port port;
-
- private Object runtimeConfiguration;
- private Object proxyFactory;
-
- /**
- * Constructor
- */
- protected ConfiguredPortImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ConfiguredPort#getPort()
- */
- public Port getPort() {
- return port;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ConfiguredPort#setPort(org.apache.tuscany.model.assembly.Port)
- */
- public void setPort(Port port) {
- checkNotFrozen();
- this.port = port;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ConfiguredPort#getAggregatePart()
- */
- public AggregatePart getAggregatePart() {
- checkInitialized();
- return aggregatePart;
- }
-
- /**
- * Sets the aggregate part containing this configured port.
- * @param aggregatePart
- */
- protected void setAggregatePart(AggregatePart aggregatePart) {
- checkNotFrozen();
- this.aggregatePart=aggregatePart;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ConfiguredPort#getProxyFactory()
- */
- public Object getProxyFactory() {
- return proxyFactory;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ConfiguredPort#setProxyFactory(java.lang.Object)
- */
- public void setProxyFactory(Object proxyFactory) {
- checkNotFrozen();
- this.proxyFactory = proxyFactory;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.RuntimeConfigurationHolder#getRuntimeConfiguration()
- */
- public Object getRuntimeConfiguration() {
- return runtimeConfiguration;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.RuntimeConfigurationHolder#setRuntimeConfiguration(java.lang.Object)
- */
- public void setRuntimeConfiguration(Object configuration) {
- checkNotFrozen();
- runtimeConfiguration = configuration;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
- */
- public void initialize(AssemblyModelContext modelContext) {
- if (isInitialized())
- return;
- super.initialize(modelContext);
-
- if (port!=null)
- port.initialize(modelContext);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#freeze()
- */
- public void freeze() {
- if (isFrozen())
- return;
- super.freeze();
-
- if (port!=null)
- port.freeze();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
- */
- public boolean accept(AssemblyModelVisitor visitor) {
- if (!super.accept(visitor))
- return false;
-
- if (port!=null) {
- if (!port.accept(visitor))
- return false;
- }
-
- return true;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredPropertyImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredPropertyImpl.java
deleted file mode 100644
index 477c62ad44..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredPropertyImpl.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
-import org.apache.tuscany.model.assembly.ConfiguredProperty;
-import org.apache.tuscany.model.assembly.OverrideOption;
-import org.apache.tuscany.model.assembly.Property;
-
-/**
- * Implementation of ConfiguredProperty
- */
-public class ConfiguredPropertyImpl extends AssemblyModelObjectImpl implements ConfiguredProperty {
- private Property property;
- private OverrideOption overrideOption;
- private Object value;
-
- /**
- * Constructor
- */
- protected ConfiguredPropertyImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ConfiguredProperty#getProperty()
- */
- public Property getProperty() {
- return property;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ConfiguredProperty#setProperty(org.apache.tuscany.model.assembly.Property)
- */
- public void setProperty(Property property) {
- checkNotFrozen();
- this.property = property;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ConfiguredProperty#getValue()
- */
- public Object getValue() {
- return value;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ConfiguredProperty#setValue(java.lang.Object)
- */
- public void setValue(Object value) {
- checkNotFrozen();
- this.value = value;
- }
-
- /*
- * @see org.apache.tuscany.model.assembly.ConfiguredProperty#getOverrideOption()
- */
- public OverrideOption getOverrideOption() {
- return overrideOption;
- }
-
- /*
- * @see org.apache.tuscany.model.assembly.ConfiguredProperty#setOverrideOption(org.apache.tuscany.model.assembly.OverrideOption)
- */
- public void setOverrideOption(OverrideOption value) {
- checkNotFrozen();
- this.overrideOption=value;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
- */
- public void initialize(AssemblyModelContext modelContext) {
- if (isInitialized())
- return;
- super.initialize(modelContext);
-
- if (property!=null)
- property.initialize(modelContext);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#freeze()
- */
- public void freeze() {
- if (isFrozen())
- return;
- super.freeze();
-
- if (property!=null)
- property.freeze();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
- */
- public boolean accept(AssemblyModelVisitor visitor) {
- if (!super.accept(visitor))
- return false;
-
- if (property!=null) {
- if (!property.accept(visitor))
- return false;
- }
-
- return true;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredReferenceImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredReferenceImpl.java
deleted file mode 100644
index c9bc9b332f..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredReferenceImpl.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.tuscany.model.assembly.ConfiguredReference;
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.Reference;
-
-/**
- * An implementation of ConfiguredReference.
- */
-public class ConfiguredReferenceImpl extends ConfiguredPortImpl implements ConfiguredReference {
-
- private List<ConfiguredService> targetConfiguredServices = new ArrayList<ConfiguredService>();
-
- /**
- * Constructor
- */
- protected ConfiguredReferenceImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ConfiguredReference#getReference()
- */
- public Reference getReference() {
- return (Reference) super.getPort();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ConfiguredReference#setReference(org.apache.tuscany.model.assembly.Reference)
- */
- public void setReference(Reference reference) {
- checkNotFrozen();
- super.setPort(reference);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ConfiguredReference#getTargetConfiguredServices()
- */
- public List<ConfiguredService> getTargetConfiguredServices() {
- return targetConfiguredServices;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.ConfiguredPortImpl#freeze()
- */
- public void freeze() {
- super.freeze();
-
- // Freeze list of configured services
- targetConfiguredServices=Collections.unmodifiableList(targetConfiguredServices);
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredServiceImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredServiceImpl.java
deleted file mode 100644
index 3e5d1a9cf5..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ConfiguredServiceImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.Service;
-
-/**
- * An implementation of ConfiguredService.
- */
-public class ConfiguredServiceImpl extends ConfiguredPortImpl implements ConfiguredService {
-
- /**
- * Constructor
- */
- protected ConfiguredServiceImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ConfiguredService#getService()
- */
- public Service getService() {
- return (Service) super.getPort();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ConfiguredService#setService(org.apache.tuscany.model.assembly.Service)
- */
- public void setService(Service service) {
- checkNotFrozen();
- super.setPort(service);
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/EntryPointImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/EntryPointImpl.java
deleted file mode 100644
index 0d39089be9..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/EntryPointImpl.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
-import org.apache.tuscany.model.assembly.Binding;
-import org.apache.tuscany.model.assembly.ConfiguredReference;
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.EntryPoint;
-
-/**
- * An implementation of EntryPoint.
- */
-public class EntryPointImpl extends AggregatePartImpl implements EntryPoint {
-
- private ConfiguredService configuredService;
- private ConfiguredReference configuredReference;
- private List<Binding> bindings=new ArrayList<Binding>();
-
- /**
- * Constructor
- */
- protected EntryPointImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.EntryPoint#getConfiguredReference()
- */
- public ConfiguredReference getConfiguredReference() {
- return configuredReference;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.EntryPoint#setConfiguredReference(org.apache.tuscany.model.assembly.ConfiguredReference)
- */
- public void setConfiguredReference(ConfiguredReference configuredReference) {
- checkNotFrozen();
- this.configuredReference=configuredReference;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.EntryPoint#getConfiguredService()
- */
- public ConfiguredService getConfiguredService() {
- return configuredService;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.EntryPoint#setConfiguredService(org.apache.tuscany.model.assembly.ConfiguredService)
- */
- public void setConfiguredService(ConfiguredService configuredService) {
- checkNotFrozen();
- this.configuredService=configuredService;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.EntryPoint#getBindings()
- */
- public List<Binding> getBindings() {
- return bindings;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
- */
- public void initialize(AssemblyModelContext modelContext) {
- if (isInitialized())
- return;
- super.initialize(modelContext);
-
- // Initialize the service contract and reference to the published service
- if (configuredReference != null) {
- ((ConfiguredPortImpl)configuredReference).setAggregatePart(this);
- configuredReference.initialize(modelContext);
- }
- if (configuredService != null) {
- ((ConfiguredPortImpl)configuredService).setAggregatePart(this);
- configuredService.initialize(modelContext);
- }
-
- // Initialize the bindings
- initialize(bindings, modelContext);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#freeze()
- */
- public void freeze() {
- if (isFrozen())
- return;
- super.freeze();
-
- // Freeze the service contract and configured reference
- if (configuredReference != null)
- configuredReference.freeze();
- if (configuredService != null)
- configuredService.freeze();
-
- // Freeze the bindings
- bindings=Collections.unmodifiableList(bindings);
- freeze(bindings);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
- */
- public boolean accept(AssemblyModelVisitor visitor) {
- if (!super.accept(visitor))
- return false;
-
- if (configuredReference!=null) {
- if (!configuredReference.accept(visitor))
- return false;
- }
-
- if (configuredService!=null) {
- if (!configuredService.accept(visitor))
- return false;
- }
-
- if (!accept(bindings, visitor))
- return false;
-
- return true;
- }
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ExtensibleImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ExtensibleImpl.java
deleted file mode 100644
index 05f2082ced..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ExtensibleImpl.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
-import org.apache.tuscany.model.assembly.Extensible;
-
-/**
- * An implementation of Extensible.
- */
-public abstract class ExtensibleImpl extends AssemblyModelObjectImpl implements Extensible {
-
- private List<Object> extensibilityElements=new ArrayList<Object>();
- private List<Object> extensibilityAttributes=new ArrayList<Object>();
-
- /**
- * Constructor
- */
- protected ExtensibleImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Extensible#getExtensibilityElements()
- */
- public List getExtensibilityElements() {
- return extensibilityElements;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Extensible#getExtensibilityAttributes()
- */
- public List getExtensibilityAttributes() {
- return extensibilityAttributes;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
- */
- public void initialize(AssemblyModelContext modelContext) {
- if (isInitialized())
- return;
- super.initialize(modelContext);
-
- // Initialize extensibility elements and attributes
- initialize(extensibilityElements, modelContext);
- initialize(extensibilityAttributes, modelContext);
- }
-
- public void freeze() {
- if (isFrozen())
- return;
- super.freeze();
-
- // Freeze extensibility elements and attributes
- freeze(extensibilityElements);
- freeze(extensibilityAttributes);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
- */
- public boolean accept(AssemblyModelVisitor visitor) {
- if (!super.accept(visitor))
- return false;
-
- if (!accept(extensibilityElements, visitor))
- return false;
- if (!accept(extensibilityAttributes, visitor))
- return false;
-
- return true;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ExternalServiceImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ExternalServiceImpl.java
deleted file mode 100644
index 33eced7e1f..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ExternalServiceImpl.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
-import org.apache.tuscany.model.assembly.Binding;
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.ExternalService;
-import org.apache.tuscany.model.assembly.OverrideOption;
-
-/**
- * An implementation ExternalService.
- */
-public class ExternalServiceImpl extends AggregatePartImpl implements ExternalService {
-
- private ConfiguredService configuredService;
- private OverrideOption overrideOption;
- private List<Binding> bindings=new ArrayList<Binding>();
-
- /**
- * Constructor
- */
- protected ExternalServiceImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.sdo.impl.ExternalServiceImpl#getOverrideOption()
- */
- public OverrideOption getOverrideOption() {
- return overrideOption;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ExternalService#setOverrideOption(org.apache.tuscany.model.assembly.OverrideOption)
- */
- public void setOverrideOption(OverrideOption newOverridable) {
- checkNotFrozen();
- overrideOption=newOverridable;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ExternalService#getBindings()
- */
- public List<Binding> getBindings() {
- return bindings;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ExternalService#getConfiguredService()
- */
- public ConfiguredService getConfiguredService() {
- return configuredService;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ExternalService#setConfiguredService(org.apache.tuscany.model.assembly.ConfiguredService)
- */
- public void setConfiguredService(ConfiguredService configuredService) {
- checkNotFrozen();
- this.configuredService=configuredService;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
- */
- public void initialize(AssemblyModelContext modelContext) {
- if (isInitialized())
- return;
- super.initialize(modelContext);
-
- // Initialize the configured service
- if (configuredService != null) {
- ((ConfiguredPortImpl)configuredService).setAggregatePart(this);
- configuredService.initialize(modelContext);
- }
-
- // Initialize the bindings
- initialize(bindings, modelContext);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#freeze()
- */
- public void freeze() {
- if (isFrozen())
- return;
- super.freeze();
-
- // Freeze the configured service
- if (configuredService!= null)
- configuredService.freeze();
-
- // Freeze the bindings
- bindings=Collections.unmodifiableList(bindings);
- freeze(bindings);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.ExtensibleImpl#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
- */
- public boolean accept(AssemblyModelVisitor visitor) {
- if (!super.accept(visitor))
- return false;
-
- if (configuredService!=null) {
- if (!configuredService.accept(visitor))
- return false;
- }
-
- if (!accept(bindings, visitor))
- return false;
-
- return true;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleComponentImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleComponentImpl.java
deleted file mode 100644
index d830c5c8d8..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleComponentImpl.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.Module;
-import org.apache.tuscany.model.assembly.ModuleComponent;
-
-/**
- * An implementation of ModuleComponent.
- */
-public class ModuleComponentImpl extends ComponentImpl implements ModuleComponent {
-
- private String uri;
-
- /**
- * Constructor
- */
- protected ModuleComponentImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ModuleComponent#setModuleImplementation(org.apache.tuscany.model.assembly.Module)
- */
- public void setModuleImplementation(Module module) {
- checkNotFrozen();
- super.setComponentImplementation(module);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ModuleComponent#getModuleImplementation()
- */
- public Module getModuleImplementation() {
- return (Module)super.getComponentImplementation();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ModuleComponent#getURI()
- */
- public String getURI() {
- return uri;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ModuleComponent#setURI(java.lang.String)
- */
- public void setURI(String value) {
- checkNotFrozen();
- uri=value;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleFragmentImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleFragmentImpl.java
deleted file mode 100644
index a36935dbfb..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleFragmentImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.ModuleFragment;
-
-/**
- * An implementation of ModuleFragment.
- */
-public class ModuleFragmentImpl extends AggregateImpl implements ModuleFragment {
-
- /**
- * Constructor
- */
- protected ModuleFragmentImpl() {
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleImpl.java
deleted file mode 100644
index 8d89590225..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleImpl.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.tuscany.model.assembly.AssemblyFactory;
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
-import org.apache.tuscany.model.assembly.Component;
-import org.apache.tuscany.model.assembly.ComponentType;
-import org.apache.tuscany.model.assembly.ConfiguredProperty;
-import org.apache.tuscany.model.assembly.ConfiguredReference;
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.EntryPoint;
-import org.apache.tuscany.model.assembly.ExternalService;
-import org.apache.tuscany.model.assembly.Module;
-import org.apache.tuscany.model.assembly.ModuleFragment;
-import org.apache.tuscany.model.assembly.Multiplicity;
-import org.apache.tuscany.model.assembly.OverrideOption;
-import org.apache.tuscany.model.assembly.Reference;
-import org.apache.tuscany.model.assembly.Service;
-import org.apache.tuscany.model.assembly.ServiceContract;
-import org.apache.tuscany.model.assembly.ServiceURI;
-import org.apache.tuscany.model.assembly.Wire;
-
-/**
- * An implementation of Module.
- */
-public class ModuleImpl extends AggregateImpl implements Module {
-
- private List<ModuleFragment> moduleFragments = new ArrayList<ModuleFragment>();
- private Map<String, ModuleFragment> moduleFragmentsMap;
- private ComponentType componentType;
- private Object runtimeConfiguration;
-
- /**
- * Constructor
- */
- protected ModuleImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ComponentImplementation#getComponentType()
- */
- public ComponentType getComponentType() {
- return componentType;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ComponentImplementation#setComponentType(org.apache.tuscany.model.assembly.ComponentType)
- */
- public void setComponentType(ComponentType componentType) {
- checkNotFrozen();
- this.componentType=componentType;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Module#getModuleFragments()
- */
- public List<ModuleFragment> getModuleFragments() {
- return moduleFragments;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Module#getModuleFragment(java.lang.String)
- */
- public ModuleFragment getModuleFragment(String name) {
- checkInitialized();
- return moduleFragmentsMap.get(name);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
- */
- public void initialize(AssemblyModelContext modelContext) {
- if (isInitialized())
- return;
-
- // Populate map of module fragments
- moduleFragmentsMap = new HashMap<String, ModuleFragment>();
- for (ModuleFragment moduleFragment : moduleFragments) {
- moduleFragmentsMap.put(moduleFragment.getName(), moduleFragment);
-
- // Add all WSDL imports, components, entry points and external services from the module fragments
- getWSDLImports().addAll(moduleFragment.getWSDLImports());
- getComponents().addAll(moduleFragment.getComponents());
- getEntryPoints().addAll(moduleFragment.getEntryPoints());
- getExternalServices().addAll(moduleFragment.getExternalServices());
-
- // Add all the wires from the module fragments
- getWires().addAll(moduleFragment.getWires());
-
- moduleFragment.initialize(modelContext);
- }
-
- // Initialize the aggregate
- super.initialize(modelContext);
-
- // Derive the component type from the entry points and external services in the module
- // Also derive properties from the overridable properties of the components in the module
- if (componentType==null) {
- AssemblyFactory factory = modelContext.getAssemblyFactory();
- componentType = factory.createComponentType();
- for (EntryPoint entryPoint : getEntryPoints()) {
- Service service = factory.createService();
- service.setName(entryPoint.getName());
- ServiceContract serviceContract = entryPoint.getConfiguredService().getService().getServiceContract();
- if (serviceContract != null)
- service.setServiceContract(serviceContract);
- componentType.getServices().add(service);
- }
- for (ExternalService externalService : getExternalServices()) {
- if (externalService.getOverrideOption()==null || externalService.getOverrideOption()==OverrideOption.NO)
- continue;
- Reference reference = factory.createReference();
- reference.setName(externalService.getName());
- ServiceContract serviceContract = externalService.getConfiguredService().getService().getServiceContract();
- if (serviceContract != null)
- reference.setServiceContract(serviceContract);
- componentType.getReferences().add(reference);
- }
- for (Component component : getComponents()) {
- for (ConfiguredProperty configuredProperty : component.getConfiguredProperties()) {
- if (configuredProperty.getOverrideOption()==null || configuredProperty.getOverrideOption()==OverrideOption.NO)
- continue;
- componentType.getProperties().add(configuredProperty.getProperty());
- }
- }
- }
- componentType.initialize(modelContext);
-
-
- // Wire the module parts
- for (Wire wire : getWires()) {
-
- // Get the source reference
- ServiceURI sourceURI=wire.getSource();
- ConfiguredReference configuredReference = null;
- String partName = sourceURI.getPartName();
- String referenceName = sourceURI.getServiceName();
- if (referenceName != null) {
- Component component = getComponent(partName);
- if (component != null) {
- configuredReference = component.getConfiguredReference(referenceName);
- }
- } else {
- EntryPoint entryPoint = getEntryPoint(partName);
- if (entryPoint != null) {
- configuredReference = entryPoint.getConfiguredReference();
- }
- }
- if (configuredReference == null) {
- throw new IllegalArgumentException("Cannot find wire source " + sourceURI.getAddress());
- } else {
-
- // Resolve the target service endpoint
- ServiceURI targetURI = wire.getTarget();
- ConfiguredService configuredService = getConfiguredService(targetURI);
- if (configuredService != null) {
-
- // Wire the reference to the target
- Multiplicity multiplicity=configuredReference.getReference().getMultiplicity();
- if (multiplicity==Multiplicity.ZERO_N || multiplicity==Multiplicity.ONE_N) {
- configuredReference.getTargetConfiguredServices().add(configuredService);
- } else {
- configuredReference.getTargetConfiguredServices().clear();
- configuredReference.getTargetConfiguredServices().add(configuredService);
- }
- } else {
- throw new IllegalArgumentException("Cannot find service for " + targetURI.getAddress());
- }
- }
- }
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.AssemblyModelObject#freeze()
- */
- public void freeze() {
- if (isFrozen())
- return;
- super.freeze();
-
- // Freeze component type and module fragments
- if (componentType!=null)
- componentType.freeze();
- moduleFragments=Collections.unmodifiableList(moduleFragments);
- freeze(moduleFragments);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.RuntimeConfigurationHolder#getRuntimeConfiguration()
- */
- public Object getRuntimeConfiguration() {
- return runtimeConfiguration;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.RuntimeConfigurationHolder#setRuntimeConfiguration(java.lang.Object)
- */
- public void setRuntimeConfiguration(Object configuration) {
- checkNotFrozen();
- this.runtimeConfiguration = configuration;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AggregateImpl#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
- */
- public boolean accept(AssemblyModelVisitor visitor) {
- if (!super.accept(visitor))
- return false;
-
- if (componentType!=null) {
- if (!componentType.accept(visitor))
- return false;
- }
-
- if (!accept(moduleFragments, visitor))
- return false;
-
- return true;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PortImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PortImpl.java
deleted file mode 100644
index ae92300d4e..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PortImpl.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
-import org.apache.tuscany.model.assembly.Port;
-import org.apache.tuscany.model.assembly.ServiceContract;
-
-/**
- * An implementation of Port.
- */
-public abstract class PortImpl extends AssemblyModelObjectImpl implements Port {
-
- private ServiceContract serviceContract;
- private String name;
-
- /**
- * Constructor
- */
- protected PortImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Port#getName()
- */
- public String getName() {
- return name;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Port#setName(java.lang.String)
- */
- public void setName(String value) {
- checkNotFrozen();
- name=value;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Port#getServiceContract()
- */
- public ServiceContract getServiceContract() {
- return serviceContract;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Port#setServiceContract(org.apache.tuscany.model.assembly.ServiceContract)
- */
- public void setServiceContract(ServiceContract value) {
- checkNotFrozen();
- serviceContract=value;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
- */
- public void initialize(AssemblyModelContext modelContext) {
- if (isInitialized())
- return;
- super.initialize(modelContext);
-
- if (serviceContract!=null)
- serviceContract.initialize(modelContext);
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#freeze()
- */
- public void freeze() {
- if (isFrozen())
- return;
- super.freeze();
-
- if (serviceContract!=null)
- serviceContract.freeze();
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
- */
- public boolean accept(AssemblyModelVisitor visitor) {
- if (!super.accept(visitor))
- return false;
-
- if (serviceContract!=null) {
- if (!serviceContract.accept(visitor))
- return false;
- }
-
- return true;
- }
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PropertyImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PropertyImpl.java
deleted file mode 100644
index f79ad2df3b..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PropertyImpl.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.Property;
-import org.apache.tuscany.sdo.util.SDOUtil;
-
-import commonj.sdo.Type;
-
-/**
- * An implementation of Property.
- */
-public class PropertyImpl extends ExtensibleImpl implements Property {
-
- private Object defaultValue;
- private String name;
- private boolean many;
- private boolean required;
- private Class type;
-
- private Type sdoType;
-
- /**
- * Constructor
- */
- protected PropertyImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Property#getDefaultValue()
- */
- public Object getDefaultValue() {
- return defaultValue;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Property#getName()
- */
- public String getName() {
- return name;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Property#getType()
- */
- public Class getType() {
- return type;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Property#isMany()
- */
- public boolean isMany() {
- return many;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Property#isRequired()
- */
- public boolean isRequired() {
- return required;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Property#setDefaultValue(java.lang.Object)
- */
- public void setDefaultValue(Object value) {
- defaultValue=value;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Property#setMany(boolean)
- */
- public void setMany(boolean value) {
- checkNotFrozen();
- many=value;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Property#setName(java.lang.String)
- */
- public void setName(String value) {
- checkNotFrozen();
- name=value;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Property#setRequired(boolean)
- */
- public void setRequired(boolean value) {
- checkNotFrozen();
- required=value;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Property#setType(java.lang.Class)
- */
- public void setType(Class value) {
- checkNotFrozen();
- type=value;
- }
-
- /**
- * @param sdoType The sdoType to set.
- */
- public void setSDOType(Type sdoType) {
- checkNotFrozen();
- this.sdoType = sdoType;
- }
-
- /**
- * @return Returns the sdoType.
- */
- public Type getSDOType() {
- return sdoType;
- }
-
- private final static Map<Class, Type> typeMapping=new HashMap<Class, Type>();
-
- static {
- typeMapping.put(BigDecimal.class, SDOUtil.getXSDSDOType("decimal"));
- typeMapping.put(BigInteger.class, SDOUtil.getXSDSDOType("integer"));
- typeMapping.put(boolean.class, SDOUtil.getXSDSDOType("boolean"));
- typeMapping.put(Boolean.class, SDOUtil.getXSDSDOType("boolean"));
- typeMapping.put(byte.class, SDOUtil.getXSDSDOType("byte"));
- typeMapping.put(Byte.class, SDOUtil.getXSDSDOType("Byte"));
- typeMapping.put(byte[].class, SDOUtil.getXSDSDOType("hexBinary"));
- typeMapping.put(char.class, SDOUtil.getXSDSDOType("string"));
- typeMapping.put(Character.class, SDOUtil.getXSDSDOType("string"));
- typeMapping.put(Date.class, SDOUtil.getXSDSDOType("dateTime"));
- typeMapping.put(double.class, SDOUtil.getXSDSDOType("double"));
- typeMapping.put(Double.class, SDOUtil.getXSDSDOType("double"));
- typeMapping.put(float.class, SDOUtil.getXSDSDOType("float"));
- typeMapping.put(Float.class, SDOUtil.getXSDSDOType("float"));
- typeMapping.put(int.class, SDOUtil.getXSDSDOType("int"));
- typeMapping.put(Integer.class, SDOUtil.getXSDSDOType("int"));
- typeMapping.put(long.class, SDOUtil.getXSDSDOType("long"));
- typeMapping.put(Long.class, SDOUtil.getXSDSDOType("long"));
- typeMapping.put(short.class, SDOUtil.getXSDSDOType("short"));
- typeMapping.put(Short.class, SDOUtil.getXSDSDOType("short"));
- typeMapping.put(String.class, SDOUtil.getXSDSDOType("string"));
- }
-
- /*
- * @see org.apache.tuscany.model.assembly.impl.ExtensibleImpl#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
- */
- public void initialize(AssemblyModelContext modelContext) {
- if (isInitialized())
- return;
- super.initialize(modelContext);
-
- // Get the SDO type corresponding to the property's Java type
- if (sdoType==null) {
- sdoType=typeMapping.get(type);
- }
- }
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ReferenceImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ReferenceImpl.java
deleted file mode 100644
index 8a2d348edc..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ReferenceImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.Multiplicity;
-import org.apache.tuscany.model.assembly.Reference;
-
-/**
- * An implementation of Reference.
- */
-public class ReferenceImpl extends PortImpl implements Reference {
-
- private Multiplicity multiplicity;
-
- /**
- * Constructor
- */
- protected ReferenceImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Reference#getMultiplicity()
- */
- public Multiplicity getMultiplicity() {
- return multiplicity;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Reference#setMultiplicity(org.apache.tuscany.model.assembly.Multiplicity)
- */
- public void setMultiplicity(Multiplicity multiplicity) {
- checkNotFrozen();
- this.multiplicity=multiplicity;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceContractImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceContractImpl.java
deleted file mode 100644
index c9fe9b269d..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceContractImpl.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.Scope;
-import org.apache.tuscany.model.assembly.ServiceContract;
-
-/**
- * An implementation of ServiceContract.
- */
-public class ServiceContractImpl extends ExtensibleImpl implements ServiceContract {
-
- private Class interface_;
- private Class callbackInterface;
- private Scope scope;
-
- /**
- * Constructor
- */
- protected ServiceContractImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ServiceContract#getCallbackInterface()
- */
- public Class getCallbackInterface() {
- return callbackInterface;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ServiceContract#getInterface()
- */
- public Class getInterface() {
- return interface_;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ServiceContract#getScope()
- */
- public Scope getScope() {
- return scope;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ServiceContract#setCallbackInterface(java.lang.Class)
- */
- public void setCallbackInterface(Class value) {
- checkNotFrozen();
- callbackInterface=value;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ServiceContract#setInterface(java.lang.Class)
- */
- public void setInterface(Class value) {
- checkNotFrozen();
- interface_=value;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.ServiceContract#setScope(org.apache.tuscany.model.assembly.Scope)
- */
- public void setScope(Scope scope) {
- checkNotFrozen();
- this.scope=scope;
- }
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceImpl.java
deleted file mode 100644
index 230d89e373..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.Service;
-
-/**
- * An implementation of Service.
- */
-public class ServiceImpl extends PortImpl implements Service {
-
- /**
- * Constructor
- */
- protected ServiceImpl() {
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceURIImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceURIImpl.java
deleted file mode 100644
index 6d2972fb7d..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceURIImpl.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.apache.tuscany.model.assembly.ConfiguredPort;
-import org.apache.tuscany.model.assembly.ConfiguredReference;
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.ModuleComponent;
-import org.apache.tuscany.model.assembly.AggregatePart;
-import org.apache.tuscany.model.assembly.Service;
-import org.apache.tuscany.model.assembly.ServiceURI;
-
-/**
- * An implementation of ServiceURI.
- */
-public class ServiceURIImpl implements ServiceURI {
-
- private String address;
- private Boolean isSCAScheme;
- private boolean isParsed;
- private String moduleComponentName;
- private String partName;
- private String serviceName;
-
- /**
- * Constructor
- */
- protected ServiceURIImpl(String address) {
- this.address = address;
- }
-
- /**
- * Constructor
- *
- * @param moduleComponent
- * @param configuredPort
- */
- protected ServiceURIImpl(ModuleComponent moduleComponent, AggregatePart aggregatePart, ConfiguredPort configuredPort) {
- if (moduleComponent != null)
- moduleComponentName = moduleComponent.getName();
- else
- moduleComponentName = "";
- if (configuredPort instanceof ConfiguredService) {
- partName = aggregatePart.getName();
- ConfiguredService configuredService = (ConfiguredService) configuredPort;
- Service service = configuredService.getService();
- if (service != null) {
- serviceName = configuredService.getService().getName();
- address = "sca:///" + moduleComponentName + '/' + partName + '/' + serviceName;
- } else {
- address = "sca:///" + moduleComponentName + '/' + partName;
- }
-
- } else if (configuredPort instanceof ConfiguredReference) {
- ConfiguredReference configuredReference = (ConfiguredReference) configuredPort;
- partName = aggregatePart.getName();
- serviceName = configuredReference.getReference().getName();
- if (serviceName!=null)
- address = "sca:///" + moduleComponentName + '/' + partName + '/' + serviceName;
- else
- address = "sca:///" + moduleComponentName + '/' + partName;
- }
-
- isSCAScheme = Boolean.TRUE;
- isParsed = true;
- }
-
- /**
- * Constructor
- *
- * @param moduleComponent
- * @param service
- */
- protected ServiceURIImpl(ModuleComponent moduleComponent, String targetServiceName) {
- if (moduleComponent != null)
- moduleComponentName = moduleComponent.getName();
- else
- moduleComponentName = "";
- int s = targetServiceName.indexOf('/');
- if (s == -1) {
- partName = targetServiceName;
- address = "sca:///" + moduleComponentName + '/' + partName;
- } else {
- partName = targetServiceName.substring(0, s);
- this.serviceName = targetServiceName.substring(s + 1);
- address = "sca:///" + moduleComponentName + '/' + partName + '/' + this.serviceName;
- }
- isSCAScheme = Boolean.TRUE;
- isParsed = true;
- }
-
- /**
- * Returns true if the address scheme is sca:
- *
- * @return
- */
- public boolean isSCAScheme() {
- if (isSCAScheme == null) {
- if (address.startsWith("sca://")) {
- isSCAScheme = Boolean.TRUE;
- } else {
- isSCAScheme = Boolean.FALSE;
- }
- }
- return isSCAScheme.booleanValue();
- }
-
- /**
- * Returns a URI for this address
- *
- * @return
- */
- public URI getURI() {
- return URI.createURI(address);
- }
-
- /**
- * @return Returns the address.
- */
- public String getAddress() {
- return address;
- }
-
- /**
- * Parse the address.
- */
- private void parse() {
- isParsed = true;
- if (isSCAScheme()) {
- int s1 = address.indexOf('/', 6);
- if (s1 == -1)
- return;
- s1++;
- int s2 = address.indexOf('/', s1);
- if (s2 == -1)
- return;
- moduleComponentName = address.substring(s1, s2);
- s2++;
- int s3 = address.indexOf('/', s2);
- if (s3 == -1) {
- partName = address.substring(s2);
- return;
- }
- partName = address.substring(s2, s3);
- s3++;
- serviceName = address.substring(s3);
- }
- }
-
- /**
- * Returns the module component name
- *
- * @return
- */
- public String getModuleComponentName() {
- if (!isParsed)
- parse();
- return moduleComponentName;
- }
-
- /**
- * Returns the part name
- *
- * @return
- */
- public String getPartName() {
- if (!isParsed)
- parse();
- return partName;
- }
-
- /**
- * Returns the service name
- * @return
- */
- public String getServiceName() {
- if (!isParsed)
- parse();
- return serviceName;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SimpleComponentImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SimpleComponentImpl.java
deleted file mode 100644
index 6de56e0806..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SimpleComponentImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.SimpleComponent;
-
-/**
- * An implementation of SimpleComponent.
- */
-public class SimpleComponentImpl extends ComponentImpl implements SimpleComponent {
-
- /**
- * Constructor
- */
- protected SimpleComponentImpl() {
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SubsystemImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SubsystemImpl.java
deleted file mode 100644
index 7dc78ee1e6..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SubsystemImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.Subsystem;
-
-/**
- * An implementation of Subsystem.
- */
-public class SubsystemImpl extends AggregateImpl implements Subsystem {
-
- private String uri;
-
- /**
- * Constructor
- */
- protected SubsystemImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Subsystem#getURI()
- */
- public String getURI() {
- return uri;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Subsystem#setURI(java.lang.String)
- */
- public void setURI(String value) {
- checkNotFrozen();
- uri=value;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/WireImpl.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/WireImpl.java
deleted file mode 100644
index 6cbf34334f..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/WireImpl.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.impl;
-
-import org.apache.tuscany.model.assembly.ServiceURI;
-import org.apache.tuscany.model.assembly.Wire;
-
-/**
- * An implementation of Wire.
- */
-public class WireImpl extends ExtensibleImpl implements Wire {
-
- private ServiceURI source;
- private ServiceURI target;
-
- /**
- * Constructor
- */
- protected WireImpl() {
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Wire#getSource()
- */
- public ServiceURI getSource() {
- return source;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Wire#setSource(org.apache.tuscany.model.assembly.ServiceURI)
- */
- public void setSource(ServiceURI uri) {
- checkNotFrozen();
- source=uri;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Wire#getTarget()
- */
- public ServiceURI getTarget() {
- return target;
- }
-
- /**
- * @see org.apache.tuscany.model.assembly.Wire#setTarget(org.apache.tuscany.model.assembly.ServiceURI)
- */
- public void setTarget(ServiceURI uri) {
- checkNotFrozen();
- target=uri;
- }
-
-}
diff --git a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/AssemblyModelLoader.java b/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/AssemblyModelLoader.java
deleted file mode 100644
index 6b0895e56f..0000000000
--- a/tags/java-stable-20060304/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/AssemblyModelLoader.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- *
- * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
- *
- * 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 org.apache.tuscany.model.assembly.loader;
-
-import java.util.List;
-
-import javax.wsdl.Definition;
-import javax.wsdl.PortType;
-
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.ComponentType;
-import org.apache.tuscany.model.assembly.Module;
-import org.apache.tuscany.model.assembly.ModuleFragment;
-import org.apache.tuscany.model.assembly.Subsystem;
-
-/**
- * An assembly model loader.
- */
-public interface AssemblyModelLoader {
-
- /**
- * Sets the model context to use.
- * @param modelContext
- */
- void setModelContext(AssemblyModelContext modelContext);
-
- /**
- * Returns the module at the given uri
- * @param uri
- * @return
- */
- Module loadModule(String uri);
-
- /**
- * Returns the module at the given uri
- * @param uri
- * @return
- */
- ModuleFragment loadModuleFragment(String uri);
-
- /**
- * Returns the component type at the given uri
- * @param uri
- * @return
- */
- ComponentType loadComponentType(String uri);
-
- /**
- * Returns the subsystem at the given uri.
- * @param uri
- * @return
- */
- Subsystem loadSubsystem(String uri);
-
- /**
- * Load a WSDL definition
- */
- Definition loadDefinition(String uri);
-
- /**
- * Load definitions by namespace
- * @param uri
- * @return
- */
- List<Definition> loadDefinitions(String namespace);
-
-}