Class AbstractImportFilesResource<TRAR extends AbstractResult<TaskResponse>>

java.lang.Object
com.cloudconvert.resource.AbstractResource
com.cloudconvert.resource.AbstractImportFilesResource<TRAR>
All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable
Direct Known Subclasses:
AsyncImportFilesResource, ImportFilesResource

public abstract class AbstractImportFilesResource<TRAR extends AbstractResult<TaskResponse>>
extends AbstractResource
  • Field Details

    • PATH_SEGMENT_IMPORT

      public static final java.lang.String PATH_SEGMENT_IMPORT
      See Also:
      Constant Field Values
    • PATH_SEGMENT_URL

      public static final java.lang.String PATH_SEGMENT_URL
      See Also:
      Constant Field Values
    • PATH_SEGMENT_UPLOAD

      public static final java.lang.String PATH_SEGMENT_UPLOAD
      See Also:
      Constant Field Values
    • PATH_SEGMENT_S3

      public static final java.lang.String PATH_SEGMENT_S3
      See Also:
      Constant Field Values
    • PATH_SEGMENTS_AZURE_BLOB

      public static final java.util.List<java.lang.String> PATH_SEGMENTS_AZURE_BLOB
    • PATH_SEGMENT_GOOGLE_CLOUD_STORAGE

      public static final java.lang.String PATH_SEGMENT_GOOGLE_CLOUD_STORAGE
      See Also:
      Constant Field Values
    • PATH_SEGMENT_OPENSTACK

      public static final java.lang.String PATH_SEGMENT_OPENSTACK
      See Also:
      Constant Field Values
    • PATH_SEGMENT_SFTP

      public static final java.lang.String PATH_SEGMENT_SFTP
      See Also:
      Constant Field Values
  • Constructor Details

  • Method Details

    • url

      public abstract TRAR url​(@NotNull @NotNull UrlImportRequest urlImportRequest) throws java.io.IOException, java.net.URISyntaxException
      Create a task to import one file by downloading it from an URL.
      Parameters:
      urlImportRequest - UrlImportRequest
      Returns:
      TRD
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • getUrlHttpUriRequest

      protected org.apache.http.client.methods.HttpUriRequest getUrlHttpUriRequest​(@NotNull @NotNull UrlImportRequest urlImportRequest) throws java.io.IOException, java.net.URISyntaxException
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • upload

      public abstract TRAR upload​(@NotNull @NotNull UploadImportRequest uploadImportRequest) throws java.io.IOException, java.net.URISyntaxException
      Create a task which uploads one input file. It allows your users to directly upload input files to CloudConvert, without temporary storing them on your server.

      Just create upload task, do not upload file immediately

      Parameters:
      uploadImportRequest - UploadImportRequest
      Returns:
      TRD
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • upload

      public abstract TRAR upload​(@NotNull @NotNull UploadImportRequest uploadImportRequest, @NotNull @NotNull java.io.File file) throws java.io.IOException, java.net.URISyntaxException
      Create a task which uploads one input file. It allows your users to directly upload input files to CloudConvert, without temporary storing them on your server.

      Upload file immediately

      Parameters:
      uploadImportRequest - UploadImportRequest
      file - File file which will be uploaded
      Returns:
      TRD
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • upload

      public abstract TRAR upload​(@NotNull TRAR taskResponseResult, @NotNull @NotNull java.io.File file) throws java.io.IOException, java.net.URISyntaxException
      Create a task which uploads one input file. It allows your users to directly upload input files to CloudConvert, without temporary storing them on your server.

      Upload file using existing task response data result

      Parameters:
      taskResponseResult - AbstractImportFilesResource
      file - File file which will be uploaded
      Returns:
      TRD
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • upload

      public abstract TRAR upload​(@NotNull @NotNull java.lang.String taskId, @NotNull TaskResponse.Result.Form taskResponseResultForm, @NotNull @NotNull java.io.File file) throws java.io.IOException, java.net.URISyntaxException
      Create a task which uploads one input file. It allows your users to directly upload input files to CloudConvert, without temporary storing them on your server.

      Upload file using existing task id and TaskResponse.Result.Form

      Parameters:
      taskId - task
      taskResponseResultForm - TaskResponse.Result.Form
      file - File file which will be uploaded
      Returns:
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • upload

      public abstract TRAR upload​(@NotNull @NotNull UploadImportRequest uploadImportRequest, @NotNull @NotNull java.io.InputStream inputStream) throws java.io.IOException, java.net.URISyntaxException
      Create a task which uploads one input file. It allows your users to directly upload input files to CloudConvert, without temporary storing them on your server.

      Upload file immediately

      Parameters:
      uploadImportRequest - UploadImportRequest
      inputStream - InputStream of file which will be uploaded
      Returns:
      TRD
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • upload

      public abstract TRAR upload​(@NotNull @NotNull UploadImportRequest uploadImportRequest, @NotNull @NotNull java.io.InputStream inputStream, @NotNull @NotNull java.lang.String filename) throws java.io.IOException, java.net.URISyntaxException
      Create a task which uploads one input file. It allows your users to directly upload input files to CloudConvert, without temporary storing them on your server.

      Upload file immediately

      Parameters:
      uploadImportRequest - UploadImportRequest
      inputStream - InputStream of file which will be uploaded
      filename - Set the filename, including file extension
      Returns:
      TRD
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • upload

      public abstract TRAR upload​(@NotNull TRAR taskResponseResult, @NotNull @NotNull java.io.InputStream inputStream) throws java.io.IOException, java.net.URISyntaxException
      Create a task which uploads one input file. It allows your users to directly upload input files to CloudConvert, without temporary storing them on your server.

      Upload file using existing task response data result

      Parameters:
      taskResponseResult - AbstractImportFilesResource
      inputStream - InputStream of file which will be uploaded
      Returns:
      TRD
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • upload

      public abstract TRAR upload​(@NotNull TRAR taskResponseResult, @NotNull @NotNull java.io.InputStream inputStream, @NotNull @NotNull java.lang.String filename) throws java.io.IOException, java.net.URISyntaxException
      Create a task which uploads one input file. It allows your users to directly upload input files to CloudConvert, without temporary storing them on your server.

      Upload file using existing task response data result

      Parameters:
      taskResponseResult - AbstractImportFilesResource
      inputStream - InputStream of file which will be uploaded
      filename - Set the filename, including file extension
      Returns:
      TRD
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • upload

      public abstract TRAR upload​(@NotNull @NotNull java.lang.String taskId, @NotNull TaskResponse.Result.Form taskResponseResultForm, @NotNull @NotNull java.io.InputStream inputStream) throws java.io.IOException, java.net.URISyntaxException
      Create a task which uploads one input file. It allows your users to directly upload input files to CloudConvert, without temporary storing them on your server.

      Upload file using existing task id and TaskResponse.Result.Form

      Parameters:
      taskId - task
      taskResponseResultForm - TaskResponse.Result.Form
      inputStream - InputStream of file which will be uploaded
      Returns:
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • upload

      public abstract TRAR upload​(@NotNull @NotNull java.lang.String taskId, @NotNull TaskResponse.Result.Form taskResponseResultForm, @NotNull @NotNull java.io.InputStream inputStream, @NotNull @NotNull java.lang.String filename) throws java.io.IOException, java.net.URISyntaxException
      Create a task which uploads one input file. It allows your users to directly upload input files to CloudConvert, without temporary storing them on your server.

      Upload file using existing task id and TaskResponse.Result.Form

      Parameters:
      taskId - task
      taskResponseResultForm - TaskResponse.Result.Form
      inputStream - InputStream of file which will be uploaded
      filename - Set the filename, including file extension
      Returns:
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • s3

      public abstract TRAR s3​(@NotNull @NotNull S3ImportRequest s3ImportRequest) throws java.io.IOException, java.net.URISyntaxException
      Create a task to import files by downloading it from a S3 bucket.
      Parameters:
      s3ImportRequest - S3ImportRequest
      Returns:
      TRD
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • getS3HttpUriRequest

      protected org.apache.http.client.methods.HttpUriRequest getS3HttpUriRequest​(@NotNull @NotNull S3ImportRequest s3ImportRequest) throws java.io.IOException, java.net.URISyntaxException
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • azureBlob

      public abstract TRAR azureBlob​(@NotNull @NotNull AzureBlobImportRequest azureBlobImportRequest) throws java.io.IOException, java.net.URISyntaxException
      Create a task to import files by downloading it from a Azure blob container.
      Parameters:
      azureBlobImportRequest - AzureBlobImportRequest
      Returns:
      TRD
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • getAzureBlobHttpUriRequest

      protected org.apache.http.client.methods.HttpUriRequest getAzureBlobHttpUriRequest​(@NotNull @NotNull AzureBlobImportRequest azureBlobImportRequest) throws java.io.IOException, java.net.URISyntaxException
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • googleCloudStorage

      public abstract TRAR googleCloudStorage​(@NotNull @NotNull GoogleCloudStorageImportRequest googleCloudStorageImportRequest) throws java.io.IOException, java.net.URISyntaxException
      Create a task to import files by downloading it from a Google Cloud Storage bucket.
      Parameters:
      googleCloudStorageImportRequest - GoogleCloudStorageImportRequest
      Returns:
      TRD
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • getGoogleCloudHttpUriRequest

      protected org.apache.http.client.methods.HttpUriRequest getGoogleCloudHttpUriRequest​(@NotNull @NotNull GoogleCloudStorageImportRequest googleCloudStorageImportRequest) throws java.io.IOException, java.net.URISyntaxException
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • openStack

      public abstract TRAR openStack​(@NotNull @NotNull OpenStackImportRequest openStackImportRequest) throws java.io.IOException, java.net.URISyntaxException
      Create a task to import files by downloading it from OpenStack Object Storage (Swift).
      Parameters:
      openStackImportRequest - OpenStackImportRequest
      Returns:
      TRD
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • getOpenStackHttpUriRequest

      protected org.apache.http.client.methods.HttpUriRequest getOpenStackHttpUriRequest​(@NotNull @NotNull OpenStackImportRequest openStackImportRequest) throws java.io.IOException, java.net.URISyntaxException
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • sftp

      public abstract TRAR sftp​(@NotNull @NotNull SftpImportRequest sftpImportRequest) throws java.io.IOException, java.net.URISyntaxException
      Create a task to import files by downloading it from a SFTP server.
      Parameters:
      sftpImportRequest - SftpImportRequest
      Returns:
      TRD
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • getSftpHttpUriRequest

      protected org.apache.http.client.methods.HttpUriRequest getSftpHttpUriRequest​(@NotNull @NotNull SftpImportRequest sftpImportRequest) throws java.io.IOException, java.net.URISyntaxException
      Throws:
      java.io.IOException
      java.net.URISyntaxException
    • getMultipartHttpEntity

      protected org.apache.http.HttpEntity getMultipartHttpEntity​(TaskResponse.Result.Form uploadImportResponseResultForm, java.io.File file) throws java.io.IOException
      Throws:
      java.io.IOException
    • getMultipartHttpEntity

      protected org.apache.http.HttpEntity getMultipartHttpEntity​(TaskResponse.Result.Form uploadImportResponseResultForm, java.io.InputStream inputStream) throws java.io.IOException
      Throws:
      java.io.IOException
    • getMultipartHttpEntity

      protected org.apache.http.HttpEntity getMultipartHttpEntity​(TaskResponse.Result.Form uploadImportResponseResultForm, @NotNull @NotNull java.lang.String filename, java.io.InputStream inputStream) throws java.io.IOException
      Throws:
      java.io.IOException