Package com.cloudconvert.resource.sync
Class ConvertFilesResource
java.lang.Object
com.cloudconvert.resource.AbstractResource
com.cloudconvert.resource.AbstractConvertFilesResource<Result<TaskResponse>,Result<Pageable<OperationResponse>>>
com.cloudconvert.resource.sync.ConvertFilesResource
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class ConvertFilesResource extends AbstractConvertFilesResource<Result<TaskResponse>,Result<Pageable<OperationResponse>>>
-
Field Summary
Fields inherited from class com.cloudconvert.resource.AbstractConvertFilesResource
PATH_SEGMENT_CONVERT, PATH_SEGMENT_FORMATSFields 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 ConvertFilesResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider, RequestExecutor requestExecutor) -
Method Summary
Modifier and Type Method Description voidclose()Result<TaskResponse>convert(@NotNull ConvertFilesTaskRequest convertFilesTaskRequest)Create a task to convert one input file from input_format to output_format.Result<Pageable<OperationResponse>>convertFormats()List all supported formats, their engines and possible options.Result<Pageable<OperationResponse>>convertFormats(@NotNull java.util.Map<Filter,java.lang.String> filters)List all supported formats, their engines and possible options.Result<Pageable<OperationResponse>>convertFormats(@NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull java.util.List<Include> includes)List all supported formats, their engines and possible options.Result<Pageable<OperationResponse>>convertFormats(@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.Methods inherited from class com.cloudconvert.resource.AbstractConvertFilesResource
getConvertFormatsHttpUriRequest, getConvertHttpUriRequestMethods inherited from class com.cloudconvert.resource.AbstractResource
getHttpEntity, getHttpEntity, getHttpUriRequest, getHttpUriRequest, getUri, getUri, requestToMap
-
Constructor Details
-
ConvertFilesResource
public ConvertFilesResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider, RequestExecutor requestExecutor)
-
-
Method Details
-
convert
public Result<TaskResponse> convert(@NotNull @NotNull ConvertFilesTaskRequest convertFilesTaskRequest) throws java.io.IOException, java.net.URISyntaxExceptionDescription copied from class:AbstractConvertFilesResourceCreate a task to convert one input file from input_format to output_format. Requires the task.write scope.- Specified by:
convertin classAbstractConvertFilesResource<Result<TaskResponse>,Result<Pageable<OperationResponse>>>- Parameters:
convertFilesTaskRequest-ConvertFilesTaskRequest- Returns:
AbstractConvertFilesResource- Throws:
java.io.IOExceptionjava.net.URISyntaxException
-
convertFormats
public Result<Pageable<OperationResponse>> convertFormats() throws java.io.IOException, java.net.URISyntaxExceptionDescription copied from class:AbstractConvertFilesResourceList all supported formats, their engines and possible options.- Specified by:
convertFormatsin classAbstractConvertFilesResource<Result<TaskResponse>,Result<Pageable<OperationResponse>>>- Returns:
AbstractConvertFilesResource- Throws:
java.io.IOExceptionjava.net.URISyntaxException
-
convertFormats
public Result<Pageable<OperationResponse>> convertFormats(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters) throws java.io.IOException, java.net.URISyntaxExceptionDescription copied from class:AbstractConvertFilesResourceList all supported formats, their engines and possible options.- Specified by:
convertFormatsin classAbstractConvertFilesResource<Result<TaskResponse>,Result<Pageable<OperationResponse>>>- 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:
AbstractConvertFilesResource- Throws:
java.io.IOExceptionjava.net.URISyntaxException
-
convertFormats
public Result<Pageable<OperationResponse>> convertFormats(@NotNull @NotNull java.util.Map<Filter,java.lang.String> filters, @NotNull @NotNull java.util.List<Include> includes) throws java.io.IOException, java.net.URISyntaxExceptionDescription copied from class:AbstractConvertFilesResourceList all supported formats, their engines and possible options.- Specified by:
convertFormatsin classAbstractConvertFilesResource<Result<TaskResponse>,Result<Pageable<OperationResponse>>>- 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:
AbstractConvertFilesResource- Throws:
java.io.IOExceptionjava.net.URISyntaxException
-
convertFormats
public Result<Pageable<OperationResponse>> 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.URISyntaxExceptionDescription copied from class:AbstractConvertFilesResourceList all supported formats, their engines and possible options.- Specified by:
convertFormatsin classAbstractConvertFilesResource<Result<TaskResponse>,Result<Pageable<OperationResponse>>>- 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:
AbstractConvertFilesResource- Throws:
java.io.IOExceptionjava.net.URISyntaxException
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-