Tabnine Logo
MultipartUpload.getObjectKey
Code IndexAdd Tabnine to your IDE (free)

How to use
getObjectKey
method
in
org.jets3t.service.model.MultipartUpload

Best Java code snippets using org.jets3t.service.model.MultipartUpload.getObjectKey (Showing top 20 results out of 315)

origin: net.java.dev.jets3t/jets3t

@Override
public void fireProgressEvent(ThreadWatcher threadWatcher, List completedResults) {
  MultipartUpload[] completedObjects = (MultipartUpload[]) completedResults
    .toArray(new MultipartUpload[completedResults.size()]);
  // Hack way to remove completed objects from incomplete list
  List<StorageObject> completedStorageObjects = new ArrayList<StorageObject>();
  for (MultipartUpload upload: completedObjects) {
    for (StorageObject object: incompletedObjectsList) {
      if (object.getKey().equals(upload.getObjectKey())) {
        completedStorageObjects.add(object);
      }
    }
  }
  incompletedObjectsList.removeAll(completedStorageObjects);
  fireServiceEvent(MultipartStartsEvent.newInProgressEvent(threadWatcher,
    completedObjects, uniqueOperationId));
}
@Override
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

@Override
public void fireProgressEvent(ThreadWatcher threadWatcher, List completedResults) {
  MultipartUpload[] completedObjects = (MultipartUpload[]) completedResults
    .toArray(new MultipartUpload[completedResults.size()]);
  // Hack way to remove completed objects from incomplete list
  List<StorageObject> completedStorageObjects = new ArrayList<StorageObject>();
  for (MultipartUpload upload: completedObjects) {
    for (StorageObject object: incompletedObjectsList) {
      if (object.getKey().equals(upload.getObjectKey())) {
        completedStorageObjects.add(object);
      }
    }
  }
  incompletedObjectsList.removeAll(completedStorageObjects);
  fireServiceEvent(MultipartStartsEvent.newInProgressEvent(threadWatcher,
    completedObjects, uniqueOperationId));
}
@Override
origin: iterate-ch/cyberduck

