Package org.geomajas.service.pipeline

Examples of org.geomajas.service.pipeline.PipelineContext


  @Test
  public void testPipeline() throws Exception {
    StringAttribute response = new StringAttribute("bla");

    PipelineContext context = pipelineService.createContext();
    context.put("start", "start");
    pipelineService.execute("pipelineTest", null, context, response);
    Assert.assertEquals("starts1s2s3", response.getValue());

    context.put("start", "bla-");
    pipelineService.execute("pipelineTest", "aLayer", context, response);
    Assert.assertEquals("bla-step-1step-3", response.getValue());

    context.put("start", "stop-");
    pipelineService.execute("pipelineTest", "stop", context, response);
    Assert.assertEquals("stop-s1-STOP", response.getValue());
  }
View Full Code Here


    pipelineInfo = pipelineService.getPipeline("pipelineTest", "delegate");
    Assert.assertNotNull(pipelineInfo);

    StringAttribute response = new StringAttribute("bla");
    PipelineContext context = pipelineService.createContext();
    context.put("start", "stop-");
    pipelineService.execute(pipelineInfo, context, response);
    Assert.assertEquals("stop-s1-STOP", response.getValue());
  }
View Full Code Here

  @Test
  public void extensionTest() throws Exception {
    StringAttribute response = new StringAttribute("bla");

    PipelineContext context = pipelineService.createContext();
    context.put("start", "start");
    pipelineService.execute("hookedTest", "base", context, response);
    Assert.assertEquals("starts1s2", response.getValue());

    context.put("start", "start");
    pipelineService.execute("hookedTest", "delegate2", context, response);
    Assert.assertEquals("starts1pps2ps2s2", response.getValue());

    context.put("start", "start");
    pipelineService.execute("hookedTest", "delegate", context, response);
    Assert.assertEquals("starts1ps2s2", response.getValue());
  }
View Full Code Here

  }
 
  @Test
  public void interceptorTest() throws Exception {
    StringAttribute response = new StringAttribute("bla");
    PipelineContext context = pipelineService.createContext();
    pipelineService.execute("interceptorTest1", "base", context, response);
    Assert.assertEquals("blabeforei1s1s2afteri1", response.getValue());
  }
View Full Code Here

  }
 
  @Test
  public void interceptorTestNested() throws Exception {
    StringAttribute response = new StringAttribute("bla");
    PipelineContext context = pipelineService.createContext();
    pipelineService.execute("interceptorTest2", "base", context, response);
    Assert.assertEquals("blabeforei1beforei2s1afteri2s2afteri1", response.getValue());
  }
View Full Code Here

  }
 
  @Test
  public void interceptorTestSkip() throws Exception {
    StringAttribute response = new StringAttribute("bla");
    PipelineContext context = pipelineService.createContext();
    pipelineService.execute("interceptorTest3", "base", context, response);
    Assert.assertEquals("blas2", response.getValue());
  }
View Full Code Here

  }

  @Test
  public void interceptorTestBoundaries() throws Exception {
    StringAttribute response = new StringAttribute("bla");
    PipelineContext context = pipelineService.createContext();
    pipelineService.execute("interceptorTest4", "base", context, response);
    Assert.assertEquals("bla_before_s1s2_after_", response.getValue());
  }
View Full Code Here

  }

  @Test
  public void interceptorTestExecutionModeAll() throws Exception {
    StringAttribute response = new StringAttribute("bla");
    PipelineContext context = pipelineService.createContext();
    pipelineService.execute("interceptorExecutionMode1", "base", context, response);
    Assert.assertEquals("bla_before_s1_after_s2", response.getValue());
  }
View Full Code Here

  }

  @Test
  public void interceptorTestExecutionSkipSteps() throws Exception {
    StringAttribute response = new StringAttribute("bla");
    PipelineContext context = pipelineService.createContext();
    pipelineService.execute("interceptorExecutionMode2", "base", context, response);
    Assert.assertEquals("bla_before__after_s2", response.getValue());
  }
View Full Code Here

  }

  @Test
  public void interceptorTestExecutionModeStepsNotAfter() throws Exception {
    StringAttribute response = new StringAttribute("bla");
    PipelineContext context = pipelineService.createContext();
    pipelineService.execute("interceptorExecutionMode3", "base", context, response);
    Assert.assertEquals("bla_before_s1s2", response.getValue());
  }
View Full Code Here

TOP

Related Classes of org.geomajas.service.pipeline.PipelineContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.