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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description (package private) static classDOMToBeEncryptedXML.NodeListImpl
-
Field Summary
Fields Modifier and Type Field and Description private CanonicalizationMethodcanonMethodprivate java.lang.Stringencodingprivate java.lang.StringmimeTypeprivate org.w3c.dom.NodeListnodeListprivate java.lang.Stringtype
-
Constructor Summary
Constructors Constructor and Description DOMToBeEncryptedXML(org.w3c.dom.Element element, CanonicalizationMethod canonMethod)Creates a new DOMToBeEncryptedXMLDOMToBeEncryptedXML(org.w3c.dom.NodeList content, CanonicalizationMethod canonMethod)Creates a new DOMToBeEncryptedXML
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description CanonicalizationMethodgetCanonicalizationMethod()Returns the canonicalization methodjava.lang.StringgetEncoding()Returns a URI identifying the transfer encoding of the data that has been encrypted.java.lang.StringgetMimeType()Returns the mime type of the data that has been encrypted.org.w3c.dom.NodeListgetNodeList()Returns the XML to be encrypted.java.lang.StringgetType()Returns a URI identifying the type of the plaintext form of the encrypted content.private voidinit(org.w3c.dom.NodeList nodeList, java.lang.String type, java.lang.String mimeType, java.lang.String encoding, CanonicalizationMethod canonMethod)
-
-
-
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
-
canonMethod
private CanonicalizationMethod canonMethod
-
-
Constructor Detail
-
DOMToBeEncryptedXML
public DOMToBeEncryptedXML(org.w3c.dom.Element element, CanonicalizationMethod canonMethod)Creates a new DOMToBeEncryptedXML- Parameters:
element- the Element to be encryptedcanonMethod- the optional serialization method (may benull)- Throws:
java.lang.NullPointerException- ifelementis null
-
DOMToBeEncryptedXML
public DOMToBeEncryptedXML(org.w3c.dom.NodeList content, CanonicalizationMethod canonMethod)Creates a new DOMToBeEncryptedXML- Parameters:
content- the content of an Element to be encryptedcanonMethod- the optional serialization method (may benull)- Throws:
java.lang.NullPointerException- ifcontentis 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 aNodeList. For to-be-encrypted XML that is of the 'element' type, the to-be-encrypted element is returned as the first item in the returningNodeList.- 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:
getTypein interfaceToBeEncrypted- Specified by:
getTypein interfaceToBeEncryptedXML- Returns:
- the type
-
getMimeType
public java.lang.String getMimeType()
Returns the mime type of the data that has been encrypted.- Specified by:
getMimeTypein interfaceToBeEncrypted- Specified by:
getMimeTypein interfaceToBeEncryptedXML- Returns:
- the mime type, or
nullif not specified
-
getEncoding
public java.lang.String getEncoding()
Returns a URI identifying the transfer encoding of the data that has been encrypted.- Specified by:
getEncodingin interfaceToBeEncrypted- Specified by:
getEncodingin interfaceToBeEncryptedXML- Returns:
- the encoding, or
nullif not specified
-
getCanonicalizationMethod
public CanonicalizationMethod getCanonicalizationMethod()
Description copied from interface:ToBeEncryptedXMLReturns the canonicalization method- Specified by:
getCanonicalizationMethodin interfaceToBeEncryptedXML- Returns:
- the canonicalization method.
nullif not specified
-
-