Search in sources :

Example 1 with XPathAndFilter

use of org.apache.camel.component.xmlsecurity.api.XmlSignatureHelper.XPathAndFilter in project camel by apache.

the class XmlSignatureTest method getTransformsXPath2.

private List<AlgorithmMethod> getTransformsXPath2() {
    List<XPathAndFilter> list = new ArrayList<XPathAndFilter>(3);
    XPathAndFilter xpath1 = new XPathAndFilter("//n0:ToBeSigned", XPathType.Filter.INTERSECT.toString());
    list.add(xpath1);
    XPathAndFilter xpath2 = new XPathAndFilter("//n0:NotToBeSigned", XPathType.Filter.SUBTRACT.toString());
    list.add(xpath2);
    XPathAndFilter xpath3 = new XPathAndFilter("//n0:ReallyToBeSigned", XPathType.Filter.UNION.toString());
    list.add(xpath3);
    List<AlgorithmMethod> result = new ArrayList<AlgorithmMethod>(2);
    result.add(XmlSignatureHelper.getCanonicalizationMethod(CanonicalizationMethod.INCLUSIVE));
    result.add(XmlSignatureHelper.getXPath2Transform(list, getNamespaceMap()));
    return result;
}
Also used : XPathAndFilter(org.apache.camel.component.xmlsecurity.api.XmlSignatureHelper.XPathAndFilter) ArrayList(java.util.ArrayList) AlgorithmMethod(javax.xml.crypto.AlgorithmMethod)

Aggregations

ArrayList (java.util.ArrayList)1 AlgorithmMethod (javax.xml.crypto.AlgorithmMethod)1 XPathAndFilter (org.apache.camel.component.xmlsecurity.api.XmlSignatureHelper.XPathAndFilter)1