From 98b9c9677994d63c3bddbcfeea0c2ed6a6fea075 Mon Sep 17 00:00:00 2001 From: slaws Date: Thu, 27 Aug 2009 17:58:54 +0000 Subject: backing up a few minor changes. This version of the builders not in use. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@808555 13f79535-47bb-0310-9956-ffa450edef68 --- .../assembly/builder/impl/ComponentBuilderImpl.java | 21 +++++++++++++-------- .../builder/impl/ComponentTypeBuilderImpl.java | 15 ++++++++++++--- .../sca/assembly/builder/impl/ModelBuilderImpl.java | 13 +++++++++---- 3 files changed, 34 insertions(+), 15 deletions(-) (limited to 'java/sca/modules') diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentBuilderImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentBuilderImpl.java index 2e6f3075ba..23493599bc 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentBuilderImpl.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentBuilderImpl.java @@ -55,11 +55,11 @@ import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.MonitorFactory; import org.apache.tuscany.sca.policy.ExtensionType; +import org.apache.tuscany.sca.policy.Intent; import org.apache.tuscany.sca.policy.PolicyFactory; import org.apache.tuscany.sca.policy.PolicySubject; /** - * * @version $Rev$ $Date$ */ public class ComponentBuilderImpl { @@ -115,7 +115,7 @@ public class ComponentBuilderImpl { // properties //configureProperties(component); - + } /** @@ -162,11 +162,16 @@ public class ComponentBuilderImpl { componentService); - - // need to propagate - // intents - // policy sets - // based on OASIS rules + // intents - done in CompositePolicyBuilder + // discuss with RF + //calculateIntents(componentService, + // componentTypeService); + + // policy sets - done in CompositePolicyBuilder + // discuss with RF + // calculatePolicySets(componentService, + // componentTypeService); + } } @@ -352,7 +357,7 @@ public class ComponentBuilderImpl { } // end if service.setCallbackReference(callbackReference); } - } + } /** * Create a default SCA binding in the case that no binding diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentTypeBuilderImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentTypeBuilderImpl.java index cd63b5a288..6750643c6f 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentTypeBuilderImpl.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentTypeBuilderImpl.java @@ -112,6 +112,8 @@ public class ComponentTypeBuilderImpl { component.getName()); } + /* process structural hierarchy + * replace by structuralParent links and associated processing // Push down the autowire flag from the composite to components if (component.getAutowire() == null) { component.setAutowire(composite.getAutowire()); @@ -120,6 +122,8 @@ public class ComponentTypeBuilderImpl { // what else needs pushing down? // intents // policySets + + */ // configure the component from its component type componentBuilder.configureComponentFromComponentType(component); @@ -144,6 +148,9 @@ public class ComponentTypeBuilderImpl { // properties //calculateProperties(composite); + // autowire + //calculateAutowire(composite); + } /** @@ -210,7 +217,7 @@ public class ComponentTypeBuilderImpl { Map components, Map componentServices){ - // Connect this component types services to the + // Connect this component type's services to the // services from child components which it promotes connectPromotedServices(componentType, components, @@ -230,8 +237,10 @@ public class ComponentTypeBuilderImpl { calculatePromotedBindings(compositeService, promotedComponentService); // promote intents + // calculatePromotedIntents(compositeService, promotedComponentService); // promote policy sets + // calculatePromotedPolicySets(compositeService, promotedComponentService); } @@ -292,7 +301,7 @@ public class ComponentTypeBuilderImpl { } /** - * OASIS RULE: Interface contract from higher in the hierarchy takes precedence + * OASIS RULE: Interface contracts from higher in the implementation hierarchy takes precedence * * @param compositeService * @param promotedComponentService @@ -322,7 +331,7 @@ public class ComponentTypeBuilderImpl { } /** - * OASIS RULE: Bindings from higher in the hierarchy take precedence + * OASIS RULE: Bindings from higher in the implementation hierarchy take precedence * * @param compositeService * @param promotedComponentService diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ModelBuilderImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ModelBuilderImpl.java index 819b953ab6..f59dc3dae9 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ModelBuilderImpl.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ModelBuilderImpl.java @@ -136,22 +136,27 @@ public class ModelBuilderImpl implements CompositeBuilder, CompositeBuilderTmp { // Expand nested composites. Clone any composite model that // is acting as a component implementation and connects the cloned // model to the component implementation in question - // TODO - could this be deferred to after the static pass through - // the model is complete compositeCloneBuilder.build(composite, definitions, monitor); - // create the static model by calculating the component type for the - // top level implementation (composite). This has the effect of + // Process the implementation hierarchy by calculating the component type + // for the top level implementation (composite). This has the effect of // recursively calculating component types and configuring the // components that depend on them componentTypeBuilder.createComponentType(composite); + // create the runtime model by updating the static model we have just // created. This involves things like creating // component URIs // binding URIs + // callback references + // callback services // Endpoints // Endoint References + // runtimeBuilder.build(composite); + + // Compute the policies across the model hierarchy + //compositePolicyBuilder.build(composite, definitions, monitor); -- cgit v1.2.3