How to Avoid Impl Abstract class in custom connector , as like standard connector's source code

1
0
-1

hello , i m using Bonita community 6.3.1 i downloaded email connector from github to just examine code . i found that there is no abstract class there ,there is direct : Connector abstract class

i want to create connector same like that so i just create one connector which take 3 input and print it . when i run this ,ti done but nothing print . pl help what i done wrong .

here is connector code

  1. package org.mycompany.connector;
  2.  
  3. import org.bonitasoft.engine.connector.ConnectorException;
  4. import org.bonitasoft.engine.connector.ConnectorValidationException;
  5. import org.bonitasoft.engine.connector.AbstractConnector;
  6. import java.util.logging.Logger;
  7.  
  8. public class Log_TestImpl extends AbstractConnector {
  9.  
  10. protected final static String IP1_INPUT_PARAMETER = "ip1";
  11. protected final static String IP2_INPUT_PARAMETER = "ip2";
  12. protected final static String IP3_INPUT_PARAMETER = "ip3";
  13. private Logger LOGGER = Logger.getLogger(this.getClass().getName());
  14.  
  15.  
  16.  
  17. @Override
  18. public void validateInputParameters() throws ConnectorValidationException {
  19.  
  20.  
  21. final String ip1 = (String) getInputParameter(IP1_INPUT_PARAMETER);
  22. final String ip2 = (String) getInputParameter(IP2_INPUT_PARAMETER);
  23. final String ip3 = (String) getInputParameter(IP3_INPUT_PARAMETER);
  24.  
  25. if(ip1 ==null || ip2 == null || ip3==null)
  26. {
  27. LOGGER.info("no null");
  28. }
  29.  
  30.  
  31.  
  32.  
  33. }
  34. private void logInputParameters() {
  35. logInputParameter(IP1_INPUT_PARAMETER);
  36. logInputParameter(IP2_INPUT_PARAMETER);
  37. logInputParameter(IP3_INPUT_PARAMETER);
  38.  
  39. }
  40. private void logInputParameter(String parameterName) {
  41. LOGGER.info(parameterName + " " + String.valueOf(getInputParameter(parameterName)));
  42. }
  43. @Override
  44. protected void executeBusinessLogic() throws ConnectorException {
  45. try {
  46. validateInputParameters();
  47. logInputParameters();
  48. } catch (ConnectorValidationException e) {
  49. // TODO Auto-generated catch block
  50. e.printStackTrace();
  51. }
  52.  
  53. }
  54.  
  55. @Override
  56. public void connect() throws ConnectorException {
  57. // [Optional] Open a connection to remote server
  58.  
  59. }
  60.  
  61. @Override
  62. public void disconnect() throws ConnectorException {
  63. // [Optional] Close connection to remote server
  64.  
  65. }
  66.  
  67. }

here is server log

No answers yet.
Notifications