Examples of Otherwise


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

  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);
    assertCanConnect(true, choice, otherwise);
   
    assertCanConnect(true, when, endpoint);
    assertCanConnect(true, when, filter);
    assertCanConnect(true, otherwise, endpoint);
    assertCanConnect(true, otherwise, filter);

    assertCanConnect(true, choice, endpoint);
    assertCanConnect(true, choice, filter);
   
    assertCanConnect(false, endpoint, when);
    assertCanConnect(false, filter, when);
    assertCanConnect(false, endpoint, otherwise);
    assertCanConnect(false, filter, otherwise);
   
    // now lets check we can't connect to something we've already connected in the other direction
    assertCanConnect(true, endpoint, filter);
    assertCanConnect(true, filter, endpoint);
    endpoint.addTargetNode(filter);
    assertCanConnect(false, endpoint, filter);
    assertCanConnect(false, filter, endpoint);

    // we should still be able to connect this filter to another output
    assertCanConnect(true, filter, bean);

    // already has one otherwise, so can't add another
    choice.addTargetNode(otherwise);
    assertCanConnect(false, choice, new Otherwise());
  }
View Full Code Here

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

    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);
    assertEquals("otherwise -> to", "seda:c", e3.getUri());

    Endpoint e4 = assertOutput(c1, 2, Endpoint.class);
    assertEquals("choice -> to", "seda:d", e4.getUri());
View Full Code Here

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

        imageProvider.addIconsForClass(new Loop());
        imageProvider.addIconsForClass(new Marshal());
        imageProvider.addIconsForClass(new Multicast());
        imageProvider.addIconsForClass(new OnCompletion());
        imageProvider.addIconsForClass(new OnException());
        imageProvider.addIconsForClass(new Otherwise());
        imageProvider.addIconsForClass(new Pipeline());
        imageProvider.addIconsForClass(new Policy());
        imageProvider.addIconsForClass(new PollEnrich());
        imageProvider.addIconsForClass(new Process());
        imageProvider.addIconsForClass(new RecipientList());
View Full Code Here

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

    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());

    assertContains(routeChildren, endpoint, filter, endpoint2);
  }
View Full Code Here

Examples of org.uengine.kernel.Otherwise

          if(currentCommand.equals(CONDITION_COMMAND)){
            confirm(CONDITION_COMMAND);
          //}else {//Otherwise
          }else if(currentCommand.equals(OTHERWISE_COMMAND)) {
            if(!isExistEvaluate(selectedRow)){
              Otherwise otherwise = new Otherwise();
              ConditionTable.this.setValueAt(otherwise, selectedRow, selectedColumn);
            }else{
              showMessageDialog(GlobalContext.getLocalizedMessage("conditioneditor.condition_already_exist.message", "You can't set the otherwise in already filled cell."));
            }
           
View Full Code Here

Examples of org.uengine.kernel.Otherwise

        if(!isOtherwise && and.getConditionsVt().size()>0){
          or.addCondition(and);
        }
       
        if(isOtherwise){
          Otherwise otherwise = new Otherwise();
          map.put(key, otherwise);
          otherwise.getDescription().setText(key);
          ors.addCondition(otherwise);
        }else{
          map.put(key, or);
          or.getDescription().setText(key);
          ors.addCondition(or);
View Full Code Here

Examples of org.uengine.kernel.Otherwise

                   
          if(condition instanceof Evaluate || condition instanceof RoleExist){
            condition.setDescription(null);
            wrapperAnd.addCondition(condition);
          }else {
            wrapperAnd.addCondition(new Otherwise());
          }
           
          condition = wrapperOr;
        }
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.