Klasse AbstractJobsResource<JRAR extends AbstractResult<JobResponse>,JRPAR extends AbstractResult<Pageable<JobResponse>>,VAR extends AbstractResult<Void>>
- Alle implementierten Schnittstellen:
Closeable,AutoCloseable
- Bekannte direkte Unterklassen:
AsyncJobsResource,JobsResource
-
Feldübersicht
FelderVon Klasse geerbte Felder 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 -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungAbstractJobsResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungabstract JRARcreate(@NotNull Map<String, TaskRequest> tasks) Create a job with one ore more tasks.abstract JRARcreate(@NotNull Map<String, TaskRequest> tasks, @NotNull String tag) Create a job with one ore more tasks.abstract VARDelete a job, including all tasks and data.protected org.apache.http.client.methods.HttpUriRequestgetCreateHttpUriRequest(@NotNull Map<String, TaskRequest> tasks, @NotNull String tag) protected org.apache.http.client.methods.HttpUriRequestgetDeleteHttpUriRequest(@NotNull String jobId) protected org.apache.http.client.methods.HttpUriRequestgetListHttpUriRequest(@NotNull Map<Filter, String> filters, @NotNull List<Include> includes, @Nullable Pagination pagination) protected org.apache.http.client.methods.HttpUriRequestgetShowHttpUriRequest(@NotNull String jobId) protected org.apache.http.client.methods.HttpUriRequestgetWaitHttpUriRequest(@NotNull String jobId) abstract JRPARlist()List all jobs.abstract JRPARList all jobs.abstract JRPARList all jobs.abstract JRPARlist(@NotNull Map<Filter, String> filters, @NotNull List<Include> includes, @Nullable Pagination pagination) List all jobs.abstract JRARShow a job.abstract JRARWait until the job status is finished or error.Von Klasse geerbte Methoden com.cloudconvert.resource.AbstractResource
getHttpEntity, getHttpEntity, getHttpUriRequest, getHttpUriRequest, getJson, getSyncUri, getSyncUri, getUri, getUri, requestToMap
-
Felddetails
-
PATH_SEGMENT_JOBS
- Siehe auch:
-
PATH_SEGMENT_WAIT
- Siehe auch:
-
-
Konstruktordetails
-
AbstractJobsResource
public AbstractJobsResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider)
-
-
Methodendetails
-
create
public abstract JRAR create(@NotNull @NotNull Map<String, TaskRequest> tasks) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionCreate a job with one ore more tasks. Requires the task.write scope.- Parameter:
tasks- The example on the right consists of three tasks: import-my-file, convert-my-file and export-my-file. You can name these tasks however you want, but only alphanumeric characters, - and _ are allowed in the task names.Each task has a operation, which is the endpoint for creating the task (for example: convert, import/s3 or export/s3). The other parameters are the same as for creating the task using their direct endpoint. The input parameter allows it to directly reference the name of another task, created with the same job request.
- Gibt zurück:
AbstractJobsResource- Löst aus:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
create
public abstract JRAR create(@NotNull @NotNull Map<String, TaskRequest> tasks, @NotNull @NotNull String tag) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionCreate a job with one ore more tasks. Requires the task.write scope.- Parameter:
tasks- The example on the right consists of three tasks: import-my-file, convert-my-file and export-my-file. You can name these tasks however you want, but only alphanumeric characters, - and _ are allowed in the task names.Each task has a operation, which is the endpoint for creating the task (for example: convert, import/s3 or export/s3). The other parameters are the same as for creating the task using their direct endpoint. The input parameter allows it to directly reference the name of another task, created with the same job request.
tag- An arbitrary string to identify the job. Does not have any effect and can be used to associate the job with an ID in your application.- Gibt zurück:
AbstractJobsResource- Löst aus:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getCreateHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getCreateHttpUriRequest(@NotNull @NotNull Map<String, TaskRequest> tasks, @NotNull @NotNull String tag) throws IOException, URISyntaxException- Löst aus:
IOExceptionURISyntaxException
-
show
public abstract JRAR show(@NotNull @NotNull String jobId) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException Show a job. Requires the task.read scope.- Parameter:
jobId- job id- Gibt zurück:
AbstractJobsResource- Löst aus:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getShowHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getShowHttpUriRequest(@NotNull @NotNull String jobId) throws URISyntaxException - Löst aus:
URISyntaxException
-
wait
public abstract JRAR wait(@NotNull @NotNull String jobId) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException Wait until the job status is finished or error. This makes the request block until the job 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 job which results in longer processing times than usual. Using an asynchronous approach with webhooks is beneficial in such cases.
- Parameter:
jobId- job id- Gibt zurück:
AbstractJobsResource- Löst aus:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getWaitHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getWaitHttpUriRequest(@NotNull @NotNull String jobId) throws URISyntaxException - Löst aus:
URISyntaxException
-
list
public abstract JRPAR list() throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all jobs. Requires the task.read scope.- Gibt zurück:
AbstractJobsResource- Löst aus:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
list
public abstract JRPAR list(@NotNull @NotNull Map<Filter, String> filters) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all jobs. Requires the task.read scope.- Parameter:
filters- (optional) Filters: - status - The result will be filtered to include only jobs with a specific status (processing, finished or error). - tag - The result will be filtered to include only jobs with a tag.- Gibt zurück:
AbstractJobsResource- Löst aus:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
list
public abstract JRPAR list(@NotNull @NotNull Map<Filter, String> filters, @NotNull @NotNull List<Include> includes) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all jobs. Requires the task.read scope.- Parameter:
filters- (optional) Filters: - status - The result will be filtered to include only jobs with a specific status (processing, finished or error). - tag - The result will be filtered to include only jobs with a tag.includes- (optional) Include tasks in the result.- Gibt zurück:
AbstractJobsResource- Löst aus:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
list
public abstract JRPAR list(@NotNull @NotNull Map<Filter, String> filters, @NotNull @NotNull List<Include> includes, @Nullable @Nullable Pagination pagination) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerExceptionList all jobs. Requires the task.read scope.- Parameter:
filters- (optional) Filters: - status - The result will be filtered to include only jobs with a specific status (processing, finished or error). - tag - The result will be filtered to include only jobs with a tag.includes- (optional) Include tasks in the result.pagination- (optional) Pagination: - per_page - Number of tasks per page, defaults to 100. - page - The result page to show.- Gibt zurück:
AbstractJobsResource- Löst aus:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getListHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getListHttpUriRequest(@NotNull @NotNull Map<Filter, String> filters, @NotNull @NotNull List<Include> includes, @Nullable @Nullable Pagination pagination) throws IOException, URISyntaxException- Löst aus:
IOExceptionURISyntaxException
-
delete
public abstract VAR delete(@NotNull @NotNull String jobId) throws IOException, URISyntaxException, CloudConvertClientException, CloudConvertServerException Delete a job, including all tasks and data. Requires the task.write scope. Jobs are deleted automatically 24 hours after they have ended.- Parameter:
jobId- job id- Gibt zurück:
AbstractJobsResource- Löst aus:
IOExceptionURISyntaxExceptionCloudConvertClientExceptionCloudConvertServerException
-
getDeleteHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getDeleteHttpUriRequest(@NotNull @NotNull String jobId) throws URISyntaxException - Löst aus:
URISyntaxException
-