javax.xml.crypto.enc.dom

Class DOMToBeEncryptedXML

  • java.lang.Object
    • javax.xml.crypto.enc.dom.DOMToBeEncryptedXML
  • All Implemented Interfaces:
    ToBeEncrypted, ToBeEncryptedXML


    public class DOMToBeEncryptedXML
    extends java.lang.Object
    implements ToBeEncryptedXML
    A representation of the ToBeEncryptedXML class which contains a XML Element or content of an Element
    • Field Detail

      • type

        private java.lang.String type
      • mimeType

        private java.lang.String mimeType
      • encoding

        private java.lang.String encoding
      • nodeList

        private org.w3c.dom.NodeList nodeList
    • Constructor Detail

      • DOMToBeEncryptedXML

        public DOMToBeEncryptedXML(org.w3c.dom.Element element,
                                   CanonicalizationMethod canonMethod)
        Creates a new DOMToBeEncryptedXML
        Parameters:
        element - the Element to be encrypted
        canonMethod - the optional serialization method (may be null)
        Throws:
        java.lang.NullPointerException - if element is null
      • DOMToBeEncryptedXML

        public DOMToBeEncryptedXML(org.w3c.dom.NodeList content,
                                   CanonicalizationMethod canonMethod)
        Creates a new DOMToBeEncryptedXML
        Parameters:
        content - the content of an Element to be encrypted
        canonMethod - the optional serialization method (may be null)
        Throws:
        java.lang.NullPointerException - if content is null
    • Method Detail

      • init

        private void init(org.w3c.dom.NodeList nodeList,
                          java.lang.String type,
                          java.lang.String mimeType,
                          java.lang.String encoding,
                          CanonicalizationMethod canonMethod)
      • getNodeList

        public org.w3c.dom.NodeList getNodeList()
        Returns the XML to be encrypted. The XML is returned as a NodeList. For to-be-encrypted XML that is of the 'element' type, the to-be-encrypted element is returned as the first item in the returning NodeList.
        Returns:
        the XML to be encrypted.
      • getType

        public java.lang.String getType()
        Returns a URI identifying the type of the plaintext form of the encrypted content.
        Specified by:
        getType in interface ToBeEncrypted
        Specified by:
        getType in interface ToBeEncryptedXML
        Returns:
        the type
      • getMimeType

        public java.lang.String getMimeType()
        Returns the mime type of the data that has been encrypted.
        Specified by:
        getMimeType in interface ToBeEncrypted
        Specified by:
        getMimeType in interface ToBeEncryptedXML
        Returns:
        the mime type, or null if not specified
      • getEncoding

        public java.lang.String getEncoding()
        Returns a URI identifying the transfer encoding of the data that has been encrypted.
        Specified by:
        getEncoding in interface ToBeEncrypted
        Specified by:
        getEncoding in interface ToBeEncryptedXML
        Returns:
        the encoding, or null if not specified
XML Security (JSR 105/106), 1.8

Copyright © 2015 IBM Corporation. All Rights Reserved.