tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svkr...@apache.org
Subject svn commit: r620307 [1/2] - in /incubator/tuscany/java/sca/modules: assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ assembly/src/main/java/org/apache/tuscany/sca/assembly/b...
Date Sun, 10 Feb 2008 18:56:55 GMT
Author: svkrish
Date: Sun Feb 10 10:56:51 2008
New Revision: 620307

URL: http://svn.apache.org/viewvc?rev=620307&view=rev
Log:
added code for first reading the composites and adding a 'applicablePolicySets' attribute to sca artifacts for which policysets defined in the domain apply, after this adding read the composite model thro the StaxProcessor, then as usual resolve the policysets specified in the applicablePolicySets attribute.  When policysets are computed, they are validated against this list of applicablePolicySets

Modified:
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/Constants.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/PolicyAttachPointProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BindingPolicyComputer.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ImplementationPolicyComputer.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PolicyComputer.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConfiguredOperationImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/PropertyImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ServiceImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/WireImpl.java
    incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/impl/AtomBindingImpl.java
    incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/impl/RSSBindingImpl.java
    incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/SCABindingImpl.java
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiService.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleService.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURI.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURI.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthentication.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentiality.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrity.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixed.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthentication.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentiality.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrity.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite
    incubator/tuscany/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java
    incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/sca/core/spring/assembly/impl/BeanComponentImpl.java
    incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java
    incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/ReadTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/resources/org/apache/tuscany/sca/implementation/java/xml/definitions_with_policysets.xml
    incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
    incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/PolicySetAttachPoint.java
    incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/util/PolicyValidationUtils.java

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java Sun Feb 10 10:56:51 2008
@@ -284,16 +284,19 @@
             //child binding elements
             resolveIntents(contract.getRequiredIntents(), resolver);
             resolvePolicySets(contract.getPolicySets(), resolver);
+            resolvePolicySets(contract.getApplicablePolicySets(), resolver);
             
             //inherit the composite / component level policy intents and policysets
             if ( parent != null && parent instanceof PolicySetAttachPoint )  {
                 addInheritedIntents(((PolicySetAttachPoint)parent).getRequiredIntents(), contract.getRequiredIntents());
                 addInheritedPolicySets(((PolicySetAttachPoint)parent).getPolicySets(), contract.getPolicySets());
+                addInheritedPolicySets(((PolicySetAttachPoint)parent).getApplicablePolicySets(), contract.getApplicablePolicySets());
             }
             
             for ( ConfiguredOperation confOp : contract.getConfiguredOperations() ) {
                 resolveIntents(confOp.getRequiredIntents(), resolver);
                 resolvePolicySets(confOp.getPolicySets(), resolver);
+                resolvePolicySets(confOp.getApplicablePolicySets(), resolver);
             }
                             
             // Resolve the interface contract
@@ -314,6 +317,7 @@
                     PolicySetAttachPoint policiedBinding = (PolicySetAttachPoint)binding;
                     resolvePolicySets(policiedBinding.getPolicySets(), resolver);
                     //validate if attached policysets apply to the binding
+                    resolvePolicySets(policiedBinding.getApplicablePolicySets(), resolver);
                     validatePolicySets(contract, policiedBinding);
                 }
                 if (binding instanceof OperationsConfigurator) {
@@ -321,6 +325,7 @@
                     for (ConfiguredOperation confOp : opConfigurator.getConfiguredOperations()) {
                         resolveIntents(confOp.getRequiredIntents(), resolver);
                         resolvePolicySets(confOp.getPolicySets(), resolver);
+                        resolvePolicySets(confOp.getApplicablePolicySets(), resolver);
                     }
                 }
             }
@@ -329,9 +334,11 @@
             if (contract.getCallback() != null) {
                 resolveIntents(contract.getCallback().getRequiredIntents(), resolver);
                 resolvePolicySets(contract.getCallback().getPolicySets(), resolver);
+                resolvePolicySets(contract.getCallback().getApplicablePolicySets(), resolver);
                 //inherit the contract's policy intents and policysets
                 addInheritedIntents(contract.getRequiredIntents(), contract.getCallback().getRequiredIntents());
                 addInheritedPolicySets(contract.getPolicySets(), contract.getCallback().getPolicySets());
+                addInheritedPolicySets(contract.getApplicablePolicySets(), contract.getCallback().getApplicablePolicySets());
                 
                 for (int i = 0, n = contract.getCallback().getBindings().size(); i < n; i++) {
                     Binding binding = contract.getCallback().getBindings().get(i);
@@ -344,6 +351,7 @@
                     if (binding instanceof PolicySetAttachPoint) {
                         PolicySetAttachPoint policiedBinding = (PolicySetAttachPoint)binding;
                         resolvePolicySets(policiedBinding.getPolicySets(), resolver);
+                        resolvePolicySets(policiedBinding.getApplicablePolicySets(), resolver);
                         validatePolicySets(contract.getCallback(), policiedBinding);
                     }
                     if (binding instanceof OperationsConfigurator) {
@@ -351,6 +359,7 @@
                         for (ConfiguredOperation confOp : opConfigurator.getConfiguredOperations()) {
                             resolveIntents(confOp.getRequiredIntents(), resolver);
                             resolvePolicySets(confOp.getPolicySets(), resolver);
+                            resolvePolicySets(confOp.getApplicablePolicySets(), resolver);
                         }
                     }
                 }
@@ -667,7 +676,26 @@
     }
     
     protected void validatePolicySets(Base parent, PolicySetAttachPoint policySetAttachPoint) throws ContributionResolveException {
-        String appliesTo = null;
+        //Since the applicablePolicySets in a policySetAttachPoint will already have the 
+        //list of policysets that might ever be applicable to this attachPoint, just check
+        //if the defined policysets feature in the list of applicable policysets
+        IntentAttachPointType attachPointType = policySetAttachPoint.getType();
+        for ( PolicySet definedPolicySet : policySetAttachPoint.getPolicySets() ) {
+            if ( !definedPolicySet.isUnresolved() ) {
+                if ( !policySetAttachPoint.getApplicablePolicySets().contains(definedPolicySet)) {
+                    throw new ContributionResolveException("Policy Set '" + definedPolicySet.getName()
+                                                           + "' does not apply to binding type  "
+                                                           + attachPointType.getName());
+                }
+            } else {
+                throw new ContributionResolveException("Policy Set '" + definedPolicySet.getName()
+                                                       + "' is not defined in this domain  ");
+                                                
+            
+            }
+        }
+        
+        /*String appliesTo = null;
         IntentAttachPointType attachPointType = policySetAttachPoint.getType();
         String scdlFragment = ""; //need to write the 'parent' as scdl xml string
         
@@ -688,8 +716,6 @@
                     
                 }
             }
-        }
+        }*/
     }
