Package org.openiaml.model.model

Examples of org.openiaml.model.model.SimpleCondition


    setGeneratedBy(object, by);
    return object;
  }

  public SimpleCondition generatedSimpleCondition(GeneratesElements by, ContainsWires container, Function source, ConditionEdgeDestination target) throws InferenceException {
    SimpleCondition wire = (SimpleCondition) createRelationship(container, ModelPackage.eINSTANCE.getSimpleCondition(), source, target, ModelPackage.eINSTANCE.getContainsWires_ConditionEdges(), ModelPackage.eINSTANCE.getComplexTerm_Function(), ModelPackage.eINSTANCE.getComplexTerm_Conditioned());
    setGeneratedBy(wire, by);
    return wire;
  }
View Full Code Here


    for (Object c : editor.getDiagramEditPart().getConnections()) {
      if (c instanceof ConnectionNodeEditPart) {
        ConnectionNodeEditPart connection = (ConnectionNodeEditPart) c;
        EObject element = connection.resolveSemanticElement();
        if (element instanceof SimpleCondition) {
          SimpleCondition w = (SimpleCondition) element;
          if (connection.getSource().equals(source) &&
              connection.getTarget().equals(target) && w.getName().equals(name))
            return connection;  // found it
          found += ", " + w.getName();
        }
      }
    }

    fail("assertHasRunInstanceWire: no connection found between '" + source + "' and '" + target + "' with name '" + name + "'. found: " + found);
View Full Code Here

    for (Object c : editor.getDiagramEditPart().getConnections()) {
      if (c instanceof ConnectionNodeEditPart) {
        ConnectionNodeEditPart connection = (ConnectionNodeEditPart) c;
        EObject element = connection.resolveSemanticElement();
        if (element instanceof SimpleCondition) {
          SimpleCondition w = (SimpleCondition) element;
          if (connection.getSource().equals(source) &&
              connection.getTarget().equals(target))
            return connection;  // found it
          found += ", " + w.getName();
        }
      }
    }

    fail("assertHasConditionEdge: no connection found between '" + source + "' and '" + target + "' with any name. found: " + found);
View Full Code Here

    // has a DecisionNode
    DecisionNode node = assertHasDecisionNode(check, "true?");
    assertGenerated(node);

    // DecisionNode evaluates the incoming condition
    SimpleCondition edge = assertHasSimpleCondition(session, exists, node);
    assertGenerated(edge);
  }
View Full Code Here

    ECARule run = assertHasRunAction(root, onEdit, update);
    assertGenerated(run);

    // should be an incoming Function edge
    SimpleCondition edge = assertHasSimpleCondition(root, canCast, run);

    // and the edge should have the current Email.Value as a parameter
    assertHasParameter(root, emailValue, edge);

  }
View Full Code Here

    ECARule run = assertHasRunAction(root, onEdit, update);
    assertGenerated(run);

    // should be an incoming Function edge
    SimpleCondition edge = assertHasSimpleCondition(root, canCast, run);

    // and the edge should have the current Email.Value as a parameter
    assertHasParameter(root, intValue, edge);

  }
View Full Code Here

    assertHasParameter(root, emailValue, run);

    // now make sure that the Function is connected
    BuiltinProperty canCast = assertHasBuiltinProperty(integer, "can cast?");

    SimpleCondition edge = assertHasSimpleCondition(root, canCast, run);
    assertHasParameter(root, emailValue, edge);

  }
View Full Code Here

    InputTextField field1 = assertHasInputTextField(page1, "field");
    InputTextField field2 = assertHasInputTextField(page2, "field");
    assertNotSame(field1, field2);

    Function cond = assertHasFunction(root, "Always False");
    SimpleCondition cw = assertHasSimpleCondition(root, cond, wire);

    // [already in model]
    // there should be a Function wire from cond to sync
    assertEquals(cw.getFunction(), cond);
    assertEquals(cw.getConditioned(), wire);

    // [inferred]
    // field1 and field2 should be connected by SyncWires
    SyncWire sw = assertHasSyncWire(root, field1, field2);
View Full Code Here

    // newly created condition
    BuiltinProperty cond = assertHasBuiltinProperty(field2, "fieldValue is set");
    assertGenerated(cond);

    SimpleCondition cw = assertHasSimpleCondition(root, cond, run);
    assertGenerated(cw);

  }
View Full Code Here

    // generated condition
    ActivityPredicate condition = assertHasActivityPredicate(session, "check requires a page is viewed first");
    assertGenerated(condition);

    SimpleCondition wire = assertHasSimpleCondition(session, condition, gate, "condition");
    assertGenerated(wire);

  }
View Full Code Here

TOP

Related Classes of org.openiaml.model.model.SimpleCondition

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.