Package com.cloudconvert.resource.sync
Class ImportFilesResource
java.lang.Object
com.cloudconvert.resource.AbstractResource
com.cloudconvert.resource.AbstractImportFilesResource<Result<TaskResponse>>
com.cloudconvert.resource.sync.ImportFilesResource
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class ImportFilesResource extends AbstractImportFilesResource<Result<TaskResponse>>
-
Field Summary
Fields inherited from class com.cloudconvert.resource.AbstractImportFilesResource
PATH_SEGMENT_BASE64, PATH_SEGMENT_GOOGLE_CLOUD_STORAGE, PATH_SEGMENT_IMPORT, PATH_SEGMENT_OPENSTACK, PATH_SEGMENT_RAW, PATH_SEGMENT_S3, PATH_SEGMENT_SFTP, PATH_SEGMENT_UPLOAD, PATH_SEGMENT_URL, PATH_SEGMENTS_AZURE_BLOBFields inherited from class com.cloudconvert.resource.AbstractResource
BEARER, HEADER_AUTHORIZATION, HEADER_USER_AGENT, INPUT_STREAM_TYPE_REFERENCE, JOB_RESPONSE_PAGEABLE_TYPE_REFERENCE, JOB_RESPONSE_TYPE_REFERENCE, MAP_STRING_TO_OBJECT_TYPE_REFERENCE, OPERATION_RESPONSE_PAGEABLE_TYPE_REFERENCE, TASK_RESPONSE_PAGEABLE_TYPE_REFERENCE, TASK_RESPONSE_TYPE_REFERENCE, USER_RESPONSE_TYPE_REFERENCE, V2, VALUE_USER_AGENT, VOID_TYPE_REFERENCE, WEBHOOKS_RESPONSE_PAGEABLE_TYPE_REFERENCE, WEBHOOKS_RESPONSE_TYPE_REFERENCE -
Constructor Summary
Constructors Constructor Description ImportFilesResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider, RequestExecutor requestExecutor, TasksResource tasksResource) -
Method Summary
Modifier and Type Method Description Result<TaskResponse>azureBlob(@NotNull AzureBlobImportRequest azureBlobImportRequest)Create a task to import files by downloading it from a Azure blob container.Result<TaskResponse>base64(@NotNull Base64ImportRequest base64ImportRequest)Create a task to import a base64 filevoidclose()Result<TaskResponse>googleCloudStorage(@NotNull GoogleCloudStorageImportRequest googleCloudStorageImportRequest)Create a task to import files by downloading it from a Google Cloud Storage bucket.Result<TaskResponse>openStack(@NotNull OpenStackImportRequest openStackImportRequest)Create a task to import files by downloading it from OpenStack Object Storage (Swift).Result<TaskResponse>raw(@NotNull RawImportRequest rawImportRequest)Create a task to import raw fileResult<TaskResponse>s3(@NotNull S3ImportRequest s3ImportRequest)Create a task to import files by downloading it from a S3 bucket.Result<TaskResponse>sftp(@NotNull SftpImportRequest sftpImportRequest)Create a task to import files by downloading it from a SFTP server.Result<TaskResponse>upload(@NotNull UploadImportRequest uploadImportRequest)Create a task which uploads one input file.Result<TaskResponse>upload(@NotNull UploadImportRequest uploadImportRequest, @NotNull java.io.File file)Create a task which uploads one input file.Result<TaskResponse>upload(@NotNull UploadImportRequest uploadImportRequest, @NotNull java.io.InputStream inputStream)Create a task which uploads one input file.Result<TaskResponse>upload(@NotNull UploadImportRequest uploadImportRequest, @NotNull java.io.InputStream inputStream, @NotNull java.lang.String filename)Create a task which uploads one input file.Result<TaskResponse>upload(@NotNull Result<TaskResponse> taskResponseResult, @NotNull java.io.File file)Create a task which uploads one input file.Result<TaskResponse>upload(@NotNull Result<TaskResponse> taskResponseResult, @NotNull java.io.InputStream inputStream)Create a task which uploads one input file.Result<TaskResponse>upload(@NotNull Result<TaskResponse> taskResponseResult, @NotNull java.io.InputStream inputStream, @NotNull java.lang.String filename)Create a task which uploads one input file.Result<TaskResponse>upload(@NotNull java.lang.String taskId, @NotNull TaskResponse.Result.Form taskResponseResultForm, @NotNull java.io.InputStream inputStream)Create a task which uploads one input file.Result<TaskResponse>upload(@NotNull java.lang.String taskId, TaskResponse.Result.Form taskResponseResultForm, @NotNull java.io.File file)Create a task which uploads one input file.Result<TaskResponse>upload(@NotNull java.lang.String taskId, TaskResponse.Result.Form taskResponseResultForm, @NotNull java.io.InputStream inputStream, @NotNull java.lang.String filename)Create a task which uploads one input file.Result<TaskResponse>url(@NotNull UrlImportRequest urlImportRequest)Create a task to import one file by downloading it from an URL.Methods inherited from class com.cloudconvert.resource.AbstractImportFilesResource
getAzureBlobHttpUriRequest, getBase64HttpUriRequest, getGoogleCloudHttpUriRequest, getMultipartHttpEntity, getMultipartHttpEntity, getMultipartHttpEntity, getOpenStackHttpUriRequest, getRawHttpUriRequest, getS3HttpUriRequest, getSftpHttpUriRequest, getUrlHttpUriRequestMethods inherited from class com.cloudconvert.resource.AbstractResource
getHttpEntity, getHttpEntity, getHttpUriRequest, getHttpUriRequest, getJson, getSyncUri, getSyncUri, getUri, getUri, requestToMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ImportFilesResource
public ImportFilesResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider, RequestExecutor requestExecutor, TasksResource tasksResource)
-
-
Method Details
-
url
public Result<TaskResponse> url(@NotNull @NotNull UrlImportRequest urlImportRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate a task to import one file by downloading it from an URL.- Specified by:
urlin classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
urlImportRequest-UrlImportRequest- Returns:
- TRD
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public Result<TaskResponse> upload(@NotNull @NotNull UploadImportRequest uploadImportRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate 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
- Specified by:
uploadin classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
uploadImportRequest-UploadImportRequest- Returns:
- TRD
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public Result<TaskResponse> upload(@NotNull @NotNull UploadImportRequest uploadImportRequest, @NotNull @NotNull java.io.File file) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate 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
- Specified by:
uploadin classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
uploadImportRequest-UploadImportRequestfile-Filefile which will be uploaded- Returns:
- TRD
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public Result<TaskResponse> upload(@NotNull @NotNull Result<TaskResponse> taskResponseResult, @NotNull @NotNull java.io.File file) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate 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
- Specified by:
uploadin classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
taskResponseResult-AbstractImportFilesResourcefile-Filefile which will be uploaded- Returns:
- TRD
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public Result<TaskResponse> 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, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate 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- Specified by:
uploadin classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
taskId- tasktaskResponseResultForm-TaskResponse.Result.Formfile-Filefile which will be uploaded- Returns:
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public Result<TaskResponse> upload(@NotNull @NotNull UploadImportRequest uploadImportRequest, @NotNull @NotNull java.io.InputStream inputStream) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate 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
- Specified by:
uploadin classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
uploadImportRequest-UploadImportRequestinputStream-InputStreamof file which will be uploaded- Returns:
- TRD
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public Result<TaskResponse> upload(@NotNull @NotNull UploadImportRequest uploadImportRequest, @NotNull @NotNull java.io.InputStream inputStream, @NotNull @NotNull java.lang.String filename) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate 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
- Specified by:
uploadin classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
uploadImportRequest-UploadImportRequestinputStream-InputStreamof file which will be uploadedfilename- Set the filename, including file extension- Returns:
- TRD
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public Result<TaskResponse> upload(@NotNull @NotNull Result<TaskResponse> taskResponseResult, @NotNull @NotNull java.io.InputStream inputStream) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate 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
- Specified by:
uploadin classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
taskResponseResult-AbstractImportFilesResourceinputStream-InputStreamof file which will be uploaded- Returns:
- TRD
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public Result<TaskResponse> upload(@NotNull @NotNull Result<TaskResponse> taskResponseResult, @NotNull @NotNull java.io.InputStream inputStream, @NotNull @NotNull java.lang.String filename) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate 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
- Specified by:
uploadin classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
taskResponseResult-AbstractImportFilesResourceinputStream-InputStreamof file which will be uploadedfilename- Set the filename, including file extension- Returns:
- TRD
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public Result<TaskResponse> 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, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate 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- Specified by:
uploadin classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
taskId- tasktaskResponseResultForm-TaskResponse.Result.ForminputStream-InputStreamof file which will be uploaded- Returns:
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public Result<TaskResponse> 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, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate 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- Specified by:
uploadin classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
taskId- tasktaskResponseResultForm-TaskResponse.Result.ForminputStream-InputStreamof file which will be uploadedfilename- Set the filename, including file extension- Returns:
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
s3
public Result<TaskResponse> s3(@NotNull @NotNull S3ImportRequest s3ImportRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate a task to import files by downloading it from a S3 bucket.- Specified by:
s3in classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
s3ImportRequest-S3ImportRequest- Returns:
- TRD
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
azureBlob
public Result<TaskResponse> azureBlob(@NotNull @NotNull AzureBlobImportRequest azureBlobImportRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate a task to import files by downloading it from a Azure blob container.- Specified by:
azureBlobin classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
azureBlobImportRequest-AzureBlobImportRequest- Returns:
- TRD
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
googleCloudStorage
public Result<TaskResponse> googleCloudStorage(@NotNull @NotNull GoogleCloudStorageImportRequest googleCloudStorageImportRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate a task to import files by downloading it from a Google Cloud Storage bucket.- Specified by:
googleCloudStoragein classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
googleCloudStorageImportRequest-GoogleCloudStorageImportRequest- Returns:
- TRD
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
openStack
public Result<TaskResponse> openStack(@NotNull @NotNull OpenStackImportRequest openStackImportRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate a task to import files by downloading it from OpenStack Object Storage (Swift).- Specified by:
openStackin classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
openStackImportRequest-OpenStackImportRequest- Returns:
- TRD
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
sftp
public Result<TaskResponse> sftp(@NotNull @NotNull SftpImportRequest sftpImportRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate a task to import files by downloading it from a SFTP server.- Specified by:
sftpin classAbstractImportFilesResource<Result<TaskResponse>>- Parameters:
sftpImportRequest-SftpImportRequest- Returns:
- TRD
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
base64
public Result<TaskResponse> base64(@NotNull @NotNull Base64ImportRequest base64ImportRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate a task to import a base64 file- Specified by:
base64in classAbstractImportFilesResource<Result<TaskResponse>>- Returns:
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
raw
public Result<TaskResponse> raw(@NotNull @NotNull RawImportRequest rawImportRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDescription copied from class:AbstractImportFilesResourceCreate a task to import raw file- Specified by:
rawin classAbstractImportFilesResource<Result<TaskResponse>>- Returns:
- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-