Package org.bonitasoft.connectors.rest
Class RESTConnector
- java.lang.Object
-
- org.bonitasoft.engine.connector.AbstractConnector
-
- org.bonitasoft.connectors.rest.AbstractRESTConnectorImpl
-
- org.bonitasoft.connectors.rest.RESTConnector
-
- All Implemented Interfaces:
org.bonitasoft.engine.connector.Connector
- Direct Known Subclasses:
DeleteConnectorImpl,GetConnectorImpl,HeadConnectorImpl,PostConnectorImpl,PutConnectorImpl
public class RESTConnector extends AbstractRESTConnectorImpl
This main class of the REST Connector implementation
-
-
Field Summary
-
Fields inherited from class org.bonitasoft.connectors.rest.AbstractRESTConnectorImpl
AUTH_HOST_INPUT_PARAMETER, AUTH_PASSWORD_INPUT_PARAMETER, AUTH_PORT_INPUT_PARAMETER, AUTH_PREEMPTIVE_INPUT_PARAMETER, AUTH_REALM_INPUT_PARAMETER, AUTH_TYPE_PARAMETER, AUTH_USERNAME_INPUT_PARAMETER, BODY_AS_OBJECT_OUTPUT_PARAMETER, BODY_AS_STRING_OUTPUT_PARAMETER, BODY_INPUT_PARAMETER, CHARSET_INPUT_PARAMETER, CONNECTION_TIMEOUT_MS_DEFAULT_VALUE, CONNECTION_TIMEOUT_MS_PARAMETER, CONTENTTYPE_INPUT_PARAMETER, DO_NOT_FOLLOW_REDIRECT_INPUT_PARAMETER, DOCUMENT_BODY_INPUT_PARAMETER, HEADERS_OUTPUT_PARAMETER, HOSTNAME_VERIFIER_INPUT_PARAMETER, IGNORE_BODY_INPUT_PARAMETER, KEY_STORE_FILE_INPUT_PARAMETER, KEY_STORE_PASSWORD_INPUT_PARAMETER, METHOD_INPUT_PARAMETER, PROXY_HOST_INPUT_PARAMETER, PROXY_PASSWORD_INPUT_PARAMETER, PROXY_PORT_INPUT_PARAMETER, PROXY_PROTOCOL_INPUT_PARAMETER, PROXY_USERNAME_INPUT_PARAMETER, SOCKET_TIMEOUT_MS_DEFAULT_VALUE, SOCKET_TIMEOUT_MS_PARAMETER, STATUS_CODE_OUTPUT_PARAMETER, STATUS_MESSAGE_OUTPUT_PARAMETER, TLS_INPUT_PARAMETER, TRUST_CERTIFICATE_STRATEGY_INPUT_PARAMETER, TRUST_STORE_FILE_INPUT_PARAMETER, TRUST_STORE_PASSWORD_INPUT_PARAMETER, URL_INPUT_PARAMETER, URLCOOKIES_INPUT_PARAMETER, URLHEADERS_INPUT_PARAMETER
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRESTConnector(boolean hasBody)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(Request request)Execute a given requestprotected voidexecuteBusinessLogic()booleanhasBody()voidvalidateInputParameters()-
Methods inherited from class org.bonitasoft.connectors.rest.AbstractRESTConnectorImpl
getAuthHost, getAuthPassword, getAuthPort, getAuthPreemptive, getAuthRealm, getAuthType, getAuthUsername, getBody, getCharset, getConnectionTimeoutMs, getContentType, getDocumentBody, getDoNotFollowRedirect, getHostnameVerifier, getIgnoreBody, getKeyStoreFile, getKeyStorePassword, getMethod, getProxyHost, getProxyPassword, getProxyPort, getProxyProtocol, getProxyUsername, getSocketTimeoutMs, getTLS, getTrustCertificateStrategy, getTrustStoreFile, getTrustStorePassword, getUrl, getUrlCookies, getUrlHeaders, setBody, setBody, setHeaders, setStatusCode, setStatusMessage
-
-
-
-
Method Detail
-
validateInputParameters
public void validateInputParameters() throws org.bonitasoft.engine.connector.ConnectorValidationException- Specified by:
validateInputParametersin interfaceorg.bonitasoft.engine.connector.Connector- Overrides:
validateInputParametersin classAbstractRESTConnectorImpl- Throws:
org.bonitasoft.engine.connector.ConnectorValidationException
-
executeBusinessLogic
protected void executeBusinessLogic() throws org.bonitasoft.engine.connector.ConnectorException- Specified by:
executeBusinessLogicin classorg.bonitasoft.engine.connector.AbstractConnector- Throws:
org.bonitasoft.engine.connector.ConnectorException
-
execute
public void execute(Request request) throws Exception
Execute a given request- Parameters:
request- The request to execute- Throws:
Exception- any exception that might occur
-
hasBody
public boolean hasBody()
- Specified by:
hasBodyin classAbstractRESTConnectorImpl
-
-