Class EncryptedTypeHeaderBlock

  • All Implemented Interfaces:
    SecurityHeaderBlock, javax.xml.soap.Node, javax.xml.soap.SOAPElement, Element, Node
    Direct Known Subclasses:
    EncryptedDataHeaderBlock, EncryptedKeyHeaderBlock

    public abstract class EncryptedTypeHeaderBlock
    extends SecurityHeaderBlockImpl
    Schema definition for an EncryptedType is as follows:
    
     <xmp>
     <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>
     </xmp>
     
    Author:
    Vishal Mahajan
    • Field Detail

      • log

        protected static final Logger log
    • Constructor Detail

      • EncryptedTypeHeaderBlock

        public EncryptedTypeHeaderBlock()
    • Method Detail

      • 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 javax.xml.soap.SOAPElement getEncryptionMethod()
      • getEncryptionMethodURI

        public String getEncryptionMethodURI()
        returns the algorithm URI
      • setEncryptionMethod

        public void setEncryptionMethod​(javax.xml.soap.SOAPElement encryptionMethod)
      • setEncryptionMethod

        public void setEncryptionMethod​(String algorithmURI)
                                 throws com.sun.xml.wss.XWSSecurityException
        Throws:
        com.sun.xml.wss.XWSSecurityException
      • getCipherValue

        public String getCipherValue()
                              throws com.sun.xml.wss.XWSSecurityException
        Throws:
        com.sun.xml.wss.XWSSecurityException - If CipherData element is not present OR If CipherValue element is not present inside CipherData.
      • getCipherData

        public javax.xml.soap.SOAPElement getCipherData​(boolean create)
                                                 throws com.sun.xml.wss.XWSSecurityException
        Throws:
        com.sun.xml.wss.XWSSecurityException
      • getCipherReference

        public javax.xml.soap.SOAPElement getCipherReference​(boolean create,
                                                             String uri)
                                                      throws com.sun.xml.wss.XWSSecurityException
        Throws:
        com.sun.xml.wss.XWSSecurityException
      • addTransform

        public void addTransform​(String algorithmURI)
                          throws com.sun.xml.wss.XWSSecurityException
        Throws:
        com.sun.xml.wss.XWSSecurityException
      • getTransforms

        public Iterator getTransforms()
                               throws com.sun.xml.wss.XWSSecurityException
        Throws:
        com.sun.xml.wss.XWSSecurityException
      • getEncryptionProperties

        public javax.xml.soap.SOAPElement getEncryptionProperties()
      • setEncryptionProperties

        public void setEncryptionProperties​(javax.xml.soap.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​(javax.xml.soap.SOAPElement element)
                                     throws com.sun.xml.wss.XWSSecurityException
        Throws:
        com.sun.xml.wss.XWSSecurityException