public void run() { S3Object[] objects = event.getObjectsWithUpdatedACL(); for (int i = 0; i < objects.length; i++) { String aclStatus = getAclDescription(objects[i].getAcl()); objectTableModel.updateObjectAclStatus(objects[i], aclStatus); objectSelectedAction(); } } });
public void run() { S3Object[] objects = event.getObjectsWithUpdatedACL(); for (int i = 0; i < objects.length; i++) { String aclStatus = getAclDescription(objects[i].getAcl()); objectTableModel.updateObjectAclStatus(objects[i], aclStatus); objectSelectedAction(); } } });
public void run() { S3Object[] objectsWithAcl = event.getObjectsWithACL(); for (int i = 0; i < objectsWithAcl.length; i++) { String aclStatus = getAclDescription(objectsWithAcl[i].getAcl()); objectTableModel.updateObjectAclStatus(objectsWithAcl[i], aclStatus); } } });
public void run() { S3Object[] objectsWithAcl = event.getObjectsWithACL(); for (int i = 0; i < objectsWithAcl.length; i++) { String aclStatus = getAclDescription(objectsWithAcl[i].getAcl()); objectTableModel.updateObjectAclStatus(objectsWithAcl[i], aclStatus); } } });
public int addObject(S3Object object) { sanitizeObjectKey(object); int insertRow = Collections.binarySearch(objectList, object, new Comparator() { public int compare(Object o1, Object o2) { return ((S3Object)o1).getKey().compareToIgnoreCase(((S3Object)o2).getKey()); } }); String aclStatus = null; if (insertRow >= 0) { // Retain the object's ACL status if it's available. aclStatus = (String) this.getValueAt(insertRow, 3); // We already have an item with this key, replace it. objectList.remove(insertRow); this.removeRow(insertRow); } else { insertRow = (-insertRow) - 1; } if (object.getAcl() != null || aclStatus == null) { aclStatus = CockpitLite.getAclDescription(object.getAcl()); } // New object to insert. objectList.add(insertRow, object); this.insertRow(insertRow, new Object[] {object.getKey(), new Long(object.getContentLength()), object.getLastModifiedDate(), aclStatus}); return insertRow; }
public int addObject(S3Object object) { sanitizeObjectKey(object); int insertRow = Collections.binarySearch(objectList, object, new Comparator() { public int compare(Object o1, Object o2) { return ((S3Object)o1).getKey().compareToIgnoreCase(((S3Object)o2).getKey()); } }); String aclStatus = null; if (insertRow >= 0) { // Retain the object's ACL status if it's available. aclStatus = (String) this.getValueAt(insertRow, 3); // We already have an item with this key, replace it. objectList.remove(insertRow); this.removeRow(insertRow); } else { insertRow = (-insertRow) - 1; } if (object.getAcl() != null || aclStatus == null) { aclStatus = CockpitLite.getAclDescription(object.getAcl()); } // New object to insert. objectList.add(insertRow, object); this.insertRow(insertRow, new Object[] {object.getKey(), new Long(object.getContentLength()), object.getLastModifiedDate(), aclStatus}); return insertRow; }
public void run() { if (retainAcls) { // Retain ACL settings from original objects. if (!s3ServiceMulti.getObjectACLs( currentSelectedBucket, sourceObjects)) { return; } for (int i = 0; i < sourceObjects.length; i++) { destinationObjects[i].setAcl( sourceObjects[i].getAcl()); } } // Copy objects. Metadata is retained, not replaced. s3ServiceMulti.copyObjects(currentBucketName, destinationBucketName, sourceObjectKeys, destinationObjects, false); if (isDeleteAfterCopy) { final S3Object[] sourceObjects = new S3Object[sourceObjectKeys.length]; for (int i = 0; i < sourceObjectKeys.length; i++) { sourceObjects[i] = new S3Object(sourceObjectKeys[i]); } s3ServiceMulti.deleteObjects(currentSelectedBucket, sourceObjects); } if (destinationBucketName.equals(currentBucketName) || isDeleteAfterCopy) { // Refesh object listing for current bucket if the bucket's contents // have changed. listObjects(); } } });
/** * Applies access control settings to an object. The ACL settings must be included * with the object. * * This method can be performed by anonymous services, but can only succeed if the * object's existing ACL already allows write access by the anonymous user. * In general, you can only access the ACL of an object if the ACL already in place * for that object (in S3) allows you to do so. See * <a href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?S3_ACLs.html"> * the S3 documentation on ACLs</a> for more details on access to ACLs. * * @param bucketName * the name of the bucket containing the object to modify. * @param object * the object with ACL settings that will be applied. * @throws S3ServiceException */ public void putObjectAcl(String bucketName, S3Object object) throws S3ServiceException { try { assertValidObject(object, "Put Object Access Control List"); putObjectAcl(bucketName, object.getKey(), object.getAcl()); } catch (ServiceException se) { throw new S3ServiceException(se); } }
/** * Applies access control settings to an object. The ACL settings must be included * with the object. * * This method can be performed by anonymous services, but can only succeed if the * object's existing ACL already allows write access by the anonymous user. * In general, you can only access the ACL of an object if the ACL already in place * for that object (in S3) allows you to do so. See * <a href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?S3_ACLs.html"> * the S3 documentation on ACLs</a> for more details on access to ACLs. * * @param bucketName * the name of the bucket containing the object to modify. * @param object * the object with ACL settings that will be applied. * @throws S3ServiceException */ public void putObjectAcl(String bucketName, S3Object object) throws S3ServiceException { try { assertValidObject(object, "Put Object Access Control List"); putObjectAcl(bucketName, object.getKey(), object.getAcl()); } catch (ServiceException se) { throw new S3ServiceException(se); } }
public void run() { if (retainAcls) { // Retain ACL settings from original objects. if (!s3ServiceMulti.getObjectACLs( currentSelectedBucket, sourceObjects)) { return; } for (int i = 0; i < sourceObjects.length; i++) { destinationObjects[i].setAcl( sourceObjects[i].getAcl()); } } // Copy objects. Metadata is retained, not replaced. s3ServiceMulti.copyObjects(currentBucketName, destinationBucketName, sourceObjectKeys, destinationObjects, false); if (isDeleteAfterCopy) { final S3Object[] sourceObjects = new S3Object[sourceObjectKeys.length]; for (int i = 0; i < sourceObjectKeys.length; i++) { sourceObjects[i] = new S3Object(sourceObjectKeys[i]); } s3ServiceMulti.deleteObjects(currentSelectedBucket, sourceObjects); } if (destinationBucketName.equals(currentBucketName) || isDeleteAfterCopy) { // Refesh object listing for current bucket if the bucket's contents // have changed. listObjects(); } } });
/** * Start a multipart upload process for a given object; must be done before * individual parts can be uploaded. * * @param bucketName * the name of the bucket in which the object will be stored. * @param object * object containing details to apply to the completed object, including: * key name, metadata, ACL, storage class, server-side encryption algorithm * @return * object representing this multipart upload. * @throws S3ServiceException */ public MultipartUpload multipartStartUpload(String bucketName, S3Object object) throws S3ServiceException { return multipartStartUploadImpl(bucketName, object.getKey(), object.getMetadataMap(), object.getAcl(), object.getStorageClass(), object.getServerSideEncryptionAlgorithm()); }
/** * Start a multipart upload process for a given object; must be done before * individual parts can be uploaded. * * @param bucketName * the name of the bucket in which the object will be stored. * @param object * object containing details to apply to the completed object, including: * key name, metadata, ACL, storage class, server-side encryption algorithm * @return * object representing this multipart upload. * @throws S3ServiceException */ public MultipartUpload multipartStartUpload(String bucketName, S3Object object) throws S3ServiceException { return multipartStartUploadImpl(bucketName, object.getKey(), object.getMetadataMap(), object.getAcl(), object.getStorageClass(), object.getServerSideEncryptionAlgorithm()); }
/** * Applies access control settings to an object. The ACL settings must be included * with the object. * * This method can be performed by anonymous services, but can only succeed if the * object's existing ACL already allows write access by the anonymous user. * In general, you can only access the ACL of an object if the ACL already in place * for that object (in S3) allows you to do so. See * <a href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?S3_ACLs.html"> * the S3 documentation on ACLs</a> for more details on access to ACLs. * * @param bucket * the bucket containing the object to modify. * @param object * the object with ACL settings that will be applied. * @throws S3ServiceException */ public void putObjectAcl(S3Bucket bucket, S3Object object) throws S3ServiceException { try { assertValidBucket(bucket, "Put Object Access Control List"); assertValidObject(object, "Put Object Access Control List"); putObjectAcl(bucket.getName(), object.getKey(), object.getAcl()); } catch (ServiceException se) { throw new S3ServiceException(se); } }
/** * Applies access control settings to an object. The ACL settings must be included * with the object. * * This method can be performed by anonymous services, but can only succeed if the * object's existing ACL already allows write access by the anonymous user. * In general, you can only access the ACL of an object if the ACL already in place * for that object (in S3) allows you to do so. See * <a href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?S3_ACLs.html"> * the S3 documentation on ACLs</a> for more details on access to ACLs. * * @param bucket * the bucket containing the object to modify. * @param object * the object with ACL settings that will be applied. * @throws S3ServiceException */ public void putObjectAcl(S3Bucket bucket, S3Object object) throws S3ServiceException { try { assertValidBucket(bucket, "Put Object Access Control List"); assertValidObject(object, "Put Object Access Control List"); putObjectAcl(bucket.getName(), object.getKey(), object.getAcl()); } catch (ServiceException se) { throw new S3ServiceException(se); } }
assertValidObject(object, "Put Versioned Object Access Control List"); String objectKey = object.getKey(); AccessControlList acl = object.getAcl(); if (acl == null) { throw new S3ServiceException("The object '" + objectKey +
assertValidObject(object, "Put Versioned Object Access Control List"); String objectKey = object.getKey(); AccessControlList acl = object.getAcl(); if (acl == null) { throw new S3ServiceException("The object '" + objectKey +
sourceObjects[i].getAcl());
sourceObjects[i].getAcl());
return copyObjectImpl(sourceBucketName, sourceObjectKey, destinationBucketName, destinationObject.getKey(), destinationObject.getAcl(), destinationMetadata, ifModifiedSince, ifUnmodifiedSince, ifMatchTags, ifNoneMatchTags, versionId, destinationObject.getStorageClass(), destinationObject.getServerSideEncryptionAlgorithm());
return copyObjectImpl(sourceBucketName, sourceObjectKey, destinationBucketName, destinationObject.getKey(), destinationObject.getAcl(), destinationMetadata, ifModifiedSince, ifUnmodifiedSince, ifMatchTags, ifNoneMatchTags, versionId, destinationObject.getStorageClass(), destinationObject.getServerSideEncryptionAlgorithm());