@Override
public List<MultipartPart> list(final MultipartUpload multipart) throws BackgroundException {
  if(log.isInfoEnabled()) {
    log.info(String.format("List completed parts of %s", multipart.getUploadId()));
  }
  // This operation lists the parts that have been uploaded for a specific multipart upload.
  try {
    return session.getClient().multipartListParts(multipart);
  }
  catch(S3ServiceException e) {
    throw new S3ExceptionMappingService().map(MessageFormat.format("Upload {0} failed", multipart.getObjectKey()), e);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * Abort the given multipart upload process. Also deletes any parts that may
 * have already been uploaded.
 *
 * @param upload
 * the multipart upload to abort.
 * @throws S3ServiceException
 */
public void multipartAbortUpload(MultipartUpload upload) throws S3ServiceException
{
  multipartAbortUploadImpl(upload.getUploadId(), upload.getBucketName(), upload.getObjectKey());
}
origin: net.java.dev.jets3t/jets3t

/**
 * Abort the given multipart upload process. Also deletes any parts that may
 * have already been uploaded.
 *
 * @param upload
 * the multipart upload to abort.
 * @throws S3ServiceException
 */
public void multipartAbortUpload(MultipartUpload upload) throws S3ServiceException
{
  multipartAbortUploadImpl(upload.getUploadId(), upload.getBucketName(), upload.getObjectKey());
}
origin: net.java.dev.jets3t/jets3t

/**
 * List the parts that have been uploaded for a given multipart upload.
 *
 * @param upload
 * the multipart upload whose parts will be listed.
 * @return
 * a list of multipart parts that have been successfully uploaded.
 * @throws S3ServiceException
 */
public List<MultipartPart> multipartListParts(MultipartUpload upload)
  throws S3ServiceException
{
  return multipartListPartsImpl(upload.getUploadId(),
    upload.getBucketName(), upload.getObjectKey());
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * List the parts that have been uploaded for a given multipart upload.
 *
 * @param upload
 * the multipart upload whose parts will be listed.
 * @return
 * a list of multipart parts that have been successfully uploaded.
 * @throws S3ServiceException
 */
public List<MultipartPart> multipartListParts(MultipartUpload upload)
  throws S3ServiceException
{
  return multipartListPartsImpl(upload.getUploadId(),
    upload.getBucketName(), upload.getObjectKey());
}
origin: net.java.dev.jets3t/jets3t

/**
 * Complete a multipart upload by combining all the given parts into
 * the final object.
 *
 * @param upload
 * the multipart upload whose parts will be completed.
 * @param parts
 * the parts comprising the final object.
 * @return
 * information about the completion operation.
 * @throws S3ServiceException
 */
public MultipartCompleted multipartCompleteUpload(MultipartUpload upload,
  List<MultipartPart> parts) throws S3ServiceException
{
  return multipartCompleteUploadImpl(upload.getUploadId(), upload.getBucketName(),
    upload.getObjectKey(), parts);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * Complete a multipart upload by combining all the given parts into
 * the final object.
 *
 * @param upload
 * the multipart upload whose parts will be completed.
 * @param parts
 * the parts comprising the final object.
 * @return
 * information about the completion operation.
 * @throws S3ServiceException
 */
public MultipartCompleted multipartCompleteUpload(MultipartUpload upload,
  List<MultipartPart> parts) throws S3ServiceException
{
  return multipartCompleteUploadImpl(upload.getUploadId(), upload.getBucketName(),
    upload.getObjectKey(), parts);
}
origin: iterate-ch/cyberduck

  @Override
  public void delete(final MultipartUpload upload) throws BackgroundException {
    if(log.isInfoEnabled()) {
      log.info(String.format("Delete multipart upload %s", upload.getUploadId()));
    }
    try {
      session.getClient().multipartAbortUpload(upload);
    }
    catch(S3ServiceException e) {
      throw new S3ExceptionMappingService().map("Cannot delete {0}", e,
        new Path(new Path(PathNormalizer.normalize(upload.getBucketName()), EnumSet.of(Path.Type.directory)),
          upload.getObjectKey(), EnumSet.of(Path.Type.file)));
    }
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

@Override
public String toString() {
  return this.getClass().getName() + " ["
    + "uploadId=" + getUploadId()
    + ", bucketName=" + getBucketName()
    + ", objectKey=" + getObjectKey()
    + (metadata != null ? ", metadata=" + getMetadata() : "")
    + (storageClass != null ? ", storageClass=" + getStorageClass() : "")
    + (initiator != null ? ", initiator=" + getInitiator() : "")
    + (owner != null ? ", owner=" + getOwner() : "")
    + (initiatedDate != null ? ", initiatedDate=" + getInitiatedDate() : "")
    + ", multipartsPartsUploaded=" + multipartsPartsUploaded
    + "]";
}
origin: net.java.dev.jets3t/jets3t

@Override
public String toString() {
  return this.getClass().getName() + " ["
    + "uploadId=" + getUploadId()
    + ", bucketName=" + getBucketName()
    + ", objectKey=" + getObjectKey()
    + (metadata != null ? ", metadata=" + getMetadata() : "")
    + (storageClass != null ? ", storageClass=" + getStorageClass() : "")
    + (initiator != null ? ", initiator=" + getInitiator() : "")
    + (owner != null ? ", owner=" + getOwner() : "")
    + (initiatedDate != null ? ", initiatedDate=" + getInitiatedDate() : "")
    + ", multipartsPartsUploaded=" + multipartsPartsUploaded
    + "]";
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * Convenience method to complete a multipart upload by automatically finding
 * its parts. This method does more work than the lower-level
 * {@link #multipartCompleteUpload(MultipartUpload, List)} API operation, but
 * relieves the caller of having to keep track of all the parts uploaded
 * for a multipart upload.
 *
 * @param upload
 * the multipart upload whose parts will be completed.
 * @return
 * information about the completion operation.
 * @throws S3ServiceException
 */
public MultipartCompleted multipartCompleteUpload(MultipartUpload upload) throws S3ServiceException
{
  List<MultipartPart> parts = multipartListParts(upload);
  return multipartCompleteUploadImpl(upload.getUploadId(), upload.getBucketName(),
    upload.getObjectKey(), parts);
}
origin: net.java.dev.jets3t/jets3t

/**
 * Convenience method to complete a multipart upload by automatically finding
 * its parts. This method does more work than the lower-level
 * {@link #multipartCompleteUpload(MultipartUpload, List)} API operation, but
 * relieves the caller of having to keep track of all the parts uploaded
 * for a multipart upload.
 *
 * @param upload
 * the multipart upload whose parts will be completed.
 * @return
 * information about the completion operation.
 * @throws S3ServiceException
 */
public MultipartCompleted multipartCompleteUpload(MultipartUpload upload) throws S3ServiceException
{
  List<MultipartPart> parts = multipartListParts(upload);
  return multipartCompleteUploadImpl(upload.getUploadId(), upload.getBucketName(),
    upload.getObjectKey(), parts);
}
origin: net.java.dev.jets3t/jets3t

/**
 * From an existing object, copy an individual part that will comprise a piece of a
 * multipart upload object.
 *
 * @param upload
 * the multipart upload to which this part will be added.
 * @param partNumber
 * the part's number; must be between 1 and 10,000 and must uniquely identify a given
 * part and represent its order compared to all other parts. Part numbers need not
 * be sequential.
 * @param sourceBucketName
 * the name of the bucket that contains the original object.
 * @param sourceObjectKey
 * the key name of the original object.
 *
 * @return
 * information about the uploaded copy part, retain this information to eventually complete
 * the object with {@link #multipartCompleteUpload(MultipartUpload, List)}.
 * @throws S3ServiceException
 */
public MultipartPart multipartUploadPartCopy(MultipartUpload upload, Integer partNumber,
  String sourceBucketName, String sourceObjectKey) throws S3ServiceException
{
  MultipartPart part = multipartUploadPartCopyImpl(upload.getUploadId(),
    upload.getBucketName(), upload.getObjectKey(), partNumber,
    sourceBucketName, sourceObjectKey,
    null, null, null, null, null, null, null);
  upload.addMultipartPartToUploadedList(part);
  return part;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * From an existing object, copy an individual part that will comprise a piece of a
 * multipart upload object.
 *
 * @param upload
 * the multipart upload to which this part will be added.
 * @param partNumber
 * the part's number; must be between 1 and 10,000 and must uniquely identify a given
 * part and represent its order compared to all other parts. Part numbers need not
 * be sequential.
 * @param sourceBucketName
 * the name of the bucket that contains the original object.
 * @param sourceObjectKey
 * the key name of the original object.
 *
 * @return
 * information about the uploaded copy part, retain this information to eventually complete
 * the object with {@link #multipartCompleteUpload(MultipartUpload, List)}.
 * @throws S3ServiceException
 */
public MultipartPart multipartUploadPartCopy(MultipartUpload upload, Integer partNumber,
  String sourceBucketName, String sourceObjectKey) throws S3ServiceException
{
  MultipartPart part = multipartUploadPartCopyImpl(upload.getUploadId(),
    upload.getBucketName(), upload.getObjectKey(), partNumber,
    sourceBucketName, sourceObjectKey,
    null, null, null, null, null, null, null);
  upload.addMultipartPartToUploadedList(part);
  return part;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

upload.getBucketName(), upload.getObjectKey(),
partNumber, sourceBucketName, sourceObjectKey,
null, null, null, null, null, null, versionId);
origin: net.java.dev.jets3t/jets3t

upload.getBucketName(), upload.getObjectKey(),
partNumber, sourceBucketName, sourceObjectKey,
null, null, null, null, null, null, versionId);
origin: iterate-ch/cyberduck

@Override
public HttpResponseOutputStream<VersionId> write(final Path file, final TransferStatus status, final ConnectionCallback callback) throws BackgroundException {
  final S3Object object = new S3WriteFeature(session, new S3DisabledMultipartService())
    .getDetails(file, status);
  // ID for the initiated multipart upload.
  final MultipartUpload multipart;
  try {
    multipart = session.getClient().multipartStartUpload(
      containerService.getContainer(file).getName(), object);
    if(log.isDebugEnabled()) {
      log.debug(String.format("Multipart upload started for %s with ID %s",
        multipart.getObjectKey(), multipart.getUploadId()));
    }
  }
  catch(ServiceException e) {
    throw new S3ExceptionMappingService().map("Upload {0} failed", e, file);
  }
  final MultipartOutputStream proxy = new MultipartOutputStream(multipart, file, status);
  return new HttpResponseOutputStream<VersionId>(new MemorySegementingOutputStream(proxy,
    preferences.getInteger("s3.upload.multipart.partsize.minimum"))) {
    @Override
    public VersionId getStatus() {
      return proxy.getVersionId();
    }
  };
}
origin: iterate-ch/cyberduck

attributes.setVersionId(upload.getUploadId());
attributes.setModificationDate(upload.getInitiatedDate().getTime());
objects.add(new Path(directory, upload.getObjectKey(), EnumSet.of(Path.Type.file, Path.Type.upload), attributes));
org.jets3t.service.modelMultipartUploadgetObjectKey

Popular methods of MultipartUpload

  • <init>
  • getBucketName
  • getInitiatedDate
  • getUploadId
  • addMultipartPartToUploadedList
  • getInitiator
  • getMetadata
  • getOwner
  • getStorageClass
  • setBucketName
  • setMetadata
  • setMetadata

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • getExternalFilesDir (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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