request.setSignature(listAllMyBuckets.getSignature());
return request;
}
public static ListAllMyBucketsResponse toListAllMyBucketsResponse(S3ListAllMyBucketsResponse engineResponse) {
ListAllMyBucketsResponse response = new ListAllMyBucketsResponse();
ListAllMyBucketsResult result = new ListAllMyBucketsResult();
ListAllMyBucketsEntry[] entries = null;
S3CanonicalUser ownerEngine = engineResponse.getOwner();
CanonicalUser owner = new CanonicalUser();
owner.setID(ownerEngine.getID());
owner.setDisplayName(ownerEngine.getDisplayName());
result.setOwner(owner);
S3ListAllMyBucketsEntry[] engineEntries = engineResponse.getBuckets();
if (engineEntries != null) {
entries = new ListAllMyBucketsEntry[engineEntries.length];
for (int i = 0; i < engineEntries.length; i++) {
entries[i] = new ListAllMyBucketsEntry();
entries[i].setName(engineEntries[i].getName());
entries[i].setCreationDate(engineEntries[i].getCreationDate()); //setTimeZone(TimeZone.getTimeZone("Z"));
}
ListAllMyBucketsList list = new ListAllMyBucketsList();
list.setBucket(entries);
result.setBuckets(list);
}
response.setListAllMyBucketsResponse(result);
return response;
}