Package org.fusesource.ide.camel.model.generated

Examples of org.fusesource.ide.camel.model.generated.When


      }
    } else if (this instanceof Sort) {
      Sort node = (Sort) this;
      return "sort " + Expressions.getExpressionOrElse(node.getExpression());
    } else if (this instanceof When) {
      When node = (When) this;
      return "when " + Expressions.getExpressionOrElse(node.getExpression());
    } else if (this instanceof Unmarshal) {
      return "unmarshal";
    } else if (this instanceof Try) {
      return "try";
    } else if (this instanceof LoadBalance) {
View Full Code Here


   *
   * @return the tooltip to display for the shape figure
   */
  public String getDisplayToolTip() {
    if (this instanceof When) {
      When node = (When) this;
      return "when " + Expressions.getExpressionOrElse(node.getExpression());
    }
    String answer = Tooltips.tooltip(getPatternName());
    if (answer == null) {
      ProcessorDefinition camelDef = createCamelDefinition();
      if (camelDef != null) {
View Full Code Here

        imageProvider.addIconsForClass(new Transacted());
        imageProvider.addIconsForClass(new Transform());
        imageProvider.addIconsForClass(new Try());
        imageProvider.addIconsForClass(new Unmarshal());
        imageProvider.addIconsForClass(new Validate());
        imageProvider.addIconsForClass(new When());
        imageProvider.addIconsForClass(new WireTap());
    }
View Full Code Here

    Choice choice = new Choice();
    ep1.addTargetNode(choice);
    // adding out of order to check we add the otherwise first before the non-when/otherwise
    choice.addTargetNode(ep4);

    When when = new When();
    choice.addTargetNode(when);
    when.addTargetNode(ep2);

    Otherwise otherwise = new Otherwise();
    choice.addTargetNode(otherwise);
    otherwise.addTargetNode(ep3);
View Full Code Here

  protected void assertRoute(RouteSupport route) {
    Endpoint e1 = assertSingleInput(route, Endpoint.class);
    assertEquals("from", "seda:a", e1.getUri());
   
    Choice c1 = assertSingleOutput(e1, Choice.class);
    When w1 = assertOutput(c1, 0, When.class);
    Endpoint e2 = assertSingleOutput(w1, Endpoint.class);
    assertEquals("when -> to", "seda:b", e2.getUri());

    Otherwise o1 = assertOutput(c1, 1, Otherwise.class);
    Endpoint e3 = assertSingleOutput(o1, Endpoint.class);
View Full Code Here

    ep1.addTargetNode(choice);

    choice.addTargetNode(ep2);
    Otherwise otherwise = new Otherwise();
    choice.addTargetNode(otherwise);
    When when = new When();
    choice.addTargetNode(when);
    choice.addTargetNode(ep3);

    assertOutput(choice, 0, When.class);
    assertOutput(choice, 1, Otherwise.class);
View Full Code Here

  @Test
  public void testCanConnect() throws Exception {
    Endpoint endpoint = new Endpoint();
    Filter filter = new Filter();
    Choice choice = new Choice();
    When when = new When();
    Otherwise otherwise = new Otherwise();
    Bean bean = new Bean();
   
    assertCanConnect(true, endpoint, choice);
    assertCanConnect(true, choice, when);
View Full Code Here

  protected void assertRoute(RouteSupport route) {
    Endpoint e1 = assertSingleInput(route, Endpoint.class);
    assertEquals("from", "seda:a", e1.getUri());
   
    Choice c1 = assertSingleOutput(e1, Choice.class);
    When w1 = assertOutput(c1, 0, When.class);
    Endpoint e2 = assertSingleOutput(w1, Endpoint.class);
    assertEquals("when -> to", "seda:b", e2.getUri());

    Otherwise o1 = assertOutput(c1, 1, Otherwise.class);
    Endpoint e3 = assertSingleOutput(o1, Endpoint.class);
View Full Code Here

    System.out.println("Endpoint outputs: " + endpoint.getOutputs());
    Choice choice = assertChildIsInstance(endpoint.getOutputs(), 0, Choice.class);

    System.out.println("Choice outputs: " + choice.getOutputs());
    When filter = assertChildIsInstance(choice.getOutputs(), 0, When.class);
    Otherwise otherwise = assertChildIsInstance(choice.getOutputs(), 1, Otherwise.class);
   
    assertEquals("when expression", "/foo/bar", filter.getExpression().getExpression());
    assertEquals("when language", "xpath", filter.getExpression().getLanguage());
   
    Endpoint endpoint2 = assertChildIsInstance(filter.getOutputs(), 0, Endpoint.class);
    assertEquals("endpoint2 uri", "seda:choiceWhen", endpoint2.getUri());

    Endpoint endpoint3 = assertChildIsInstance(otherwise.getOutputs(), 0, Endpoint.class);
    assertEquals("endpoint3 uri", "seda:choiceOtherwise", endpoint3.getUri());
View Full Code Here

TOP

Related Classes of org.fusesource.ide.camel.model.generated.When

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.