@Override public final Map<String, Object> execute() throws ConnectorException { executeBusinessLogic(); return getOutputParameters(); }
/** * get the input parameter or the default value if the parameter is not set * * @param parameterKey * name of the parameter * @param defaultValue * value of the parameter if not set * @return * the value of the parameter */ protected Object getInputParameter(final String parameterKey, final Serializable defaultValue) { final Object param = getInputParameter(parameterKey); return param == null ? defaultValue : param; }
@Override public void setInputParameters(final Map<String, Object> parameters) { final APIAccessor apiAccessor = (APIAccessor) parameters.remove("connectorApiAccessor"); final EngineExecutionContext executionContext = (EngineExecutionContext) parameters.remove("engineExecutionContext"); if (connector instanceof AbstractConnector) { ((AbstractConnector) connector).setAPIAccessor(apiAccessor); if (executionContext != null) { ((AbstractConnector) connector).setExecutionContext(executionContext); } } connector.setInputParameters(parameters); }
@Override public void setInputParameters(final Map<String, Object> parameters) { final APIAccessor apiAccessor = (APIAccessor) parameters.remove("connectorApiAccessor"); final EngineExecutionContext executionContext = (EngineExecutionContext) parameters.remove("engineExecutionContext"); if (connector instanceof AbstractConnector) { ((AbstractConnector) connector).setAPIAccessor(apiAccessor); if (executionContext != null) { ((AbstractConnector) connector).setExecutionContext(executionContext); } } connector.setInputParameters(parameters); }
@Override public final Map<String, Object> execute() throws ConnectorException { executeBusinessLogic(); return getOutputParameters(); }
/** * get the input parameter or the default value if the parameter is not set * * @param parameterKey * name of the parameter * @param defaultValue * value of the parameter if not set * @return * the value of the parameter */ protected Object getInputParameter(final String parameterKey, final Serializable defaultValue) { final Object param = getInputParameter(parameterKey); return param == null ? defaultValue : param; }