tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r1185132 - /tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/policy/util/PolicyHelper.java
Date Mon, 17 Oct 2011 12:46:41 GMT
Author: slaws
Date: Mon Oct 17 12:46:41 2011
New Revision: 1185132

URL: http://svn.apache.org/viewvc?rev=1185132&view=rev
Log:
Extend getIntent to retrieve qualified intents as well as top level intents

Modified:
    tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/policy/util/PolicyHelper.java

Modified: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/policy/util/PolicyHelper.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/policy/util/PolicyHelper.java?rev=1185132&r1=1185131&r2=1185132&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/policy/util/PolicyHelper.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/policy/util/PolicyHelper.java
Mon Oct 17 12:46:41 2011
@@ -51,6 +51,11 @@ public class PolicyHelper {
             if (i.getName().equals(intentName)) {
                 return i;
             }
+            for (Intent qualifiedIntent : i.getQualifiedIntents()){
+                if (qualifiedIntent.getName().equals(intentName)) {
+                    return qualifiedIntent;
+                }
+            }
         }
         return null;
     }



Mime
View raw message