com.sun.xml.wss.core
Class EncryptedTypeHeaderBlock

java.lang.Object
  extended by com.sun.xml.wss.impl.misc.SOAPElementExtension
      extended by com.sun.xml.wss.impl.misc.SecurityHeaderBlockImpl
          extended by com.sun.xml.wss.core.EncryptedTypeHeaderBlock
All Implemented Interfaces:
SecurityHeaderBlock, SOAPElement, Element, Node
Direct Known Subclasses:
EncryptedDataHeaderBlock, EncryptedKeyHeaderBlock

public abstract class EncryptedTypeHeaderBlock
extends SecurityHeaderBlockImpl

Schema definition for an EncryptedType is as follows:

<complexType name='EncryptedType' abstract='true'> <sequence> <element name='EncryptionMethod' type='xenc:EncryptionMethodType' minOccurs='0'/> <element ref='ds:KeyInfo' minOccurs='0'/> <element ref='xenc:CipherData'/> <element ref='xenc:EncryptionProperties' minOccurs='0'/> </sequence> <attribute name='Id' type='ID' use='optional'/> <attribute name='Type' type='anyURI' use='optional'/> <attribute name='MimeType' type='string' use='optional'/> <attribute name='Encoding' type='anyURI' use='optional'/> </complexType>

Author:
Vishal Mahajan

Field Summary
protected static Logger log
           
 
Fields inherited from class com.sun.xml.wss.impl.misc.SecurityHeaderBlockImpl
delegateElement
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
EncryptedTypeHeaderBlock()
           
 
Method Summary
 void addTransform(String algorithmURI)
           
 SOAPElement getCipherData(boolean create)
           
 SOAPElement getCipherReference(boolean create, String uri)
           
 String getCipherValue()
           
 String getEncoding()
          Returns null if Encoding attr is not present
 SOAPElement getEncryptionMethod()
           
 String getEncryptionMethodURI()
          returns the algorithm URI
 SOAPElement getEncryptionProperties()
           
 String getId()
          Returns null if id attr is not present
 KeyInfoHeaderBlock getKeyInfo()
           
 String getMimeType()
          Returns null if MimeType attr is not present
 Iterator getTransforms()
           
 String getType()
          Returns null if Type attr is not present
 void initializeEncryptedType(SOAPElement element)
           
 void saveChanges()
          This method should be called when changes are made inside an object through its reference obtained from any of the get methods of this class.
 void setEncoding(String encoding)
           
 void setEncryptionMethod(SOAPElement encryptionMethod)
           
 void setEncryptionMethod(String algorithmURI)
           
 void setEncryptionProperties(SOAPElement encryptionProperties)
           
 void setId(String id)
           
 void setKeyInfo(KeyInfoHeaderBlock keyInfo)
           
 void setMimeType(String mimeType)
           
 void setType(String type)
           
 
Methods inherited from class com.sun.xml.wss.impl.misc.SecurityHeaderBlockImpl
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, appendChild, cloneNode, compareDocumentPosition, detachNode, equals, fromSoapElement, getAllAttributes, getAllAttributesAsQNames, getAsSoapElement, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributeValue, getBaseURI, getChildElements, getChildElements, getChildNodes, getElementName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getFeature, getFirstChild, getLastChild, getLocalName, getNamespacePrefixes, getNamespaceURI, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPreviousSibling, getSchemaTypeInfo, getSoapFactory, getTagName, getTextContent, getUserData, getValue, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, insertBefore, isBSP, isBSP, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, recycleNode, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, removeContents, removeNamespaceDeclaration, replaceChild, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setEncodingStyle, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setParentElement, setPrefix, setSOAPElement, setTextContent, setUserData, setValue, setWsuIdAttr
 
Methods inherited from class com.sun.xml.wss.impl.misc.SOAPElementExtension
addAttribute, addChildElement, createQName, getAttributeValue, getChildElements, getElementQName, removeAttribute, setElementQName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.soap.SOAPElement
addAttribute, addChildElement, createQName, getAttributeValue, getChildElements, getElementQName, removeAttribute, setElementQName
 

Field Detail

log

protected static final Logger log
Constructor Detail

EncryptedTypeHeaderBlock

public EncryptedTypeHeaderBlock()
Method Detail

getId

public String getId()
Returns null if id attr is not present

Specified by:
getId in interface SecurityHeaderBlock
Overrides:
getId in class SecurityHeaderBlockImpl

setId

public void setId(String id)

getType

public String getType()
Returns null if Type attr is not present


setType

public void setType(String type)

getMimeType

public String getMimeType()
Returns null if MimeType attr is not present


setMimeType

public void setMimeType(String mimeType)

getEncoding

public String getEncoding()
Returns null if Encoding attr is not present


setEncoding

public void setEncoding(String encoding)

getEncryptionMethod

public SOAPElement getEncryptionMethod()

getEncryptionMethodURI

public String getEncryptionMethodURI()
returns the algorithm URI


setEncryptionMethod

public void setEncryptionMethod(SOAPElement encryptionMethod)

setEncryptionMethod

public void setEncryptionMethod(String algorithmURI)
                         throws XWSSecurityException
Throws:
XWSSecurityException

getKeyInfo

public KeyInfoHeaderBlock getKeyInfo()

setKeyInfo

public void setKeyInfo(KeyInfoHeaderBlock keyInfo)

getCipherValue

public String getCipherValue()
                      throws XWSSecurityException
Throws:
XWSSecurityException - If CipherData element is not present OR If CipherValue element is not present inside CipherData.

getCipherData

public SOAPElement getCipherData(boolean create)
                          throws XWSSecurityException
Throws:
XWSSecurityException

getCipherReference

public SOAPElement getCipherReference(boolean create,
                                      String uri)
                               throws XWSSecurityException
Throws:
XWSSecurityException

addTransform

public void addTransform(String algorithmURI)
                  throws XWSSecurityException
Throws:
XWSSecurityException

getTransforms

public Iterator getTransforms()
                       throws XWSSecurityException
Throws:
XWSSecurityException

getEncryptionProperties

public SOAPElement getEncryptionProperties()

setEncryptionProperties

public void setEncryptionProperties(SOAPElement encryptionProperties)

saveChanges

public void saveChanges()
This method should be called when changes are made inside an object through its reference obtained from any of the get methods of this class. For example, if getKeyInfo() call is made and then changes are made inside the keyInfo, this method should be called to reflect changes in the EncryptedType.


initializeEncryptedType

public void initializeEncryptedType(SOAPElement element)
                             throws XWSSecurityException
Throws:
XWSSecurityException


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.