public ObjectNode convertElementToJson(BaseElementImpl baseElm){
List<ConnectorInstance> connectorInstances = baseElm.getConnectorInstances();
if(connectorInstances != null){
ObjectNode connectorInstanceNode = objectMapper.createObjectNode();
ArrayNode itemsNode = objectMapper.createArrayNode();
for(ConnectorInstance connectorInstance: connectorInstances){
ObjectNode connectorInstanceItemNode = objectMapper.createObjectNode();
connectorInstanceItemNode.put(PROPERTY_CONNECTORINSTANCE_CONNECTORID, connectorInstance.getConnectorId());
connectorInstanceItemNode.put(PROPERTY_CONNECTORINSTANCE_PACKAGENAME, connectorInstance.getPackageName());
connectorInstanceItemNode.put(PROPERTY_CONNECTORINSTANCE_CLASSNAME, connectorInstance.getClassName());
connectorInstanceItemNode.put(PROPERTY_CONNECTORINSTANCE_CONNECTORINSTANCEID, connectorInstance.getConnectorInstanceId());
connectorInstanceItemNode.put(PROPERTY_CONNECTORINSTANCE_CONNECTORINSTANCENAME, connectorInstance.getConnectorInstanceName());
connectorInstanceItemNode.put(PROPERTY_CONNECTORINSTANCE_EVENTTYPE, connectorInstance.getEventType());
connectorInstanceItemNode.put(PROPERTY_CONNECTORINSTANCE_ERRORHANDLING, connectorInstance.getErrorHandling());
connectorInstanceItemNode.put(PROPERTY_CONNECTORINSTANCE_ERRORCODE, connectorInstance.getErrorCode());
connectorInstanceItemNode.put(PROPERTY_CONNECTORINSTANCE_ISTIMEEXECUTE, connectorInstance.isIsTimeExecute());
Documentation documentation = connectorInstance.getDocumentation();
if(documentation != null){
ObjectNode documentationItemNode = objectMapper.createObjectNode();
documentationItemNode.put(PROPERTY_DOCUMENTATION_ID, documentation.getId());
documentationItemNode.put(PROPERTY_DOCUMENTATION_NAME, documentation.getName());
documentationItemNode.put(PROPERTY_DOCUMENTATION_VALUE, documentation.getValue());
connectorInstanceItemNode.put(PROPERTY_DOCUMENTATION, documentationItemNode);
}
List<ConnectorParameterInputs> connectorParameterInputs = connectorInstance.getConnectorParameterInputs();
if(connectorParameterInputs != null){
ArrayNode parameterItemsNode = objectMapper.createArrayNode();
for(ConnectorParameterInputs connectorParameterInput: connectorParameterInputs){
ObjectNode connectorParameterInputItemNode = objectMapper.createObjectNode();
connectorParameterInputItemNode.put(PROPERTY_CONNECTORPARAMETERINPUTS_ID, connectorParameterInput.getId());
connectorParameterInputItemNode.put(PROPERTY_CONNECTORPARAMETERINPUTS_NAME, connectorParameterInput.getName());
connectorParameterInputItemNode.put(PROPERTY_CONNECTORPARAMETERINPUTS_DATATYPE, connectorParameterInput.getDataType());
connectorParameterInputItemNode.put(PROPERTY_CONNECTORPARAMETERINPUTS_EXPRESSION_ID, connectorParameterInput.getExpression().getId());
connectorParameterInputItemNode.put(PROPERTY_CONNECTORPARAMETERINPUTS_EXPRESSION_NAME, connectorParameterInput.getExpression().getName());
connectorParameterInputItemNode.put(PROPERTY_CONNECTORPARAMETERINPUTS_EXPRESSION_VALUE, connectorParameterInput.getExpression().getValue());
parameterItemsNode.add(connectorParameterInputItemNode);
}
connectorInstanceItemNode.put(PROPERTY_CONNECTORPARAMETERINPUTS, parameterItemsNode);
}
List<ConnectorParameterOutputs> connectorParameterOutputs = connectorInstance.getConnectorParameterOutputs();
if(connectorParameterOutputs != null){
ArrayNode parameterItemsNode = objectMapper.createArrayNode();
for(ConnectorParameterOutputs connectorParameterOutput: connectorParameterOutputs){
ObjectNode connectorParameterInputItemNode = objectMapper.createObjectNode();
connectorParameterInputItemNode.put(PROPERTY_CONNECTORPARAMETEROUTPUTS_VARIABLETARGET, connectorParameterOutput.getVariableTarget());
connectorParameterInputItemNode.put(PROPERTY_CONNECTORPARAMETEROUTPUTS_EXPRESSION_ID, connectorParameterOutput.getExpression().getId());
connectorParameterInputItemNode.put(PROPERTY_CONNECTORPARAMETEROUTPUTS_EXPRESSION_NAME, connectorParameterOutput.getExpression().getName());
connectorParameterInputItemNode.put(PROPERTY_CONNECTORPARAMETEROUTPUTS_EXPRESSION_VALUE, connectorParameterOutput.getExpression().getValue());
parameterItemsNode.add(connectorParameterInputItemNode);
}
connectorInstanceItemNode.put(PROPERTY_CONNECTORPARAMETEROUTPUTS, parameterItemsNode);
}
List<ConnectorParameterOutputsDef> connectorParameterOutputsDef = connectorInstance.getConnectorParameterOutputsDef();
if(connectorParameterOutputsDef != null){
ArrayNode parameterItemsNode = objectMapper.createArrayNode();
for(ConnectorParameterOutputsDef cpod: connectorParameterOutputsDef){
ObjectNode cpodItemNode = objectMapper.createObjectNode();
cpodItemNode.put(PROPERTY_CONNECTORPARAMETEROUTPUTSDEF_ID, cpod.getId());
cpodItemNode.put(PROPERTY_CONNECTORPARAMETEROUTPUTSDEF_NAME, cpod.getName());
cpodItemNode.put(PROPERTY_CONNECTORPARAMETEROUTPUTSDEF_DATATYPE, cpod.getDataType());
parameterItemsNode.add(cpodItemNode);
}
connectorInstanceItemNode.put(PROPERTY_CONNECTORPARAMETEROUTPUTSDEF, parameterItemsNode);
}
SkipComment skipComment = connectorInstance.getSkipComment();