Class DOMHASHGenerator

    • Constructor Summary

      Constructors 
      Constructor Description
      DOMHASHGenerator()
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean compareOMAttribute​(org.apache.axiom.om.OMAttribute attribute, org.apache.axiom.om.OMAttribute comparingAttribute, String digestAlgorithm)
      Deprecated.
      Compares two OMAttributes for the XML equality.
      boolean compareOMDocument​(org.apache.axiom.om.OMDocument document, org.apache.axiom.om.OMDocument comparingDocument, String digestAlgorithm)
      Deprecated.
      Compares two OMDocuments for the XML equality.
      boolean compareOMNode​(org.apache.axiom.om.OMNode node, org.apache.axiom.om.OMNode comparingNode, String digestAlgorithm)
      Deprecated.
      Compares two OMNodes for the XML equality.
      Collection getAttributesWithoutNS​(org.apache.axiom.om.OMElement element)
      Deprecated.
      Gets the collection of attributes which are none namespace declarations for an OMElement sorted according to the expanded names of the attributes.
      byte[] getDigest​(org.apache.axiom.om.OMAttribute attribute, String digestAlgorithm)
      Deprecated.
      This is an overloaded method for the digest generation for OMAttribute.
      byte[] getDigest​(org.apache.axiom.om.OMDocument document, String digestAlgorithm)
      Deprecated.
      This is an overloaded method for the digest generation for OMDocument.
      byte[] getDigest​(org.apache.axiom.om.OMElement element, String digestAlgorithm)
      Deprecated.
      This is an overloaded method for the digest generation for OMElement.
      byte[] getDigest​(org.apache.axiom.om.OMNode node, String digestAlgorithm)
      Deprecated.
      This is an overloaded method for the digest generation for OMNode.
      byte[] getDigest​(org.apache.axiom.om.OMProcessingInstruction pi, String digestAlgorithm)
      Deprecated.
      This method is an overloaded method for the digest generation for OMProcessingInstruction.
      byte[] getDigest​(org.apache.axiom.om.OMText text, String digestAlgorithm)
      Deprecated.
      This method is an overloaded method for the digest generation for OMText.
      String getDigest​(org.apache.axis2.context.MessageContext msgContext)
      Deprecated.
      This is the implementation of the getDigest method and will implement the DOMHASH algorithm based XML node identifications.
      String getExpandedName​(org.apache.axiom.om.OMAttribute attribute)
      Deprecated.
      This is an overloaded method for getting the expanded name as namespaceURI followed by the local name for OMAttribute.
      String getExpandedName​(org.apache.axiom.om.OMElement element)
      Deprecated.
      This is an overloaded method for getting the expanded name as namespaceURI followed by the local name for OMElement.
      String getStringRepresentation​(byte[] array)
      Deprecated.
      Gets the String representation of the byte array.
      Collection getValidElements​(org.apache.axiom.om.OMDocument document)
      Deprecated.
      Gets the valid element collection of an OMDocument.
      void init​(Map<String,​Object> properties)
      Deprecated.
      If more properties are needed to generate the hash other than the MessageContext it can be initialized via this method
    • Field Detail

      • MD5_DIGEST_ALGORITHM

        public static final String MD5_DIGEST_ALGORITHM
        Deprecated.
        String representing the MD5 digest algorithm.
        See Also:
        Constant Field Values
      • SHA_DIGEST_ALGORITHM

        public static final String SHA_DIGEST_ALGORITHM
        Deprecated.
        String representing the SHA digest algorithm.
        See Also:
        Constant Field Values
      • SHA1_DIGEST_ALGORITHM

        public static final String SHA1_DIGEST_ALGORITHM
        Deprecated.
        String representing the SHA1 digest algorithm.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DOMHASHGenerator

        public DOMHASHGenerator()
        Deprecated.
    • Method Detail

      • init

        public void init​(Map<String,​Object> properties)
        Deprecated.
        Description copied from interface: DigestGenerator
        If more properties are needed to generate the hash other than the MessageContext it can be initialized via this method
        Specified by:
        init in interface DigestGenerator
        Parameters:
        properties - A list of other properties used to generate the hash
      • getDigest

        public String getDigest​(org.apache.axis2.context.MessageContext msgContext)
                         throws CachingException
        Deprecated.
        This is the implementation of the getDigest method and will implement the DOMHASH algorithm based XML node identifications. This will consider only the SOAP payload and this does not consider the SOAP headers in generating the digets. So, in effect this will uniquely identify the SOAP messages with the same payload.
        Specified by:
        getDigest in interface DigestGenerator
        Parameters:
        msgContext - - MessageContext on which the XML node identifier will be generated
        Returns:
        Object representing the DOMHASH value of the normalized XML node
        Throws:
        CachingException - if there is an error in generating the digest key

        #getDigest(org.apache.axis2.context.MessageContext)

      • getDigest

        public byte[] getDigest​(org.apache.axiom.om.OMNode node,
                                String digestAlgorithm)
                         throws CachingException
        Deprecated.
        This is an overloaded method for the digest generation for OMNode.
        Parameters:
        node - - OMNode to be subjected to the key generation
        digestAlgorithm - - digest algorithm as a String
        Returns:
        byte[] representing the calculated digest over the provided node
        Throws:
        CachingException - if there is an error in generating the digest
      • getDigest

        public byte[] getDigest​(org.apache.axiom.om.OMDocument document,
                                String digestAlgorithm)
                         throws CachingException
        Deprecated.
        This is an overloaded method for the digest generation for OMDocument.
        Parameters:
        document - - OMDocument to be subjected to the key generation
        digestAlgorithm - - digest algorithm as a String
        Returns:
        byte[] representing the calculated digest over the provided document
        Throws:
        CachingException - if there is an io error or the specified algorithm is incorrect
      • getDigest

        public byte[] getDigest​(org.apache.axiom.om.OMElement element,
                                String digestAlgorithm)
                         throws CachingException
        Deprecated.
        This is an overloaded method for the digest generation for OMElement.
        Parameters:
        element - - OMElement to be subjected to the key generation
        digestAlgorithm - - digest algorithm as a String
        Returns:
        byte[] representing the calculated digest over the provided element
        Throws:
        CachingException - if there is an io error or the specified algorithm is incorrect
      • getDigest

        public byte[] getDigest​(org.apache.axiom.om.OMProcessingInstruction pi,
                                String digestAlgorithm)
                         throws CachingException
        Deprecated.
        This method is an overloaded method for the digest generation for OMProcessingInstruction.
        Parameters:
        pi - - OMProcessingInstruction to be subjected to the key generation
        digestAlgorithm - - digest algorithm as a String
        Returns:
        byte[] representing the calculated digest over the provided pi
        Throws:
        CachingException - if the specified algorithm is incorrect or the encoding is not supported by the processor
      • getDigest

        public byte[] getDigest​(org.apache.axiom.om.OMAttribute attribute,
                                String digestAlgorithm)
                         throws CachingException
        Deprecated.
        This is an overloaded method for the digest generation for OMAttribute.
        Parameters:
        attribute - - OMAttribute to be subjected to the key generation
        digestAlgorithm - - digest algorithm as a String
        Returns:
        byte[] representing the calculated digest over the provided attribute
        Throws:
        CachingException - if the specified algorithm is incorrect or the encoding is not supported by the processor
      • getDigest

        public byte[] getDigest​(org.apache.axiom.om.OMText text,
                                String digestAlgorithm)
                         throws CachingException
        Deprecated.
        This method is an overloaded method for the digest generation for OMText.
        Parameters:
        text - - OMText to be subjected to the key generation
        digestAlgorithm - - digest algorithm as a String
        Returns:
        byte[] representing the calculated digest over the provided text
        Throws:
        CachingException - if the specified algorithm is incorrect or the encoding is not supported by the processor
      • getExpandedName

        public String getExpandedName​(org.apache.axiom.om.OMElement element)
        Deprecated.
        This is an overloaded method for getting the expanded name as namespaceURI followed by the local name for OMElement.
        Parameters:
        element - - OMElement of which the expanded name is retrieved
        Returns:
        expanded name of OMElement as an String in the form {ns-uri:local-name}
      • getExpandedName

        public String getExpandedName​(org.apache.axiom.om.OMAttribute attribute)
        Deprecated.
        This is an overloaded method for getting the expanded name as namespaceURI followed by the local name for OMAttribute.
        Parameters:
        attribute - - OMAttribute of which the expanded name is retrieved
        Returns:
        expanded name of the OMAttribute as an String in the form {ns-uri:local-name}
      • getAttributesWithoutNS

        public Collection getAttributesWithoutNS​(org.apache.axiom.om.OMElement element)
        Deprecated.
        Gets the collection of attributes which are none namespace declarations for an OMElement sorted according to the expanded names of the attributes.
        Parameters:
        element - - OMElement of which the none ns declaration attributes to be retrieved
        Returns:
        the collection of attributes which are none namespace declarations
      • getValidElements

        public Collection getValidElements​(org.apache.axiom.om.OMDocument document)
        Deprecated.
        Gets the valid element collection of an OMDocument. This returns only the OMElement and OMProcessingInstruction nodes
        Parameters:
        document - - OMDocument of which the valid elements to be retrieved
        Returns:
        the collection of OMProcessingInstructions and OMElements in the provided document
      • getStringRepresentation

        public String getStringRepresentation​(byte[] array)
        Deprecated.
        Gets the String representation of the byte array.
        Parameters:
        array - - byte[] of which the String representation is required
        Returns:
        the String representation of the byte[]
      • compareOMNode

        public boolean compareOMNode​(org.apache.axiom.om.OMNode node,
                                     org.apache.axiom.om.OMNode comparingNode,
                                     String digestAlgorithm)
                              throws CachingException
        Deprecated.
        Compares two OMNodes for the XML equality.
        Parameters:
        node - - OMNode to be compared
        comparingNode - - OMNode to be compared
        digestAlgorithm - - digest algorithm as a String to be used in the comparison
        Returns:
        boolean true if the two OMNodes are XML equal, and false otherwise
        Throws:
        CachingException - if there is an error in generating the digest key
      • compareOMDocument

        public boolean compareOMDocument​(org.apache.axiom.om.OMDocument document,
                                         org.apache.axiom.om.OMDocument comparingDocument,
                                         String digestAlgorithm)
                                  throws CachingException
        Deprecated.
        Compares two OMDocuments for the XML equality.
        Parameters:
        document - - OMDocument to be compared
        comparingDocument - - OMDocument to be compared
        digestAlgorithm - - digest algorithm as a String to be used in the comparison
        Returns:
        boolean true if the two OMDocuments are XML equal, and false otherwise
        Throws:
        CachingException - if there is an error in generating the digest key
      • compareOMAttribute

        public boolean compareOMAttribute​(org.apache.axiom.om.OMAttribute attribute,
                                          org.apache.axiom.om.OMAttribute comparingAttribute,
                                          String digestAlgorithm)
                                   throws CachingException
        Deprecated.
        Compares two OMAttributes for the XML equality.
        Parameters:
        attribute - - OMAttribute to be compared
        comparingAttribute - - OMAttribute to be compared
        digestAlgorithm - - digest algorithm as a String to be used in the comparison
        Returns:
        boolean true if the two OMAttributes are XML equal, and false otherwise
        Throws:
        CachingException - if there is an error in generating the digest key