Class SConnectorAdapter

java.lang.Object
org.bonitasoft.engine.core.connector.impl.SConnectorAdapter
All Implemented Interfaces:
SConnector

public class SConnectorAdapter extends 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

    Modifier and Type
    Method
    Description
    void
    Called by the engine before the connector is executed This method can be implemented by connectors to handle here opening of connections like database connection
    void
    Called by the engine after the connector and its output operations are executed This method can be implemented by connectors to close connections here.
    Execute the connector.
    org.bonitasoft.engine.connector.Connector
     
    void
    Set the input parameter for a connector.
    void
    Validate the input parameters.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SConnectorAdapter

      public SConnectorAdapter(org.bonitasoft.engine.connector.Connector connector)
  • Method Details

    • getConnector

      public org.bonitasoft.engine.connector.Connector getConnector()
    • setInputParameters

      public void setInputParameters(Map<String,Object> parameters)
      Description copied from interface: SConnector
      Set the input parameter for a connector.
      Specified by:
      setInputParameters in interface SConnector
      Parameters:
      parameters - parameters is a map with parameter names and their value.
    • validate

      public void validate() throws SConnectorValidationException
      Description copied from interface: SConnector
      Validate the input parameters. Check the parameters types and boundaries.
      Specified by:
      validate in interface SConnector
      Throws:
      SConnectorValidationException
    • execute

      public Map<String,Object> execute() throws SConnectorException
      Description copied from interface: SConnector
      Execute the connector.
      Specified by:
      execute in interface SConnector
      Returns:
      the connector outputs map corresponding to the output definition.
      Throws:
      SConnectorException
    • connect

      public void connect() throws SConnectorException
      Description copied from interface: SConnector
      Called 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:
      connect in interface SConnector
      Throws:
      SConnectorException
    • disconnect

      public void disconnect() throws SConnectorException
      Description copied from interface: SConnector
      Called 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:
      disconnect in interface SConnector
      Throws:
      SConnectorException