Package com.mongodb

Examples of com.mongodb.ReflectionTest$Process


      laneSet.getLanes().remove(movedLane);
      if (laneSet.getLanes().isEmpty()) {
        sourceParticipant.getProcessRef().getLaneSets().remove(laneSet);
      }

      Process process = internalParticipant.getProcessRef();
      if (process.getLaneSets().isEmpty()) {
        LaneSet createLaneSet = ModelHandler.FACTORY.createLaneSet();
//        createLaneSet.setId(EcoreUtil.generateUUID());
        process.getLaneSets().add(createLaneSet);
        ModelUtil.setID(createLaneSet);
      }
      process.getLaneSets().get(0).getLanes().add(movedLane);
    }
  }
View Full Code Here


      laneSet.getLanes().remove(movedLane);
      if (laneSet.getLanes().isEmpty()) {
        sourceParticipant.getProcessRef().getLaneSets().remove(laneSet);
      }

      Process process = targetParticipant.getProcessRef();
      if (process.getLaneSets().isEmpty()) {
        LaneSet createLaneSet = ModelHandler.FACTORY.createLaneSet();
//        createLaneSet.setId(EcoreUtil.generateUUID());
        process.getLaneSets().add(createLaneSet);
        ModelUtil.setID(createLaneSet);
      }
      process.getLaneSets().get(0).getLanes().add(movedLane);
    }
  }
View Full Code Here

    laneSet.getLanes().remove(lane);

    if (laneSet.getLanes().size() == 0) {
      EObject container = laneSet.eContainer();
      if (container instanceof Process) {
        Process p = (Process) container;
        p.getLaneSets().remove(laneSet);
      }
    }

    if (targetLane.getChildLaneSet() == null) {
      LaneSet createLaneSet = ModelHandler.FACTORY.createLaneSet();
View Full Code Here

    ContainerShape cont = diagram;

    // find the process this lane belongs to
    for (BaseElement be : elements.keySet()) {
      if (be instanceof Participant) {
        Process processRef = ((Participant) be).getProcessRef();
        if (processRef != null && parent.getId().equals(processRef.getId())) {
          cont = (ContainerShape) elements.get(be);
          break;
        }
      } else if (be instanceof Process) {
        if (be.getId().equals(parent.getId())) {
View Full Code Here

    Participant sourceParticipant = getParticipant(movedLane);
    moveLane(movedLane, sourceParticipant, targetParticipant);
  }

  public void moveLane(Lane movedLane, Participant sourceParticipant, Participant targetParticipant) {
    Process sourceProcess = getOrCreateProcess(sourceParticipant);
    Process targetProcess = getOrCreateProcess(targetParticipant);
    for (FlowNode node : movedLane.getFlowNodeRefs()) {
      moveFlowNode(node, sourceProcess, targetProcess);
    }
    if (movedLane.getChildLaneSet() != null && !movedLane.getChildLaneSet().getLanes().isEmpty()) {
      for (Lane lane : movedLane.getChildLaneSet().getLanes()) {
View Full Code Here

    }
  }

  public Process getOrCreateProcess(Participant participant) {
    if (participant.getProcessRef() == null) {
      Process process = FACTORY.createProcess();
//      process.setId(EcoreUtil.generateUUID());
      ModelUtil.setID(process,resource);
      process.setName("Process for " + participant.getName());
      getDefinitions().getRootElements().add(process);
      participant.setProcessRef(process);
    }
    return participant.getProcessRef();
  }
View Full Code Here

  public void laneToTop(Lane lane) {
    LaneSet laneSet = FACTORY.createLaneSet();
//    laneSet.setId(EcoreUtil.generateUUID());
    ModelUtil.setID(laneSet,resource);
    laneSet.getLanes().add(lane);
    Process process = getOrCreateProcess(getInternalParticipant());
    process.getLaneSets().add(laneSet);
  }
View Full Code Here

    if (object instanceof Participant) {
      return (Participant) object;
    }

    Process process = findElementOfType(Process.class, object);

    for (Participant p : getOrCreateCollaboration().getParticipants()) {
      if (p.getProcessRef() != null && p.getProcessRef().equals(process)) {
        return p;
      }
View Full Code Here

   * @param artifact
   *            artifact to be added
   * @return
   */
  public <T extends Artifact> T addArtifact(Object target, T artifact) {
    Process process = getOrCreateProcess(getParticipant(target));
    process.getArtifacts().add(artifact);
    return artifact;
  }
View Full Code Here

    getOrCreateCollaboration().getConversations().add(conversationNode);
    return conversationNode;
  }

  private InputOutputSpecification getOrCreateIOSpecification(Object target) {
    Process process = getOrCreateProcess(getParticipant(target));
    if (process.getIoSpecification() == null) {
      InputOutputSpecification ioSpec = FACTORY.createInputOutputSpecification();
//      ioSpec.setId(EcoreUtil.generateUUID());
      ModelUtil.setID(ioSpec,resource);
      process.setIoSpecification(ioSpec);
    }
    return process.getIoSpecification();
  }
View Full Code Here

TOP

Related Classes of com.mongodb.ReflectionTest$Process

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.