Package com.cloudconvert.resource
Class AbstractImportFilesResource<TRAR extends AbstractResult<TaskResponse>>
java.lang.Object
com.cloudconvert.resource.AbstractResource
com.cloudconvert.resource.AbstractImportFilesResource<TRAR>
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
AsyncImportFilesResource,ImportFilesResource
public abstract class AbstractImportFilesResource<TRAR extends AbstractResult<TaskResponse>>
extends AbstractResource
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields 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
ConstructorsConstructorDescriptionAbstractImportFilesResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider) -
Method Summary
Modifier and TypeMethodDescriptionabstract TRARazureBlob(@NotNull AzureBlobImportRequest azureBlobImportRequest) Create a task to import files by downloading it from a Azure blob container.abstract TRARbase64(@NotNull Base64ImportRequest base64ImportRequest) Create a task to import a base64 fileprotected org.apache.http.client.methods.HttpUriRequestgetAzureBlobHttpUriRequest(@NotNull AzureBlobImportRequest azureBlobImportRequest) protected org.apache.http.client.methods.HttpUriRequestgetBase64HttpUriRequest(@NotNull Base64ImportRequest base64ImportRequest) protected org.apache.http.client.methods.HttpUriRequestgetGoogleCloudHttpUriRequest(@NotNull GoogleCloudStorageImportRequest googleCloudStorageImportRequest) protected org.apache.http.HttpEntitygetMultipartHttpEntity(TaskResponse.Result.Form uploadImportResponseResultForm, @NotNull String filename, InputStream inputStream) protected org.apache.http.HttpEntitygetMultipartHttpEntity(TaskResponse.Result.Form uploadImportResponseResultForm, File file) protected org.apache.http.HttpEntitygetMultipartHttpEntity(TaskResponse.Result.Form uploadImportResponseResultForm, InputStream inputStream) protected org.apache.http.client.methods.HttpUriRequestgetOpenStackHttpUriRequest(@NotNull OpenStackImportRequest openStackImportRequest) protected org.apache.http.client.methods.HttpUriRequestgetRawHttpUriRequest(@NotNull RawImportRequest rawImportRequest) protected org.apache.http.client.methods.HttpUriRequestgetS3HttpUriRequest(@NotNull S3ImportRequest s3ImportRequest) protected org.apache.http.client.methods.HttpUriRequestgetSftpHttpUriRequest(@NotNull SftpImportRequest sftpImportRequest) protected org.apache.http.client.methods.HttpUriRequestgetUrlHttpUriRequest(@NotNull UrlImportRequest urlImportRequest) abstract TRARgoogleCloudStorage(@NotNull GoogleCloudStorageImportRequest googleCloudStorageImportRequest) Create a task to import files by downloading it from a Google Cloud Storage bucket.abstract TRARopenStack(@NotNull OpenStackImportRequest openStackImportRequest) Create a task to import files by downloading it from OpenStack Object Storage (Swift).abstract TRARraw(@NotNull RawImportRequest rawImportRequest) Create a task to import raw fileabstract TRARs3(@NotNull S3ImportRequest s3ImportRequest) Create a task to import files by downloading it from a S3 bucket.abstract TRARsftp(@NotNull SftpImportRequest sftpImportRequest) Create a task to import files by downloading it from a SFTP server.abstract TRARupload(@NotNull UploadImportRequest uploadImportRequest) Create a task which uploads one input file.abstract TRARupload(@NotNull UploadImportRequest uploadImportRequest, @NotNull File file) Create a task which uploads one input file.abstract TRARupload(@NotNull UploadImportRequest uploadImportRequest, @NotNull InputStream inputStream) Create a task which uploads one input file.abstract TRARupload(@NotNull UploadImportRequest uploadImportRequest, @NotNull InputStream inputStream, @NotNull String filename) Create a task which uploads one input file.abstract TRARupload(@NotNull String taskId, TaskResponse.Result.Form taskResponseResultForm, @NotNull File file) Create a task which uploads one input file.abstract TRARupload(@NotNull String taskId, TaskResponse.Result.Form taskResponseResultForm, @NotNull InputStream inputStream) Create a task which uploads one input file.abstract TRARupload(@NotNull String taskId, TaskResponse.Result.Form taskResponseResultForm, @NotNull InputStream inputStream, @NotNull String filename) Create a task which uploads one input file.abstract TRARCreate a task which uploads one input file.abstract TRARupload(TRAR taskResponseResult, @NotNull InputStream inputStream) Create a task which uploads one input file.abstract TRARupload(TRAR taskResponseResult, @NotNull InputStream inputStream, @NotNull String filename) Create a task which uploads one input file.abstract TRARurl(@NotNull UrlImportRequest urlImportRequest) Create a task to import one file by downloading it from an URL.Methods inherited from class com.cloudconvert.resource.AbstractResource
getHttpEntity, getHttpEntity, getHttpUriRequest, getHttpUriRequest, getJson, getSyncUri, getSyncUri, getUri, getUri, requestToMap
-
Field Details
-
PATH_SEGMENT_IMPORT
- See Also:
-
PATH_SEGMENT_URL
- See Also:
-
PATH_SEGMENT_UPLOAD
- See Also:
-
PATH_SEGMENT_S3
- See Also:
-
PATH_SEGMENTS_AZURE_BLOB
-
PATH_SEGMENT_GOOGLE_CLOUD_STORAGE
- See Also:
-
PATH_SEGMENT_OPENSTACK
- See Also:
-
PATH_SEGMENT_SFTP
- See Also:
-
PATH_SEGMENT_BASE64
- See Also:
-
PATH_SEGMENT_RAW
- See Also:
-
-
Constructor Details
-
AbstractImportFilesResource
public AbstractImportFilesResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider)
-
-
Method Details
-
url
public abstract TRAR url(@NotNull @NotNull UrlImportRequest urlImportRequest) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException Create a task to import one file by downloading it from an URL.- Parameters:
urlImportRequest-UrlImportRequest- Returns:
- TRD
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getUrlHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getUrlHttpUriRequest(@NotNull @NotNull UrlImportRequest urlImportRequest) throws IOException, URISyntaxException - Throws:
IOExceptionURISyntaxException
-
upload
public abstract TRAR upload(@NotNull @NotNull UploadImportRequest uploadImportRequest) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException 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:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public abstract TRAR upload(@NotNull @NotNull UploadImportRequest uploadImportRequest, @NotNull @NotNull File file) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException 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-UploadImportRequestfile-Filefile which will be uploaded- Returns:
- TRD
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public abstract TRAR upload(@NotNull TRAR taskResponseResult, @NotNull @NotNull File file) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException 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-AbstractImportFilesResourcefile-Filefile which will be uploaded- Returns:
- TRD
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public abstract TRAR upload(@NotNull @NotNull String taskId, @NotNull TaskResponse.Result.Form taskResponseResultForm, @NotNull @NotNull File file) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException 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- tasktaskResponseResultForm-TaskResponse.Result.Formfile-Filefile which will be uploaded- Returns:
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public abstract TRAR upload(@NotNull @NotNull UploadImportRequest uploadImportRequest, @NotNull @NotNull InputStream inputStream) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException 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-UploadImportRequestinputStream-InputStreamof file which will be uploaded- Returns:
- TRD
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public abstract TRAR upload(@NotNull @NotNull UploadImportRequest uploadImportRequest, @NotNull @NotNull InputStream inputStream, @NotNull @NotNull String filename) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException 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-UploadImportRequestinputStream-InputStreamof file which will be uploadedfilename- Set the filename, including file extension- Returns:
- TRD
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public abstract TRAR upload(@NotNull TRAR taskResponseResult, @NotNull @NotNull InputStream inputStream) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException 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-AbstractImportFilesResourceinputStream-InputStreamof file which will be uploaded- Returns:
- TRD
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public abstract TRAR upload(@NotNull TRAR taskResponseResult, @NotNull @NotNull InputStream inputStream, @NotNull @NotNull String filename) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException 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-AbstractImportFilesResourceinputStream-InputStreamof file which will be uploadedfilename- Set the filename, including file extension- Returns:
- TRD
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public abstract TRAR upload(@NotNull @NotNull String taskId, @NotNull TaskResponse.Result.Form taskResponseResultForm, @NotNull @NotNull InputStream inputStream) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException 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- tasktaskResponseResultForm-TaskResponse.Result.ForminputStream-InputStreamof file which will be uploaded- Returns:
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
upload
public abstract TRAR upload(@NotNull @NotNull String taskId, @NotNull TaskResponse.Result.Form taskResponseResultForm, @NotNull @NotNull InputStream inputStream, @NotNull @NotNull String filename) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException 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- tasktaskResponseResultForm-TaskResponse.Result.ForminputStream-InputStreamof file which will be uploadedfilename- Set the filename, including file extension- Returns:
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
s3
public abstract TRAR s3(@NotNull @NotNull S3ImportRequest s3ImportRequest) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException Create a task to import files by downloading it from a S3 bucket.- Parameters:
s3ImportRequest-S3ImportRequest- Returns:
- TRD
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getS3HttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getS3HttpUriRequest(@NotNull @NotNull S3ImportRequest s3ImportRequest) throws IOException, URISyntaxException - Throws:
IOExceptionURISyntaxException
-
azureBlob
public abstract TRAR azureBlob(@NotNull @NotNull AzureBlobImportRequest azureBlobImportRequest) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException Create a task to import files by downloading it from a Azure blob container.- Parameters:
azureBlobImportRequest-AzureBlobImportRequest- Returns:
- TRD
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getAzureBlobHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getAzureBlobHttpUriRequest(@NotNull @NotNull AzureBlobImportRequest azureBlobImportRequest) throws IOException, URISyntaxException - Throws:
IOExceptionURISyntaxException
-
googleCloudStorage
public abstract TRAR googleCloudStorage(@NotNull @NotNull GoogleCloudStorageImportRequest googleCloudStorageImportRequest) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException Create a task to import files by downloading it from a Google Cloud Storage bucket.- Parameters:
googleCloudStorageImportRequest-GoogleCloudStorageImportRequest- Returns:
- TRD
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getGoogleCloudHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getGoogleCloudHttpUriRequest(@NotNull @NotNull GoogleCloudStorageImportRequest googleCloudStorageImportRequest) throws IOException, URISyntaxException - Throws:
IOExceptionURISyntaxException
-
openStack
public abstract TRAR openStack(@NotNull @NotNull OpenStackImportRequest openStackImportRequest) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException Create a task to import files by downloading it from OpenStack Object Storage (Swift).- Parameters:
openStackImportRequest-OpenStackImportRequest- Returns:
- TRD
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getOpenStackHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getOpenStackHttpUriRequest(@NotNull @NotNull OpenStackImportRequest openStackImportRequest) throws IOException, URISyntaxException - Throws:
IOExceptionURISyntaxException
-
sftp
public abstract TRAR sftp(@NotNull @NotNull SftpImportRequest sftpImportRequest) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException Create a task to import files by downloading it from a SFTP server.- Parameters:
sftpImportRequest-SftpImportRequest- Returns:
- TRD
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getSftpHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getSftpHttpUriRequest(@NotNull @NotNull SftpImportRequest sftpImportRequest) throws IOException, URISyntaxException - Throws:
IOExceptionURISyntaxException
-
base64
public abstract TRAR base64(@NotNull @NotNull Base64ImportRequest base64ImportRequest) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException Create a task to import a base64 file- Parameters:
base64ImportRequest-- Returns:
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getBase64HttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getBase64HttpUriRequest(@NotNull @NotNull Base64ImportRequest base64ImportRequest) throws IOException, URISyntaxException - Throws:
IOExceptionURISyntaxException
-
raw
public abstract TRAR raw(@NotNull @NotNull RawImportRequest rawImportRequest) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException Create a task to import raw file- Parameters:
rawImportRequest-- Returns:
- Throws:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getRawHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getRawHttpUriRequest(@NotNull @NotNull RawImportRequest rawImportRequest) throws IOException, URISyntaxException - Throws:
IOExceptionURISyntaxException
-
getMultipartHttpEntity
protected org.apache.http.HttpEntity getMultipartHttpEntity(TaskResponse.Result.Form uploadImportResponseResultForm, File file) throws IOException - Throws:
IOException
-
getMultipartHttpEntity
protected org.apache.http.HttpEntity getMultipartHttpEntity(TaskResponse.Result.Form uploadImportResponseResultForm, InputStream inputStream) throws IOException - Throws:
IOException
-
getMultipartHttpEntity
protected org.apache.http.HttpEntity getMultipartHttpEntity(TaskResponse.Result.Form uploadImportResponseResultForm, @NotNull @NotNull String filename, InputStream inputStream) throws IOException - Throws:
IOException
-