Ejemplo n.º 1
0
 @Override
 public void exitIntegrationFlowDefStatement(WUMLParser.IntegrationFlowDefStatementContext ctx) {
   // Create the integration flow when definition is found
   integrationFlow =
       new WUMLConfigurationBuilder.IntegrationFlow(ctx.INTEGRATIONFLOWNAME().getText());
   super.exitIntegrationFlowDefStatement(ctx);
 }
Ejemplo n.º 2
0
 @Override
 public void exitInvokeFromSource(WUMLParser.InvokeFromSourceContext ctx) {
   // String inbountEndpointName = ctx.INBOUNDENDPOINTNAME().getText();
   String pipelineName = ctx.PIPELINENAME().getText();
   integrationFlow.getEsbConfigHolder().getInboundEndpoint().setPipeline(pipelineName);
   pipelineStack.push(pipelineName);
   // activePipeline = pipelineName;
   super.exitInvokeFromSource(ctx);
 }
Ejemplo n.º 3
0
 @Override
 public void exitIfStatement(WUMLParser.IfStatementContext ctx) {
   // ctx.expression().EXPRESSIONX()
   ifMultiThenBlockStarted = false;
   ifElseBlockStarted = false;
   if (!filterMediatorStack.isEmpty()) {
     filterMediatorStack.pop();
   }
   super.exitIfStatement(ctx);
 }
Ejemplo n.º 4
0
 @Override
 public void exitOutboundEndpointDefStatement(WUMLParser.OutboundEndpointDefStatementContext ctx) {
   String protocolName =
       StringParserUtil.getValueWithinDoubleQuotes(
           ctx.outboundEndpointDef().PROTOCOLDEF().getText());
   String uri =
       StringParserUtil.getValueWithinDoubleQuotes(ctx.outboundEndpointDef().HOSTDEF().getText());
   OutboundEndpoint outboundEndpoint =
       OutboundEndpointFactory.getOutboundEndpoint(
           OutboundEndpointType.valueOf(protocolName), ctx.OUTBOUNDENDPOINTNAME().getText(), uri);
   integrationFlow.getEsbConfigHolder().addOutboundEndpoint(outboundEndpoint);
   super.exitOutboundEndpointDefStatement(ctx);
 }
Ejemplo n.º 5
0
  @Override
  public void exitMessageProcessingDef(WUMLParser.MessageProcessingDefContext ctx) {
    String mediatorName = ctx.MEDIATORNAME().getText();
    String configurations =
        StringParserUtil.getValueWithinDoubleQuotes(ctx.ARGUMENTLISTDEF().getText());
    Mediator mediator = MediatorFactory.getInstance().getMediator(mediatorName, configurations);
    if (ifMultiThenBlockStarted) {
      filterMediatorStack.peek().addThenMediator(mediator);

    } else if (ifElseBlockStarted) {
      filterMediatorStack.peek().addOtherwiseMediator(mediator);

    } else {
      integrationFlow.getEsbConfigHolder().getPipeline(pipelineStack.peek()).addMediator(mediator);
    }
    super.exitMessageProcessingDef(ctx);
  }
Ejemplo n.º 6
0
 @Override
 public void exitConditionStatement(WUMLParser.ConditionStatementContext ctx) {
   String sourceDefinition =
       StringParserUtil.getValueWithinDoubleQuotes(ctx.conditionDef().SOURCEDEF().getText());
   Source source = new Source(sourceDefinition);
   Condition condition =
       new Condition(
           source,
           Pattern.compile(
               StringParserUtil.getValueWithinDoubleQuotes(
                   ctx.conditionDef().PATTERNDEF().getText())));
   FilterMediator filterMediator = new FilterMediator(condition);
   integrationFlow
       .getEsbConfigHolder()
       .getPipeline(pipelineStack.peek())
       .addMediator(filterMediator);
   filterMediatorStack.push(filterMediator);
   super.exitConditionStatement(ctx);
 }
Ejemplo n.º 7
0
 @Override
 public void exitInboundEndpointDefStatement(WUMLParser.InboundEndpointDefStatementContext ctx) {
   String protocolName =
       StringParserUtil.getValueWithinDoubleQuotes(
           ctx.inboundEndpointDef().PROTOCOLDEF().getText());
   int port =
       Integer.parseInt(
           StringParserUtil.getValueWithinBrackets(ctx.inboundEndpointDef().PORTDEF().getText()));
   String context =
       StringParserUtil.getValueWithinDoubleQuotes(
           ctx.inboundEndpointDef().CONTEXTDEF().getText());
   InboundEndpoint inboundEndpoint =
       InboundEndpointFactory.getInboundEndpoint(
           InboundEndpointType.valueOf(protocolName), ctx.INBOUNDENDPOINTNAME().getText(), port);
   if (inboundEndpoint instanceof HTTPInboundEP) {
     ((HTTPInboundEP) inboundEndpoint).setContext(context);
   }
   integrationFlow.getEsbConfigHolder().setInboundEndpoint(inboundEndpoint);
   super.exitInboundEndpointDefStatement(ctx);
 }
