Exemple #1
0
  public String getXML() {
    StringBuffer retval = new StringBuffer(200);
    if ((null != from_entry) && (null != to_entry)) {
      retval.append("    <hop>").append(Const.CR);
      retval.append("      ").append(XMLHandler.addTagValue("from", from_entry.getName()));
      retval.append("      ").append(XMLHandler.addTagValue("to", to_entry.getName()));
      retval.append("      ").append(XMLHandler.addTagValue("from_nr", from_entry.getNr()));
      retval.append("      ").append(XMLHandler.addTagValue("to_nr", to_entry.getNr()));
      retval.append("      ").append(XMLHandler.addTagValue("enabled", enabled));
      retval.append("      ").append(XMLHandler.addTagValue("evaluation", evaluation));
      retval.append("      ").append(XMLHandler.addTagValue("unconditional", unconditional));
      retval.append("      ").append(XMLHandler.addTagValue("gui_mid_location_x", guiMidLocationX));
      retval.append("      ").append(XMLHandler.addTagValue("gui_mid_location_y", guiMidLocationY));
      retval.append("    </hop>").append(Const.CR);
    }

    return retval.toString();
  }
Exemple #2
0
  public JobHopMeta(JobEntryCopy from, JobEntryCopy to) {
    from_entry = from;
    to_entry = to;
    enabled = true;
    split = false;
    evaluation = true;
    unconditional = false;
    id = -1L;
    guiMidLocationX = "";
    guiMidLocationY = "";

    if (from.isStart()) setUnconditional();
  }
Exemple #3
0
  public void saveRep(Repository rep, long id_job) throws KettleException {
    try {
      long id_jobentry_from = -1, id_jobentry_to = -1;

      id_jobentry_from = from_entry == null ? -1 : from_entry.getID();
      id_jobentry_to = to_entry == null ? -1 : to_entry.getID();

      // Insert new transMeta hop in repository
      setID(
          rep.insertJobHop(
              id_job,
              id_jobentry_from,
              id_jobentry_to,
              enabled,
              evaluation,
              unconditional,
              guiMidLocationX,
              guiMidLocationY));
    } catch (KettleDatabaseException dbe) {
      throw new KettleException(
          Messages.getString("JobHopMeta.Exception.UnableToSaveHopInfoRep", "" + id_job), dbe);
    }
  }
Exemple #4
0
  private JobEntryCopy searchJobEntry(List<JobEntryCopy> entries, String name) {
    for (JobEntryCopy jobEntry : entries)
      if (jobEntry.getName().equalsIgnoreCase(name)) return jobEntry;

    return null;
  }