S3Object[] objects = service.listObjects(s3BucketName, prefix, null, 1000);
// Package object information in SignatureRequest objects. This data will be
// automatically encoded and sent across the wire back to the client.
for (int i = 0; i < objects.length; i++) {
SignatureRequest sr = new SignatureRequest();
sr.setObjectMetadata(objects[i].getMetadataMap());
sr.addObjectMetadata(S3Object.METADATA_HEADER_LAST_MODIFIED_DATE,
ServiceUtils.formatIso8601Date(objects[i].getLastModifiedDate()));
sr.setObjectKey(objects[i].getKey());
gatekeeperMessage.addSignatureRequest(sr);
}
gatekeeperMessage.addApplicationProperty("AccountDescription",
"<html>Bucket: <b>" + s3BucketName + "</b></html>");