-
-
 }

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java Sun Feb 10 10:56:51 2008
@@ -749,14 +749,18 @@
         //to child elements as and when the child elements are being resolved
         List<Intent> compositeIntents = null;
         List<PolicySet> compositePolicySets = null;
+        List<PolicySet> compositeApplicablePolicySets = null;
         if (composite instanceof PolicySetAttachPoint) { 
             resolveIntents(((PolicySetAttachPoint)composite).getRequiredIntents(), resolver);
             resolvePolicySets(((PolicySetAttachPoint)composite).getPolicySets(), resolver);
+            resolvePolicySets(((PolicySetAttachPoint)composite).getApplicablePolicySets(), resolver);
             compositeIntents = ((PolicySetAttachPoint)composite).getRequiredIntents();
             compositePolicySets = ((PolicySetAttachPoint)composite).getPolicySets();
+            compositeApplicablePolicySets = ((PolicySetAttachPoint)composite).getApplicablePolicySets();
         } else {
             compositeIntents = new ArrayList<Intent>();
             compositePolicySets = new ArrayList<PolicySet>();
+            compositeApplicablePolicySets = new ArrayList<PolicySet>();
         }
         
         //Resolve composite services and references
@@ -775,10 +779,12 @@
             //to child elements as and when the child elements are being resolved
             resolveIntents(component.getRequiredIntents(), resolver);
             resolvePolicySets(component.getPolicySets(), resolver);
+            resolvePolicySets(component.getApplicablePolicySets(), resolver);
             
             //inherit composite intents and policysets
             addInheritedIntents(compositeIntents, component.getRequiredIntents());
             addInheritedPolicySets(compositePolicySets, component.getPolicySets());
+            addInheritedPolicySets(compositeApplicablePolicySets, component.getApplicablePolicySets());
 
             //resolve component services and references 
             resolveContracts(component, component.getServices(), resolver);
@@ -821,11 +827,13 @@
         if (implementation instanceof PolicySetAttachPoint) {
             resolveIntents(((PolicySetAttachPoint)implementation).getRequiredIntents(), resolver);
             resolvePolicySets(((PolicySetAttachPoint)implementation).getPolicySets(), resolver);
+            resolvePolicySets(((PolicySetAttachPoint)implementation).getApplicablePolicySets(), resolver);
             validatePolicySets(component, (PolicySetAttachPoint)implementation);
             //add implementation policies into component... since implementation instance are 
             //reused and its likely that this implementation instance will not hold after its resolution
             component.getRequiredIntents().addAll(((PolicySetAttachPoint)implementation).getRequiredIntents());
             component.getPolicySets().addAll(((PolicySetAttachPoint)implementation).getPolicySets());
+            component.getApplicablePolicySets().addAll(((PolicySetAttachPoint)implementation).getApplicablePolicySets());
             if ( implementation instanceof OperationsConfigurator ) {
                 boolean notFound;
                 List<ConfiguredOperation> opsFromImplementation = new ArrayList<ConfiguredOperation>();
@@ -833,11 +841,13 @@
                     notFound = true;
                     resolveIntents(implConfOp.getRequiredIntents(), resolver);
                     resolvePolicySets(implConfOp.getPolicySets(), resolver);
+                    resolvePolicySets(implConfOp.getApplicablePolicySets(), resolver);
                     for ( ConfiguredOperation compConfOp : ((OperationsConfigurator)component).getConfiguredOperations() ) {
                         if ( implConfOp.getName().equals(compConfOp.getName()) ) {
                             notFound = false;
                             addInheritedIntents(implConfOp.getRequiredIntents(), compConfOp.getRequiredIntents());
                             addInheritedPolicySets(implConfOp.getPolicySets(), compConfOp.getPolicySets());
+                            addInheritedPolicySets(implConfOp.getApplicablePolicySets(), compConfOp.getApplicablePolicySets());
                             notFound = false;
                         }
                     }
@@ -850,6 +860,8 @@
             }
             ((PolicySetAttachPoint)implementation).getRequiredIntents().clear();
             ((PolicySetAttachPoint)implementation).getPolicySets().clear();
+            ((PolicySetAttachPoint)implementation).getApplicablePolicySets().clear();
+            
         }
     }
     

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/Constants.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/Constants.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/Constants.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/Constants.java Sun Feb 10 10:56:51 2008
@@ -75,7 +75,8 @@
     String LOCAL = "local";
     String AUTOWIRE = "autowire";
     String REQUIRES = "requires";
