Class RemoteConnectorRequestImpl
java.lang.Object
org.alfresco.repo.remoteconnector.RemoteConnectorRequestImpl
- All Implemented Interfaces:
RemoteConnectorRequest
Helper wrapper around a Remote Request, to be performed by the
RemoteConnectorService.- Since:
- 4.0.2
- Author:
- Nick Burch
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRemoteConnectorRequestImpl(String url, Class<? extends org.apache.commons.httpclient.HttpMethodBase> method) RemoteConnectorRequestImpl(String url, String methodName) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRequestHeader(String name, String value) voidaddRequestHeader(org.apache.commons.httpclient.Header header) voidaddRequestHeaders(org.apache.commons.httpclient.Header[] headers) protected static org.apache.commons.httpclient.HttpMethodBasebuildHttpClientMethod(String url, Class<? extends org.apache.commons.httpclient.HttpMethodBase> method) protected static org.apache.commons.httpclient.HttpMethodBasebuildHttpClientMethod(String url, String method) org.apache.commons.httpclient.HttpMethodBaseorg.apache.commons.httpclient.methods.RequestEntityReturns the Request Body, for use by theRemoteConnectorServicewhich created thisorg.apache.commons.httpclient.Header[]getURL()voidsetContentType(String contentType) Sets the Content Type to send for the requestvoidsetRequestBody(byte[] body) voidsetRequestBody(InputStream body) voidsetRequestBody(String body) voidsetRequestBody(org.apache.commons.httpclient.methods.RequestEntity body)
-
Field Details
-
HEADER_CONTENT_TYPE
- See Also:
-
-
Constructor Details
-
RemoteConnectorRequestImpl
-
RemoteConnectorRequestImpl
-
-
Method Details
-
buildHttpClientMethod
-
buildHttpClientMethod
-
getURL
- Specified by:
getURLin interfaceRemoteConnectorRequest- Returns:
- the URL this request is for
-
getMethod
- Specified by:
getMethodin interfaceRemoteConnectorRequest- Returns:
- the HTTP Method this request will execute (eg POST, GET)
-
getMethodInstance
public org.apache.commons.httpclient.HttpMethodBase getMethodInstance() -
getContentType
- Specified by:
getContentTypein interfaceRemoteConnectorRequest- Returns:
- The Content Type of the request
-
setContentType
Description copied from interface:RemoteConnectorRequestSets the Content Type to send for the request- Specified by:
setContentTypein interfaceRemoteConnectorRequest
-
getRequestBody
public org.apache.commons.httpclient.methods.RequestEntity getRequestBody()Description copied from interface:RemoteConnectorRequestReturns the Request Body, for use by theRemoteConnectorServicewhich created this- Specified by:
getRequestBodyin interfaceRemoteConnectorRequest
-
setRequestBody
- Specified by:
setRequestBodyin interfaceRemoteConnectorRequest
-
setRequestBody
public void setRequestBody(byte[] body) - Specified by:
setRequestBodyin interfaceRemoteConnectorRequest
-
setRequestBody
- Specified by:
setRequestBodyin interfaceRemoteConnectorRequest
-
setRequestBody
public void setRequestBody(org.apache.commons.httpclient.methods.RequestEntity body) - Specified by:
setRequestBodyin interfaceRemoteConnectorRequest
-
getRequestHeaders
public org.apache.commons.httpclient.Header[] getRequestHeaders()- Specified by:
getRequestHeadersin interfaceRemoteConnectorRequest
-
addRequestHeader
public void addRequestHeader(org.apache.commons.httpclient.Header header) - Specified by:
addRequestHeaderin interfaceRemoteConnectorRequest
-
addRequestHeader
- Specified by:
addRequestHeaderin interfaceRemoteConnectorRequest
-
addRequestHeaders
public void addRequestHeaders(org.apache.commons.httpclient.Header[] headers) - Specified by:
addRequestHeadersin interfaceRemoteConnectorRequest
-