diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-14 22:06:31 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-14 22:06:31 +0000 |
commit | 69f2050e34ee05b93e3141cb7b13ab0e072bc340 (patch) | |
tree | 1b64cbcda872510d70a55432f0de2ab5a49c45fb | |
parent | 2f93b179e29713d30ad55608e605f5cddf150691 (diff) |
Remove SCA prefix from Defintions model
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@704715 13f79535-47bb-0310-9956-ffa450edef68
65 files changed, 337 insertions, 355 deletions
diff --git a/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java b/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java index aebe4ff211..c9339c1545 100644 --- a/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java +++ b/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java @@ -28,7 +28,7 @@ import org.apache.tuscany.sca.assembly.SCABindingFactory; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory; @@ -113,7 +113,7 @@ public class CompositeBuilderNonWiringImpl implements CompositeBuilder { return "org.apache.tuscany.sca.assembly.builder.CompositeBuilderNonWiring"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { // Collect and fuse includes compositeIncludeBuilder.build(composite, definitions, monitor); diff --git a/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java b/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java index b2e7dbb8c0..4b3485f088 100644 --- a/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java +++ b/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java @@ -52,7 +52,7 @@ import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.ModuleActivator;
import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.definitions.Definitions;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
@@ -73,7 +73,7 @@ public class CustomCompositeBuilder { private ContributionBuilder contributionDependencyBuilder;
private CompositeBuilder domainCompositeBuilder;
private static Workspace workspace;
- private List<SCADefinitions> policyDefinitions;
+ private List<Definitions> policyDefinitions;
private Monitor monitor;
private Composite domainComposite;
private boolean nonWiring;
diff --git a/branches/sca-equinox/itest/validation/src/test/java/domain/CustomCompositeBuilder.java b/branches/sca-equinox/itest/validation/src/test/java/domain/CustomCompositeBuilder.java index e7305e671d..e6f3bce5df 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/domain/CustomCompositeBuilder.java +++ b/branches/sca-equinox/itest/validation/src/test/java/domain/CustomCompositeBuilder.java @@ -51,7 +51,7 @@ import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.ModuleActivator; import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.implementation.node.NodeImplementationFactory; import org.apache.tuscany.sca.implementation.node.builder.impl.NodeCompositeBuilderImpl; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; @@ -77,7 +77,7 @@ public class CustomCompositeBuilder { private NodeImplementationFactory nodeFactory; //private AtomBindingFactory atomBindingFactory; private static Workspace workspace; - private List<SCADefinitions> policyDefinitions; + private List<Definitions> policyDefinitions; private Monitor monitor; private CustomCompositeBuilder() { diff --git a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java index 09ef2e2c8b..57d2330210 100644 --- a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java +++ b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java @@ -44,7 +44,7 @@ import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory; import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.policy.PolicySet; import org.apache.tuscany.sca.policy.util.PolicyComputationUtils; @@ -215,8 +215,8 @@ public class CompositeDocumentProcessor extends BaseAssemblyProcessor implements } for ( Object object : scaDefnsSink ) { - if ( object instanceof SCADefinitions ) { - for ( PolicySet policySet : ((SCADefinitions)object).getPolicySets() ) { + if ( object instanceof Definitions ) { + for ( PolicySet policySet : ((Definitions)object).getPolicySets() ) { domainPolicySetMap.put( policySet.getName(), policySet); } } diff --git a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/BuildPolicyTestCase.java b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/BuildPolicyTestCase.java index 51d83cbf15..0fc36e6cad 100644 --- a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/BuildPolicyTestCase.java +++ b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/BuildPolicyTestCase.java @@ -45,7 +45,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.DefaultMonitorFactory; import org.apache.tuscany.sca.monitor.Monitor; @@ -61,7 +61,7 @@ import org.junit.Test; */ public class BuildPolicyTestCase { private static URLArtifactProcessor<Object> documentProcessor; - private static URLArtifactProcessor<SCADefinitions> policyDefinitionsProcessor; + private static URLArtifactProcessor<Definitions> policyDefinitionsProcessor; private static ModelResolver resolver; private static CompositeBuilder compositeBuilder; private static Composite composite; @@ -75,7 +75,7 @@ public class BuildPolicyTestCase { modelFactories.addFactory(scaBindingFactory); compositeBuilder = extensionPoints.getExtensionPoint(CompositeBuilderExtensionPoint.class).getCompositeBuilder("org.apache.tuscany.sca.assembly.builder.CompositeBuilder"); - List<SCADefinitions> policyDefinitions = new ArrayList<SCADefinitions>(); + List<Definitions> policyDefinitions = new ArrayList<Definitions>(); resolver = new DefaultModelResolver(); MonitorFactory monitorFactory = new DefaultMonitorFactory(); @@ -86,7 +86,7 @@ public class BuildPolicyTestCase { URLArtifactProcessorExtensionPoint documentProcessors = new DefaultURLArtifactProcessorExtensionPoint(extensionPoints); documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors, null); - policyDefinitionsProcessor = documentProcessors.getProcessor(SCADefinitions.class); + policyDefinitionsProcessor = documentProcessors.getProcessor(Definitions.class); StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class); staxProcessors.addArtifactProcessor(new TestPolicyProcessor()); @@ -104,7 +104,7 @@ public class BuildPolicyTestCase { url = BuildPolicyTestCase.class.getResource("another_test_definitions.xml"); uri = URI.create("another_test_definitions.xml"); - SCADefinitions definitions = (SCADefinitions)policyDefinitionsProcessor.read(null, uri, url); + Definitions definitions = (Definitions)policyDefinitionsProcessor.read(null, uri, url); assertNotNull(definitions); policyDefinitions.add(definitions); diff --git a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ResolvePolicyTestCase.java b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ResolvePolicyTestCase.java index cf8ef0cad9..cc5421cd84 100644 --- a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ResolvePolicyTestCase.java +++ b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ResolvePolicyTestCase.java @@ -37,7 +37,7 @@ import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensi import org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver; import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.policy.PolicySetAttachPoint; import org.junit.BeforeClass; import org.junit.Test; @@ -51,7 +51,7 @@ public class ResolvePolicyTestCase { private static URLArtifactProcessor<Object> documentProcessor; private static ModelResolver resolver; - private static URLArtifactProcessor<SCADefinitions> policyDefinitionsProcessor; + private static URLArtifactProcessor<Definitions> policyDefinitionsProcessor; @BeforeClass public static void setUp() throws Exception { @@ -60,7 +60,7 @@ public class ResolvePolicyTestCase { URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors, null); - policyDefinitionsProcessor = documentProcessors.getProcessor(SCADefinitions.class); + policyDefinitionsProcessor = documentProcessors.getProcessor(Definitions.class); // Create StAX processors StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class); @@ -83,7 +83,7 @@ public class ResolvePolicyTestCase { url = getClass().getResource("test_definitions.xml"); uri = URI.create("test_definitions.xml"); - SCADefinitions scaDefns = (SCADefinitions)policyDefinitionsProcessor.read(null, uri, url); + Definitions scaDefns = (Definitions)policyDefinitionsProcessor.read(null, uri, url); assertNotNull(scaDefns); preResolvePolicyTests(composite); diff --git a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WireTestCase.java b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WireTestCase.java index f42d4195d5..ee281faa5d 100644 --- a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WireTestCase.java +++ b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WireTestCase.java @@ -44,7 +44,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.DefaultMonitorFactory; import org.apache.tuscany.sca.monitor.Monitor; @@ -62,7 +62,7 @@ public class WireTestCase { private static XMLInputFactory inputFactory; private static StAXArtifactProcessor<Object> staxProcessor; private static ModelResolver resolver; - private static URLArtifactProcessor<SCADefinitions> policyDefinitionsProcessor; + private static URLArtifactProcessor<Definitions> policyDefinitionsProcessor; private static CompositeBuilder compositeBuilder; private static Monitor monitor; @@ -86,7 +86,7 @@ public class WireTestCase { InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class); URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - policyDefinitionsProcessor = documentProcessors.getProcessor(SCADefinitions.class); + policyDefinitionsProcessor = documentProcessors.getProcessor(Definitions.class); } @Test @@ -106,7 +106,7 @@ public class WireTestCase { URL url = getClass().getResource("test_definitions.xml"); URI uri = URI.create("test_definitions.xml"); - SCADefinitions scaDefns = (SCADefinitions)policyDefinitionsProcessor.read(null, uri, url); + Definitions scaDefns = (Definitions)policyDefinitionsProcessor.read(null, uri, url); assertNotNull(scaDefns); policyDefinitionsProcessor.resolve(scaDefns, resolver); @@ -134,7 +134,7 @@ public class WireTestCase { URL url = getClass().getResource("test_definitions.xml"); URI uri = URI.create("test_definitions.xml"); - SCADefinitions scaDefns = (SCADefinitions)policyDefinitionsProcessor.read(null, uri, url); + Definitions scaDefns = (Definitions)policyDefinitionsProcessor.read(null, uri, url); assertNotNull(scaDefns); policyDefinitionsProcessor.resolve(scaDefns, resolver); diff --git a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteAllTestCase.java b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteAllTestCase.java index 2ae7eebbef..df760c1d1f 100644 --- a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteAllTestCase.java +++ b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteAllTestCase.java @@ -47,7 +47,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.DefaultMonitorFactory; import org.apache.tuscany.sca.monitor.Monitor; @@ -66,7 +66,7 @@ public class WriteAllTestCase { private static ExtensibleStAXArtifactProcessor staxProcessor; private static ModelResolver resolver; private static CompositeBuilder compositeBuilder; - private static URLArtifactProcessor<SCADefinitions> policyDefinitionsProcessor; + private static URLArtifactProcessor<Definitions> policyDefinitionsProcessor; private static Monitor monitor; @BeforeClass @@ -90,7 +90,7 @@ public class WriteAllTestCase { monitor = monitorFactory.createMonitor(); URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - policyDefinitionsProcessor = documentProcessors.getProcessor(SCADefinitions.class); + policyDefinitionsProcessor = documentProcessors.getProcessor(Definitions.class); } @Test @@ -118,7 +118,7 @@ public class WriteAllTestCase { URL url = getClass().getResource("test_definitions.xml"); URI uri = URI.create("test_definitions.xml"); - SCADefinitions scaDefns = (SCADefinitions)policyDefinitionsProcessor.read(null, uri, url); + Definitions scaDefns = (Definitions)policyDefinitionsProcessor.read(null, uri, url); assertNotNull(scaDefns); policyDefinitionsProcessor.resolve(scaDefns, resolver); diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/CompositeBuilder.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/CompositeBuilder.java index 0d4f091b1e..8a18f74b2b 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/CompositeBuilder.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/CompositeBuilder.java @@ -20,7 +20,7 @@ package org.apache.tuscany.sca.assembly.builder; import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; /** @@ -46,6 +46,6 @@ public interface CompositeBuilder { * @param monitor * @throws CompositeBuilderException */ - void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException; + void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException; } diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultCompositeBuilderExtensionPoint.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultCompositeBuilderExtensionPoint.java index 46b6769e6e..8197bf2552 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultCompositeBuilderExtensionPoint.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultCompositeBuilderExtensionPoint.java @@ -28,7 +28,7 @@ import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.extensibility.ServiceDeclaration; import org.apache.tuscany.sca.extensibility.ServiceDiscovery; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; @@ -118,7 +118,7 @@ public class DefaultCompositeBuilderExtensionPoint implements CompositeBuilderEx return id; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { getBuilder().build(composite, definitions, monitor); } diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java index 834bcb2112..a1de950045 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java @@ -46,7 +46,7 @@ import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.assembly.builder.AutomaticBinding; import org.apache.tuscany.sca.assembly.builder.ComponentPreProcessor; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.Monitor; @@ -90,7 +90,7 @@ public abstract class BaseConfigurationBuilderImpl { * @param composite * @param monitor */ - protected void configureComponents(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + protected void configureComponents(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { configureComponents(composite, null, definitions, monitor); configureSourcedProperties(composite, null); } @@ -102,7 +102,7 @@ public abstract class BaseConfigurationBuilderImpl { * @param uri * @param problems */ - private void configureComponents(Composite composite, String uri, SCADefinitions definitions, Monitor monitor) { + private void configureComponents(Composite composite, String uri, Definitions definitions, Monitor monitor) { String parentURI = uri; // Process nested composites recursively @@ -778,7 +778,7 @@ public abstract class BaseConfigurationBuilderImpl { return null; } - private SCABinding createSCABinding(SCADefinitions definitions) { + private SCABinding createSCABinding(Definitions definitions) { SCABinding scaBinding = scaBindingFactory.createSCABinding(); // mark the bindings that are added automatically so that they can @@ -803,7 +803,7 @@ public abstract class BaseConfigurationBuilderImpl { * * @param composite the composite to be configured */ - protected void configureBindingURIsAndNames(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + protected void configureBindingURIsAndNames(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { configureBindingURIs(composite, null, definitions, null, monitor); configureBindingNames(composite, monitor); } @@ -817,7 +817,7 @@ public abstract class BaseConfigurationBuilderImpl { * @param defaultBindings list of default binding configurations */ protected void configureBindingURIs(Composite composite, - SCADefinitions definitions, List<Binding> defaultBindings, + Definitions definitions, List<Binding> defaultBindings, Monitor monitor) throws CompositeBuilderException { configureBindingURIs(composite, null, definitions, defaultBindings, monitor); } @@ -843,7 +843,7 @@ public abstract class BaseConfigurationBuilderImpl { * @param defaultBindings list of default binding configurations */ private void configureBindingURIs(Composite composite, String uri, - SCADefinitions definitions, List<Binding> defaultBindings, + Definitions definitions, List<Binding> defaultBindings, Monitor monitor) throws CompositeBuilderException { String parentComponentURI = uri; diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentConfigurationBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentConfigurationBuilderImpl.java index cbd53187c4..fa2c8cd292 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentConfigurationBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentConfigurationBuilderImpl.java @@ -27,7 +27,7 @@ import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.assembly.SCABindingFactory; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.Monitor; @@ -61,7 +61,7 @@ public class ComponentConfigurationBuilderImpl extends BaseConfigurationBuilderI return "org.apache.tuscany.sca.assembly.builder.ComponentConfigurationBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { configureComponents(composite, definitions, monitor); } diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceBindingBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceBindingBuilderImpl.java index d289bd3749..734b373f11 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceBindingBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceBindingBuilderImpl.java @@ -27,7 +27,7 @@ import org.apache.tuscany.sca.assembly.Implementation; import org.apache.tuscany.sca.assembly.builder.BindingBuilderExtension; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; /** @@ -41,7 +41,7 @@ public class ComponentReferenceBindingBuilderImpl implements CompositeBuilder { public ComponentReferenceBindingBuilderImpl() { } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { buildReferenceBindings(composite, monitor); } diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferencePromotionWireBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferencePromotionWireBuilderImpl.java index 61921a4df9..4ceb4bb079 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferencePromotionWireBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferencePromotionWireBuilderImpl.java @@ -35,7 +35,7 @@ import org.apache.tuscany.sca.assembly.Reference; import org.apache.tuscany.sca.assembly.SCABinding; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; /** @@ -52,7 +52,7 @@ public class ComponentReferencePromotionWireBuilderImpl implements CompositeBuil this.endpointFactory = endpointFactory; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { wireCompositeReferences(composite, monitor); } diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java index 9fe08f9730..03f28a6f7a 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java @@ -24,7 +24,7 @@ import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.assembly.EndpointFactory; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.Monitor; @@ -43,7 +43,7 @@ public class ComponentReferenceWireBuilderImpl extends BaseWireBuilderImpl imple return "org.apache.tuscany.sca.assembly.builder.ComponentReferenceWireBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { wireComponentReferences(composite, monitor); } } diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceBindingBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceBindingBuilderImpl.java index a98522b2bf..c725ea8947 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceBindingBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceBindingBuilderImpl.java @@ -28,7 +28,7 @@ import org.apache.tuscany.sca.assembly.builder.BindingBuilder; import org.apache.tuscany.sca.assembly.builder.BindingBuilderExtension; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; /** @@ -46,7 +46,7 @@ public class ComponentServiceBindingBuilderImpl implements CompositeBuilder { return "org.apache.tuscany.sca.assembly.builder.ComponentServiceBindingBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { buildServiceBindings(composite, monitor); } diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java index 282de1fbde..b9646acb20 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java @@ -28,7 +28,7 @@ import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.assembly.Implementation; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; /** @@ -47,7 +47,7 @@ public class ComponentServicePromotionBuilderImpl implements CompositeBuilder { return "org.apache.tuscany.sca.assembly.builder.ComponentServicePromotionBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { // Process nested composites recursively configureNestedCompositeServices(composite); diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingConfigurationBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingConfigurationBuilderImpl.java index 9f618ecb51..d322e4949a 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingConfigurationBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingConfigurationBuilderImpl.java @@ -28,7 +28,7 @@ import org.apache.tuscany.sca.assembly.SCABindingFactory; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.Monitor; @@ -60,7 +60,7 @@ public class CompositeBindingConfigurationBuilderImpl extends BaseConfigurationB return "org.apache.tuscany.sca.assembly.builder.CompositeServiceBindingBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { List<Binding> defaultBindings = null; for (Object x: composite.getExtensions()) { if (x instanceof List) { diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingURIBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingURIBuilderImpl.java index 030eb76eae..0c507c615e 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingURIBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingURIBuilderImpl.java @@ -27,7 +27,7 @@ import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.assembly.SCABindingFactory; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.Monitor; @@ -60,7 +60,7 @@ public class CompositeBindingURIBuilderImpl extends BaseConfigurationBuilderImpl return "org.apache.tuscany.sca.assembly.builder.CompositeBindingURIBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { configureBindingURIsAndNames(composite, definitions, monitor); } diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java index 2225e81e4b..9846edc127 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java @@ -31,7 +31,7 @@ import org.apache.tuscany.sca.assembly.SCABindingFactory; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory; @@ -176,7 +176,7 @@ public class CompositeBuilderImpl implements CompositeBuilder { return "org.apache.tuscany.sca.assembly.builder.CompositeBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { // Collect and fuse includes compositeIncludeBuilder.build(composite, definitions, monitor); diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeCloneBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeCloneBuilderImpl.java index d5c6b63454..21e5192ae8 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeCloneBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeCloneBuilderImpl.java @@ -28,7 +28,7 @@ import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.assembly.Implementation; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; /** @@ -41,7 +41,7 @@ public class CompositeCloneBuilderImpl implements CompositeBuilder { public CompositeCloneBuilderImpl() { } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { expandCompositeImplementations(composite); } diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeIncludeBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeIncludeBuilderImpl.java index 7980664493..730c002468 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeIncludeBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeIncludeBuilderImpl.java @@ -28,7 +28,7 @@ import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; @@ -51,7 +51,7 @@ public class CompositeIncludeBuilderImpl implements CompositeBuilder { return "org.apache.tuscany.sca.assembly.builder.CompositeIncludeBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { fuseIncludes(composite, monitor); } diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java index ce3c028933..cc84df86c3 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java @@ -25,7 +25,7 @@ import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.assembly.EndpointFactory; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.Monitor; @@ -46,7 +46,7 @@ public class CompositePolicyBuilderImpl extends BaseWireBuilderImpl implements C return "org.apache.tuscany.sca.assembly.builder.CompositePolicyBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { computePolicies(composite, monitor); } } diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePromotionBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePromotionBuilderImpl.java index 3f786377a9..05747a25b2 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePromotionBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePromotionBuilderImpl.java @@ -25,7 +25,7 @@ import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.assembly.EndpointFactory; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.Monitor; @@ -45,7 +45,7 @@ public class CompositePromotionBuilderImpl extends BaseWireBuilderImpl implement return "org.apache.tuscany.sca.assembly.builder.CompositePromotionBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { connectCompositeReferencesAndServices(composite, monitor); } } diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceConfigurationBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceConfigurationBuilderImpl.java index 09c57b617f..a89f0d402f 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceConfigurationBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceConfigurationBuilderImpl.java @@ -31,7 +31,7 @@ import org.apache.tuscany.sca.assembly.Implementation; import org.apache.tuscany.sca.assembly.builder.AutomaticBinding; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; /** @@ -50,7 +50,7 @@ public class CompositeReferenceConfigurationBuilderImpl implements CompositeBuil return "org.apache.tuscany.sca.assembly.builder.CompositeReferenceConfigurationBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { // Process nested composites recursively configureNestedCompositeReferences(composite); diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceWireBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceWireBuilderImpl.java index 7d59964efa..3786cdfa38 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceWireBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceWireBuilderImpl.java @@ -30,7 +30,7 @@ import org.apache.tuscany.sca.assembly.Reference; import org.apache.tuscany.sca.assembly.SCABinding; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; /** @@ -56,7 +56,7 @@ public class CompositeReferenceWireBuilderImpl implements CompositeBuilder { * * @param composite */ - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { // Process composite references declared in this composite for (Reference reference : composite.getReferences()) { diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceBindingBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceBindingBuilderImpl.java index e0d3a91809..6a8da7241a 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceBindingBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceBindingBuilderImpl.java @@ -28,7 +28,7 @@ import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.assembly.builder.BindingBuilderExtension; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; /** @@ -46,7 +46,7 @@ public class CompositeServiceBindingBuilderImpl implements CompositeBuilder { return "org.apache.tuscany.sca.assembly.builder.CompositeServiceBindingBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { buildServiceBindings(composite, monitor); } diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceConfigurationBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceConfigurationBuilderImpl.java index c5f109c473..2fc5e571b2 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceConfigurationBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceConfigurationBuilderImpl.java @@ -31,7 +31,7 @@ import org.apache.tuscany.sca.assembly.Implementation; import org.apache.tuscany.sca.assembly.builder.AutomaticBinding; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; /** @@ -50,7 +50,7 @@ public class CompositeServiceConfigurationBuilderImpl implements CompositeBuilde return "org.apache.tuscany.sca.assembly.builder.CompositeServiceConfigurationBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { // Process nested composites recursively configureNestedCompositeServices(composite); diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java index 07efb399c3..3004a9f590 100644 --- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java +++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java @@ -27,7 +27,7 @@ import org.apache.tuscany.sca.assembly.CompositeService; import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; /** @@ -46,7 +46,7 @@ public class CompositeServicePromotionBuilderImpl implements CompositeBuilder { return "org.apache.tuscany.sca.assembly.builder.CompositeServicePromotionBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { // Process top level composite services for (Service service : composite.getServices()) { diff --git a/branches/sca-equinox/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingDefinitionsProvider.java b/branches/sca-equinox/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingDefinitionsProvider.java index eae1016777..faf0bd53fd 100644 --- a/branches/sca-equinox/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingDefinitionsProvider.java +++ b/branches/sca-equinox/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingDefinitionsProvider.java @@ -29,25 +29,25 @@ import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.definitions.SCADefinitions; -import org.apache.tuscany.sca.provider.SCADefinitionsProvider; -import org.apache.tuscany.sca.provider.SCADefinitionsProviderException; +import org.apache.tuscany.sca.definitions.Definitions; +import org.apache.tuscany.sca.provider.DefinitionsProvider; +import org.apache.tuscany.sca.provider.DefinitionsProviderException; /** * Provider for Policy Intents and PolicySet definitions related to security * * @version $Rev$ $Date$ */ -public class SCABindingDefinitionsProvider implements SCADefinitionsProvider { +public class SCABindingDefinitionsProvider implements DefinitionsProvider { private String definitionsFile = "org/apache/tuscany/sca/binding/sca/definitions.xml"; URLArtifactProcessor urlArtifactProcessor = null; public SCABindingDefinitionsProvider(ExtensionPointRegistry registry) { URLArtifactProcessorExtensionPoint documentProcessors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - urlArtifactProcessor = (URLArtifactProcessor)documentProcessors.getProcessor(SCADefinitions.class); + urlArtifactProcessor = (URLArtifactProcessor)documentProcessors.getProcessor(Definitions.class); } - public SCADefinitions getSCADefinition() throws SCADefinitionsProviderException { + public Definitions getDefinitions() throws DefinitionsProviderException { // Allow privileged access to load resource. Requires RuntimePermssion in security policy. final URL definitionsFileUrl = AccessController.doPrivileged(new PrivilegedAction<URL>() { public URL run() { @@ -55,17 +55,17 @@ public class SCABindingDefinitionsProvider implements SCADefinitionsProvider { } }); - SCADefinitions scaDefn = null; + Definitions scaDefn = null; try { final URI uri = new URI(definitionsFile); // Allow bindings to read properties. Requires PropertyPermission read in security policy. - scaDefn = AccessController.doPrivileged(new PrivilegedExceptionAction<SCADefinitions>() { - public SCADefinitions run() throws ContributionReadException { - return (SCADefinitions)urlArtifactProcessor.read(null, uri, definitionsFileUrl); + scaDefn = AccessController.doPrivileged(new PrivilegedExceptionAction<Definitions>() { + public Definitions run() throws ContributionReadException { + return (Definitions)urlArtifactProcessor.read(null, uri, definitionsFileUrl); } }); } catch (Exception e) { - throw new SCADefinitionsProviderException(e); + throw new DefinitionsProviderException(e); } return scaDefn; } diff --git a/branches/sca-equinox/modules/binding-sca/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider b/branches/sca-equinox/modules/binding-sca/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProvider index 22c9a64b05..22c9a64b05 100644 --- a/branches/sca-equinox/modules/binding-sca/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider +++ b/branches/sca-equinox/modules/binding-sca/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProvider diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/WSBindingDefinitionsProvider.java b/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/WSBindingDefinitionsProvider.java index 7e95313011..34f752e229 100644 --- a/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/WSBindingDefinitionsProvider.java +++ b/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/WSBindingDefinitionsProvider.java @@ -28,37 +28,37 @@ import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.definitions.SCADefinitions; -import org.apache.tuscany.sca.provider.SCADefinitionsProvider; -import org.apache.tuscany.sca.provider.SCADefinitionsProviderException; +import org.apache.tuscany.sca.definitions.Definitions; +import org.apache.tuscany.sca.provider.DefinitionsProvider; +import org.apache.tuscany.sca.provider.DefinitionsProviderException; /** * Provider for Policy Intents and PolicySet definitions related to security * * @version $Rev$ $Date$ */ -public class WSBindingDefinitionsProvider implements SCADefinitionsProvider { +public class WSBindingDefinitionsProvider implements DefinitionsProvider { private String definitionsFile = "org/apache/tuscany/sca/binding/ws/axis2/definitions.xml"; URLArtifactProcessor urlArtifactProcessor = null; public WSBindingDefinitionsProvider(ExtensionPointRegistry registry) { URLArtifactProcessorExtensionPoint documentProcessors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - urlArtifactProcessor = (URLArtifactProcessor)documentProcessors.getProcessor(SCADefinitions.class); + urlArtifactProcessor = (URLArtifactProcessor)documentProcessors.getProcessor(Definitions.class); } - public SCADefinitions getSCADefinition() throws SCADefinitionsProviderException { + public Definitions getDefinitions() throws DefinitionsProviderException { final URL definitionsFileUrl = getClass().getClassLoader().getResource(definitionsFile); - SCADefinitions scaDefn = null; + Definitions scaDefn = null; try { final URI uri = new URI(definitionsFile); // Allow bindings to read properties. Requires PropertyPermission read in security policy. - scaDefn = AccessController.doPrivileged(new PrivilegedExceptionAction<SCADefinitions>() { - public SCADefinitions run() throws ContributionReadException { - return (SCADefinitions)urlArtifactProcessor.read(null, uri, definitionsFileUrl); + scaDefn = AccessController.doPrivileged(new PrivilegedExceptionAction<Definitions>() { + public Definitions run() throws ContributionReadException { + return (Definitions)urlArtifactProcessor.read(null, uri, definitionsFileUrl); } }); } catch (Exception e) { - throw new SCADefinitionsProviderException(e); + throw new DefinitionsProviderException(e); } return scaDefn; } diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider b/branches/sca-equinox/modules/binding-ws-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProvider index 370b83f87b..370b83f87b 100644 --- a/branches/sca-equinox/modules/binding-ws-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider +++ b/branches/sca-equinox/modules/binding-ws-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProvider diff --git a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultDefinitionsProviderExtensionPoint.java index 3e1f1a10c5..8b7902bec8 100644 --- a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java +++ b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultDefinitionsProviderExtensionPoint.java @@ -33,26 +33,26 @@ import org.apache.tuscany.sca.extensibility.ServiceDiscovery; * * @version $Rev$ $Date$ */ -public class DefaultSCADefinitionsProviderExtensionPoint implements - SCADefinitionsProviderExtensionPoint { +public class DefaultDefinitionsProviderExtensionPoint implements + DefinitionsProviderExtensionPoint { private ExtensionPointRegistry extensionPointRegistry = null; - private List<SCADefinitionsProvider> scaDefnsProviders = new ArrayList<SCADefinitionsProvider>(); + private List<DefinitionsProvider> scaDefnsProviders = new ArrayList<DefinitionsProvider>(); - public DefaultSCADefinitionsProviderExtensionPoint(ExtensionPointRegistry extnPtReg) { + public DefaultDefinitionsProviderExtensionPoint(ExtensionPointRegistry extnPtReg) { this.extensionPointRegistry = extnPtReg; } - public void addSCADefinitionsProvider(SCADefinitionsProvider provider) { + public void addDefinitionsProvider(DefinitionsProvider provider) { scaDefnsProviders.add(provider); } - public void removeSCADefinitionsProvider(SCADefinitionsProvider provider) { + public void removeDefinitionsProvider(DefinitionsProvider provider) { scaDefnsProviders.remove(provider); } - public List<SCADefinitionsProvider> getSCADefinitionsProviders() { + public List<DefinitionsProvider> getDefinitionsProviders() { if (scaDefnsProviders.isEmpty()) { loadProviders(); } @@ -62,23 +62,23 @@ public class DefaultSCADefinitionsProviderExtensionPoint implements private void loadProviders() { // Get the provider service declarations Set<ServiceDeclaration> defnProviderDecls; - SCADefinitionsProvider aProvider = null; + DefinitionsProvider aProvider = null; Class providerClass = null; Constructor constructor = null; try { defnProviderDecls = - ServiceDiscovery.getInstance().getServiceDeclarations(SCADefinitionsProvider.class.getName()); + ServiceDiscovery.getInstance().getServiceDeclarations(DefinitionsProvider.class.getName()); for (ServiceDeclaration aDefnProviderDecl : defnProviderDecls) { providerClass = aDefnProviderDecl.loadClass(); try { constructor = providerClass.getConstructor(); - aProvider = (SCADefinitionsProvider)constructor.newInstance(); + aProvider = (DefinitionsProvider)constructor.newInstance(); } catch (NoSuchMethodException e1) { constructor = providerClass.getConstructor(ExtensionPointRegistry.class); - aProvider = (SCADefinitionsProvider)constructor.newInstance(extensionPointRegistry); + aProvider = (DefinitionsProvider)constructor.newInstance(extensionPointRegistry); } scaDefnsProviders.add(aProvider); diff --git a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProvider.java b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefinitionsProvider.java index bd0f4d4b75..7871aea07c 100644 --- a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProvider.java +++ b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefinitionsProvider.java @@ -19,7 +19,7 @@ package org.apache.tuscany.sca.provider; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; /** * Models a provider of SCA Definitions. Typically SCA Definitions providers @@ -28,6 +28,6 @@ import org.apache.tuscany.sca.definitions.SCADefinitions; * * @version $Rev$ $Date$ */ -public interface SCADefinitionsProvider { - SCADefinitions getSCADefinition() throws SCADefinitionsProviderException ; +public interface DefinitionsProvider { + Definitions getDefinitions() throws DefinitionsProviderException ; } diff --git a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderException.java b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefinitionsProviderException.java index b05130d6c8..11464125ad 100644 --- a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderException.java +++ b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefinitionsProviderException.java @@ -22,9 +22,9 @@ package org.apache.tuscany.sca.provider; /** * @version $Rev$ $Date$ */ -public class SCADefinitionsProviderException extends Exception { +public class DefinitionsProviderException extends Exception { - public SCADefinitionsProviderException(Throwable e) { + public DefinitionsProviderException(Throwable e) { super(e); } } diff --git a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderExtensionPoint.java b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefinitionsProviderExtensionPoint.java index a5d60cc6eb..61cfbe8536 100644 --- a/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderExtensionPoint.java +++ b/branches/sca-equinox/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefinitionsProviderExtensionPoint.java @@ -27,9 +27,9 @@ import java.util.List; * * @version $Rev$ $Date$ */ -public interface SCADefinitionsProviderExtensionPoint { +public interface DefinitionsProviderExtensionPoint { - void addSCADefinitionsProvider(SCADefinitionsProvider provider); - void removeSCADefinitionsProvider(SCADefinitionsProvider provider); - List<SCADefinitionsProvider> getSCADefinitionsProviders(); + void addDefinitionsProvider(DefinitionsProvider provider); + void removeDefinitionsProvider(DefinitionsProvider provider); + List<DefinitionsProvider> getDefinitionsProviders(); } diff --git a/branches/sca-equinox/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint b/branches/sca-equinox/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProviderExtensionPoint index 2f700671ca..b7501e854e 100644 --- a/branches/sca-equinox/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint +++ b/branches/sca-equinox/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProviderExtensionPoint @@ -15,5 +15,5 @@ # specific language governing permissions and limitations
# under the License.
-org.apache.tuscany.sca.provider.DefaultSCADefinitionsProviderExtensionPoint
+org.apache.tuscany.sca.provider.DefaultDefinitionsProviderExtensionPoint
\ No newline at end of file diff --git a/branches/sca-equinox/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsDocumentProcessor.java b/branches/sca-equinox/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java index f396a601fc..6c3dca7bab 100644 --- a/branches/sca-equinox/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsDocumentProcessor.java +++ b/branches/sca-equinox/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java @@ -27,6 +27,8 @@ import java.net.URLConnection; import java.security.AccessController; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; +import java.util.HashMap; +import java.util.Map; import javax.xml.namespace.QName; import javax.xml.stream.XMLInputFactory; @@ -40,19 +42,22 @@ import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.core.FactoryExtensionPoint; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.definitions.DefinitionsFactory; -import org.apache.tuscany.sca.definitions.SCADefinitions; -import org.apache.tuscany.sca.definitions.util.SCADefinitionsUtil; +import org.apache.tuscany.sca.definitions.util.DefinitionsUtil; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.monitor.Problem.Severity; +import org.apache.tuscany.sca.policy.Intent; +import org.apache.tuscany.sca.policy.IntentAttachPointType; +import org.apache.tuscany.sca.policy.PolicySet; /** * A SCA Definitions Document processor. * * @version $Rev$ $Date$ */ -public class SCADefinitionsDocumentProcessor implements URLArtifactProcessor<SCADefinitions> { +public class DefinitionsDocumentProcessor implements URLArtifactProcessor<Definitions> { private StAXArtifactProcessor<Object> extensionProcessor; private XMLInputFactory inputFactory; private DefinitionsFactory definitionsFactory; @@ -67,7 +72,7 @@ public class SCADefinitionsDocumentProcessor implements URLArtifactProcessor<SCA * @param policyFactory * @param staxProcessor */ - public SCADefinitionsDocumentProcessor(StAXArtifactProcessor<Object> staxProcessor, + public DefinitionsDocumentProcessor(StAXArtifactProcessor<Object> staxProcessor, XMLInputFactory inputFactory, DefinitionsFactory definitionsFactory, Monitor monitor) { @@ -83,7 +88,7 @@ public class SCADefinitionsDocumentProcessor implements URLArtifactProcessor<SCA * @param modelFactories * @param staxProcessor */ - public SCADefinitionsDocumentProcessor(FactoryExtensionPoint modelFactories, + public DefinitionsDocumentProcessor(FactoryExtensionPoint modelFactories, StAXArtifactProcessor<Object> staxProcessor, Monitor monitor) { this.extensionProcessor = (StAXArtifactProcessor<Object>)staxProcessor; @@ -132,7 +137,7 @@ public class SCADefinitionsDocumentProcessor implements URLArtifactProcessor<SCA } } - public SCADefinitions read(URL contributionURL, final URI uri, final URL url) throws ContributionReadException { + public Definitions read(URL contributionURL, final URI uri, final URL url) throws ContributionReadException { InputStream urlStream = null; try { // Allow privileged access to open URL stream. Add FilePermission to added to security @@ -153,7 +158,7 @@ public class SCADefinitionsDocumentProcessor implements URLArtifactProcessor<SCA //urlStream = createInputStream(url); XMLStreamReader reader = inputFactory.createXMLStreamReader(url.toString(), urlStream); - SCADefinitions definitions = definitionsFactory.createDefinitions(); + Definitions definitions = definitionsFactory.createDefinitions(); QName name = null; int event; while (reader.hasNext()) { @@ -166,8 +171,8 @@ public class SCADefinitionsDocumentProcessor implements URLArtifactProcessor<SCA return definitions; } } else { - SCADefinitions aDefn = (SCADefinitions)extensionProcessor.read(reader); - SCADefinitionsUtil.aggregateSCADefinitions(aDefn, definitions); + Definitions aDefn = (Definitions)extensionProcessor.read(reader); + DefinitionsUtil.aggregate(aDefn, definitions); } } } @@ -193,9 +198,40 @@ public class SCADefinitionsDocumentProcessor implements URLArtifactProcessor<SCA } } } + + private static void stripDuplicates(Definitions scaDefns) { + Map<QName, Intent> definedIntents = new HashMap<QName, Intent>(); + for (Intent intent : scaDefns.getIntents()) { + definedIntents.put(intent.getName(), intent); + } + + Map<QName, PolicySet> definedPolicySets = new HashMap<QName, PolicySet>(); + for (PolicySet policySet : scaDefns.getPolicySets()) { + definedPolicySets.put(policySet.getName(), policySet); + } + + Map<QName, IntentAttachPointType> definedBindingTypes = new HashMap<QName, IntentAttachPointType>(); + for (IntentAttachPointType bindingType : scaDefns.getBindingTypes()) { + definedBindingTypes.put(bindingType.getName(), bindingType); + } + + Map<QName, IntentAttachPointType> definedImplTypes = new HashMap<QName, IntentAttachPointType>(); + for (IntentAttachPointType implType : scaDefns.getImplementationTypes()) { + definedImplTypes.put(implType.getName(), implType); + } + + scaDefns.getIntents().clear(); + scaDefns.getIntents().addAll(definedIntents.values()); + scaDefns.getPolicySets().clear(); + scaDefns.getPolicySets().addAll(definedPolicySets.values()); + scaDefns.getBindingTypes().clear(); + scaDefns.getBindingTypes().addAll(definedBindingTypes.values()); + scaDefns.getImplementationTypes().clear(); + scaDefns.getImplementationTypes().addAll(definedImplTypes.values()); + } - public void resolve(SCADefinitions scaDefinitions, ModelResolver resolver) throws ContributionResolveException { - SCADefinitionsUtil.stripDuplicates(scaDefinitions); + public void resolve(Definitions scaDefinitions, ModelResolver resolver) throws ContributionResolveException { + stripDuplicates(scaDefinitions); extensionProcessor.resolve(scaDefinitions, resolver); } @@ -203,8 +239,8 @@ public class SCADefinitionsDocumentProcessor implements URLArtifactProcessor<SCA return "definitions.xml"; } - public Class<SCADefinitions> getModelType() { - return SCADefinitions.class; + public Class<Definitions> getModelType() { + return Definitions.class; } } diff --git a/branches/sca-equinox/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsProcessor.java b/branches/sca-equinox/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java index 46bcff3874..c65a9626ab 100644 --- a/branches/sca-equinox/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsProcessor.java +++ b/branches/sca-equinox/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java @@ -40,7 +40,7 @@ import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.definitions.DefinitionsFactory; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.policy.Intent; import org.apache.tuscany.sca.policy.IntentAttachPointType; @@ -53,7 +53,7 @@ import org.apache.tuscany.sca.policy.QualifiedIntent; * * @version $Rev$ $Date$ */ -public class SCADefinitionsProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<SCADefinitions> { +public class DefinitionsProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<Definitions> { private StAXArtifactProcessor<Object> extensionProcessor; private DefinitionsFactory definitionsFactory; @@ -67,7 +67,7 @@ public class SCADefinitionsProcessor extends BaseStAXArtifactProcessor implement public static final String TARGET_NAMESPACE = "targetNamespace"; public static final String NAME = "name"; - public SCADefinitionsProcessor(FactoryExtensionPoint factoryExtensionPoint, + public DefinitionsProcessor(FactoryExtensionPoint factoryExtensionPoint, StAXArtifactProcessor<Object> extensionProcessor, Monitor monitor) { this.extensionProcessor = extensionProcessor; @@ -75,9 +75,9 @@ public class SCADefinitionsProcessor extends BaseStAXArtifactProcessor implement this.definitionsFactory = factoryExtensionPoint.getFactory(DefinitionsFactory.class); } - public SCADefinitions read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { + public Definitions read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { QName name = null; - SCADefinitions definitions = null; + Definitions definitions = null; String targetNamespace = null; while (reader.hasNext()) { @@ -105,7 +105,7 @@ public class SCADefinitionsProcessor extends BaseStAXArtifactProcessor implement // FIXME: Workaround for TUSCANY-2499 intent.setUnresolved(false); - definitions.getPolicyIntents().add(intent); + definitions.getIntents().add(intent); } else if (extension instanceof PolicySet) { PolicySet policySet = (PolicySet)extension; policySet.setName(new QName(targetNamespace, policySet.getName().getLocalPart())); @@ -145,13 +145,13 @@ public class SCADefinitionsProcessor extends BaseStAXArtifactProcessor implement return definitions; } - public void write(SCADefinitions definitions, XMLStreamWriter writer) throws ContributionWriteException, + public void write(Definitions definitions, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException { writeStartDocument(writer, SCA10_NS, SCA_DEFINITIONS, new XAttr(TARGET_NAMESPACE, definitions .getTargetNamespace())); - for (Intent policyIntent : definitions.getPolicyIntents()) { + for (Intent policyIntent : definitions.getIntents()) { extensionProcessor.write(policyIntent, writer); } @@ -170,7 +170,7 @@ public class SCADefinitionsProcessor extends BaseStAXArtifactProcessor implement writeEndDocument(writer); } - public void resolve(SCADefinitions scaDefns, ModelResolver resolver) throws ContributionResolveException { + public void resolve(Definitions scaDefns, ModelResolver resolver) throws ContributionResolveException { // start by adding all of the top level artifacts into the resolver as there // are many cross artifact references in a definitions file and we don't want // to be dependent on the order things appear @@ -181,7 +181,7 @@ public class SCADefinitionsProcessor extends BaseStAXArtifactProcessor implement List<PolicySet> simplePolicySets = new ArrayList<PolicySet>(); List<PolicySet> referredPolicySets = new ArrayList<PolicySet>(); - for (Intent policyIntent : scaDefns.getPolicyIntents()) { + for (Intent policyIntent : scaDefns.getIntents()) { if (policyIntent instanceof ProfileIntent) profileIntents.add((ProfileIntent)policyIntent); else if (policyIntent instanceof QualifiedIntent) @@ -242,8 +242,8 @@ public class SCADefinitionsProcessor extends BaseStAXArtifactProcessor implement return SCA_DEFINITIONS_QNAME; } - public Class<SCADefinitions> getModelType() { - return SCADefinitions.class; + public Class<Definitions> getModelType() { + return Definitions.class; } } diff --git a/branches/sca-equinox/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/branches/sca-equinox/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor index 38fe3c5225..fa33150e87 100644 --- a/branches/sca-equinox/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor +++ b/branches/sca-equinox/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor @@ -16,4 +16,4 @@ # under the License. # Implementation class for the artifact processor extension -org.apache.tuscany.sca.definitions.xml.SCADefinitionsProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#definitions,model=org.apache.tuscany.sca.definitions.SCADefinitions +org.apache.tuscany.sca.definitions.xml.DefinitionsProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#definitions,model=org.apache.tuscany.sca.definitions.Definitions diff --git a/branches/sca-equinox/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor b/branches/sca-equinox/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor index 4392461df1..677aff9918 100644 --- a/branches/sca-equinox/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor +++ b/branches/sca-equinox/modules/definitions-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor @@ -16,4 +16,4 @@ # under the License. # Implementation class for the artifact processor extension -org.apache.tuscany.sca.definitions.xml.SCADefinitionsDocumentProcessor;type=definitions.xml,model=org.apache.tuscany.sca.definitions.SCADefinitions +org.apache.tuscany.sca.definitions.xml.DefinitionsDocumentProcessor;type=definitions.xml,model=org.apache.tuscany.sca.definitions.Definitions diff --git a/branches/sca-equinox/modules/definitions-xml/src/test/java/org/apache/tuscany/sca/definitions/ReadDocumentTestCase.java b/branches/sca-equinox/modules/definitions-xml/src/test/java/org/apache/tuscany/sca/definitions/ReadDocumentTestCase.java index 6a654a7c9b..2614bbacb4 100644 --- a/branches/sca-equinox/modules/definitions-xml/src/test/java/org/apache/tuscany/sca/definitions/ReadDocumentTestCase.java +++ b/branches/sca-equinox/modules/definitions-xml/src/test/java/org/apache/tuscany/sca/definitions/ReadDocumentTestCase.java @@ -53,8 +53,8 @@ import org.junit.Test; */
public class ReadDocumentTestCase {
- private static URLArtifactProcessor<SCADefinitions> policyDefinitionsProcessor = null;
- private static SCADefinitions definitions;
+ private static URLArtifactProcessor<Definitions> policyDefinitionsProcessor = null;
+ private static Definitions definitions;
private static Map<QName, Intent> intentTable = new Hashtable<QName, Intent>();
private static Map<QName, PolicySet> policySetTable = new Hashtable<QName, PolicySet>();
private static Map<QName, IntentAttachPointType> bindingTypesTable = new Hashtable<QName, IntentAttachPointType>();
@@ -85,13 +85,13 @@ public class ReadDocumentTestCase { staxProcessors.addArtifactProcessor(new TestPolicyProcessor());
URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
- policyDefinitionsProcessor = documentProcessors.getProcessor(SCADefinitions.class);
+ policyDefinitionsProcessor = documentProcessors.getProcessor(Definitions.class);
URL url = ReadDocumentTestCase.class.getResource("test_definitions.xml");
URI uri = URI.create("test_definitions.xml");
definitions = policyDefinitionsProcessor.read(null, uri, url);
- for ( Intent intent : definitions.getPolicyIntents() ) {
+ for ( Intent intent : definitions.getIntents() ) {
intentTable.put(intent.getName(), intent);
}
diff --git a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefaultDefinitionsFactory.java b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefaultDefinitionsFactory.java index 8b1df067ba..156fd0af75 100644 --- a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefaultDefinitionsFactory.java +++ b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefaultDefinitionsFactory.java @@ -18,15 +18,15 @@ */ package org.apache.tuscany.sca.definitions; -import org.apache.tuscany.sca.definitions.impl.SCADefinitionsImpl; +import org.apache.tuscany.sca.definitions.impl.DefinitionsImpl; /** * Default Implementation of DefinitionsFactory */ public class DefaultDefinitionsFactory implements DefinitionsFactory { - public SCADefinitions createDefinitions() { - return new SCADefinitionsImpl(); + public Definitions createDefinitions() { + return new DefinitionsImpl(); } } diff --git a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/SCADefinitions.java b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/Definitions.java index 2039b9ecc9..d3373215a2 100644 --- a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/SCADefinitions.java +++ b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/Definitions.java @@ -30,7 +30,7 @@ import org.apache.tuscany.sca.policy.PolicySet; *
* @version $Rev$ $Date$
*/
-public interface SCADefinitions {
+public interface Definitions {
/**
* Returns the target namespace for this SCA Definition
* @return the target namespace
@@ -49,7 +49,7 @@ public interface SCADefinitions { *
* @return a list of domain wide Policy Intents
*/
- List<Intent> getPolicyIntents();
+ List<Intent> getIntents();
/**
* Returns a list of domain wide PolicySets
diff --git a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/SCADefinitionsBuilder.java b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsBuilder.java index a41d7a6717..59cfa1e205 100644 --- a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/SCADefinitionsBuilder.java +++ b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsBuilder.java @@ -24,11 +24,11 @@ package org.apache.tuscany.sca.definitions; *
* @version $Rev$ $Date$
*/
-public interface SCADefinitionsBuilder {
+public interface DefinitionsBuilder {
/**
* Builds the SCA definitions
*
* @param scaDefns
*/
- void build(SCADefinitions scaDefns) throws SCADefinitionsBuilderException;
+ void build(Definitions scaDefns) throws DefinitionsBuilderException;
}
diff --git a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/SCADefinitionsBuilderException.java b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsBuilderException.java index 85b9ad7f7d..e3a11d29aa 100644 --- a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/SCADefinitionsBuilderException.java +++ b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsBuilderException.java @@ -23,21 +23,21 @@ package org.apache.tuscany.sca.definitions; *
* @version $Rev$ $Date$
*/
-public class SCADefinitionsBuilderException extends Exception {
+public class DefinitionsBuilderException extends Exception {
private static final long serialVersionUID = 2513219325230252783L;
- public SCADefinitionsBuilderException() {
+ public DefinitionsBuilderException() {
}
- public SCADefinitionsBuilderException(String message) {
+ public DefinitionsBuilderException(String message) {
super(message);
}
- public SCADefinitionsBuilderException(Throwable cause) {
+ public DefinitionsBuilderException(Throwable cause) {
super(cause);
}
- public SCADefinitionsBuilderException(String message, Throwable cause) {
+ public DefinitionsBuilderException(String message, Throwable cause) {
super(message, cause);
}
}
diff --git a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/SCADefinitionsBuilderImpl.java b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsBuilderImpl.java index 8b9ff3e1a9..08a01c020a 100644 --- a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/SCADefinitionsBuilderImpl.java +++ b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsBuilderImpl.java @@ -37,11 +37,11 @@ import org.apache.tuscany.sca.policy.QualifiedIntent; *
* @version $Rev$ $Date$
*/
-public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder {
+public class DefinitionsBuilderImpl implements DefinitionsBuilder {
- public void build(SCADefinitions scaDefns) throws SCADefinitionsBuilderException {
+ public void build(Definitions scaDefns) throws DefinitionsBuilderException {
Map<QName, Intent> definedIntents = new HashMap<QName, Intent>();
- for (Intent intent : scaDefns.getPolicyIntents()) {
+ for (Intent intent : scaDefns.getIntents()) {
definedIntents.put(intent.getName(), intent);
}
@@ -62,12 +62,12 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { //filling up the maps removes all duplicate entries... so fill this unique lists
//into the scaDefns.
- scaDefns.getPolicyIntents().clear();
+ scaDefns.getIntents().clear();
scaDefns.getPolicySets().clear();
scaDefns.getBindingTypes().clear();
scaDefns.getImplementationTypes().clear();
- scaDefns.getPolicyIntents().addAll(definedIntents.values());
+ scaDefns.getIntents().addAll(definedIntents.values());
scaDefns.getPolicySets().addAll(definedPolicySets.values());
scaDefns.getBindingTypes().addAll(definedBindingTypes.values());
scaDefns.getImplementationTypes().addAll(definedImplTypes.values());
@@ -78,9 +78,9 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { buildImplementationTypes(scaDefns, definedImplTypes, definedIntents);
}
- private void buildBindingTypes(SCADefinitions scaDefns,
+ private void buildBindingTypes(Definitions scaDefns,
Map<QName, IntentAttachPointType> definedBindingTypes,
- Map<QName, Intent> definedIntents) throws SCADefinitionsBuilderException {
+ Map<QName, Intent> definedIntents) throws DefinitionsBuilderException {
for (IntentAttachPointType bindingType : scaDefns.getBindingTypes()) {
buildAlwaysProvidedIntents(bindingType, definedIntents);
buildMayProvideIntents(bindingType, definedIntents);
@@ -88,9 +88,9 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { }
- private void buildImplementationTypes(SCADefinitions scaDefns,
+ private void buildImplementationTypes(Definitions scaDefns,
Map<QName, IntentAttachPointType> definedImplTypes,
- Map<QName, Intent> definedIntents) throws SCADefinitionsBuilderException {
+ Map<QName, Intent> definedIntents) throws DefinitionsBuilderException {
for (IntentAttachPointType implType : scaDefns.getImplementationTypes()) {
buildAlwaysProvidedIntents(implType, definedIntents);
buildMayProvideIntents(implType, definedIntents);
@@ -98,9 +98,9 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { }
- private void buildPolicyIntents(SCADefinitions scaDefns, Map<QName, Intent> definedIntents)
- throws SCADefinitionsBuilderException {
- for (Intent policyIntent : scaDefns.getPolicyIntents()) {
+ private void buildPolicyIntents(Definitions scaDefns, Map<QName, Intent> definedIntents)
+ throws DefinitionsBuilderException {
+ for (Intent policyIntent : scaDefns.getIntents()) {
if (policyIntent instanceof ProfileIntent) {
buildProfileIntent((ProfileIntent)policyIntent, definedIntents);
}
@@ -111,9 +111,9 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { }
}
- private void buildPolicySets(SCADefinitions scaDefns,
+ private void buildPolicySets(Definitions scaDefns,
Map<QName, PolicySet> definedPolicySets,
- Map<QName, Intent> definedIntents) throws SCADefinitionsBuilderException {
+ Map<QName, Intent> definedIntents) throws DefinitionsBuilderException {
for (PolicySet policySet : scaDefns.getPolicySets()) {
buildProvidedIntents(policySet, definedIntents);
@@ -129,7 +129,7 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { }
private void buildProfileIntent(ProfileIntent policyIntent, Map<QName, Intent> definedIntents)
- throws SCADefinitionsBuilderException {
+ throws DefinitionsBuilderException {
//FIXME: Need to check for cyclic references first i.e an A requiring B and then B requiring A...
if (policyIntent != null) {
//resolve all required intents
@@ -140,7 +140,7 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { if (resolvedRequiredIntent != null) {
requiredIntents.add(resolvedRequiredIntent);
} else {
- throw new SCADefinitionsBuilderException("Required Intent - " + requiredIntent
+ throw new DefinitionsBuilderException("Required Intent - " + requiredIntent
+ " not found for ProfileIntent "
+ policyIntent);
@@ -155,7 +155,7 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { }
private void buildQualifiedIntent(QualifiedIntent policyIntent, Map<QName, Intent> definedIntents)
- throws SCADefinitionsBuilderException {
+ throws DefinitionsBuilderException {
if (policyIntent != null) {
//resolve the qualifiable intent
Intent qualifiableIntent = policyIntent.getQualifiableIntent();
@@ -165,7 +165,7 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { if (resolvedQualifiableIntent != null) {
policyIntent.setQualifiableIntent(resolvedQualifiableIntent);
} else {
- throw new SCADefinitionsBuilderException("Qualifiable Intent - " + qualifiableIntent
+ throw new DefinitionsBuilderException("Qualifiable Intent - " + qualifiableIntent
+ " not found for QualifiedIntent "
+ policyIntent);
}
@@ -176,7 +176,7 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { private void buildAlwaysProvidedIntents(IntentAttachPointType extensionType,
- Map<QName, Intent> definedIntents) throws SCADefinitionsBuilderException {
+ Map<QName, Intent> definedIntents) throws DefinitionsBuilderException {
if (extensionType != null) {
// resolve all provided intents
List<Intent> alwaysProvided = new ArrayList<Intent>();
@@ -186,7 +186,7 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { if (resolvedProvidedIntent != null) {
alwaysProvided.add(resolvedProvidedIntent);
} else {
- throw new SCADefinitionsBuilderException(
+ throw new DefinitionsBuilderException(
"Always Provided Intent - " + providedIntent
+ " not found for ExtensionType "
+ extensionType);
@@ -202,7 +202,7 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { }
private void buildMayProvideIntents(IntentAttachPointType extensionType,
- Map<QName, Intent> definedIntents) throws SCADefinitionsBuilderException {
+ Map<QName, Intent> definedIntents) throws DefinitionsBuilderException {
if (extensionType != null) {
// resolve all provided intents
List<Intent> mayProvide = new ArrayList<Intent>();
@@ -212,7 +212,7 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { if (resolvedProvidedIntent != null) {
mayProvide.add(resolvedProvidedIntent);
} else {
- throw new SCADefinitionsBuilderException(
+ throw new DefinitionsBuilderException(
"May Provide Intent - " + providedIntent
+ " not found for ExtensionType "
+ extensionType);
@@ -228,7 +228,7 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { }
private void buildProvidedIntents(PolicySet policySet, Map<QName, Intent> definedIntents)
- throws SCADefinitionsBuilderException {
+ throws DefinitionsBuilderException {
if (policySet != null) {
//resolve all provided intents
List<Intent> providedIntents = new ArrayList<Intent>();
@@ -238,7 +238,7 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { if (resolvedProvidedIntent != null) {
providedIntents.add(resolvedProvidedIntent);
} else {
- throw new SCADefinitionsBuilderException("Provided Intent - " + providedIntent
+ throw new DefinitionsBuilderException("Provided Intent - " + providedIntent
+ " not found for PolicySet "
+ policySet);
@@ -253,7 +253,7 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { }
private void buildIntentsInMappedPolicies(PolicySet policySet, Map<QName, Intent> definedIntents)
- throws SCADefinitionsBuilderException {
+ throws DefinitionsBuilderException {
Map<Intent, List<Object>> mappedPolicies = new Hashtable<Intent, List<Object>>();
for (Map.Entry<Intent, List<Object>> entry : policySet.getMappedPolicies().entrySet()) {
Intent mappedIntent = entry.getKey();
@@ -263,7 +263,7 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { if (resolvedMappedIntent != null) {
mappedPolicies.put(resolvedMappedIntent, entry.getValue());
} else {
- throw new SCADefinitionsBuilderException("Mapped Intent - " + mappedIntent
+ throw new DefinitionsBuilderException("Mapped Intent - " + mappedIntent
+ " not found for PolicySet "
+ policySet);
@@ -278,7 +278,7 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { }
private void buildReferredPolicySets(PolicySet policySet, Map<QName, PolicySet> definedPolicySets)
- throws SCADefinitionsBuilderException {
+ throws DefinitionsBuilderException {
List<PolicySet> referredPolicySets = new ArrayList<PolicySet>();
for (PolicySet referredPolicySet : policySet.getReferencedPolicySets()) {
@@ -287,7 +287,7 @@ public class SCADefinitionsBuilderImpl implements SCADefinitionsBuilder { if (resolvedReferredPolicySet != null) {
referredPolicySets.add(resolvedReferredPolicySet);
} else {
- throw new SCADefinitionsBuilderException("Referred PolicySet - " + referredPolicySet
+ throw new DefinitionsBuilderException("Referred PolicySet - " + referredPolicySet
+ "not found for PolicySet - "
+ policySet);
}
diff --git a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsFactory.java b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsFactory.java index 8f9fa3f075..616616ae7a 100644 --- a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsFactory.java +++ b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsFactory.java @@ -27,5 +27,5 @@ public interface DefinitionsFactory { * Create an instance of SCA definitions * @return a new instance of SCA definitions */ - SCADefinitions createDefinitions(); + Definitions createDefinitions(); } diff --git a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/impl/SCADefinitionsImpl.java b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/impl/DefinitionsImpl.java index a5178497a0..fdce0060f9 100644 --- a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/impl/SCADefinitionsImpl.java +++ b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/impl/DefinitionsImpl.java @@ -22,7 +22,7 @@ package org.apache.tuscany.sca.definitions.impl; import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
-import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.definitions.Definitions;
import org.apache.tuscany.sca.policy.Intent;
import org.apache.tuscany.sca.policy.IntentAttachPointType;
import org.apache.tuscany.sca.policy.PolicySet;
@@ -32,9 +32,9 @@ import org.apache.tuscany.sca.policy.PolicySet; *
* @version $Rev$ $Date$
*/
-public class SCADefinitionsImpl implements SCADefinitions {
+public class DefinitionsImpl implements Definitions {
private String targetNamespace = null;
- private List<Intent> policyIntents = new CopyOnWriteArrayList<Intent>();
+ private List<Intent> intents = new CopyOnWriteArrayList<Intent>();
private List<PolicySet> policySets = new CopyOnWriteArrayList<PolicySet>();
private List<IntentAttachPointType> bindingTypes = new CopyOnWriteArrayList<IntentAttachPointType>();
private List<IntentAttachPointType> implementationTypes = new CopyOnWriteArrayList<IntentAttachPointType>();
@@ -49,8 +49,8 @@ public class SCADefinitionsImpl implements SCADefinitions { return implementationTypes;
}
- public List<Intent> getPolicyIntents() {
- return policyIntents;
+ public List<Intent> getIntents() {
+ return intents;
}
public List<PolicySet> getPolicySets() {
diff --git a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/util/DefinitionsUtil.java b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/util/DefinitionsUtil.java new file mode 100644 index 0000000000..cd408125d2 --- /dev/null +++ b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/util/DefinitionsUtil.java @@ -0,0 +1,41 @@ +/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.sca.definitions.util;
+
+import org.apache.tuscany.sca.definitions.Definitions;
+
+/**
+ * Some utility functions to deal with SCADefinitions
+ *
+ * @version $Rev$ $Date$
+ */
+public class DefinitionsUtil {
+
+
+
+ public static void aggregate(Definitions source, Definitions target) {
+ target.getIntents().addAll(source.getIntents());
+ target.getPolicySets().addAll(source.getPolicySets());
+ target.getBindingTypes().addAll(source.getBindingTypes());
+ target.getImplementationTypes().addAll(source.getImplementationTypes());
+ target.getBindings().addAll(source.getBindings());
+ }
+
+}
diff --git a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/util/SCADefinitionsUtil.java b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/util/SCADefinitionsUtil.java deleted file mode 100644 index 8de6f63c05..0000000000 --- a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/util/SCADefinitionsUtil.java +++ /dev/null @@ -1,87 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.sca.definitions.util;
-
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.definitions.SCADefinitions;
-import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.IntentAttachPointType;
-import org.apache.tuscany.sca.policy.PolicySet;
-
-/**
- * Some utility functions to deal with SCADefinitions
- *
- * @version $Rev$ $Date$
- */
-public class SCADefinitionsUtil {
-
- public static void stripDuplicates(SCADefinitions scaDefns) {
- Map<QName, Intent> definedIntents = new HashMap<QName, Intent>();
- for (Intent intent : scaDefns.getPolicyIntents()) {
- definedIntents.put(intent.getName(), intent);
- }
-
- Map<QName, PolicySet> definedPolicySets = new HashMap<QName, PolicySet>();
- for (PolicySet policySet : scaDefns.getPolicySets()) {
- definedPolicySets.put(policySet.getName(), policySet);
- }
-
- Map<QName, IntentAttachPointType> definedBindingTypes = new HashMap<QName, IntentAttachPointType>();
- for (IntentAttachPointType bindingType : scaDefns.getBindingTypes()) {
- definedBindingTypes.put(bindingType.getName(), bindingType);
- }
-
- Map<QName, IntentAttachPointType> definedImplTypes = new HashMap<QName, IntentAttachPointType>();
- for (IntentAttachPointType implType : scaDefns.getImplementationTypes()) {
- definedImplTypes.put(implType.getName(), implType);
- }
-
- scaDefns.getPolicyIntents().clear();
- scaDefns.getPolicyIntents().addAll(definedIntents.values());
- scaDefns.getPolicySets().clear();
- scaDefns.getPolicySets().addAll(definedPolicySets.values());
- scaDefns.getBindingTypes().clear();
- scaDefns.getBindingTypes().addAll(definedBindingTypes.values());
- scaDefns.getImplementationTypes().clear();
- scaDefns.getImplementationTypes().addAll(definedImplTypes.values());
- }
-
- public static void aggregateSCADefinitions(SCADefinitions source, SCADefinitions target) {
- target.getPolicyIntents().addAll(source.getPolicyIntents());
- target.getPolicySets().addAll(source.getPolicySets());
- target.getBindingTypes().addAll(source.getBindingTypes());
- target.getImplementationTypes().addAll(source.getImplementationTypes());
- target.getBindings().addAll(source.getBindings());
- }
-
- public static boolean isSCADefnsFile(URI uri) {
- int index = uri.toString().lastIndexOf("/");
-
- index = (index != -1) ? index + 1 : 0;
-
- return uri.toString().substring(index).equals("definitions.xml");
- }
-
-}
diff --git a/branches/sca-equinox/modules/extensibility/pom.xml b/branches/sca-equinox/modules/extensibility/pom.xml index 01cd2d0ca9..93e2694971 100644 --- a/branches/sca-equinox/modules/extensibility/pom.xml +++ b/branches/sca-equinox/modules/extensibility/pom.xml @@ -40,7 +40,10 @@ <Bundle-Version>${tuscany.version}</Bundle-Version> <Bundle-SymbolicName>org.apache.tuscany.sca.extensibility</Bundle-SymbolicName> <Bundle-Description>${pom.name}</Bundle-Description> - <Export-Package>org.apache.tuscany.sca.*</Export-Package> + <Export-Package> + org.apache.tuscany.sca.core, + org.apache.tuscany.sca.extensibility + </Export-Package> </instructions> </configuration> </plugin> diff --git a/branches/sca-equinox/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/ReadTestCase.java b/branches/sca-equinox/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/ReadTestCase.java index 9a1a614975..5d443c8a4c 100644 --- a/branches/sca-equinox/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/ReadTestCase.java +++ b/branches/sca-equinox/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/ReadTestCase.java @@ -42,7 +42,7 @@ import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.policy.Intent; import org.apache.tuscany.sca.policy.PolicySet; import org.apache.tuscany.sca.policy.PolicySetAttachPoint; @@ -59,7 +59,7 @@ public class ReadTestCase { private static XMLInputFactory inputFactory; private static StAXArtifactProcessor<Object> staxProcessor; - private static URLArtifactProcessor<SCADefinitions> policyDefinitionsProcessor; + private static URLArtifactProcessor<Definitions> policyDefinitionsProcessor; private static CompositeBuilder compositeBuilder; @BeforeClass @@ -72,7 +72,7 @@ public class ReadTestCase { compositeBuilder = extensionPoints.getExtensionPoint(CompositeBuilderExtensionPoint.class).getCompositeBuilder("org.apache.tuscany.sca.assembly.builder.CompositeBuilder"); URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - policyDefinitionsProcessor = documentProcessors.getProcessor(SCADefinitions.class); + policyDefinitionsProcessor = documentProcessors.getProcessor(Definitions.class); } @Test @@ -93,7 +93,7 @@ public class ReadTestCase { URL url = getClass().getResource("definitions.xml"); URI uri = URI.create("definitions.xml"); - SCADefinitions scaDefns = policyDefinitionsProcessor.read(null, uri, url); + Definitions scaDefns = policyDefinitionsProcessor.read(null, uri, url); InputStream is = getClass().getResourceAsStream("Calculator.composite"); XMLStreamReader reader = inputFactory.createXMLStreamReader(is); @@ -158,7 +158,7 @@ public class ReadTestCase { URL url = getClass().getResource("definitions_with_policysets.xml"); URI uri = URI.create("definitions_with_policysets.xml"); - SCADefinitions policyDefinitions = policyDefinitionsProcessor.read(null, uri, url); + Definitions policyDefinitions = policyDefinitionsProcessor.read(null, uri, url); InputStream is = getClass().getResourceAsStream("Calculator.composite"); XMLStreamReader reader = inputFactory.createXMLStreamReader(is); diff --git a/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/builder/impl/NodeCompositeBuilderImpl.java b/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/builder/impl/NodeCompositeBuilderImpl.java index 2df1ad48c0..14046065b5 100644 --- a/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/builder/impl/NodeCompositeBuilderImpl.java +++ b/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/builder/impl/NodeCompositeBuilderImpl.java @@ -36,7 +36,7 @@ import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint; import org.apache.tuscany.sca.core.FactoryExtensionPoint; -import org.apache.tuscany.sca.definitions.SCADefinitions; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.implementation.node.NodeImplementation; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.Monitor; @@ -76,7 +76,7 @@ public class NodeCompositeBuilderImpl implements CompositeBuilder { return "org.apache.tuscany.sca.implementation.node.builder.NodeCompositeBuilder"; } - public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException { + public void build(Composite composite, Definitions definitions, Monitor monitor) throws CompositeBuilderException { // Process each node component in the given composite for (Component component: composite.getComponents()) { diff --git a/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java index a42b1a699e..e1f56e598b 100644 --- a/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java +++ b/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java @@ -20,7 +20,6 @@ package org.apache.tuscany.sca.node.impl; import static java.lang.System.currentTimeMillis; -import static org.apache.tuscany.sca.definitions.util.SCADefinitionsUtil.aggregateSCADefinitions; import static org.apache.tuscany.sca.node.impl.NodeUtil.contribution; import static org.apache.tuscany.sca.node.impl.NodeUtil.createURI; @@ -50,12 +49,10 @@ import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint; import org.apache.tuscany.sca.contribution.Artifact; import org.apache.tuscany.sca.contribution.Contribution; import org.apache.tuscany.sca.contribution.ContributionFactory; -import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver; import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver; import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint; @@ -71,8 +68,7 @@ import org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory; import org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory; import org.apache.tuscany.sca.core.invocation.ProxyFactory; import org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint; -import org.apache.tuscany.sca.definitions.SCADefinitions; -import org.apache.tuscany.sca.definitions.impl.SCADefinitionsImpl; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.implementation.node.ConfiguredNodeImplementation; import org.apache.tuscany.sca.implementation.node.NodeImplementationFactory; import org.apache.tuscany.sca.monitor.Monitor; @@ -81,12 +77,6 @@ import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.monitor.Problem.Severity; import org.apache.tuscany.sca.node.Client; import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.IntentAttachPointType; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.provider.SCADefinitionsProvider; -import org.apache.tuscany.sca.provider.SCADefinitionsProviderException; -import org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.apache.tuscany.sca.runtime.RuntimeComponentContext; import org.apache.tuscany.sca.work.WorkScheduler; @@ -130,7 +120,7 @@ public class NodeImpl implements Node, Client { private List<ModuleActivator> moduleActivators = new ArrayList<ModuleActivator>(); private CompositeActivator compositeActivator; private WorkScheduler workScheduler; - private SCADefinitions systemDefinitions; + private Definitions systemDefinitions; /** * Constructs a new SCA node. @@ -327,13 +317,13 @@ public class NodeImpl implements Node, Client { // the Equinox environment initially // // Load the system definitions.xml -// SCADefinitionsProviderExtensionPoint definitionsProviders = extensionPoints.getExtensionPoint(SCADefinitionsProviderExtensionPoint.class); -// systemDefinitions = new SCADefinitionsImpl(); +// DefinitionsProviderExtensionPoint definitionsProviders = extensionPoints.getExtensionPoint(DefinitionsProviderExtensionPoint.class); +// systemDefinitions = new DefinitionsImpl(); // try { -// for (SCADefinitionsProvider definitionsProvider : definitionsProviders.getSCADefinitionsProviders()) { -// aggregateSCADefinitions(definitionsProvider.getSCADefinition(), systemDefinitions); +// for (DefinitionsProvider definitionsProvider : definitionsProviders.getDefinitionsProviders()) { +// aggregateDefinitions(definitionsProvider.getSCADefinition(), systemDefinitions); // } -// } catch (SCADefinitionsProviderException e) { +// } catch (DefinitionsProviderException e) { // throw new IllegalStateException(e); // } // @@ -354,7 +344,7 @@ public class NodeImpl implements Node, Client { // // // Now that all system sca definitions have been read, let's resolve them // URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); -// URLArtifactProcessor<SCADefinitions> definitionsProcessor = documentProcessors.getProcessor(SCADefinitions.class); +// URLArtifactProcessor<Definitions> definitionsProcessor = documentProcessors.getProcessor(Definitions.class); // try { // definitionsProcessor.resolve(systemDefinitions, definitionsResolver); // } catch (ContributionResolveException e) { @@ -437,10 +427,10 @@ public class NodeImpl implements Node, Client { } // Build an aggregated SCA definitions model - SCADefinitions definitions = systemDefinitions; - //definitions = new SCADefinitionsImpl(); - //for (SCADefinitions definition : ((List<SCADefinitions>)policyDefinitions)) { - // SCADefinitionsUtil.aggregateSCADefinitions(definition, definitions); + Definitions definitions = systemDefinitions; + //definitions = new DefinitionsImpl(); + //for (Definitions definition : ((List<Definitions>)policyDefinitions)) { + // DefinitionsUtil.aggregateDefinitions(definition, definitions); //} // Build the composite and wire the components included in it diff --git a/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/LoggingPolicyDefinitionsProvider.java b/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/LoggingPolicyDefinitionsProvider.java index 4220caab80..836631541d 100644 --- a/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/LoggingPolicyDefinitionsProvider.java +++ b/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/LoggingPolicyDefinitionsProvider.java @@ -27,25 +27,25 @@ import java.security.PrivilegedAction; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.definitions.SCADefinitions; -import org.apache.tuscany.sca.provider.SCADefinitionsProvider; -import org.apache.tuscany.sca.provider.SCADefinitionsProviderException; +import org.apache.tuscany.sca.definitions.Definitions; +import org.apache.tuscany.sca.provider.DefinitionsProvider; +import org.apache.tuscany.sca.provider.DefinitionsProviderException; /** * Provider for Policy Intents and PolicySet definitions related to security * * @version $Rev$ $Date$ */ -public class LoggingPolicyDefinitionsProvider implements SCADefinitionsProvider { +public class LoggingPolicyDefinitionsProvider implements DefinitionsProvider { private String definitionsFile = "org/apache/tuscany/sca/policy/logging/definitions.xml"; URLArtifactProcessor urlArtifactProcessor = null; public LoggingPolicyDefinitionsProvider(ExtensionPointRegistry registry) { URLArtifactProcessorExtensionPoint documentProcessors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - urlArtifactProcessor = (URLArtifactProcessor)documentProcessors.getProcessor(SCADefinitions.class); + urlArtifactProcessor = (URLArtifactProcessor)documentProcessors.getProcessor(Definitions.class); } - public SCADefinitions getSCADefinition() throws SCADefinitionsProviderException { + public Definitions getDefinitions() throws DefinitionsProviderException { // Allow privileged access to load resource. Requires RuntimePermssion in security policy. URL definitionsFileUrl = AccessController.doPrivileged(new PrivilegedAction<URL>() { public URL run() { @@ -56,11 +56,11 @@ public class LoggingPolicyDefinitionsProvider implements SCADefinitionsProvider Object scaDefn = null; try { URI uri = new URI(definitionsFile); - return (SCADefinitions)urlArtifactProcessor.read(null, + return (Definitions)urlArtifactProcessor.read(null, uri, definitionsFileUrl); } catch ( Exception e ) { - throw new SCADefinitionsProviderException(e); + throw new DefinitionsProviderException(e); } } diff --git a/branches/sca-equinox/modules/policy-logging/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider b/branches/sca-equinox/modules/policy-logging/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProvider index ec40cb7dc5..ec40cb7dc5 100644 --- a/branches/sca-equinox/modules/policy-logging/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider +++ b/branches/sca-equinox/modules/policy-logging/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProvider diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/SecurityPolicyDefinitionsProvider.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/SecurityPolicyDefinitionsProvider.java index cfe856e0f2..b58b9bb874 100644 --- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/SecurityPolicyDefinitionsProvider.java +++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/SecurityPolicyDefinitionsProvider.java @@ -27,29 +27,29 @@ import java.security.PrivilegedAction; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.definitions.SCADefinitions; -import org.apache.tuscany.sca.definitions.util.SCADefinitionsUtil; -import org.apache.tuscany.sca.provider.SCADefinitionsProvider; -import org.apache.tuscany.sca.provider.SCADefinitionsProviderException; +import org.apache.tuscany.sca.definitions.Definitions; +import org.apache.tuscany.sca.definitions.util.DefinitionsUtil; +import org.apache.tuscany.sca.provider.DefinitionsProvider; +import org.apache.tuscany.sca.provider.DefinitionsProviderException; /** * Provider for Policy Intents and PolicySet definitions related to security * * @version $Rev$ $Date$ */ -public class SecurityPolicyDefinitionsProvider implements SCADefinitionsProvider { +public class SecurityPolicyDefinitionsProvider implements DefinitionsProvider { private static final String tuscanyDefinitionsFile = "org/apache/tuscany/sca/policy/security/tuscany_definitions.xml"; private String definitionsFile = "org/apache/tuscany/sca/policy/security/definitions.xml"; URLArtifactProcessor urlArtifactProcessor = null; public SecurityPolicyDefinitionsProvider(ExtensionPointRegistry registry) { URLArtifactProcessorExtensionPoint documentProcessors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - urlArtifactProcessor = (URLArtifactProcessor)documentProcessors.getProcessor(SCADefinitions.class); + urlArtifactProcessor = (URLArtifactProcessor)documentProcessors.getProcessor(Definitions.class); } - public SCADefinitions getSCADefinition() throws SCADefinitionsProviderException { - SCADefinitions scaDefns = null; - SCADefinitions tuscanyDefns = null; + public Definitions getDefinitions() throws DefinitionsProviderException { + Definitions scaDefns = null; + Definitions tuscanyDefns = null; try { // Allow privileged access to load resource. Requires RuntimePermssion in security policy. URL definitionsFileUrl = AccessController.doPrivileged(new PrivilegedAction<URL>() { @@ -60,7 +60,7 @@ public class SecurityPolicyDefinitionsProvider implements SCADefinitionsProvider URI uri = new URI(definitionsFile); - scaDefns = (SCADefinitions)urlArtifactProcessor.read(null, + scaDefns = (Definitions)urlArtifactProcessor.read(null, uri, definitionsFileUrl); @@ -71,15 +71,15 @@ public class SecurityPolicyDefinitionsProvider implements SCADefinitionsProvider }); uri = new URI(definitionsFile); - tuscanyDefns = (SCADefinitions)urlArtifactProcessor.read(null, + tuscanyDefns = (Definitions)urlArtifactProcessor.read(null, uri, definitionsFileUrl); - SCADefinitionsUtil.aggregateSCADefinitions(tuscanyDefns, scaDefns); + DefinitionsUtil.aggregate(tuscanyDefns, scaDefns); return scaDefns; } catch ( Exception e ) { - throw new SCADefinitionsProviderException(e); + throw new DefinitionsProviderException(e); } } diff --git a/branches/sca-equinox/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider b/branches/sca-equinox/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProvider index 790424df6b..790424df6b 100644 --- a/branches/sca-equinox/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider +++ b/branches/sca-equinox/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProvider diff --git a/branches/sca-equinox/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyDefinitionsProvider.java b/branches/sca-equinox/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyDefinitionsProvider.java index 7b10a7d568..0dfa986177 100644 --- a/branches/sca-equinox/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyDefinitionsProvider.java +++ b/branches/sca-equinox/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyDefinitionsProvider.java @@ -25,17 +25,17 @@ import java.net.URL; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.definitions.SCADefinitions; -import org.apache.tuscany.sca.definitions.util.SCADefinitionsUtil; -import org.apache.tuscany.sca.provider.SCADefinitionsProvider; -import org.apache.tuscany.sca.provider.SCADefinitionsProviderException; +import org.apache.tuscany.sca.definitions.Definitions; +import org.apache.tuscany.sca.definitions.util.DefinitionsUtil; +import org.apache.tuscany.sca.provider.DefinitionsProvider; +import org.apache.tuscany.sca.provider.DefinitionsProviderException; /** * Provider for Policy Intents and PolicySet definitions related to transaction * * @version $Rev$ $Date$ */ -public class TransactionPolicyDefinitionsProvider implements SCADefinitionsProvider { +public class TransactionPolicyDefinitionsProvider implements DefinitionsProvider { private static final String scaDefinitionsFile = "definitions.xml"; private static final String tuscanyDefinitionsFile = "tuscany_definitions.xml"; private URLArtifactProcessor urlArtifactProcessor; @@ -43,28 +43,28 @@ public class TransactionPolicyDefinitionsProvider implements SCADefinitionsProvi public TransactionPolicyDefinitionsProvider(ExtensionPointRegistry registry) { URLArtifactProcessorExtensionPoint documentProcessors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - urlArtifactProcessor = (URLArtifactProcessor)documentProcessors.getProcessor(SCADefinitions.class); + urlArtifactProcessor = (URLArtifactProcessor)documentProcessors.getProcessor(Definitions.class); } - public SCADefinitions getSCADefinition() throws SCADefinitionsProviderException { + public Definitions getDefinitions() throws DefinitionsProviderException { try { - SCADefinitions scaTransactionPolicyDefns = null; - SCADefinitions tuscanyTransactionPolicyDefns = null; + Definitions scaTransactionPolicyDefns = null; + Definitions tuscanyTransactionPolicyDefns = null; URI uri = new URI(scaDefinitionsFile); URL defintionsFileUrl = getClass().getResource(scaDefinitionsFile); - scaTransactionPolicyDefns = (SCADefinitions)urlArtifactProcessor.read(null, uri, defintionsFileUrl); + scaTransactionPolicyDefns = (Definitions)urlArtifactProcessor.read(null, uri, defintionsFileUrl); uri = new URI(tuscanyDefinitionsFile); defintionsFileUrl = getClass().getResource(tuscanyDefinitionsFile); - tuscanyTransactionPolicyDefns = (SCADefinitions)urlArtifactProcessor.read(null, uri, defintionsFileUrl); + tuscanyTransactionPolicyDefns = (Definitions)urlArtifactProcessor.read(null, uri, defintionsFileUrl); - SCADefinitionsUtil.aggregateSCADefinitions(tuscanyTransactionPolicyDefns, scaTransactionPolicyDefns); + DefinitionsUtil.aggregate(tuscanyTransactionPolicyDefns, scaTransactionPolicyDefns); return scaTransactionPolicyDefns; } catch (Exception e) { - throw new SCADefinitionsProviderException(e); + throw new DefinitionsProviderException(e); } } diff --git a/branches/sca-equinox/modules/policy-transaction/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider b/branches/sca-equinox/modules/policy-transaction/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProvider index e9d9fab519..e9d9fab519 100644 --- a/branches/sca-equinox/modules/policy-transaction/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider +++ b/branches/sca-equinox/modules/policy-transaction/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProvider diff --git a/branches/sca-equinox/samples/databinding-echo/src/main/java/dbecho/Echo.java b/branches/sca-equinox/samples/databinding-echo/src/main/java/dbecho/Echo.java index 25ecc90454..73da41b55e 100644 --- a/branches/sca-equinox/samples/databinding-echo/src/main/java/dbecho/Echo.java +++ b/branches/sca-equinox/samples/databinding-echo/src/main/java/dbecho/Echo.java @@ -18,15 +18,15 @@ */ package dbecho; -import org.apache.tuscany.sca.databinding.annotation.DataBinding; +import org.apache.tuscany.sca.databinding.annotation.DataType; import org.osoa.sca.annotations.Remotable; /** * @version $Rev$ $Date$ */ -@DataBinding("org.w3c.dom.Node") @Remotable public interface Echo { - Object echo(Object msg); + @DataType("org.w3c.dom.Node") + Object echo(@DataType("org.w3c.dom.Node") Object msg); } diff --git a/branches/sca-equinox/samples/databinding-echo/src/main/java/dbecho/Interface1.java b/branches/sca-equinox/samples/databinding-echo/src/main/java/dbecho/Interface1.java index 70b450e358..81d3581f85 100644 --- a/branches/sca-equinox/samples/databinding-echo/src/main/java/dbecho/Interface1.java +++ b/branches/sca-equinox/samples/databinding-echo/src/main/java/dbecho/Interface1.java @@ -18,15 +18,17 @@ */ package dbecho; -import org.apache.tuscany.sca.databinding.annotation.DataBinding; +import org.apache.tuscany.sca.databinding.annotation.DataType; import org.osoa.sca.annotations.Remotable; /** * @version $Rev$ $Date$ */ -@DataBinding("java.lang.String") @Remotable public interface Interface1 { - String call(String msg); - String call1(String msg); + @DataType("java.lang.String") + String call(@DataType("java.lang.String") String msg); + + @DataType("java.lang.String") + String call1(@DataType("java.lang.String") String msg); } diff --git a/branches/sca-equinox/samples/databinding-echo/src/main/java/dbecho/Interface2.java b/branches/sca-equinox/samples/databinding-echo/src/main/java/dbecho/Interface2.java index b62f1f425d..543d51cb95 100644 --- a/branches/sca-equinox/samples/databinding-echo/src/main/java/dbecho/Interface2.java +++ b/branches/sca-equinox/samples/databinding-echo/src/main/java/dbecho/Interface2.java @@ -20,17 +20,14 @@ package dbecho; import javax.xml.stream.XMLStreamReader; -import org.apache.tuscany.sca.databinding.annotation.DataBinding; import org.osoa.sca.annotations.Remotable; import org.w3c.dom.Node; /** * @version $Rev$ $Date$ */ -@DataBinding("org.w3c.dom.Node") @Remotable public interface Interface2 { Node call(Node msg); - @DataBinding("javax.xml.stream.XMLStreamReader") XMLStreamReader call1(XMLStreamReader msg); } |