@Override public StorageObject call(final AbstractHttpEntity entity) throws BackgroundException { try { final RequestEntityRestStorageService client = session.getClient(); client.putObjectWithRequestEntityImpl( containerService.getContainer(file).getName(), object, entity, status.getParameters()); if(log.isDebugEnabled()) { log.debug(String.format("Saved object %s with checksum %s", file, object.getETag())); } } catch(ServiceException e) { throw new S3ExceptionMappingService().map("Upload {0} failed", e, file); } return object; }
objectContentLengthTextField.setText(String.valueOf(object.getContentLength())); objectLastModifiedTextField.setText(String.valueOf(object.getLastModifiedDate())); objectETagTextField.setText(object.getETag()); bucketNameTextField.setText(object.getBucketName());
objectContentLengthTextField.setText(String.valueOf(object.getContentLength())); objectLastModifiedTextField.setText(String.valueOf(object.getLastModifiedDate())); objectETagTextField.setText(object.getETag()); bucketNameTextField.setText(object.getBucketName());
objectContentLengthTextField.setText(String.valueOf(currentObject.getContentLength())); objectLastModifiedTextField.setText(String.valueOf(currentObject.getLastModifiedDate())); objectETagTextField.setText(currentObject.getETag()); bucketLocationTextField.setText(currentObject.getBucketName()); String storageClass = (currentObject.getStorageClass() != null
/** * * @param containerName * @return * @throws StorageCommunicationException * @see org.opencredo.cloud.storage.StorageOperations#listContainerObjectDetails(java.lang.String) */ public List<BlobDetails> listContainerObjectDetails(String containerName) throws StorageCommunicationException { Assert.notNull(containerName, "Bucket name cannot be null"); LOG.debug("Get objects list for bucket '{}'", containerName); try { S3Object[] s3Objects = this.s3Service.listObjects(new S3Bucket(containerName)); List<BlobDetails> keys = new ArrayList<BlobDetails>(s3Objects.length); for (S3Object s : s3Objects) { keys.add(new BlobDetails(s.getBucketName(), s.getKey(), s.getETag(), s.getLastModifiedDate())); } return keys; } catch (S3ServiceException e) { throw new StorageCommunicationException("Failed to get bucket " + containerName + " object details.", e); } }
objectContentLengthTextField.setText(String.valueOf(currentObject.getContentLength())); objectLastModifiedTextField.setText(String.valueOf(currentObject.getLastModifiedDate())); objectETagTextField.setText(currentObject.getETag()); bucketLocationTextField.setText(currentObject.getBucketName()); String storageClass = (currentObject.getStorageClass() != null
object.getETag(), object.getContentLength()); } catch (ServiceException se) { throw new S3ServiceException(se);
if (!ServiceUtils.isEtagAlsoAnMD5Hash(object.getETag())) { log.warn("Unable to verify MD5 hash of downloaded data against" + " ETag returned by service because ETag value \"" + object.getETag() + "\" is not an MD5 hash value" + ", for object key: " + object.getKey()); if (!hexMD5OfDownloadedData.equals(object.getETag())) { throw new S3ServiceException("Mismatch between MD5 hash of downloaded data (" + hexMD5OfDownloadedData + ") and ETag returned by S3 (" + object.getETag() + ") for object key: " + object.getKey()); } else {
if (!ServiceUtils.isEtagAlsoAnMD5Hash(object.getETag())) { log.warn("Unable to verify MD5 hash of downloaded data against" + " ETag returned by service because ETag value \"" + object.getETag() + "\" is not an MD5 hash value" + ", for object key: " + object.getKey()); if (!hexMD5OfDownloadedData.equals(object.getETag())) { throw new S3ServiceException("Mismatch between MD5 hash of downloaded data (" + hexMD5OfDownloadedData + ") and ETag returned by S3 (" + object.getETag() + ") for object key: " + object.getKey()); } else {
object.getETag(), object.getContentLength()); } catch (ServiceException se) { throw new S3ServiceException(se);