public class ConnectorServiceDecorator extends Object implements ConnectorService
DONE, FAILED, SKIPPED, TO_BE_EXECUTED, TO_RE_EXECUTE| Constructor and Description |
|---|
ConnectorServiceDecorator(ConnectorService connectorService) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectorImplementation(Long processDefinitionId,
String name,
byte[] content) |
void |
disconnect(ConnectorResult result) |
Map<String,Object> |
evaluateInputParameters(String connectorId,
Map<String,SExpression> parameters,
SExpressionContext sExpressionContext,
Map<String,Map<String,Serializable>> inputValues) |
ConnectorResult |
executeConnector(long processDefinitionId,
SConnectorInstance sConnectorInstance,
SConnectorImplementationDescriptor connectorImplementationDescriptor,
ClassLoader classLoader,
Map<String,Object> inputParameters) |
ConnectorResult |
executeMultipleEvaluation(long processDefinitionId,
String connectorDefinitionId,
String connectorDefinitionVersion,
Map<String,SExpression> connectorInputParameters,
Map<String,Map<String,Serializable>> inputValues,
ClassLoader classLoader,
SExpressionContext sexpContext)
Execute a connector instance by given connectorDefinitionId and connectorDefinitionVersion
|
void |
executeOutputOperation(List<SOperation> outputs,
SExpressionContext expressionContext,
ConnectorResult connectorOutput) |
SConnectorImplementationDescriptor |
getConnectorImplementation(long processDefinitionId,
String connectorId,
String connectorVersion)
Get connector implementation descriptor for specified connector in a process definition.
|
SConnectorImplementationDescriptor |
getConnectorImplementationDescriptor(long processDefinitionId,
String connectorId,
String version) |
List<org.bonitasoft.engine.resources.SBARResource> |
getConnectorImplementations(long processDefinitionId,
int from,
int numberOfElements) |
List<SConnectorImplementationDescriptor> |
getConnectorImplementations(long processDefinitionId,
int fromIndex,
int numberPerPage,
String field,
OrderByType order)
Get a list of connector implementation descriptors for id specified process definition, the returned list is paginated
|
Long |
getNumberOfConnectorImplementations(long processDefinitionId) |
boolean |
loadConnectors(SProcessDefinition sDefinition)
Load connectors for given process definition and tenant, connectors will be stored in cache after loading
|
void |
removeConnectorImplementations(long processDefinitionId) |
void |
setConnectorImplementation(SProcessDefinition sProcessDefinition,
String connectorId,
String connectorVersion,
byte[] connectorImplementationArchive)
Set connector implementation for id and version specified connector.
|
public ConnectorServiceDecorator(ConnectorService connectorService)
public ConnectorResult executeMultipleEvaluation(long processDefinitionId, String connectorDefinitionId, String connectorDefinitionVersion, Map<String,SExpression> connectorInputParameters, Map<String,Map<String,Serializable>> inputValues, ClassLoader classLoader, SExpressionContext sexpContext) throws SConnectorException
ConnectorServiceexecuteMultipleEvaluation in interface ConnectorServiceprocessDefinitionId - The identifier of process definitionconnectorDefinitionId - The identifier of connector definitionconnectorDefinitionVersion - The version of connector definitionconnectorInputParameters - The input of connectorinputValues - The input values of connectorclassLoader - The class loader used to load and run connectorsexpContext - The expression contextSConnectorException - Error thrown if has exceptions during the connector executingpublic boolean loadConnectors(SProcessDefinition sDefinition) throws SConnectorException
ConnectorServiceloadConnectors in interface ConnectorServicesDefinition - The process definitionSConnectorException - Error thrown if has exceptions during the connector loadingpublic void setConnectorImplementation(SProcessDefinition sProcessDefinition, String connectorId, String connectorVersion, byte[] connectorImplementationArchive) throws SConnectorException, SInvalidConnectorImplementationException
ConnectorServicesetConnectorImplementation in interface ConnectorServicesProcessDefinition - The process definition which the connector belongs toconnectorId - Id of connector definition.connectorVersion - Version of connector definitionconnectorImplementationArchive - zip byte array containing the connector implementation informationSConnectorException - Error thrown if has exceptions during the connector implementation settingSInvalidConnectorImplementationExceptionpublic List<SConnectorImplementationDescriptor> getConnectorImplementations(long processDefinitionId, int fromIndex, int numberPerPage, String field, OrderByType order) throws SConnectorException
ConnectorServicegetConnectorImplementations in interface ConnectorServiceprocessDefinitionId - Identifier of process definitionfromIndex - Start index of connector recordnumberPerPage - Number of connectors we want to get. Maximum number of connectors returned.field - The field that the result ordered byorder - The order, ACS or DESCSConnectorException - Error thrown if has exceptions during the connector implementations retrievepublic SConnectorImplementationDescriptor getConnectorImplementation(long processDefinitionId, String connectorId, String connectorVersion) throws SConnectorException
ConnectorServicegetConnectorImplementation in interface ConnectorServiceprocessDefinitionId - Identifier of process definitionconnectorId - id of connector definitionconnectorVersion - version of connector definitionSConnectorException - Error thrown if has exceptions during the connector implementation getpublic Map<String,Object> evaluateInputParameters(String connectorId, Map<String,SExpression> parameters, SExpressionContext sExpressionContext, Map<String,Map<String,Serializable>> inputValues) throws SExpressionTypeUnknownException, SExpressionEvaluationException, SExpressionDependencyMissingException, SInvalidExpressionException
evaluateInputParameters in interface ConnectorServiceSExpressionTypeUnknownExceptionSExpressionEvaluationExceptionSExpressionDependencyMissingExceptionSInvalidExpressionExceptionpublic void executeOutputOperation(List<SOperation> outputs, SExpressionContext expressionContext, ConnectorResult connectorOutput) throws SConnectorException
executeOutputOperation in interface ConnectorServiceSConnectorExceptionpublic ConnectorResult executeConnector(long processDefinitionId, SConnectorInstance sConnectorInstance, SConnectorImplementationDescriptor connectorImplementationDescriptor, ClassLoader classLoader, Map<String,Object> inputParameters) throws SConnectorException
executeConnector in interface ConnectorServiceSConnectorExceptionpublic void disconnect(ConnectorResult result) throws SConnectorException
disconnect in interface ConnectorServiceSConnectorExceptionpublic Long getNumberOfConnectorImplementations(long processDefinitionId) throws SConnectorException
getNumberOfConnectorImplementations in interface ConnectorServiceprocessDefinitionId - the id of the process definitionSConnectorExceptionpublic List<org.bonitasoft.engine.resources.SBARResource> getConnectorImplementations(long processDefinitionId, int from, int numberOfElements) throws SBonitaReadException
getConnectorImplementations in interface ConnectorServiceSBonitaReadExceptionpublic void addConnectorImplementation(Long processDefinitionId, String name, byte[] content) throws SRecorderException
addConnectorImplementation in interface ConnectorServiceSRecorderExceptionpublic void removeConnectorImplementations(long processDefinitionId)
throws SBonitaReadException,
SRecorderException
removeConnectorImplementations in interface ConnectorServiceSBonitaReadExceptionSRecorderExceptionpublic SConnectorImplementationDescriptor getConnectorImplementationDescriptor(long processDefinitionId, String connectorId, String version) throws SConnectorException
getConnectorImplementationDescriptor in interface ConnectorServiceSConnectorExceptionCopyright © 2018 Bonitasoft S.A.. All rights reserved.