Package com.eaglegenomics.simlims.core

Examples of com.eaglegenomics.simlims.core.User


      }
    }
  }

  public void addWatcher(ProjectOverview overview, Long userId) throws IOException {
    User user = securityManager.getUserById(userId);
    if (user != null) {
      for (Project clone : projects.values()) {
        ProjectOverview cloneOverview = clone.getOverviewById(overview.getOverviewId());
        if (cloneOverview != null) {
          log.debug("Added watcher " + userId + " to overview " + overview.getOverviewId());
View Full Code Here


      }
    }
  }

  public void removeWatcher(ProjectOverview overview, Long userId) throws IOException {
    User user = securityManager.getUserById(userId);
    if (user != null) {
      for (Project clone : projects.values()) {
        ProjectOverview cloneOverview = clone.getOverviewById(overview.getOverviewId());
        if (cloneOverview != null) {
          log.debug("Removed watcher " + userId + " from overview " + overview.getOverviewId());
View Full Code Here

      }
    }
  }

  public void addWatcher(Project project, Long userId) throws IOException {
    User user = securityManager.getUserById(userId);
    if (user != null) {
      Project clone = projects.get(project.getId());
      log.debug("Added watcher " + userId + " to project " + project.getId());
      if (clone == null) {
        project.addWatcher(user);
View Full Code Here

      }
    }
  }

  public void removeWatcher(Project project, Long userId) throws IOException {
    User user = securityManager.getUserById(userId);
    if (user != null) {
      Project clone = projects.get(project.getId());
      if (clone == null) {
        project.removeWatcher(user);
        for (ProjectOverview po : project.getOverviews()) {
View Full Code Here

      }
    }
  }

  public void updateGroupWatcher(Long userId) throws IOException {
    User user = securityManager.getUserById(userId);
    for (Project p : projects.values()) {
      if (user.getGroups().contains(securityManager.getGroupByName("ProjectWatchers"))) {
        addWatcher(p, userId);
      }
      else {
        if (p.getSecurityProfile() != null && p.getSecurityProfile().getOwner() != null && !p.getSecurityProfile().getOwner().equals(user)) {
          removeWatcher(p, userId);
View Full Code Here

                          @Property(name = "includeParameterTypes", value = "false")
                  }
          )
  )
  public long save(Project project) throws IOException {
    User user = securityManager.getUserByLoginName(SecurityContextHolder.getContext().getAuthentication().getName());

    Long securityProfileId = project.getSecurityProfile().getProfileId();
    if (securityProfileId == SecurityProfile.UNSAVED_ID ||
        (this.cascadeType != null)) { // && this.cascadeType.equals(CascadeType.PERSIST))) {
      securityProfileId = securityProfileDAO.save(project.getSecurityProfile());
View Full Code Here

    return project.getProjectId();
  }

  public long saveOverview(ProjectOverview overview) throws IOException {
    User user = securityManager.getUserByLoginName(SecurityContextHolder.getContext().getAuthentication().getName());

    MapSqlParameterSource params = new MapSqlParameterSource();
    params.addValue("principalInvestigator", overview.getPrincipalInvestigator())
            .addValue("startDate", overview.getStartDate())
            .addValue("endDate", overview.getEndDate())
View Full Code Here

  public JSONObject changeReportType(HttpSession session, JSONObject json) {

    StringBuilder b = new StringBuilder();
    try {
      User user = securityManager.getUserByLoginName(SecurityContextHolder.getContext().getAuthentication().getName());


      if (json.has("reportType") && !json.get("reportType").equals("")) {
        b.append("<input type=\"text\" onkeyup=\"Utils.timer.timedFunc(reportSearch(this), 300);\" size=\"20\" id=\"search" + json.get("reportType") + "\" name=\"search" + json.get("reportType") + "\"/>");
        b.append("<form id=\"reportform\" name=\"reportform\" method=\"POST\" >");
View Full Code Here

  }

  public JSONObject searchProject(HttpSession session, JSONObject json) {
    String searchStr = (String) json.get("str");
    try {
      User user = securityManager.getUserByLoginName(SecurityContextHolder.getContext().getAuthentication().getName());
      if (searchStr != null && !searchStr.equals("")) {
        if (searchStr.length() > 1) {
          String str = searchStr.toLowerCase();

          StringBuilder b = new StringBuilder();
View Full Code Here

  //sample

  public JSONObject searchSample(HttpSession session, JSONObject json) {
    String searchStr = (String) json.get("str");
    try {
      User user = securityManager.getUserByLoginName(SecurityContextHolder.getContext().getAuthentication().getName());
      if (searchStr != null && !searchStr.equals("")) {
        if (searchStr.length() > 1) {
          String str = searchStr.toLowerCase();

          StringBuilder b = new StringBuilder();
View Full Code Here

TOP

Related Classes of com.eaglegenomics.simlims.core.User

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.