org.jets3t.apps.uploader
Class XmlGenerator

java.lang.Object
  extended by org.jets3t.apps.uploader.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

Field Summary
static String xmlVersionNumber
           
 
Constructor Summary
XmlGenerator()
           
 
Method Summary
 void addApplicationProperties(Map properties)
          Add application-specific properties to the XML document.
 void addMessageProperties(Map properties)
          Add message-specific properties to the XML document.
 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.
 String generateXml()
          Generates an XML document containing metadata information as Property elements.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xmlVersionNumber

public static final String xmlVersionNumber
See Also:
Constant Field Values
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