Package com.cloudconvert.resource
Class AbstractTasksResource<TRAR extends AbstractResult<TaskResponse>,TRPAR extends AbstractResult<Pageable<TaskResponse>>,VAR extends AbstractResult<java.lang.Void>,ORPAR extends AbstractResult<Pageable<OperationResponse>>>
java.lang.Object
com.cloudconvert.resource.AbstractResource
com.cloudconvert.resource.AbstractTasksResource<TRAR,TRPAR,VAR,ORPAR>
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
AsyncTasksResource,TasksResource
public abstract class AbstractTasksResource<TRAR extends AbstractResult<TaskResponse>,TRPAR extends AbstractResult<Pageable<TaskResponse>>,VAR extends AbstractResult<java.lang.Void>,ORPAR extends AbstractResult<Pageable<OperationResponse>>> extends AbstractResource
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPATH_SEGMENT_CANCELstatic java.lang.StringPATH_SEGMENT_OPERATIONSstatic java.lang.StringPATH_SEGMENT_RETRYstatic java.lang.StringPATH_SEGMENT_TASKSstatic java.lang.StringPATH_SEGMENT_WAITFields 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 AbstractTasksResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider, AbstractConvertFilesResource<TRAR,ORPAR> abstractConvertFilesResource, AbstractOptimizeFilesResource<TRAR> abstractOptimizeFilesResource, AbstractCaptureWebsitesResource<TRAR> abstractCaptureWebsitesResource, AbstractMergeFilesResource<TRAR> abstractMergeFilesResource, AbstractCreateArchivesResource<TRAR> abstractCreateArchivesResource, AbstractExecuteCommandsResource<TRAR> abstractExecuteCommandsResource, AbstractCreateThumbnailsResource<TRAR> abstractCreateThumbnailsResource, AbstractGetMetadataResource<TRAR> abstractGetMetadataResourceResource, AbstractWriteMetadataResource<TRAR> abstractWriteMetadataResourceResource, AbstractAddWatermarkResource<TRAR> abstractAddWatermarkResource) -
Method Summary
Modifier and Type Method Description abstract TRARarchive(@NotNull CreateArchivesTaskRequest createArchivesTaskRequest)Create a task to create a ZIP, RAR, 7Z, TAR, TAR.GZ or TAR.BZ2 archive.abstract TRARcancel(@NotNull java.lang.String taskId)Cancel a task that is in status waiting or processing.abstract TRARcapture(@NotNull CaptureWebsitesTaskRequest captureWebsitesTaskRequest)Create a task to convert a website to PDF or to capture a screenshot of a website (png, jpg).voidclose()abstract TRARcommand(@NotNull ExecuteCommandsTaskRequest executeCommandsTaskRequest)Create a task to execute a command.abstract TRARconvert(@NotNull ConvertFilesTaskRequest convertFilesTaskRequest)Create a task to convert one input file from input_format to output_format.abstract ORPARconvertFormats()List all supported formats, their engines and possible options.abstract ORPARconvertFormats(@NotNull java.util.Map<Filter,java.lang.String> filters)List all supported formats, their engines and possible options.abstract ORPARconvertFormats(@NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull java.util.List<Include> includes)List all supported formats, their engines and possible options.abstract ORPARconvertFormats(@NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull java.util.List<Include> includes, @Nullable java.lang.Boolean alternative)List all supported formats, their engines and possible options.abstract VARdelete(@NotNull java.lang.String taskId)Delete a task, including all data.protected org.apache.http.client.methods.HttpUriRequestgetCancelHttpUriRequest(@NotNull java.lang.String taskId)protected org.apache.http.client.methods.HttpUriRequestgetDeleteHttpUriRequest(@NotNull java.lang.String taskId)protected org.apache.http.client.methods.HttpUriRequestgetListHttpUriRequest(@NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull java.util.List<Include> includes, @Nullable Pagination pagination)protected org.apache.http.client.methods.HttpUriRequestgetOperationsHttpUriRequest(@NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull java.util.List<Include> includes, @Nullable java.lang.Boolean alternative)protected org.apache.http.client.methods.HttpUriRequestgetRetryHttpUriRequest(@NotNull java.lang.String taskId)protected org.apache.http.client.methods.HttpUriRequestgetShowHttpUriRequest(@NotNull java.lang.String taskId, @NotNull java.util.List<Include> includes)protected org.apache.http.client.methods.HttpUriRequestgetWaitHttpUriRequest(@NotNull java.lang.String taskId)abstract TRPARlist()List all tasks with their status, payload and result.abstract TRPARlist(@NotNull java.util.Map<Filter,java.lang.String> filters)List all tasks with their status, payload and result.abstract TRPARlist(@NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull java.util.List<Include> includes)List all tasks with their status, payload and result.abstract TRPARlist(@NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull java.util.List<Include> includes, @Nullable Pagination pagination)List all tasks with their status, payload and result.abstract TRARmerge(@NotNull MergeFilesTaskRequest mergeFilesTaskRequest)Create a task to merge at least two files to one PDF.abstract TRARmetadata(@NotNull GetMetadataTaskRequest getMetadataTaskRequest)Create a task to extract metadata from one file.abstract ORPARoperations()List all possible operations, formats, engines and possible options.abstract ORPARoperations(@NotNull java.util.Map<Filter,java.lang.String> filters)List all possible operations, formats, engines and possible options.abstract ORPARoperations(@NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull java.util.List<Include> includes)List all possible operations, formats, engines and possible options.abstract ORPARoperations(@NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull java.util.List<Include> includes, @Nullable java.lang.Boolean alternative)List all possible operations, formats, engines and possible options.abstract TRARoptimize(@NotNull OptimizeFilesTaskRequest optimizeFilesTaskRequest)Create a task to optimize and compress a file.abstract TRARretry(@NotNull java.lang.String taskId)Create a new task, based on the payload of another task.abstract TRARshow(@NotNull java.lang.String taskId)Show a task.abstract TRARshow(@NotNull java.lang.String taskId, @NotNull java.util.List<Include> includes)Show a task.abstract TRARthumbnail(@NotNull CreateThumbnailsTaskRequest createThumbnailsTaskRequest)Create a task to create a thumbnail of one file.abstract TRARwait(@NotNull java.lang.String taskId)Wait until the task status is finished or error.abstract TRARwatermark(@NotNull AddWatermarkTaskRequest addWatermarkTaskRequest)Create a task to add a watermark to a file.abstract TRARwriteMetadata(@NotNull WriteMetadataTaskRequest writeMetadataTaskRequest)Create a task to write file metadata.Methods 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
-
Field Details
-
PATH_SEGMENT_TASKS
public static final java.lang.String PATH_SEGMENT_TASKS- See Also:
- Constant Field Values
-
PATH_SEGMENT_OPERATIONS
public static final java.lang.String PATH_SEGMENT_OPERATIONS- See Also:
- Constant Field Values
-
PATH_SEGMENT_WAIT
public static final java.lang.String PATH_SEGMENT_WAIT- See Also:
- Constant Field Values
-
PATH_SEGMENT_CANCEL
public static final java.lang.String PATH_SEGMENT_CANCEL- See Also:
- Constant Field Values
-
PATH_SEGMENT_RETRY
public static final java.lang.String PATH_SEGMENT_RETRY- See Also:
- Constant Field Values
-
-
Constructor Details
-
AbstractTasksResource
public AbstractTasksResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider, AbstractConvertFilesResource<TRAR,ORPAR> abstractConvertFilesResource, AbstractOptimizeFilesResource<TRAR> abstractOptimizeFilesResource, AbstractCaptureWebsitesResource<TRAR> abstractCaptureWebsitesResource, AbstractMergeFilesResource<TRAR> abstractMergeFilesResource, AbstractCreateArchivesResource<TRAR> abstractCreateArchivesResource, AbstractExecuteCommandsResource<TRAR> abstractExecuteCommandsResource, AbstractCreateThumbnailsResource<TRAR> abstractCreateThumbnailsResource, AbstractGetMetadataResource<TRAR> abstractGetMetadataResourceResource, AbstractWriteMetadataResource<TRAR> abstractWriteMetadataResourceResource, AbstractAddWatermarkResource<TRAR> abstractAddWatermarkResource)
-
-
Method Details
-
show
public abstract TRAR show(@NotNull @NotNull java.lang.String taskId) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionShow a task. Requires the task.read scope.- Parameters:
taskId- task id- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
show
public abstract TRAR show(@NotNull @NotNull java.lang.String taskId, @NotNull @NotNull java.util.List<Include> includes) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionShow a task. Requires the task.read scope.- Parameters:
taskId- task idincludes- (optional) Include retries, depends_on_tasks, payload and/or job in the result. Multiple include values are separated by , (comma).- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getShowHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getShowHttpUriRequest(@NotNull @NotNull java.lang.String taskId, @NotNull @NotNull java.util.List<Include> includes) throws java.net.URISyntaxException- Throws:
java.net.URISyntaxException
-
wait
public abstract TRAR wait(@NotNull @NotNull java.lang.String taskId) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionWait until the task status is finished or error. This makes the request block until the task has been completed. Requires the task.read scope.We do not recommend using this for long running jobs (e.g. video encodings). Your system might automatically time out requests if there is not data transferred for a longer time.
In general, please avoid to block your application until a CloudConvert job completes. There might be cases in which we need to queue your task which results in longer processing times than usual. Using an asynchronous approach with webhooks is beneficial in such cases.
- Parameters:
taskId- task id- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getWaitHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getWaitHttpUriRequest(@NotNull @NotNull java.lang.String taskId) throws java.net.URISyntaxException- Throws:
java.net.URISyntaxException
-
list
public abstract TRPAR list() throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all tasks with their status, payload and result. Requires the task.read scope.- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
list
public abstract TRPAR list(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all tasks with their status, payload and result. Requires the task.read scope.- Parameters:
filters- (optional) Filters: - job_id - The result will be filtered to include only tasks for a specific Job ID. - status - The result will be filtered to include only tasks with a specific status (waiting, processing, finished or error). - operation - Filter result to only include tasks of with a matching operation (for example convert or import/s3).- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
list
public abstract TRPAR list(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull @NotNull java.util.List<Include> includes) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all tasks with their status, payload and result. Requires the task.read scope.- Parameters:
filters- (optional) Filters: - job_id - The result will be filtered to include only tasks for a specific Job ID. - status - The result will be filtered to include only tasks with a specific status (waiting, processing, finished or error). - operation - Filter result to only include tasks of with a matching operation (for example convert or import/s3).includes- (optional) Include retries and/or depends_on_tasks in the result.- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
list
public abstract TRPAR list(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull @NotNull java.util.List<Include> includes, @Nullable @Nullable Pagination pagination) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all tasks with their status, payload and result. Requires the task.read scope.- Parameters:
filters- (optional) Filters: - job_id - The result will be filtered to include only tasks for a specific Job ID. - status - The result will be filtered to include only tasks with a specific status (waiting, processing, finished or error). - operation - Filter result to only include tasks of with a matching operation (for example convert or import/s3).includes- (optional) Include retries and/or depends_on_tasks in the result.pagination- (optional) Pagination: - per_page - Number of tasks per page, defaults to 100. - page - The result page to show.- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getListHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getListHttpUriRequest(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull @NotNull java.util.List<Include> includes, @Nullable @Nullable Pagination pagination) throws java.net.URISyntaxException- Throws:
java.net.URISyntaxException
-
cancel
public abstract TRAR cancel(@NotNull @NotNull java.lang.String taskId) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionCancel a task that is in status waiting or processing. Requires the task.write scope.- Parameters:
taskId- task id- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getCancelHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getCancelHttpUriRequest(@NotNull @NotNull java.lang.String taskId) throws java.net.URISyntaxException- Throws:
java.net.URISyntaxException
-
retry
public abstract TRAR retry(@NotNull @NotNull java.lang.String taskId) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionCreate a new task, based on the payload of another task. Requires the task.write scope.- Parameters:
taskId- task id- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getRetryHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getRetryHttpUriRequest(@NotNull @NotNull java.lang.String taskId) throws java.net.URISyntaxException- Throws:
java.net.URISyntaxException
-
delete
public abstract VAR delete(@NotNull @NotNull java.lang.String taskId) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionDelete a task, including all data. Requires the task.write scope. Tasks are deleted automatically 24 hours after they have ended.- Parameters:
taskId- task id- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getDeleteHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getDeleteHttpUriRequest(@NotNull @NotNull java.lang.String taskId) throws java.net.URISyntaxException- Throws:
java.net.URISyntaxException
-
operations
public abstract ORPAR operations() throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all possible operations, formats, engines and possible options.- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
operations
public abstract ORPAR operations(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all possible operations, formats, engines and possible options.- Parameters:
filters- (optional) Filters: - operation - The result will be filtered to include only possible operations with a matching operation name (e.g. convert or optimize). - input_format - The result will be filtered to include only possible conversions with a matching input format. - output_format - The result will be filtered to include only possible conversions with a matching output format. - engine - Filter result to only include conversions with a matching engine name. - engine_version - Filter result to only include conversions with a matching engine version.- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
operations
public abstract ORPAR operations(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull @NotNull java.util.List<Include> includes) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all possible operations, formats, engines and possible options.- Parameters:
filters- (optional) Filters: - operation - The result will be filtered to include only possible operations with a matching operation name (e.g. convert or optimize). - input_format - The result will be filtered to include only possible conversions with a matching input format. - output_format - The result will be filtered to include only possible conversions with a matching output format. - engine - Filter result to only include conversions with a matching engine name. - engine_version - Filter result to only include conversions with a matching engine version.includes- (optional) Include options and/or engine_versions in the result.- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
operations
public abstract ORPAR operations(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull @NotNull java.util.List<Include> includes, @Nullable @Nullable java.lang.Boolean alternative) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all possible operations, formats, engines and possible options.- Parameters:
filters- (optional) Filters: - operation - The result will be filtered to include only possible operations with a matching operation name (e.g. convert or optimize). - input_format - The result will be filtered to include only possible conversions with a matching input format. - output_format - The result will be filtered to include only possible conversions with a matching output format. - engine - Filter result to only include conversions with a matching engine name. - engine_version - Filter result to only include conversions with a matching engine version.includes- (optional) Include options and/or engine_versions in the result.alternative- (optional) For some formats multiple alternative engines are available. If set to true, the result includes these alternative conversion types. Default to false.- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getOperationsHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getOperationsHttpUriRequest(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull @NotNull java.util.List<Include> includes, @Nullable @Nullable java.lang.Boolean alternative) throws java.net.URISyntaxException- Throws:
java.net.URISyntaxException
-
convert
public abstract TRAR convert(@NotNull @NotNull ConvertFilesTaskRequest convertFilesTaskRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionCreate a task to convert one input file from input_format to output_format. Requires the task.write scope.- Parameters:
convertFilesTaskRequest-ConvertFilesTaskRequest- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
convertFormats
public abstract ORPAR convertFormats() throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all supported formats, their engines and possible options.- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
convertFormats
public abstract ORPAR convertFormats(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all supported formats, their engines and possible options.- Parameters:
filters- (optional) Filters: - input_format - The result will be filtered to include only possible conversions with a matching input format. - output_format - The result will be filtered to include only possible conversions with a matching output format. - engine - Filter result to only include conversions with a matching engine name. - engine_version - Filter result to only include conversions with a matching engine version.- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
convertFormats
public abstract ORPAR convertFormats(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull @NotNull java.util.List<Include> includes) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all supported formats, their engines and possible options.- Parameters:
filters- (optional) Filters: - input_format - The result will be filtered to include only possible conversions with a matching input format. - output_format - The result will be filtered to include only possible conversions with a matching output format. - engine - Filter result to only include conversions with a matching engine name. - engine_version - Filter result to only include conversions with a matching engine version.includes- (optional) Include options and/or engine_versions in the result.- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
convertFormats
public abstract ORPAR convertFormats(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull @NotNull java.util.List<Include> includes, @Nullable @Nullable java.lang.Boolean alternative) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all supported formats, their engines and possible options.- Parameters:
filters- (optional) Filters: - input_format - The result will be filtered to include only possible conversions with a matching input format. - output_format - The result will be filtered to include only possible conversions with a matching output format. - engine - Filter result to only include conversions with a matching engine name. - engine_version - Filter result to only include conversions with a matching engine version.includes- (optional) Include options and/or engine_versions in the result.alternative- (optional) For some formats multiple alternative engines are available. If set to true, the result includes these alternative conversion types. Default to false.- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
optimize
public abstract TRAR optimize(@NotNull @NotNull OptimizeFilesTaskRequest optimizeFilesTaskRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionCreate a task to optimize and compress a file. Currently supported formats are PDF, PNG and JPG.- Parameters:
optimizeFilesTaskRequest-OptimizeFilesTaskRequest- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
capture
public abstract TRAR capture(@NotNull @NotNull CaptureWebsitesTaskRequest captureWebsitesTaskRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionCreate a task to convert a website to PDF or to capture a screenshot of a website (png, jpg).- Parameters:
captureWebsitesTaskRequest-CaptureWebsitesTaskRequest- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
merge
public abstract TRAR merge(@NotNull @NotNull MergeFilesTaskRequest mergeFilesTaskRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionCreate a task to merge at least two files to one PDF. If input files are not PDFs yet, they are automatically converted to PDF.- Parameters:
mergeFilesTaskRequest-MergeFilesTaskRequest- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
archive
public abstract TRAR archive(@NotNull @NotNull CreateArchivesTaskRequest createArchivesTaskRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionCreate a task to create a ZIP, RAR, 7Z, TAR, TAR.GZ or TAR.BZ2 archive.- Parameters:
createArchivesTaskRequest-CreateArchivesTaskRequest- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
command
public abstract TRAR command(@NotNull @NotNull ExecuteCommandsTaskRequest executeCommandsTaskRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionCreate a task to execute a command. Currently, ffmpeg, imagemagick and graphicsmagick commands re supported. You can access the files from the input task in the /input/{taskName}/ (For example: /input/import-1/) directory. All files that are created in the /output/ directory are available for following tasks (e.g. export tasks).- Parameters:
executeCommandsTaskRequest-ExecuteCommandsTaskRequest- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
thumbnail
public abstract TRAR thumbnail(@NotNull @NotNull CreateThumbnailsTaskRequest createThumbnailsTaskRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionCreate a task to create a thumbnail of one file. Requires the task.write scope.- Parameters:
createThumbnailsTaskRequest-CreateThumbnailsTaskRequest- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
metadata
public abstract TRAR metadata(@NotNull @NotNull GetMetadataTaskRequest getMetadataTaskRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionCreate a task to extract metadata from one file. Requires the task.write scope.- Parameters:
getMetadataTaskRequest-GetMetadataTaskRequest- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
writeMetadata
public abstract TRAR writeMetadata(@NotNull @NotNull WriteMetadataTaskRequest writeMetadataTaskRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionCreate a task to write file metadata.- Parameters:
writeMetadataTaskRequest-WriteMetadataTaskRequest- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
watermark
public abstract TRAR watermark(@NotNull @NotNull AddWatermarkTaskRequest addWatermarkTaskRequest) throws java.io.IOException, java.net.URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionCreate a task to add a watermark to a file. Requires the task.write scope.- Parameters:
addWatermarkTaskRequest-AddWatermarkTaskRequest- Returns:
AbstractTasksResource- Throws:
java.io.IOExceptionjava.net.URISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-