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

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


        imageProvider.addIconsForClass(new RemoveHeader());
        imageProvider.addIconsForClass(new RemoveHeaders());
        imageProvider.addIconsForClass(new RemoveProperty());
        imageProvider.addIconsForClass(new Resequence());
        imageProvider.addIconsForClass(new Rollback());
        imageProvider.addIconsForClass(new Route());
        imageProvider.addIconsForClass(new RoutingSlip());
        imageProvider.addIconsForClass(new Sampling());
        imageProvider.addIconsForClass(new SetBody());
        imageProvider.addIconsForClass(new SetExchangePattern());
        imageProvider.addIconsForClass(new SetFaultBody());
View Full Code Here


    Otherwise otherwise = new Otherwise();
    choice.addTargetNode(otherwise);
    otherwise.addTargetNode(ep3);

   
    RouteSupport route = new Route();
    route.addChildren(ep1, choice, when, otherwise, ep2, ep3, ep4);

    // now lets turn into the camel model...
    RouteDefinition routeDef = route.createRouteDefinition();
    System.out.println("Created: " + routeDef);

    assertSingleInput(routeDef, FromDefinition.class);
    assertSize(routeDef.getOutputs(), 2);
    ChoiceDefinition c1 = assertOutput(routeDef, 0, ChoiceDefinition.class);
    ToDefinition ed4 = assertOutput(routeDef, 1, ToDefinition.class);
    assertEquals("choice -> to", "seda:d", ed4.getUri());

    List<WhenDefinition> whenClauses = c1.getWhenClauses();
    assertSize(whenClauses, 1);
    WhenDefinition wd1 = whenClauses.get(0);
    ToDefinition ed2 = assertSingleOutput(wd1, ToDefinition.class);
    assertEquals("when -> to", "seda:b", ed2.getUri());
   
    OtherwiseDefinition od1 = c1.getOtherwise();
    assertNotNull("Should have Otherwise", od1);
    ToDefinition ed3 = assertSingleOutput(od1, ToDefinition.class);
    assertEquals("otherwise -> to", "seda:c", ed3.getUri());

    RouteContainer routeContainer = new RouteContainer();
    RouteSupport route2 = new Route(routeDef, routeContainer);
    System.out.println("Created route: " + route2);
    assertRoute(route);
   
    /** TODO: commented out as this fails for unknown reason - needs further investigation
    assertRoute(route2);
View Full Code Here

   
    // wire them up...
    ep1.addTargetNode(filter1);
    filter1.addTargetNode(ep2);
   
    RouteSupport route = new Route();
    assertValidNode(route, "route");
   
    route.addChildren(ep1, filter1, ep2);
   
    // now lets turn into the camel model...
    RouteDefinition routeDef = route.createRouteDefinition();
    System.out.println("Created: " + routeDef);

    FromDefinition ed1 = assertSingleInput(routeDef, FromDefinition.class);
    FilterDefinition fd1 = assertSingleOutput(routeDef, FilterDefinition.class);
    ToDefinition ed2 = assertSingleOutput(fd1, ToDefinition.class);
View Full Code Here

  @Test
  public void testEndpointSummary() throws Exception {
    RouteContainer routeContainer = new RouteContainer();
   
    // from seda:a -> filter -> seda:b
    RouteSupport route1 = new Route();
    routeContainer.addChild(route1);
   
    Endpoint endpoint1 = new Endpoint("seda:a");
    route1.addChild(endpoint1);
   
    Filter filter1 = new Filter();
    endpoint1.addTargetNode(filter1);
   
    Endpoint endpoint2 = new Endpoint("seda:b");
    filter1.addTargetNode(endpoint2);

    // from seda:b -> filter -> seda:c
    RouteSupport route2 = new Route();
    routeContainer.addChild(route2);
   
    Endpoint endpoint3 = new Endpoint("seda:b");
    route2.addChild(endpoint3);
   
    Filter filter2 = new Filter();
    endpoint3.addTargetNode(filter2);
   
    Endpoint endpoint4 = new Endpoint("seda:c");
View Full Code Here

  @Test
  public void testModelSave() throws Exception {
   
    assertDisplayText(new Endpoint());
    assertDisplayText(new Filter());
    assertDisplayText(new Route());
  }
View Full Code Here

   
    Unmarshal um = new Unmarshal();
    ep1.addTargetNode(um);
    um.addTargetNode(ep2);

    RouteSupport route = new Route();
    route.addChildren(ep1, um, ep2);

    // now lets turn into the camel model...
    RouteDefinition routeDef = route.createRouteDefinition();
    System.out.println("Created: " + routeDef);

    assertSingleInput(routeDef, FromDefinition.class);
    assertSize(routeDef.getOutputs(), 2);
    assertOutput(routeDef, 0, UnmarshalDefinition.class);
View Full Code Here

            // so instead select the endpoint uri which is the source node of the route
            if (endpointUri != null) {
              return selectEndpointUri(endpointUri);
            } else {
              // okay we dont have the endpoint uri, then select the first source of the route
              Route route = (Route) newSelection;
              if (!route.getSourceNodes().isEmpty()) {
                newSelection = route.getSourceNodes().get(0);
              }
            }
          }
          if (newSelection != null) {
            viewer.setSelection(new StructuredSelection(newSelection));
View Full Code Here

  private void setInitialRoute() {
    if (getModel() != null) {
      if (getModel().getChildren().isEmpty()) {
        // lets add an empty route for now...
        Route route = new Route();
        getModel().addChild(route);
      }
      this.activeRoute = (RouteSupport)getModel().getChildren().get(0);
      this.data.selectedRoute = activeRoute;
    }
View Full Code Here

        IEditorPart activeEditor = activePage.getActiveEditor();
        if (activeEditor instanceof RiderEditor) {
          RiderEditor editor = (RiderEditor) activeEditor;
          RiderDesignEditor designEditor = editor.getDesignEditor();
          if (designEditor != null) {
            Route route = new Route();
            designEditor.getModel().addChild(route);
            designEditor.setSelectedRoute(route);
          }
        }
      }
View Full Code Here

    this.designEditor = designEditor;
  }

  @Override
  protected void doExecute() {
    Route route = new Route();
    designEditor.getModel().addChild(route);
    designEditor.setSelectedRoute(route);
  }
View Full Code Here

TOP

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

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.