-    String POLICY_SETS = "policySets";    
+    String POLICY_SETS = "policySets"; 
+    String APPLICABLE_POLICY_SETS = "applicablePolicySets";
     String PROMOTE = "promote";
     String TARGET = "target";
     String WIRED_BY_IMPL = "wiredByImpl";

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/PolicyAttachPointProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/PolicyAttachPointProcessor.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/PolicyAttachPointProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/PolicyAttachPointProcessor.java Sun Feb 10 10:56:51 2008
@@ -120,6 +120,22 @@
                 policySets.add(policySet);
             }
         }
+        
+        value = reader.getAttributeValue(SCA10_TUSCANY_NS, APPLICABLE_POLICY_SETS);
+        if (value != null) {
+            List<PolicySet> applicablePolicySets = policySetAttachPoint.getApplicablePolicySets();
+            for (StringTokenizer tokens = new StringTokenizer(value); tokens.hasMoreTokens();) {
+                QName qname = getQNameValue(reader, tokens.nextToken());
+                PolicySet policySet = policyFactory.createPolicySet();
+                policySet.setName(qname);
+                if (operation != null) {
+                    //FIXME Don't we need to handle policySet specification
+                    // on an operation basis?
+                    //policySet.getOperations().add(operation);
+                }
+                applicablePolicySets.add(policySet);
+            }
+        }
     }
     
     /**

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.java Sun Feb 10 10:56:51 2008
@@ -53,6 +53,7 @@
     List<PolicySet> policySets = new ArrayList<PolicySet>();
     IntentAttachPointType bindingType = new TestSCABindingType();
     List<ConfiguredOperation>  configuredOperations = new ArrayList<ConfiguredOperation>();
+    private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
 
     /**
      * Constructs a new SCA binding.
@@ -204,5 +205,9 @@
 
     public void setConfiguredOperations(List<ConfiguredOperation> configuredOperations) {
         this.configuredOperations = configuredOperations;
+    }
+
+    public List<PolicySet> getApplicablePolicySets() {
+        return applicablePolicySets;
     }
 }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BindingPolicyComputer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BindingPolicyComputer.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BindingPolicyComputer.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BindingPolicyComputer.java Sun Feb 10 10:56:51 2008
@@ -48,7 +48,7 @@
     
     public void computeBindingIntentsAndPolicySets(Contract contract)  throws PolicyValidationException {
         computeIntents(contract.getBindings(), contract.getRequiredIntents());
-        computePolicySets(contract, contract.getBindings(), contract.getPolicySets());
+        computePolicySets(contract.getApplicablePolicySets(), contract.getBindings(), contract.getPolicySets());
         
         for ( Binding binding : contract.getBindings() ) {
             if ( binding instanceof IntentAttachPoint ) {
@@ -56,14 +56,15 @@
             }
             
             if ( binding instanceof PolicySetAttachPoint ) {
-                computePolicySetsForOperations(contract, (PolicySetAttachPoint)binding);
+                computePolicySetsForOperations(((PolicySetAttachPoint)binding).getApplicablePolicySets(), 
+                                               (PolicySetAttachPoint)binding);
             }
         }
         
         if ( contract.getCallback() != null ) {
             computeIntents(contract.getCallback().getBindings(), 
                            contract.getCallback().getRequiredIntents());
-            computePolicySets(contract, 
+            computePolicySets(contract.getApplicablePolicySets(), 
                               contract.getCallback().getBindings(), 
                               contract.getCallback().getPolicySets());
         }
@@ -88,19 +89,18 @@
         }
     }
     
-    private void computePolicySets(Base parent,
+    private void computePolicySets(List<PolicySet> applicablePolicySets,
                                    List<Binding> bindings,
                                    List<PolicySet> inheritedPolicySets) throws PolicyValidationException {
         for (Binding binding : bindings) {
             if ( binding instanceof PolicySetAttachPoint ) {
                 PolicySetAttachPoint policiedBinding = (PolicySetAttachPoint)binding;
                 
-                List<PolicySet> prunedPolicySets = computeInheritablePolicySets(parent, 
-                                                                                policiedBinding.getType(), 
+                List<PolicySet> prunedPolicySets = computeInheritablePolicySets(policiedBinding,
                                                                                 inheritedPolicySets);
                 policiedBinding.getPolicySets().addAll(prunedPolicySets);
                 computePolicySets(policiedBinding);
-                computePolicySetsForOperations(parent, policiedBinding);
+                computePolicySetsForOperations(applicablePolicySets, policiedBinding);
 
             }
         }
@@ -113,6 +113,8 @@
                 PolicySetAttachPoint policiedBinding = (PolicySetAttachPoint)aBinding;
                 IntentAttachPointType bindingType = policiedBinding.getType();
 
+                
+                intentsCopy = new ArrayList<Intent>(policiedBinding.getRequiredIntents());
                 // add the target component's intents to the reference binding
                 if (target != null) {
                     for (Intent intent : target.getRequiredIntents()) {
@@ -136,7 +138,7 @@
                     OperationsConfigurator opConfigurator = (OperationsConfigurator)aBinding;
                     
                     for ( ConfiguredOperation confOp : opConfigurator.getConfiguredOperations() ) {
-                        intentsCopy = new ArrayList<Intent>(confOp.getRequiredIntents());
+                        List<Intent> opsIntentsCopy = new ArrayList<Intent>(confOp.getRequiredIntents());
                         
                         trimInherentlyProvidedIntents(policiedBinding.getType(), 
                                                       confOp.getRequiredIntents());
@@ -144,7 +146,7 @@
                         trimProvidedIntents(confOp.getRequiredIntents(), policiedBinding.getPolicySets());
                         
                         if (domainPolicySets != null) {
-                            determineApplicableDomainPolicySets(aBinding, 
+                            determineApplicableDomainPolicySets(policiedBinding.getApplicablePolicySets(), 
                                                                 confOp,
                                                                 policiedBinding.getType());
         
@@ -158,12 +160,11 @@
                         //the intents list could have been trimmed when matching for policysets
                         //since the bindings may need the original set of intents we copy that back
                         confOp.getRequiredIntents().clear();
-                        confOp.getRequiredIntents().addAll(intentsCopy);
+                        confOp.getRequiredIntents().addAll(opsIntentsCopy);
                         
                     }
                 }
 
-                intentsCopy = new ArrayList<Intent>(policiedBinding.getRequiredIntents());
                 trimInherentlyProvidedIntents(policiedBinding.getType(), 
                                               policiedBinding.getRequiredIntents());
                 trimProvidedIntents(policiedBinding.getRequiredIntents(), policiedBinding
@@ -190,7 +191,7 @@
                                                      PolicySetAttachPoint policiedBinding) 
                                                             throws PolicyComputationException {
         if ( domainPolicySets != null) {
-            determineApplicableDomainPolicySets(contract, 
+            determineApplicableDomainPolicySets(policiedBinding.getApplicablePolicySets(), 
                                                 policiedBinding,
                                                 policiedBinding.getType());
             

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ImplementationPolicyComputer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ImplementationPolicyComputer.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ImplementationPolicyComputer.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ImplementationPolicyComputer.java Sun Feb 10 10:56:51 2008
@@ -60,13 +60,12 @@
                                         parent.getRequiredIntents());
             
             
-            List<PolicySet> prunedPolicySets = computeInheritablePolicySets(parent, 
-                                                                            policiedImplementation.getType(), 
+            List<PolicySet> prunedPolicySets = computeInheritablePolicySets(policiedImplementation, 
                                                                             parent.getPolicySets());
             parent.getPolicySets().clear();
             parent.getPolicySets().addAll(prunedPolicySets);
             computePolicySets(parent);
-            computePolicySetsForOperations(parent, 
+            computePolicySetsForOperations(parent.getApplicablePolicySets(), 
                                            (OperationsConfigurator)parent, 
                                            (PolicySetAttachPoint)implementation);
             
@@ -92,7 +91,7 @@
                     trimProvidedIntents(confOp.getRequiredIntents(), component.getPolicySets());
                     
                     if (domainPolicySets != null) {
-                        determineApplicableDomainPolicySets(component.getImplementation(), 
+                        determineApplicableDomainPolicySets(component.getApplicablePolicySets(), 
                                                             confOp,
                                                             policiedImplementation.getType());
     
@@ -120,7 +119,7 @@
             //TODO: resolved to domain policy registry and attach suitable policy sets to the implementation
             //...for now using the SCA Definitions instead of registry
             if ( domainPolicySets != null)  {
-                determineApplicableDomainPolicySets(component, 
+                determineApplicableDomainPolicySets(component.getApplicablePolicySets(), 
                                                     component,
                                                     policiedImplementation.getType());
                                                     

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PolicyComputer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PolicyComputer.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PolicyComputer.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PolicyComputer.java Sun Feb 10 10:56:51 2008
@@ -167,7 +167,7 @@
         }
     }
     
-    protected List<PolicySet> computeInheritablePolicySets(Base parent,
+    /*protected List<PolicySet> computeInheritablePolicySets(Base parent,
                                                            IntentAttachPointType attachPointType,
                                                            List<PolicySet> inheritablePolicySets) 
                                                                throws PolicyValidationException {
@@ -188,6 +188,24 @@
                 
         }
         return validInheritablePolicySets;
+    }*/
+    
+    protected List<PolicySet> computeInheritablePolicySets(PolicySetAttachPoint policySetAttachPoint,
+                                                           List<PolicySet> inheritablePolicySets) 
+                                                               throws PolicyValidationException {
+        List<PolicySet> validInheritablePolicySets = new ArrayList<PolicySet>();
+        for (PolicySet policySet : inheritablePolicySets) {
+            if ( !policySet.isUnresolved() ) { 
+                if ( policySetAttachPoint.getApplicablePolicySets().contains(policySet) ) {
+                    validInheritablePolicySets.add(policySet);
+                }
+            } else {
+                throw new PolicyValidationException("Policy Set '" + policySet.getName()
+                        + "' is not defined in this domain  ");
+            }
+        }
+        
+        return validInheritablePolicySets;
     }
     
     protected void computePolicySets(PolicySetAttachPoint policySetAttachPoint ) {
@@ -206,23 +224,23 @@
         }
     }
     
