Esempio n. 1
0
  public List<SelectItem> getProjects() {
    List<SelectItem> projectsList = new ArrayList<SelectItem>();

    String wilosUserId =
        (String) this.webSessionService.getAttribute(WebSessionService.WILOS_USER_ID);
    Participant participant = this.participantService.getParticipant(wilosUserId);

    if (participant != null) {
      HashMap<Project, Boolean> projects =
          this.participantService.getProjectsForAParticipant(participant);
      for (Project project : projects.keySet()) {
        if (projects.get(project)) {
          this.addSelectItemToList(
              projectsList, new SelectItem(project.getId(), project.getConcreteName()));
        }
      }
    }

    ResourceBundle bundle =
        ResourceBundle.getBundle(
            "wilos.resources.messages",
            FacesContext.getCurrentInstance().getApplication().getDefaultLocale());
    projectsList.add(
        0,
        new SelectItem(
            DEFAULT_PROJECT_ID, bundle.getString("navigation.tree.defaulttreenodetext")));
    return projectsList;
  }
Esempio n. 2
0
  public ProjectTO(Project _myproject) {
    this.setProcess(new ProcessTO(_myproject.getProcess()));

    this.setDescription(_myproject.getDescription());
    this.setCreationDate(_myproject.getCreationDate());
    this.setLaunchingDate(_myproject.getLaunchingDate());
    this.setIsFinished(_myproject.getIsFinished());
    this.setId(_myproject.getId());
    this.setConcreteName(_myproject.getConcreteName());
    this.setPlannedStartingDate(_myproject.getPlannedStartingDate());
    this.setPlannedFinishingDate(_myproject.getPlannedFinishingDate());
    this.setPlannedTime(_myproject.getPlannedTime());
  }