congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
StorageBucket.getName
Code IndexAdd Tabnine 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)

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
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
  • putExtra (Intent)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now