-    protected void computePolicySetsForOperations(Base parent, 
+    protected void computePolicySetsForOperations(List<PolicySet> applicablePolicySets,
                                                   PolicySetAttachPoint policySetAttachPoint) 
                                                                         throws PolicyValidationException {
         if ( policySetAttachPoint instanceof OperationsConfigurator ) {
-            computePolicySetsForOperations(parent, 
+            computePolicySetsForOperations(applicablePolicySets, 
                                            (OperationsConfigurator)policySetAttachPoint, 
                                            policySetAttachPoint);
         }
         
     }
     
-    protected void computePolicySetsForOperations(Base parent, 
+    protected void computePolicySetsForOperations(List<PolicySet> applicablePolicySets, 
                                                   OperationsConfigurator opConfigurator,
                                                   PolicySetAttachPoint policySetAttachPoint) 
                                                                         throws PolicyValidationException {
-        String appliesTo = null;
-        String scdlFragment = "";
+        //String appliesTo = null;
+        //String scdlFragment = "";
         HashMap<QName, PolicySet> policySetTable = new HashMap<QName, PolicySet>();
         IntentAttachPointType attachPointType = policySetAttachPoint.getType();
         
@@ -230,9 +248,10 @@
             //validate policysets specified for the attachPoint
             for (PolicySet policySet : confOp.getPolicySets()) {
                 if ( !policySet.isUnresolved() ) {
-                    appliesTo = policySet.getAppliesTo();
+                    //appliesTo = policySet.getAppliesTo();
         
-                    if (!PolicyValidationUtils.isPolicySetApplicable(scdlFragment, appliesTo, attachPointType)) {
+                    //if (!PolicyValidationUtils.isPolicySetApplicable(scdlFragment, appliesTo, attachPointType)) {
+                    if (!applicablePolicySets.contains(policySet)) {
                         throw new PolicyValidationException("Policy Set '" + policySet.getName() 
                                 + " specified for operation " + confOp.getName()  
                             + "' does not constrain extension type  "
@@ -268,13 +287,14 @@
         }
     }
     
-    protected void determineApplicableDomainPolicySets(Base parentElement,
+    protected void determineApplicableDomainPolicySets(List<PolicySet> applicablePolicySets,
                                                      PolicySetAttachPoint policySetAttachPoint,
                                                      IntentAttachPointType intentAttachPointType) {
-        String scdlFragment = null; //write parentelement as scdl fragment and store it here
+        //String scdlFragment = null; //write parentelement as scdl fragment and store it here
         if (policySetAttachPoint.getRequiredIntents().size() > 0) {
             for (PolicySet policySet : domainPolicySets) {
-                if (PolicyValidationUtils.isPolicySetApplicable(scdlFragment, policySet.getAppliesTo(), intentAttachPointType)) {
+                //if (PolicyValidationUtils.isPolicySetApplicable(scdlFragment, policySet.getAppliesTo(), intentAttachPointType)) {
+                if ( applicablePolicySets.contains(policySet)) {
                     int prevSize = policySetAttachPoint.getRequiredIntents().size();
                     trimProvidedIntents(policySetAttachPoint.getRequiredIntents(), policySet);
                     // if any intent was trimmed off, then this policyset must
@@ -283,7 +303,7 @@
                         policySetAttachPoint.getPolicySets().add(policySet);
                     }
                 }
-            }
+            } 
         }
     }
     

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java Sun Feb 10 10:56:51 2008
@@ -39,7 +39,7 @@
     private List<Intent> requiredIntents = new ArrayList<Intent>();
     private List<PolicySet> policySets = new ArrayList<PolicySet>();
     private List<ConfiguredOperation>  configuredOperations = new ArrayList<ConfiguredOperation>();
-    
+    private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>(); 
 
     public List<PolicySet> getPolicySets() {
         return policySets;
@@ -73,6 +73,10 @@
     
     public List<ConfiguredOperation> getConfiguredOperations() {
         return configuredOperations;
+    }
+
+    public List<PolicySet> getApplicablePolicySets() {
+        return applicablePolicySets;
     }
 
 }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java Sun Feb 10 10:56:51 2008
@@ -52,6 +52,7 @@
     private Boolean autowire;
     private IntentAttachPointType type;
     private List<ConfiguredOperation>  configuredImplOperations = new ArrayList<ConfiguredOperation>();
+    private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
 
     /**
      * Constructs a new component.
@@ -167,32 +168,9 @@
     public void setConfiguredOperations(List<ConfiguredOperation> configuredOperations) {
         this.configuredImplOperations = configuredOperations;
     }
-
     
-    private class PolicySetAttachPointImpl implements PolicySetAttachPoint {
-        private List<Intent> requiredIntents = new ArrayList<Intent>();
-        private List<PolicySet> policySets = new ArrayList<PolicySet>();
-        
-        public List<PolicySet> getPolicySets() {
-            return policySets;
-        }
-
-        public void setPolicySets(List<PolicySet> policySets) {
-        }
-
-        public List<Intent> getRequiredIntents() {
-            return requiredIntents;
-        }
-
-        public IntentAttachPointType getType() {
-            return null;
-        }
-
-        public void setRequiredIntents(List<Intent> intents) {
-        }
-
-        public void setType(IntentAttachPointType type) {
-        }
+    public List<PolicySet> getApplicablePolicySets() {
+        return applicablePolicySets;
     }
 
 }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java Sun Feb 10 10:56:51 2008
@@ -33,12 +33,13 @@
 import org.apache.tuscany.sca.policy.PolicySet;
 import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
 
-/**
+/** 
  * Represents a component type.
  * 
  * @version $Rev$ $Date$
  */
-public class ComponentTypeImpl extends ExtensibleImpl implements ComponentType, Cloneable, PolicySetAttachPoint, OperationsConfigurator {
+public class ComponentTypeImpl extends ExtensibleImpl implements ComponentType, Cloneable,
+    PolicySetAttachPoint, OperationsConfigurator {
     private String uri;
     private ConstrainingType constrainingType;
     private List<Property> properties = new ArrayList<Property>();
@@ -47,37 +48,38 @@
     private List<Intent> requiredIntents = new ArrayList<Intent>();
     private List<PolicySet> policySets = new ArrayList<PolicySet>();
     private IntentAttachPointType type = null;
-    private List<ConfiguredOperation>  configuredOperations = new ArrayList<ConfiguredOperation>();
-    
+    private List<ConfiguredOperation> configuredOperations = new ArrayList<ConfiguredOperation>();
+    private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
+
     /**
      * Constructs a new component type.
      */
     protected ComponentTypeImpl() {
     }
-    
+
     @Override
     public Object clone() throws CloneNotSupportedException {
         ComponentTypeImpl clone = (ComponentTypeImpl)super.clone();
-        
+
         clone.services = new ArrayList<Service>();
-        for (Service service: getServices()) {
+        for (Service service : getServices()) {
             clone.services.add((Service)service.clone());
         }
         clone.references = new ArrayList<Reference>();
-        for (Reference reference: getReferences()) {
+        for (Reference reference : getReferences()) {
             clone.references.add((Reference)reference.clone());
         }
         clone.properties = new ArrayList<Property>();
-        for (Property property: getProperties()) {
+        for (Property property : getProperties()) {
             clone.properties.add((Property)property.clone());
         }
         return clone;
     }
-    
+
     public String getURI() {
         return uri;
     }
-    
+
     public void setURI(String uri) {
         this.uri = uri;
     }
@@ -109,7 +111,7 @@
     public List<PolicySet> getPolicySets() {
         return policySets;
     }
-    
+
     public IntentAttachPointType getType() {
         return type;
     }
@@ -117,20 +119,20 @@
     public void setType(IntentAttachPointType type) {
         this.type = type;
     }
-    
+
     public void setPolicySets(List<PolicySet> policySets) {
-        this.policySets = policySets; 
+        this.policySets = policySets;
     }
 
     public void setRequiredIntents(List<Intent> intents) {
         this.requiredIntents = intents;
     }
-    
+
     @Override
     public int hashCode() {
         return String.valueOf(getURI()).hashCode();
     }
-    
+
     @Override
     public boolean equals(Object obj) {
         if (obj == this) {
@@ -154,5 +156,9 @@
 
     public void setConfiguredOperations(List<ConfiguredOperation> configuredOperations) {
         this.configuredOperations = configuredOperations;
+    }
+
+    public List<PolicySet> getApplicablePolicySets() {
+        return applicablePolicySets;
     }
 }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConfiguredOperationImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConfiguredOperationImpl.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConfiguredOperationImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConfiguredOperationImpl.java Sun Feb 10 10:56:51 2008
@@ -33,6 +33,7 @@
 public class ConfiguredOperationImpl extends BaseImpl implements ConfiguredOperation {
     private List<PolicySet> policySets = new ArrayList<PolicySet>();
     private List<Intent> requiredIntents = new ArrayList<Intent>();
+    private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
     
     private String name;
     private String contractName;
@@ -81,4 +82,10 @@
 
     public void setType(IntentAttachPointType type) {
     }
+
+    public List<PolicySet> getApplicablePolicySets() {
+        return applicablePolicySets;
+    }
+    
+    
 }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/PropertyImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/PropertyImpl.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/PropertyImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/PropertyImpl.java Sun Feb 10 10:56:51 2008
@@ -32,6 +32,7 @@
  */
 public class PropertyImpl extends AbstractPropertyImpl implements Property, Cloneable {
     private List<PolicySet> policySets = new ArrayList<PolicySet>();
+    private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
     
     /**
      * Constructs a new property.
@@ -50,5 +51,9 @@
     
     public void setPolicySets(List<PolicySet> policySets) {
         this.policySets = policySets; 
+    }
+
+    public List<PolicySet> getApplicablePolicySets() {
+        return applicablePolicySets;
     }
 }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java Sun Feb 10 10:56:51 2008
@@ -39,6 +39,11 @@
     private List<PolicySet> policySets = new ArrayList<PolicySet>();
     private List<ComponentService> targets = new ArrayList<ComponentService>();
     private Callback callback;
+    private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
+
+    public List<PolicySet> getApplicablePolicySets() {
+        return applicablePolicySets;
+    }
 
     /**
      * Constructs a new reference.

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ServiceImpl.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ServiceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ServiceImpl.java Sun Feb 10 10:56:51 2008
@@ -36,7 +36,12 @@
     private List<Binding> bindings = new ArrayList<Binding>();
     private List<PolicySet> policySets = new ArrayList<PolicySet>();
     private Callback callback;
+    private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
     
+    public List<PolicySet> getApplicablePolicySets() {
+        return applicablePolicySets;
+    }
+
     /**
      * Constructs a new service.
      */

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/WireImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/WireImpl.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/WireImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/WireImpl.java Sun Feb 10 10:56:51 2008
@@ -38,6 +38,11 @@
     private ComponentService target;
     private List<Intent> requiredIntents = new ArrayList<Intent>();
     private List<PolicySet> policySets = new ArrayList<PolicySet>();
+    private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
+
+    public List<PolicySet> getApplicablePolicySets() {
+        return applicablePolicySets;
+    }
 
     /**
      * Constructs a new wire.

Modified: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/impl/AtomBindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/impl/AtomBindingImpl.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/impl/AtomBindingImpl.java (original)
+++ incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/impl/AtomBindingImpl.java Sun Feb 10 10:56:51 2008
@@ -42,6 +42,11 @@
     private List<Intent> requiredIntents = new ArrayList<Intent>();
     private List<PolicySet> policySets = new ArrayList<PolicySet>();
     private IntentAttachPointType intentAttachPointType;
+    private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
+
+    public List<PolicySet> getApplicablePolicySets() {
+        return applicablePolicySets;
+    }
 
     public String getName() {
         return name;

Modified: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/impl/RSSBindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/impl/RSSBindingImpl.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/impl/RSSBindingImpl.java (original)
+++ incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/impl/RSSBindingImpl.java Sun Feb 10 10:56:51 2008
@@ -38,6 +38,11 @@
     private List<Intent> requiredIntents = new ArrayList<Intent>();
     private List<PolicySet> policySets = new ArrayList<PolicySet>();
     private IntentAttachPointType intentAttachPointType;
+    private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
+
+    public List<PolicySet> getApplicablePolicySets() {
+        return applicablePolicySets;
+    }
 
     public String getName() {
         return name;

Modified: incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/SCABindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/SCABindingImpl.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/SCABindingImpl.java (original)
+++ incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/SCABindingImpl.java Sun Feb 10 10:56:51 2008
@@ -48,7 +48,12 @@
     private Component targetComponent;
     private ComponentService targetComponentService;
     private Binding targetBinding;
+    private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
     
+    public List<PolicySet> getApplicablePolicySets() {
+        return applicablePolicySets;
+    }
+
     /**
      * Constructs a new SCA binding.
      */

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite Sun Feb 10 10:56:51 2008
@@ -18,7 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="HelloWorld">
 
     <service name="helloWorld" promote="HelloWorldService">

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite Sun Feb 10 10:56:51 2008
@@ -18,6 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="HelloWorldNoWSDL">
 
     <service name="helloWorld" promote="HelloWorldService">

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiService.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiService.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiService.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiService.composite Sun Feb 10 10:56:51 2008
@@ -18,7 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-
+           xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="endpoint1">
            
     <!-- 

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleService.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleService.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleService.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleService.composite Sun Feb 10 10:56:51 2008
@@ -18,7 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="endpoint1">
            
     <!-- 

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURI.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURI.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURI.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURI.composite Sun Feb 10 10:56:51 2008
@@ -18,7 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="endpoint3">
            
     <!-- 

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURI.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURI.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURI.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURI.composite Sun Feb 10 10:56:51 2008
@@ -18,7 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="endpoint4">
            
     <!-- 

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite Sun Feb 10 10:56:51 2008
@@ -18,7 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="HelloWorld">
 
     <service name="helloWorld" promote="HelloWorldService">

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite Sun Feb 10 10:56:51 2008
@@ -18,7 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="HelloWorldOM-Merged">
 
     <service name="helloWorld" promote="HelloWorldMergedService">

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite Sun Feb 10 10:56:51 2008
@@ -18,7 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="HelloWorldOM">
 
     <service name="helloWorld" promote="HelloWorldService">

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthentication.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthentication.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthentication.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthentication.composite Sun Feb 10 10:56:51 2008
@@ -19,6 +19,7 @@
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
 			xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+           xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="endpoint3">
            
     <!-- 

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentiality.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentiality.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentiality.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentiality.composite Sun Feb 10 10:56:51 2008
@@ -18,7 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="endpoint3">
            
     <!-- 

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrity.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrity.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrity.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrity.composite Sun Feb 10 10:56:51 2008
@@ -18,7 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="endpoint3">
            
     <!-- 

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml Sun Feb 10 10:56:51 2008
@@ -32,7 +32,7 @@
  <!-- WS Security POLICY SETS -->
   <sca:policySet name="tuscany:wsAuthenticationPolicy"
  	provides="sca:authentication"
- 	appliesTo="sca:binding.ws"
+ 	appliesTo="//sca:binding.ws"
  	>
  	<tuscany:wsConfigParam>
  		<parameter name="InflowSecurity">
@@ -46,7 +46,7 @@
  
  <sca:policySet name="tuscany:wsClientAuthenticationPolicy"
  	provides="tuscany:wsAuthentication"
- 	appliesTo="sca:binding.ws">
+ 	appliesTo="//sca:binding.ws">
  	<tuscany:wsConfigParam>
  		<parameter name="OutflowSecurity">
  			<action>
@@ -61,7 +61,7 @@
  
  <sca:policySet name="tuscany:wsIntegrityPolicy"
  	provides="sca:integrity"
- 	appliesTo="sca:binding.ws">
+ 	appliesTo="//sca:binding.ws">
  	<tuscany:wsConfigParam>
  		<parameter name="InflowSecurity">
 		    <action>
@@ -83,7 +83,7 @@
 
  <sca:policySet name="tuscany:wsConfidentialityPolicy"
  	provides="sca:confidentiality"
- 	appliesTo="sca:binding.ws">
+ 	appliesTo="//sca:binding.ws">
  	<tuscany:wsConfigParam>
  		<parameter name="InflowSecurity">
       		<action>

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixed.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixed.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixed.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixed.composite Sun Feb 10 10:56:51 2008
@@ -19,6 +19,7 @@
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
 			xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="endpoint3">
            
     <!-- 

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml Sun Feb 10 10:56:51 2008
@@ -34,7 +34,7 @@
  <!-- WS Security POLICY SETS -->
   <sca:policySet name="tuscany:wsAuthenticationPolicy"
  	provides="sca:authentication"
- 	appliesTo="sca:binding.ws"
+ 	appliesTo="//sca:binding.ws"
  	>
  	<tuscany:wsConfigParam>
  		<parameter name="InflowSecurity">
@@ -48,7 +48,7 @@
  
  <sca:policySet name="tuscany:wsClientAuthenticationPolicy"
  	provides="tuscany:wsAuthentication"
- 	appliesTo="sca:binding.ws">
+ 	appliesTo="//sca:binding.ws">
  	<tuscany:wsConfigParam>
  		<parameter name="OutflowSecurity">
  			<action>
@@ -63,7 +63,7 @@
  
  <sca:policySet name="tuscany:wsMixedReceiverIntegrityPolicy"
  	provides="sca:integrity"
- 	appliesTo="sca:binding.ws">
+ 	appliesTo="//sca:binding.ws">
  	<tuscany:wsConfigParam>
  		<parameter name="InflowSecurity">
 		    <action>
@@ -76,7 +76,7 @@
  
  <sca:policySet name="tuscany:wsMixedSenderIntegrityPolicy"
  	provides="sca:integrity"
- 	appliesTo="sca:binding.ws">
+ 	appliesTo="//sca:binding.ws">
  	<tuscany:wsConfigParam>
  		<parameter name="OutflowSecurity">
       		<action>
@@ -92,7 +92,7 @@
  
  <sca:policySet name="tuscany:wsServerAuthenticationIntegrityPolicy"
  	provides="sca:authentication sca:integrity"
- 	appliesTo="sca:binding.ws"
+ 	appliesTo="//sca:binding.ws"
  	>
  	<tuscany:wsConfigParam>
  		<parameter name="InflowSecurity">
@@ -116,7 +116,7 @@
  
  <sca:policySet name="tuscany:wsClientAuthenticationIntegrityPolicy"
  	provides="tuscany:wsAuthentication"
- 	appliesTo="sca:binding.ws">
+ 	appliesTo="//sca:binding.ws">
  	<tuscany:wsConfigParam>
  		<parameter name="InflowSecurity">
 		    <action>
@@ -139,7 +139,7 @@
  
  <sca:policySet name="tuscany:clientWsPolicyForAuthentication"
  	provides="sca:authentication"
- 	appliesTo="sca:binding.ws"
+ 	appliesTo="//sca:binding.ws"
  	>
  	<wsp:Policy wsu:Id="UTOverTransport" 
  		xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
@@ -164,7 +164,7 @@
  
  <sca:policySet name="tuscany:serverWsPolicyForAuthentication"
  	provides="sca:authentication"
- 	appliesTo="sca:binding.ws"
+ 	appliesTo="//sca:binding.ws"
  	>
  	<wsp:Policy wsu:Id="UTOverTransport" 
  		xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
@@ -188,7 +188,7 @@
   <!-- A policyset that uses WS Policy --> 
  <sca:policySet name="tuscany:serverWsPolicyForIntegrity"
  	provides="sca:integrity"
- 	appliesTo="sca:binding.ws">
+ 	appliesTo="//sca:binding.ws">
  	<wsp:Policy wsu:Id="SignOnly" 
  		xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
  		xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthentication.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthentication.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthentication.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthentication.composite Sun Feb 10 10:56:51 2008
@@ -19,6 +19,7 @@
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
 			xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+           xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="endpoint3">
            
     <!-- 

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentiality.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentiality.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentiality.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentiality.composite Sun Feb 10 10:56:51 2008
@@ -18,7 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="endpoint3">
            
     <!-- 

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrity.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrity.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrity.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrity.composite Sun Feb 10 10:56:51 2008
@@ -19,6 +19,7 @@
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
 			xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+           xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="endpoint3">
            
     <!-- 

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite Sun Feb 10 10:56:51 2008
@@ -18,7 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="QuestionMarkWSDLTests">
 
     <service name="ep1" promote="HelloWorldService">

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite Sun Feb 10 10:56:51 2008
@@ -18,7 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="HelloWorld">
 
     <service name="helloWorld" promote="HelloWorldService">

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite Sun Feb 10 10:56:51 2008
@@ -18,7 +18,7 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-
+			xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
            name="QuestionMarkWSDLTests">
 
     <service name="ep1" promote="HelloWorldService">

Modified: incubator/tuscany/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java?rev=620307&r1=620306&r2=620307&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java (original)
+++ incubator/tuscany/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java Sun Feb 10 10:56:51 2008
@@ -55,6 +55,7 @@
     private List<PolicySet> policySets = new ArrayList<PolicySet>();
     private IntentAttachPointType intentAttachPointType;
     private List<ConfiguredOperation>  configuredOperations = new ArrayList<ConfiguredOperation>();
+    private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
     
     private String location;
     private Binding binding;
@@ -282,5 +283,9 @@
 
     public void setConfiguredOperations(List<ConfiguredOperation> configuredOperations) {
         this.configuredOperations = configuredOperations;
+    }
+
+    public List<PolicySet> getApplicablePolicySets() {
+        return applicablePolicySets;
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message