Codota Logo
StorageBucket.getName
Code IndexAdd Codota to your IDE (free)

How to use
getName
method
in
org.jets3t.service.model.StorageBucket

Best Java code snippets using org.jets3t.service.model.StorageBucket.getName (Showing top 19 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: net.java.dev.jets3t/jets3t

/**
 * Throws an exception if a bucket is null or contains a null/empty name.
 * @param bucket
 * @param action
 * the action being attempted which this assertion is applied, for debugging purposes.
 * @throws ServiceException
 */
protected void assertValidBucket(StorageBucket bucket, String action) throws ServiceException {
  if (bucket == null || bucket.getName() == null || bucket.getName().length() == 0) {
    throw new ServiceException("The action " + action
      + " cannot be performed with an invalid bucket: " + bucket);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * Throws an exception if a bucket is null or contains a null/empty name.
 * @param bucket
 * @param action
 * the action being attempted which this assertion is applied, for debugging purposes.
 * @throws ServiceException
 */
protected void assertValidBucket(StorageBucket bucket, String action) throws ServiceException {
  if (bucket == null || bucket.getName() == null || bucket.getName().length() == 0) {
    throw new ServiceException("The action " + action
      + " cannot be performed with an invalid bucket: " + bucket);
  }
}
origin: net.java.dev.jets3t/jets3t

public static void registerMBeans(StorageBucket[] buckets) {
  if (!isEnabled) {
    return;
  }
  for (int i=0; i<buckets.length; i++) {
    getInstance(buckets[i].getName());
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

public static void registerMBeans(StorageBucket[] buckets) {
  if (!isEnabled) {
    return;
  }
  for (int i=0; i<buckets.length; i++) {
    getInstance(buckets[i].getName());
  }
}
origin: net.java.dev.jets3t/jets3t

@Override
public String toString() {
  return "StorageBucket [name=" + getName() + "] Metadata=" + getMetadataMap();
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

@Override
public String toString() {
  return "StorageBucket [name=" + getName() + "] Metadata=" + getMetadataMap();
}
origin: net.java.dev.jets3t/jets3t

/**
 * Deletes a bucket. Only the owner of a bucket may delete it.
 * <p>
 * This method cannot be performed by anonymous services.
 *
 * @param bucket
 * the bucket to delete.
 * @throws ServiceException
 */
public void deleteBucket(StorageBucket bucket) throws ServiceException {
  assertValidBucket(bucket, "Delete bucket");
  deleteBucketImpl(bucket.getName());
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * Deletes a bucket. Only the owner of a bucket may delete it.
 * <p>
 * This method cannot be performed by anonymous services.
 *
 * @param bucket
 * the bucket to delete.
 * @throws ServiceException
 */
public void deleteBucket(StorageBucket bucket) throws ServiceException {
  assertValidBucket(bucket, "Delete bucket");
  deleteBucketImpl(bucket.getName());
}
origin: net.java.dev.jets3t/jets3t

/**
 * 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;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * 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;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * Applies access control settings to a bucket. The ACL settings must be included
 * inside the bucket.
 *
 * This method can be performed by anonymous services, but can only succeed if the
 * bucket's existing ACL already allows write access by the anonymous user.
 * In general, you can only access the ACL of a bucket if the ACL already in place
 * for that bucket allows you to do so.
 *
 * @param bucket
 * a bucket with ACL settings to apply.
 * @throws ServiceException
 */
public void putBucketAcl(StorageBucket bucket) throws ServiceException {
  assertValidBucket(bucket, "Put Bucket Access Control List");
  putBucketAcl(bucket.getName(), bucket.getAcl());
}
origin: net.java.dev.jets3t/jets3t

/**
 * Applies access control settings to a bucket. The ACL settings must be included
 * inside the bucket.
 *
 * This method can be performed by anonymous services, but can only succeed if the
 * bucket's existing ACL already allows write access by the anonymous user.
 * In general, you can only access the ACL of a bucket if the ACL already in place
 * for that bucket allows you to do so.
 *
 * @param bucket
 * a bucket with ACL settings to apply.
 * @throws ServiceException
 */
public void putBucketAcl(StorageBucket bucket) throws ServiceException {
  assertValidBucket(bucket, "Put Bucket Access Control List");
  putBucketAcl(bucket.getName(), bucket.getAcl());
}
origin: net.java.dev.jets3t/jets3t

/**
 * Create a bucket with the Access Control List settings of the bucket object (if any).
 * <p>
 * <b>Caution:</b> Performing this operation unnecessarily when a bucket already
 * exists may cause OperationAborted errors with the message "A conflicting conditional
 * operation is currently in progress against this resource.". To avoid this error, use the
 * {@link #getOrCreateBucket(String)} in situations where the bucket may already exist.
 * <p>
 * This method cannot be performed by anonymous services.
 *
 * @param bucket
 * the bucket to create, including optional ACL settings.
 * @return
 * the created bucket object. <b>Note:</b> the object returned has minimal information about
 * the bucket that was created, including only the bucket's name.
 * @throws ServiceException
 */
public StorageBucket createBucket(StorageBucket bucket) throws ServiceException
{
  return createBucketImpl(bucket.getName(), bucket.getLocation(), bucket.getAcl());
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * Create a bucket with the Access Control List settings of the bucket object (if any).
 * <p>
 * <b>Caution:</b> Performing this operation unnecessarily when a bucket already
 * exists may cause OperationAborted errors with the message "A conflicting conditional
 * operation is currently in progress against this resource.". To avoid this error, use the
 * {@link #getOrCreateBucket(String)} in situations where the bucket may already exist.
 * <p>
 * This method cannot be performed by anonymous services.
 *
 * @param bucket
 * the bucket to create, including optional ACL settings.
 * @return
 * the created bucket object. <b>Note:</b> the object returned has minimal information about
 * the bucket that was created, including only the bucket's name.
 * @throws ServiceException
 */
public StorageBucket createBucket(StorageBucket bucket) throws ServiceException
{
  return createBucketImpl(bucket.getName(), bucket.getLocation(), bucket.getAcl());
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

compareLocalAndRemoteFiles(mergedDiscrepancyResults, bucket.getName(),
  rootObjectPath, priorLastKey, objectKeyToFilepathMap,
  md5GenerationProgressWatcher);
    new DownloadPackage[downloadPackagesList.size()]);
  (new ThreadedStorageService(storageService, serviceEventAdaptor)).downloadObjects(
    bucket.getName(), downloadPackages);
  serviceEventAdaptor.throwErrorIfPresent();
  new StorageObject[objectsMoved.size()]);
(new ThreadedStorageService(storageService, serviceEventAdaptor)).deleteObjects(
  bucket.getName(), objects);
serviceEventAdaptor.throwErrorIfPresent();
origin: net.java.dev.jets3t/jets3t

compareLocalAndRemoteFiles(mergedDiscrepancyResults, bucket.getName(),
  rootObjectPath, priorLastKey, objectKeyToFilepathMap,
  md5GenerationProgressWatcher);
    new DownloadPackage[downloadPackagesList.size()]);
  (new ThreadedStorageService(storageService, serviceEventAdaptor)).downloadObjects(
    bucket.getName(), downloadPackages);
  serviceEventAdaptor.throwErrorIfPresent();
  new StorageObject[objectsMoved.size()]);
(new ThreadedStorageService(storageService, serviceEventAdaptor)).deleteObjects(
  bucket.getName(), objects);
serviceEventAdaptor.throwErrorIfPresent();
origin: net.java.dev.jets3t/jets3t

  compareLocalAndRemoteFiles(mergedDiscrepancyResults, bucket.getName(), rootObjectPath,
    priorLastKey, objectKeyToFilepathMap, md5GenerationProgressWatcher);
priorLastKey = result.priorLastKey;
        bucket.getName(), objectsForStandardPut.toArray(new StorageObject[] {}));
      serviceEventAdaptor.throwErrorIfPresent();
        bucket.getName(), (S3Service)storageService,
        objectsForMultipartUpload, serviceEventAdaptor);
(new ThreadedStorageService(storageService, serviceEventAdaptor)).deleteObjects(bucket.getName(), objects);
serviceEventAdaptor.throwErrorIfPresent();
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

  compareLocalAndRemoteFiles(mergedDiscrepancyResults, bucket.getName(), rootObjectPath,
    priorLastKey, objectKeyToFilepathMap, md5GenerationProgressWatcher);
priorLastKey = result.priorLastKey;
        bucket.getName(), objectsForStandardPut.toArray(new StorageObject[] {}));
      serviceEventAdaptor.throwErrorIfPresent();
        bucket.getName(), (S3Service)storageService,
        objectsForMultipartUpload, serviceEventAdaptor);
(new ThreadedStorageService(storageService, serviceEventAdaptor)).deleteObjects(bucket.getName(), objects);
serviceEventAdaptor.throwErrorIfPresent();
origin: iterate-ch/cyberduck

final Path bucket = new Path(PathNormalizer.normalize(b.getName()), EnumSet.of(Path.Type.volume, Path.Type.directory));
if(b.getOwner() != null) {
org.jets3t.service.modelStorageBucketgetName

Popular methods of StorageBucket

  • getLocation
  • <init>
  • addMetadata
  • getAcl
  • getMetadata
  • getMetadataMap
  • replaceAllMetadata
  • setAcl
    Sets the bucket's Access Control List - this should only be used internally by JetS3t methods that r
  • setCreationDate
    Sets the bucket's creation date - this should only be used internally by JetS3t methods that retriev
  • setLocation
    Set's the bucket's location. This method should only be used internally by JetS3t methods that retri
  • setName
  • setOwner
  • setName,
  • setOwner,
  • getCreationDate,
  • getOwner,
  • isLocationKnown

Popular in Java

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
  • getExternalFilesDir (Context)
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Notification (javax.management)
  • JButton (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now