Package javax.xml.crypto.dsig.spec

Examples of javax.xml.crypto.dsig.spec.XPathFilter2ParameterSpec


      String algo = TRANSFORM_ALGOS[i];
      TransformParameterSpec params = null;
      if (algo.equals(Transform.XPATH)) {
    params = new XPathFilterParameterSpec("xPath");
      } else if (algo.equals(Transform.XPATH2)) {
    params = new XPathFilter2ParameterSpec
        (Collections.singletonList(new XPathType
      ("xPath2", XPathType.Filter.INTERSECT)));
      } else if (algo.equals(Transform.XSLT)) {
    params = new XSLTTransformParameterSpec(new XSLTStructure());
      }
View Full Code Here


        transforms.add(fac.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null));

        // Create the Reference
        XpathConstructor xpathConstructor = sap.getXpathConstructor();
        if (xpathConstructor != null && xpathConstructor.getXpathExpression().length() > 0) {
            XPathFilter2ParameterSpec xpath2Spec = new XPathFilter2ParameterSpec(Collections.singletonList(new XPathType(xpathConstructor.getXpathExpression(), XPathType.Filter.INTERSECT)));
            transforms.add(fac.newTransform(Transform.XPATH2, xpath2Spec));
        }
        return  fac.newReference("", digestMethodSHA1, transforms, null, referenceId);
    }
View Full Code Here

        //TODO::FixMe:  Fill this appropriately.
        if(algoSpec instanceof XPathFilterParameterSpec){
            XPathFilterParameterSpec spec = (XPathFilterParameterSpec)algoSpec;
            paramList.put("XPATH",spec.getXPath());
        }else if(algoSpec instanceof XPathFilter2ParameterSpec){
            XPathFilter2ParameterSpec spec = (XPathFilter2ParameterSpec)algoSpec;
            paramList.put("XPATH2",spec.getXPathList());
        }
    }
View Full Code Here

        if (xpathAndFilterList.isEmpty()) {
            throw new IllegalArgumentException("XPath and filter list is empty");
        }
        List<XPathType> list = getXPathTypeList(xpathAndFilterList, namespaceMap);
        XmlSignatureTransform transformXPath = new XmlSignatureTransform(Transform.XPATH2);
        transformXPath.setParameterSpec(new XPathFilter2ParameterSpec(list));
        return transformXPath;
    }
View Full Code Here

        if (xpathAndFilterList.isEmpty()) {
            throw new IllegalArgumentException("XPath and filter list is empty");
        }
        List<XPathType> list = getXPathTypeList(xpathAndFilterList, namespaceMap);
        XmlSignatureTransform transformXPath = new XmlSignatureTransform(Transform.XPATH2);
        transformXPath.setParameterSpec(new XPathFilter2ParameterSpec(list));
        return transformXPath;
    }
View Full Code Here

                list.add(new XPathType(xPath, filter));
            }

            curXPathElem = DOMUtils.getNextSiblingElement(curXPathElem);
        }
        this.params = new XPathFilter2ParameterSpec(list);
    }
View Full Code Here

    public void marshalParams(XMLStructure parent, XMLCryptoContext context)
        throws MarshalException {

        super.marshalParams(parent, context);
        XPathFilter2ParameterSpec xp =
            (XPathFilter2ParameterSpec) getParameterSpec();
        String prefix = DOMUtils.getNSPrefix(context, Transform.XPATH2);
        String qname = (prefix == null) ? "xmlns" : "xmlns:" + prefix;
        List list = xp.getXPathList();
        for (int i = 0, size = list.size(); i < size; i++) {
            XPathType xpathType = (XPathType) list.get(i);
            Element elem = DOMUtils.createElement
                (ownerDoc, "XPath", Transform.XPATH2, prefix);
            elem.appendChild
View Full Code Here

                list.add(new XPathType(xPath, filter));
            }

            curXPathElem = DOMUtils.getNextSiblingElement(curXPathElem);
        }
        this.params = new XPathFilter2ParameterSpec(list);
    }
View Full Code Here

    public void marshalParams(XMLStructure parent, XMLCryptoContext context)
        throws MarshalException
    {
        super.marshalParams(parent, context);
        XPathFilter2ParameterSpec xp =
            (XPathFilter2ParameterSpec)getParameterSpec();
        String prefix = DOMUtils.getNSPrefix(context, Transform.XPATH2);
        String qname = (prefix == null || prefix.length() == 0)
                       ? "xmlns" : "xmlns:" + prefix;
        @SuppressWarnings("unchecked")
        List<XPathType> xpathList = xp.getXPathList();
        for (XPathType xpathType : xpathList) {
            Element elem = DOMUtils.createElement(ownerDoc, "XPath",
                                                  Transform.XPATH2, prefix);
            elem.appendChild
                (ownerDoc.createTextNode(xpathType.getExpression()));
View Full Code Here

            String algo = TRANSFORM_ALGOS[i];
            TransformParameterSpec params = null;
            if (algo.equals(Transform.XPATH)) {
                params = new XPathFilterParameterSpec("xPath");
            } else if (algo.equals(Transform.XPATH2)) {
                params = new XPathFilter2ParameterSpec
                    (Collections.singletonList(new XPathType
                        ("xPath2", XPathType.Filter.INTERSECT)));
            } else if (algo.equals(Transform.XSLT)) {
                params = new XSLTTransformParameterSpec(new XSLTStructure());
            }
View Full Code Here

TOP

Related Classes of javax.xml.crypto.dsig.spec.XPathFilter2ParameterSpec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.