예제 #1
0
  private void setUpTemplate() {
    template = new Process();
    template.setTitel("template");
    template.setDocket(new Docket());
    template.setDocketId(0);
    template.setId(666);
    template.setMetadatenKonfigurationID(0);
    template.setIstTemplate(true);

    Project project = new Project();
    project.setTitel("Project");
    template.setProjekt(project);
    project.setFileFormatInternal("Mets");
    project.setFileFormatDmsExport("Mets");
    userList = new ArrayList<>();
    User user = new User();
    user.setLogin("login");
    user.setPasswort("password");
    userList.add(user);

    List<Step> stepList = new ArrayList<>();
    Step step = new Step();
    step.setTitel("titel");
    step.setBenutzer(userList);
    step.setReihenfolge(1);
    stepList.add(step);

    secondStep = new Step();
    secondStep.setTitel("titel");
    secondStep.setReihenfolge(2);
    stepList.add(secondStep);
    template.setSchritte(stepList);
  }
예제 #2
0
  public SearchBean() {
    for (StepStatus s : StepStatus.values()) {
      this.stepstatus.add(s);
    }
    int restriction =
        ((LoginBean) Helper.getManagedBeanValue("#{LoginForm}")).getMaximaleBerechtigung();

    // projects
    String projectFilter = "";

    if (restriction > 2) {
      projectFilter = " projectIsArchived = false ";
    }
    this.projects.add(Helper.getTranslation("notSelected"));

    try {
      List<Project> projektList =
          ProjectManager.getProjects("titel", projectFilter, 0, Integer.MAX_VALUE);
      for (Project p : projektList) {
        this.projects.add(p.getTitel());
      }
    } catch (DAOException e1) {
    }

    this.masterpiecePropertyTitles.add(Helper.getTranslation("notSelected"));
    this.masterpiecePropertyTitles.addAll(PropertyManager.getDistinctMasterpiecePropertyTitles());

    this.templatePropertyTitles.add(Helper.getTranslation("notSelected"));
    this.templatePropertyTitles.addAll(PropertyManager.getDistinctTemplatePropertyTitles());

    this.processPropertyTitles.add(Helper.getTranslation("notSelected"));
    this.processPropertyTitles.addAll(PropertyManager.getDistinctProcessPropertyTitles());

    this.stepTitles.add(Helper.getTranslation("notSelected"));
    stepTitles.addAll(StepManager.getDistinctStepTitles());

    initializeRowList();

    fieldnameList.add(new SelectItem("", Helper.getTranslation("notSelected")));
    fieldnameList.add(new SelectItem("PROCESSID", Helper.getTranslation("id")));
    fieldnameList.add(new SelectItem("PROCESSTITLE", Helper.getTranslation("title")));

    fieldnameList.add(
        new SelectItem("PROCESSPROPERTY", Helper.getTranslation("processProperties")));

    fieldnameList.add(new SelectItem("STEP", Helper.getTranslation("step")));

    fieldnameList.add(new SelectItem("PROJECT", Helper.getTranslation("projects")));
    fieldnameList.add(new SelectItem("TEMPLATE", Helper.getTranslation("templateProperties")));

    fieldnameList.add(new SelectItem("WORKPIECE", Helper.getTranslation("masterpieceProperties")));
    fieldnameList.add(new SelectItem("BATCH", Helper.getTranslation("batch")));
    fieldnameList.add(new SelectItem("METADATA", Helper.getTranslation("metadata")));

    fieldnameList.add(new SelectItem("PROCESSLOG", Helper.getTranslation("processlog")));

    metadataTitles.add(Helper.getTranslation("notSelected"));
    metadataTitles.addAll(MetadataManager.getDistinctMetadataNames());
  }