/** * Returns the owner of an account, using information available in the * bucket listing response. * <p> * This method cannot be performed by anonymous services, and will fail with an exception * if the service is not authenticated. * * @return * the owner of the account. * @throws ServiceException */ public StorageOwner getAccountOwner() throws ServiceException { assertAuthenticatedConnection("List all buckets to find account owner"); return getAccountOwnerImpl(); }
/** * Returns the owner of an account, using information available in the * bucket listing response. * <p> * This method cannot be performed by anonymous services, and will fail with an exception * if the service is not authenticated. * * @return * the owner of the account. * @throws ServiceException */ public StorageOwner getAccountOwner() throws ServiceException { assertAuthenticatedConnection("List all buckets to find account owner"); return getAccountOwnerImpl(); }
/** * Returns a bucket in your account by listing all your buckets * (using {@link #listAllBuckets()}), and looking for the named bucket in * this list. * <p> * This method cannot be performed by anonymous services. * * @param bucketName * @return * the bucket in your account, or null if you do not own the named bucket. * * @throws ServiceException */ public StorageBucket getBucket(String bucketName) throws ServiceException { assertAuthenticatedConnection("Get Bucket"); // List existing buckets and return the named bucket if it exists. StorageBucket[] existingBuckets = listAllBuckets(); for (int i = 0; i < existingBuckets.length; i++) { if (existingBuckets[i].getName().equals(bucketName)) { return existingBuckets[i]; } } return null; }
/** * Returns a bucket in your account by listing all your buckets * (using {@link #listAllBuckets()}), and looking for the named bucket in * this list. * <p> * This method cannot be performed by anonymous services. * * @param bucketName * @return * the bucket in your account, or null if you do not own the named bucket. * * @throws ServiceException */ public StorageBucket getBucket(String bucketName) throws ServiceException { assertAuthenticatedConnection("Get Bucket"); // List existing buckets and return the named bucket if it exists. StorageBucket[] existingBuckets = listAllBuckets(); for (int i = 0; i < existingBuckets.length; i++) { if (existingBuckets[i].getName().equals(bucketName)) { return existingBuckets[i]; } } return null; }
/** * Lists the buckets belonging to the service user. * <p> * This method cannot be performed by anonymous services, and will fail with an exception * if the service is not authenticated. * * @return * the list of buckets owned by the service user. * @throws ServiceException */ public StorageBucket[] listAllBuckets() throws ServiceException { assertAuthenticatedConnection("List all buckets"); StorageBucket[] buckets = listAllBucketsImpl(); MxDelegate.getInstance().registerStorageBucketMBeans(buckets); return buckets; }
/** * Lists the buckets belonging to the service user. * <p> * This method cannot be performed by anonymous services, and will fail with an exception * if the service is not authenticated. * * @return * the list of buckets owned by the service user. * @throws ServiceException */ public StorageBucket[] listAllBuckets() throws ServiceException { assertAuthenticatedConnection("List all buckets"); StorageBucket[] buckets = listAllBucketsImpl(); MxDelegate.getInstance().registerStorageBucketMBeans(buckets); return buckets; }
String[] ifNoneMatchTags) throws ServiceException assertAuthenticatedConnection("copyObject"); Map<String, Object> destinationMetadata = replaceMetadata ? destinationObject.getModifiableMetadata() : null;
String[] ifNoneMatchTags) throws ServiceException assertAuthenticatedConnection("copyObject"); Map<String, Object> destinationMetadata = replaceMetadata ? destinationObject.getModifiableMetadata() : null;