org.jets3t.servlets.gatekeeper.impl
Class RenameToUuidUrlSigner

java.lang.Object
  extended by org.jets3t.servlets.gatekeeper.UrlSigner
      extended by org.jets3t.servlets.gatekeeper.impl.DefaultUrlSigner
          extended by org.jets3t.servlets.gatekeeper.impl.RenameToUuidUrlSigner

public class RenameToUuidUrlSigner
extends DefaultUrlSigner

UrlSigner implementation that extends the DefaultUrlSigner class to perform some additional work - speficically this class renames the S3 objects keys based on the transaction ID.

Author:
James Murty

Field Summary
 
Fields inherited from class org.jets3t.servlets.gatekeeper.impl.DefaultUrlSigner
awsCredentials, s3BucketName, secondsUntilExpiry, TRANSACTION_ID_METADATA_NAME
 
Constructor Summary
RenameToUuidUrlSigner(javax.servlet.ServletConfig servletConfig)
          Constructs the UrlSigner with the required parameters.
 
Method Summary
protected  void updateObject(SignatureRequest signatureRequest, java.util.Properties messageProperties)
          Overrides the implementation in DefaultUrlProvider to do everything that class does, but also to rename objects based on the transaction ID.
 
Methods inherited from class org.jets3t.servlets.gatekeeper.impl.DefaultUrlSigner
signDelete, signGet, signGetAcl, signHead, signPut, signPutAcl
 
Methods inherited from class org.jets3t.servlets.gatekeeper.UrlSigner
calculateExpiryTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenameToUuidUrlSigner

public RenameToUuidUrlSigner(javax.servlet.ServletConfig servletConfig)
                      throws javax.servlet.ServletException
Constructs the UrlSigner with the required parameters.

The required parameters that must be available in the servlet configuration are:

Parameters:
servletConfig -
Throws:
javax.servlet.ServletException
Method Detail

updateObject

protected void updateObject(SignatureRequest signatureRequest,
                            java.util.Properties messageProperties)
                     throws S3ServiceException
Overrides the implementation in DefaultUrlProvider to do everything that class does, but also to rename objects based on the transaction ID.

Each object is renamed to the following format:
transactionId.objectCount.objectExtension

Objects that arrive with the metadata property GatekeeperMessage.SUMMARY_DOCUMENT_METADATA_FLAG as treated as special cases, as this flag indicates that the object is an XML summary document provided by the JetS3t Uploader application. In this case, the object should not be renamed as it is already named according to the last transaction ID.

Overrides:
updateObject in class DefaultUrlSigner
Parameters:
signatureRequest -
messageProperties -
Throws:
S3ServiceException