Class BaseMultipartRequest
- java.lang.Object
-
- com.adobe.pdfservices.operation.internal.http.BaseMultipartRequest
-
- All Implemented Interfaces:
HttpRequest,MultiPartRequest
public class BaseMultipartRequest extends Object implements MultiPartRequest
Returns a new instance of the multipart request on every setter
-
-
Constructor Summary
Constructors Constructor Description BaseMultipartRequest(String uriTemplate)
-
Method Summary
-
-
-
Constructor Detail
-
BaseMultipartRequest
public BaseMultipartRequest(String uriTemplate)
-
-
Method Detail
-
withContentType
public MultiPartRequest withContentType(String contentType)
- Specified by:
withContentTypein interfaceHttpRequest
-
withHeader
public MultiPartRequest withHeader(String headerName, String headerValue)
- Specified by:
withHeaderin interfaceHttpRequest
-
withHeaders
public MultiPartRequest withHeaders(Map<String,String> headers)
- Specified by:
withHeadersin interfaceHttpRequest
-
withUriParam
public MultiPartRequest withUriParam(String name, String value)
- Specified by:
withUriParamin interfaceHttpRequest
-
withUrlEncodedFormParams
public MultiPartRequest withUrlEncodedFormParams(List<org.apache.http.NameValuePair> formParams)
- Specified by:
withUrlEncodedFormParamsin interfaceHttpRequest
-
withBody
public MultiPartRequest withBody(String body)
- Specified by:
withBodyin interfaceHttpRequest
-
withAuthenticationMethod
public MultiPartRequest withAuthenticationMethod(AuthenticationMethod authMethod)
- Specified by:
withAuthenticationMethodin interfaceHttpRequest
-
withTemplate
public MultiPartRequest withTemplate(String uriTemplate)
- Specified by:
withTemplatein interfaceHttpRequest
-
withAcceptType
public MultiPartRequest withAcceptType(String acceptHeader)
- Specified by:
withAcceptTypein interfaceHttpRequest
-
withAuthenticator
public MultiPartRequest withAuthenticator(Authenticator authenticator)
Description copied from interface:HttpRequestAttaches an authenticator instance to the class, which will be used for all access token operations- Specified by:
withAuthenticatorin interfaceHttpRequest- Returns:
-
withConfig
public MultiPartRequest withConfig(HttpRequestConfig requestConfig)
- Specified by:
withConfigin interfaceHttpRequest
-
withRequestKey
public HttpRequest withRequestKey(RequestKey requestKey)
- Specified by:
withRequestKeyin interfaceHttpRequest
-
withStringBodyPart
public MultiPartRequest withStringBodyPart(StringBodyPart stringBodyPart)
Only supports a single body part for now, based on the backend API. Internal implementation can be changed- Specified by:
withStringBodyPartin interfaceMultiPartRequest- Parameters:
stringBodyPart-- Returns:
-
withInputStreamPart
public MultiPartRequest withInputStreamPart(InputStreamPart inputStreamPart)
- Specified by:
withInputStreamPartin interfaceMultiPartRequest
-
withByteArrayPart
public MultiPartRequest withByteArrayPart(ByteArrayPart byteArrayPart)
- Specified by:
withByteArrayPartin interfaceMultiPartRequest
-
authenticate
public void authenticate()
Description copied from interface:HttpRequestGets an access token from the authenticator configured with a request and adds it as an authorization header- Specified by:
authenticatein interfaceHttpRequest
-
forceAuthenticate
public void forceAuthenticate()
Description copied from interface:HttpRequestRefreshes the access token via the authenticator configured with a request and adds it as an authorization header- Specified by:
forceAuthenticatein interfaceHttpRequest
-
getConfig
public HttpRequestConfig getConfig()
- Specified by:
getConfigin interfaceHttpRequest
-
getEntity
public org.apache.http.entity.StringEntity getEntity()
- Specified by:
getEntityin interfaceHttpRequest
-
getHttpMethod
public HttpMethod getHttpMethod()
- Specified by:
getHttpMethodin interfaceHttpRequest
-
getAuthMethod
public AuthenticationMethod getAuthMethod()
- Specified by:
getAuthMethodin interfaceHttpRequest
-
getHeaders
public Map<String,String> getHeaders()
- Specified by:
getHeadersin interfaceHttpRequest
-
getFinalUri
public String getFinalUri()
- Specified by:
getFinalUriin interfaceHttpRequest
-
getRequestType
public RequestType getRequestType()
- Specified by:
getRequestTypein interfaceHttpRequest
-
getAuthenticator
public Authenticator getAuthenticator()
- Specified by:
getAuthenticatorin interfaceHttpRequest
-
getTemplateString
public String getTemplateString()
- Specified by:
getTemplateStringin interfaceHttpRequest
-
getByteArrayParts
public List<ByteArrayPart> getByteArrayParts()
- Specified by:
getByteArrayPartsin interfaceMultiPartRequest
-
getInputStreams
public List<InputStreamPart> getInputStreams()
- Specified by:
getInputStreamsin interfaceMultiPartRequest
-
getStringBodyPart
public StringBodyPart getStringBodyPart()
- Specified by:
getStringBodyPartin interfaceMultiPartRequest
-
getRequestKey
public RequestKey getRequestKey()
- Specified by:
getRequestKeyin interfaceHttpRequest
-
-