Class XmlGenerator


  • public class XmlGenerator
    extends Object
    Generates XML documents containing metadata about files uploaded to Amazon S3 by the Uploader. The XML document includes metadata for user inputs, inputs sourced from applet parameter tags, and additional information available from the uploader such as filenames and generated UUID.
    Author:
    James Murty
    • Constructor Detail

      • XmlGenerator

        public XmlGenerator()
    • Method Detail

      • addSignatureRequest

        public void addSignatureRequest​(String key,
                                        String bucketName,
                                        Map metadata,
                                        SignatureRequest signatureRequest)
        Add a signature request item to the XML document to store the request, and details about the object the request was related to.
        Parameters:
        key - the key name of the object the signature request applies to.
        bucketName - the bucket containing the object.
        metadata - the object's metadata
        signatureRequest - the signature request for the object.
      • addApplicationProperties

        public void addApplicationProperties​(Map properties)
        Add application-specific properties to the XML document.
        Parameters:
        properties -
      • addMessageProperties

        public void addMessageProperties​(Map properties)
        Add message-specific properties to the XML document.
        Parameters:
        properties -
      • generateXml

        public String generateXml()
                           throws Exception
        Generates an XML document containing metadata information as Property elements. The root of the document is the element Uploader.
        Returns:
        an XML document string containing Property elements.
        Throws:
        Exception