response.setGetObjectResponse(result);
return response;
}
private GetObjectExtendedResponse toGetObjectExtendedResponse(S3GetObjectResponse engineResponse) {
GetObjectExtendedResponse response = new GetObjectExtendedResponse();
int resultCode = engineResponse.getResultCode();
GetObjectResult result = new GetObjectResult();
Status param1 = new Status();
param1.setCode( resultCode );
param1.setDescription( engineResponse.getResultDescription());
result.setStatus( param1 );
if ( 200 == resultCode || 206 == resultCode )
{
result.setData(engineResponse.getData());
result.setETag( engineResponse.getETag());
result.setMetadata(toMetadataEntry(engineResponse.getMetaEntries()));
result.setLastModified( engineResponse.getLastModified());
}
else
{ result.setETag( "" );
result.setLastModified( Calendar.getInstance());
}
response.setGetObjectResponse(result);
return response;
}