diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-16 17:49:02 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-16 17:49:02 +0000 |
commit | 06891b50bded21d24be8abce7cbd5035f2bb6e61 (patch) | |
tree | c6440adcf74e64d446832093ff6a0d5fe78ac2da /sca-java-2.x/trunk/modules/builder/src/main | |
parent | 29f8c0f0166e25402867d3c2d03333e0a90cc2dc (diff) |
Remove the compile dependency on assembly-xml to fix build error
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@964878 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/builder/src/main')
-rw-r--r-- | sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java index 8370db00df..1989ce02ba 100644 --- a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java +++ b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java @@ -25,6 +25,7 @@ import java.util.Set; import javax.xml.namespace.QName; +import org.apache.tuscany.sca.assembly.Base; import org.apache.tuscany.sca.assembly.Component; import org.apache.tuscany.sca.assembly.ComponentReference; import org.apache.tuscany.sca.assembly.ComponentService; @@ -36,7 +37,6 @@ import org.apache.tuscany.sca.assembly.builder.BuilderContext; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; import org.apache.tuscany.sca.assembly.builder.PolicyBuilder; -import org.apache.tuscany.sca.assembly.xml.Constants; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.policy.Intent; @@ -52,7 +52,7 @@ import org.apache.tuscany.sca.policy.util.PolicyHelper; * @version $Rev$ $Date$ */ public class CompositePolicyBuilderImpl extends ComponentPolicyBuilderImpl implements CompositeBuilder { - + private final static QName NOLISTENER_INTENT = new QName(Base.SCA11_NS, "noListener"); private CompositeBuilder policyAppliesToBuilder = null; public CompositePolicyBuilderImpl(ExtensionPointRegistry registry) { @@ -219,34 +219,30 @@ public class CompositePolicyBuilderImpl extends ComponentPolicyBuilderImpl imple } private void checkForNoListenerIntent(Endpoint ep, BuilderContext context) { - PolicyHelper helper = new PolicyHelper(); - if ( helper.getIntent(ep, Constants.NOLISTENER_INTENT) != null ) { - error(context.getMonitor(), - "NoListenerIntentSpecifiedOnService", - this, - ep.toString()); - } - - } - - private void removeDirectPolicySetsIfExternalExists(PolicySubject subject, - BuilderContext context) { - boolean foundExternalPolicySet = false; - for (PolicySet ps : subject.getPolicySets() ) { - if ( ps.getAttachTo() != null ) - foundExternalPolicySet = true; - } - - if ( foundExternalPolicySet ) { - List<PolicySet> copy = new ArrayList<PolicySet>(subject.getPolicySets()); - for ( PolicySet ps : copy ) { - if ( ps.getAttachTo() == null ) { - subject.getPolicySets().remove(ps); - } - } - } - - } + PolicyHelper helper = new PolicyHelper(); + if (helper.getIntent(ep, NOLISTENER_INTENT) != null) { + error(context.getMonitor(), "NoListenerIntentSpecifiedOnService", this, ep.toString()); + } + + } + + private void removeDirectPolicySetsIfExternalExists(PolicySubject subject, BuilderContext context) { + boolean foundExternalPolicySet = false; + for (PolicySet ps : subject.getPolicySets()) { + if (ps.getAttachTo() != null) + foundExternalPolicySet = true; + } + + if (foundExternalPolicySet) { + List<PolicySet> copy = new ArrayList<PolicySet>(subject.getPolicySets()); + for (PolicySet ps : copy) { + if (ps.getAttachTo() == null) { + subject.getPolicySets().remove(ps); + } + } + } + + } /** * This is mainly about removing policies that don't "applyTo" the element where |