Class SConnectorAdapter
- java.lang.Object
-
- org.bonitasoft.engine.core.connector.impl.SConnectorAdapter
-
- All Implemented Interfaces:
SConnector
public class SConnectorAdapter extends java.lang.Object implements SConnector
Adapter to execute client connector objects in the server side- Author:
- Baptiste Mesta, Emmanuel Duchastenier
-
-
Constructor Summary
Constructors Constructor Description SConnectorAdapter(org.bonitasoft.engine.connector.Connector connector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect()Called by the engine before the connector is executed This method can be implemented by connectors to handle here opening of connections like database connectionvoiddisconnect()Called by the engine after the connector and its output operations are executed This method can be implemented by connectors to close connections here.java.util.Map<java.lang.String,java.lang.Object>execute()Execute the connector.org.bonitasoft.engine.connector.ConnectorgetConnector()voidsetInputParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)Set the input parameter for a connector.voidvalidate()Validate the input parameters.
-
-
-
Method Detail
-
getConnector
public org.bonitasoft.engine.connector.Connector getConnector()
-
setInputParameters
public void setInputParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
Description copied from interface:SConnectorSet the input parameter for a connector.- Specified by:
setInputParametersin interfaceSConnector- Parameters:
parameters- parameters is a map with parameter names and their value.
-
validate
public void validate() throws SConnectorValidationExceptionDescription copied from interface:SConnectorValidate the input parameters. Check the parameters types and boundaries.- Specified by:
validatein interfaceSConnector- Throws:
SConnectorValidationException
-
execute
public java.util.Map<java.lang.String,java.lang.Object> execute() throws SConnectorExceptionDescription copied from interface:SConnectorExecute the connector.- Specified by:
executein interfaceSConnector- Returns:
- the connector outputs map corresponding to the output definition.
- Throws:
SConnectorException
-
connect
public void connect() throws SConnectorExceptionDescription copied from interface:SConnectorCalled by the engine before the connector is executed This method can be implemented by connectors to handle here opening of connections like database connection- Specified by:
connectin interfaceSConnector- Throws:
SConnectorException
-
disconnect
public void disconnect() throws SConnectorExceptionDescription copied from interface:SConnectorCalled by the engine after the connector and its output operations are executed This method can be implemented by connectors to close connections here. The typical use of this is to be able to return connected objects that will be used in output operation and then disconnect them.- Specified by:
disconnectin interfaceSConnector- Throws:
SConnectorException
-
-