diff options
author | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-04 06:12:29 +0000 |
---|---|---|
committer | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-04 06:12:29 +0000 |
commit | 94d85abe8a454d55dc98e278c33dd089f48b4ac1 (patch) | |
tree | 7e4eca2bad96f6132a31e209ae6e63cc96060c2e /sca-java-2.x/trunk/modules/assembly/src | |
parent | 6fa9ccb840509bc22c576683924f0e5a08f4468b (diff) |
Add a boolean to PolicySet to determine if it has been attached via external attachment
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@982129 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly/src')
2 files changed, 21 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/policy/PolicySet.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/policy/PolicySet.java index a1ae3892e4..230d635e76 100644 --- a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/policy/PolicySet.java +++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/policy/PolicySet.java @@ -144,4 +144,16 @@ public interface PolicySet { */ void setAppliesToXPathExpression(XPathExpression xpathExpression); + /** + * Returns true if this PolicySet was attached via external attachment + * For unattached and directly attached PolicySets, returns false + * @return + */ + boolean isExternalAttachment(); + + /** + * Sets whether this PolicySet has been attached via external attachment or not + * @param value + */ + void setIsExternalAttachment(boolean value); } diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/policy/impl/PolicySetImpl.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/policy/impl/PolicySetImpl.java index 75d1229cd8..22e6e4d4cf 100644 --- a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/policy/impl/PolicySetImpl.java +++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/policy/impl/PolicySetImpl.java @@ -48,6 +48,7 @@ public class PolicySetImpl implements PolicySet { private List<IntentMap> intentMaps = new ArrayList<IntentMap>(); private List<PolicyExpression> policies = new ArrayList<PolicyExpression>(); + private boolean isExternalAttachment; public QName getName() { return name; @@ -142,4 +143,12 @@ public class PolicySetImpl implements PolicySet { return true; } + public boolean isExternalAttachment() { + return this.isExternalAttachment; + } + + public void setIsExternalAttachment(boolean value) { + this.isExternalAttachment = value; + } + } |