Search in sources :

Example 71 with Policy

use of org.apache.neethi.Policy in project cxf by apache.

the class ExternalAttachmentProvider method getEffectivePolicy.

public Policy getEffectivePolicy(BindingOperationInfo boi, Message m) {
    readDocument();
    Policy p = null;
    for (PolicyAttachment pa : attachments) {
        if (pa.appliesTo(boi)) {
            if (p == null) {
                p = new Policy();
            }
            p = p.merge(pa.getPolicy());
        }
    }
    return p;
}
Also used : Policy(org.apache.neethi.Policy)

Example 72 with Policy

use of org.apache.neethi.Policy in project cxf by apache.

the class ExternalAttachmentProvider method getEffectivePolicy.

public Policy getEffectivePolicy(EndpointInfo ei, Message m) {
    readDocument();
    Policy p = null;
    for (PolicyAttachment pa : attachments) {
        if (pa.appliesTo(ei)) {
            if (p == null) {
                p = new Policy();
            }
            p = p.merge(pa.getPolicy());
        }
    }
    return p;
}
Also used : Policy(org.apache.neethi.Policy)

Example 73 with Policy

use of org.apache.neethi.Policy in project cxf by apache.

the class ExternalAttachmentProvider method resolveReference.

Policy resolveReference(PolicyReference ref, Document doc) {
    Policy p = null;
    if (isExternal(ref)) {
        p = resolveExternal(ref, doc.getBaseURI());
    } else {
        p = resolveLocal(ref, doc);
    }
    checkResolved(ref, p);
    return p;
}
Also used : Policy(org.apache.neethi.Policy)

Example 74 with Policy

use of org.apache.neethi.Policy in project cxf by apache.

the class ExternalAttachmentProvider method getEffectivePolicy.

public Policy getEffectivePolicy(BindingFaultInfo bfi, Message m) {
    readDocument();
    Policy p = null;
    for (PolicyAttachment pa : attachments) {
        if (pa.appliesTo(bfi)) {
            if (p == null) {
                p = new Policy();
            }
            p = p.merge(pa.getPolicy());
        }
    }
    return p;
}
Also used : Policy(org.apache.neethi.Policy)

Example 75 with Policy

use of org.apache.neethi.Policy in project cxf by apache.

the class ExternalAttachmentProvider method getEffectivePolicy.

public Policy getEffectivePolicy(BindingMessageInfo bmi, Message m) {
    readDocument();
    Policy p = null;
    for (PolicyAttachment pa : attachments) {
        if (pa.appliesTo(bmi)) {
            if (p == null) {
                p = new Policy();
            }
            p = p.merge(pa.getPolicy());
        }
    }
    return p;
}
Also used : Policy(org.apache.neethi.Policy)

Aggregations

Policy (org.apache.neethi.Policy)122 Test (org.junit.Test)47 Assertion (org.apache.neethi.Assertion)27 QName (javax.xml.namespace.QName)23 ArrayList (java.util.ArrayList)21 All (org.apache.neethi.All)18 ExactlyOne (org.apache.neethi.ExactlyOne)18 Message (org.apache.cxf.message.Message)15 EndpointInfo (org.apache.cxf.service.model.EndpointInfo)14 Element (org.w3c.dom.Element)13 Bus (org.apache.cxf.Bus)12 PrimitiveAssertion (org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion)12 List (java.util.List)9 Interceptor (org.apache.cxf.interceptor.Interceptor)9 BindingOperationInfo (org.apache.cxf.service.model.BindingOperationInfo)9 HashMap (java.util.HashMap)7 OMElement (org.apache.axiom.om.OMElement)7 MessageImpl (org.apache.cxf.message.MessageImpl)7 ReferenceResolver (org.apache.cxf.ws.policy.attachment.reference.ReferenceResolver)6 InputStream (java.io.InputStream)5