Ejemplo n.º 8
0
  @Override
  public void exitInvokeToSource(WUMLParser.InvokeToSourceContext ctx) {
    Mediator mediator = MediatorFactory.getInstance().getMediator("respond", null);
    if (ifMultiThenBlockStarted) {
      filterMediatorStack.peek().addThenMediator(mediator);

    } else if (ifElseBlockStarted) {
      filterMediatorStack.peek().addOtherwiseMediator(mediator);

    } else {
      //            String mediatorName =
      // StringParserUtil.getValueWithinDoubleQuotes(ctx.MEDIATORNAMESTRINGX().getText());
      //            String configurations =
      // StringParserUtil.getValueWithinDoubleQuotes(ctx.CONFIGSDEF().getText());
      //            Mediator mediator =
      // MediatorFactory.getMediator(MediatorType.valueOf(mediatorName), configurations);
      integrationFlow.getEsbConfigHolder().getPipeline(pipelineStack.peek()).addMediator(mediator);
    }
    pipelineStack.pop();
    super.exitInvokeToSource(ctx);
  }
Ejemplo n.º 9
0
 @Override
 public void exitScript(WUMLParser.ScriptContext ctx) {
   super.exitScript(ctx);
 }
Ejemplo n.º 10
0
 @Override
 public void exitHandler(WUMLParser.HandlerContext ctx) {
   super.exitHandler(ctx);
 }
Ejemplo n.º 11
0
 @Override
 public void exitRefStatement(WUMLParser.RefStatementContext ctx) {
   pipelineStack.push(ctx.PIPELINENAME().getText());
   super.exitRefStatement(ctx);
 }
Ejemplo n.º 12
0
 @Override
 public void exitExpression(WUMLParser.ExpressionContext ctx) {
   super.exitExpression(ctx);
 }
Ejemplo n.º 13
0
 @Override
 public void enterIfElseBlock(WUMLParser.IfElseBlockContext ctx) {
   ifMultiThenBlockStarted = false;
   ifElseBlockStarted = true;
   super.enterIfElseBlock(ctx);
 }
Ejemplo n.º 14
0
 @Override
 public void exitIfElseBlock(WUMLParser.IfElseBlockContext ctx) {
   ifElseBlockStarted = false;
   super.exitIfElseBlock(ctx);
 }
Ejemplo n.º 15
0
 @Override
 public void exitPipelineDef(WUMLParser.PipelineDefContext ctx) {
   super.exitPipelineDef(ctx);
 }
Ejemplo n.º 16
0
 @Override
 public void exitProcessingStatement(WUMLParser.ProcessingStatementContext ctx) {
   super.exitProcessingStatement(ctx);
 }
Ejemplo n.º 17
0
 @Override
 public void exitPipelineDefStatement(WUMLParser.PipelineDefStatementContext ctx) {
   Pipeline pipeline = new Pipeline(ctx.PIPELINENAME().getText());
   integrationFlow.getEsbConfigHolder().addPipeline(pipeline);
   super.exitPipelineDefStatement(ctx);
 }
Ejemplo n.º 18
0
 @Override
 public void exitParElseBlock(WUMLParser.ParElseBlockContext ctx) {
   super.exitParElseBlock(ctx);
 }
Ejemplo n.º 19
0
 @Override
 public void exitMediatorDef(WUMLParser.MediatorDefContext ctx) {
   super.exitMediatorDef(ctx);
 }
Ejemplo n.º 20
0
 @Override
 public void exitInvokeFromTarget(WUMLParser.InvokeFromTargetContext ctx) {
   String pipelineName = ctx.PIPELINENAME().getText();
   pipelineStack.push(pipelineName);
   super.exitInvokeFromTarget(ctx);
 }
Ejemplo n.º 21
0
 @Override
 public void exitOutboundEndpointDef(WUMLParser.OutboundEndpointDefContext ctx) {
   super.exitOutboundEndpointDef(ctx);
 }
Ejemplo n.º 22
0
 @Override
 public void exitStatement(WUMLParser.StatementContext ctx) {
   super.exitStatement(ctx);
 }
Ejemplo n.º 23
0
 @Override
 public void exitMediatorDefStatement(WUMLParser.MediatorDefStatementContext ctx) {
   super.exitMediatorDefStatement(ctx);
 }
Ejemplo n.º 24
0
 @Override
 public void exitParticipantStatement(WUMLParser.ParticipantStatementContext ctx) {
   super.exitParticipantStatement(ctx);
 }
Ejemplo n.º 25
0
 @Override
 public void exitIntegrationFlowDef(WUMLParser.IntegrationFlowDefContext ctx) {
   super.exitIntegrationFlowDef(ctx);
 }
Ejemplo n.º 26
0
 @Override
 public void exitTitleStatement(WUMLParser.TitleStatementContext ctx) {
   // Create the integration flow when definition is found
   integrationFlow = new WUMLConfigurationBuilder.IntegrationFlow(ctx.IDENTIFIER().getText());
   super.exitTitleStatement(ctx);
 }
Ejemplo n.º 27
0
 @Override
 public void exitParMultiThenBlock(WUMLParser.ParMultiThenBlockContext ctx) {
   super.exitParMultiThenBlock(ctx);
 }