Package com.cloudconvert.resource
Class AbstractResource
java.lang.Object
com.cloudconvert.resource.AbstractResource
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
AbstractAddWatermarkResource,AbstractCaptureWebsitesResource,AbstractConvertFilesResource,AbstractCreateArchivesResource,AbstractCreateThumbnailsResource,AbstractExecuteCommandsResource,AbstractExportFilesResource,AbstractFilesResource,AbstractGetMetadataResource,AbstractImportFilesResource,AbstractJobsResource,AbstractMergeFilesResource,AbstractOptimizeFilesResource,AbstractSignedUrlResource,AbstractTasksResource,AbstractUsersResource,AbstractWebhooksResource,AbstractWriteMetadataResource
public abstract class AbstractResource
extends java.lang.Object
implements java.io.Closeable
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBEARERstatic java.lang.StringHEADER_AUTHORIZATIONstatic java.lang.StringHEADER_USER_AGENTstatic com.fasterxml.jackson.core.type.TypeReference<java.io.InputStream>INPUT_STREAM_TYPE_REFERENCEstatic com.fasterxml.jackson.core.type.TypeReference<Pageable<JobResponse>>JOB_RESPONSE_PAGEABLE_TYPE_REFERENCEstatic com.fasterxml.jackson.core.type.TypeReference<JobResponse>JOB_RESPONSE_TYPE_REFERENCEstatic com.fasterxml.jackson.core.type.TypeReference<java.util.Map<java.lang.String,java.lang.Object>>MAP_STRING_TO_OBJECT_TYPE_REFERENCEstatic com.fasterxml.jackson.core.type.TypeReference<Pageable<OperationResponse>>OPERATION_RESPONSE_PAGEABLE_TYPE_REFERENCEstatic com.fasterxml.jackson.core.type.TypeReference<Pageable<TaskResponse>>TASK_RESPONSE_PAGEABLE_TYPE_REFERENCEstatic com.fasterxml.jackson.core.type.TypeReference<TaskResponse>TASK_RESPONSE_TYPE_REFERENCEstatic com.fasterxml.jackson.core.type.TypeReference<UserResponse>USER_RESPONSE_TYPE_REFERENCEstatic java.lang.StringV2static java.lang.StringVALUE_USER_AGENTstatic com.fasterxml.jackson.core.type.TypeReference<java.lang.Void>VOID_TYPE_REFERENCEstatic com.fasterxml.jackson.core.type.TypeReference<Pageable<WebhookResponse>>WEBHOOKS_RESPONSE_PAGEABLE_TYPE_REFERENCEstatic com.fasterxml.jackson.core.type.TypeReference<WebhookResponse>WEBHOOKS_RESPONSE_TYPE_REFERENCE -
Constructor Summary
Constructors Constructor Description AbstractResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider) -
Method Summary
Modifier and Type Method Description protected org.apache.http.HttpEntitygetHttpEntity(Request request)protected org.apache.http.HttpEntitygetHttpEntity(java.util.Map<java.lang.String,java.lang.Object> map)protected org.apache.http.client.methods.HttpUriRequestgetHttpUriRequest(java.lang.Class<? extends org.apache.http.client.methods.HttpRequestBase> httpRequestBaseClass, java.net.URI uri)protected org.apache.http.client.methods.HttpUriRequestgetHttpUriRequest(java.lang.Class<? extends org.apache.http.client.methods.HttpRequestBase> httpRequestBaseClass, java.net.URI uri, @Nullable org.apache.http.HttpEntity httpEntity)protected java.lang.StringgetJson(java.util.Map<java.lang.String,java.lang.Object> map)protected java.net.URIgetSyncUri(java.util.List<java.lang.String> pathSegments)protected java.net.URIgetSyncUri(java.util.List<java.lang.String> pathSegments, java.util.List<org.apache.http.NameValuePair> nameValuePairs)protected java.net.URIgetUri(java.util.List<java.lang.String> pathSegments)protected java.net.URIgetUri(java.util.List<java.lang.String> pathSegments, java.util.List<org.apache.http.NameValuePair> nameValuePairs)protected java.util.Map<java.lang.String,java.lang.Object>requestToMap(Request request)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.io.Closeable
close
-
Field Details
-
HEADER_AUTHORIZATION
public static final java.lang.String HEADER_AUTHORIZATION- See Also:
- Constant Field Values
-
HEADER_USER_AGENT
public static final java.lang.String HEADER_USER_AGENT- See Also:
- Constant Field Values
-
V2
public static final java.lang.String V2- See Also:
- Constant Field Values
-
BEARER
public static final java.lang.String BEARER- See Also:
- Constant Field Values
-
VALUE_USER_AGENT
public static final java.lang.String VALUE_USER_AGENT- See Also:
- Constant Field Values
-
VOID_TYPE_REFERENCE
public static final com.fasterxml.jackson.core.type.TypeReference<java.lang.Void> VOID_TYPE_REFERENCE -
INPUT_STREAM_TYPE_REFERENCE
public static final com.fasterxml.jackson.core.type.TypeReference<java.io.InputStream> INPUT_STREAM_TYPE_REFERENCE -
MAP_STRING_TO_OBJECT_TYPE_REFERENCE
public static final com.fasterxml.jackson.core.type.TypeReference<java.util.Map<java.lang.String,java.lang.Object>> MAP_STRING_TO_OBJECT_TYPE_REFERENCE -
TASK_RESPONSE_TYPE_REFERENCE
public static final com.fasterxml.jackson.core.type.TypeReference<TaskResponse> TASK_RESPONSE_TYPE_REFERENCE -
JOB_RESPONSE_TYPE_REFERENCE
public static final com.fasterxml.jackson.core.type.TypeReference<JobResponse> JOB_RESPONSE_TYPE_REFERENCE -
USER_RESPONSE_TYPE_REFERENCE
public static final com.fasterxml.jackson.core.type.TypeReference<UserResponse> USER_RESPONSE_TYPE_REFERENCE -
WEBHOOKS_RESPONSE_TYPE_REFERENCE
public static final com.fasterxml.jackson.core.type.TypeReference<WebhookResponse> WEBHOOKS_RESPONSE_TYPE_REFERENCE -
OPERATION_RESPONSE_PAGEABLE_TYPE_REFERENCE
public static final com.fasterxml.jackson.core.type.TypeReference<Pageable<OperationResponse>> OPERATION_RESPONSE_PAGEABLE_TYPE_REFERENCE -
TASK_RESPONSE_PAGEABLE_TYPE_REFERENCE
public static final com.fasterxml.jackson.core.type.TypeReference<Pageable<TaskResponse>> TASK_RESPONSE_PAGEABLE_TYPE_REFERENCE -
JOB_RESPONSE_PAGEABLE_TYPE_REFERENCE
public static final com.fasterxml.jackson.core.type.TypeReference<Pageable<JobResponse>> JOB_RESPONSE_PAGEABLE_TYPE_REFERENCE -
WEBHOOKS_RESPONSE_PAGEABLE_TYPE_REFERENCE
public static final com.fasterxml.jackson.core.type.TypeReference<Pageable<WebhookResponse>> WEBHOOKS_RESPONSE_PAGEABLE_TYPE_REFERENCE
-
-
Constructor Details
-
AbstractResource
public AbstractResource(SettingsProvider settingsProvider, ObjectMapperProvider objectMapperProvider)
-
-
Method Details
-
requestToMap
-
getUri
protected java.net.URI getUri(java.util.List<java.lang.String> pathSegments) throws java.net.URISyntaxException- Throws:
java.net.URISyntaxException
-
getUri
protected java.net.URI getUri(java.util.List<java.lang.String> pathSegments, java.util.List<org.apache.http.NameValuePair> nameValuePairs) throws java.net.URISyntaxException- Throws:
java.net.URISyntaxException
-
getSyncUri
protected java.net.URI getSyncUri(java.util.List<java.lang.String> pathSegments) throws java.net.URISyntaxException- Throws:
java.net.URISyntaxException
-
getSyncUri
protected java.net.URI getSyncUri(java.util.List<java.lang.String> pathSegments, java.util.List<org.apache.http.NameValuePair> nameValuePairs) throws java.net.URISyntaxException- Throws:
java.net.URISyntaxException
-
getHttpEntity
protected org.apache.http.HttpEntity getHttpEntity(Request request) throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getHttpEntity
protected org.apache.http.HttpEntity getHttpEntity(java.util.Map<java.lang.String,java.lang.Object> map) throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getJson
protected java.lang.String getJson(java.util.Map<java.lang.String,java.lang.Object> map) throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getHttpUriRequest(java.lang.Class<? extends org.apache.http.client.methods.HttpRequestBase> httpRequestBaseClass, java.net.URI uri) -
getHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getHttpUriRequest(java.lang.Class<? extends org.apache.http.client.methods.HttpRequestBase> httpRequestBaseClass, java.net.URI uri, @Nullable @Nullable org.apache.http.HttpEntity httpEntity)
-