Package org.osforce.connect.entity.system

Examples of org.osforce.connect.entity.system.Project


    Assert.notNull(entityModel, "Parameter entity can not be null!");
    Assert.notNull(userModel, "Parameter user can not be null!");
    Assert.notNull(projectModel, "Parameter project can not be null!");
    String entity = (String) entityModel.getAsString();
    User user = (User) userModel.getWrappedObject();
    Project project = (Project) projectModel.getWrappedObject();
    String exist = existModel!=null ? existModel.getAsString() : null;
    Object value = null;
    if(Profile.NAME.equals(entity)) {
      value = linkService.getLink(user.getProjectId(), project.getProfileId(), entity);
    } else if (TeamMember.NAME.equals(entity)) {
      value = memberService.getMember(project, user, Boolean.FALSE);
    }
    //
    boolean flag = false;
View Full Code Here


  }
  // TODO need role code support
  public String doShowView(@PrefParam String uniqueId,
      @PrefParam String roleCode, Page<TeamMember> page, Model model) {
    if(StringUtils.isNotBlank(uniqueId)) {
      Project project = projectService.getProject(uniqueId);
      if(project!=null) {
        page = memberService.getMemberPage(page, project);
        model.addAttribute(AttributeKeys.PAGE_KEY_READABLE, page);
        return "team/member-show";
      }
View Full Code Here

    return model;
  }
 
  @RequestMapping(value="/request")
  public @ResponseBody Object doRequestAction (TeamMember member) {
    Project project = projectService.getProject(member.getProjectId());
    Role role = roleService.getRole(project.getCategoryId(), Role.LEVEL_MIDDLE);
    member.setRole(role);
    member.setStatus(TeamMember.STATUS_WAIT_APPROVE);
    memberService.requestMember(member);
    return Collections.singletonMap("id", member.getId());
  }
View Full Code Here

    updateBlogCategory(category);
  }

  public void updateBlogCategory(PostCategory category) {
    if(category.getProjectId()!=null) {
      Project project = projectDao.get(category.getProjectId());
      category.setProject(project);
    }
    if(category.getId()==null) {
      blogCategoryDao.save(category);
    } else {
View Full Code Here

    if(folder.getEnteredId()!=null) {
      User enteredBy = userDao.get(folder.getEnteredId());
      folder.setEnteredBy(enteredBy);
    }
    if(folder.getProjectId()!=null) {
      Project project = projectDao.get(folder.getProjectId());
      folder.setProject(project);
    }
    if(!folder.getRoot() && folder.getParentId()!=null) {
      Folder parent = folderDao.get(folder.getParentId());
      folder.setParent(parent);
View Full Code Here

    if(question.getModifiedId()!=null) {
      User modifiedBy = userDao.get(question.getModifiedId());
      question.setModifiedBy(modifiedBy);
    }
    if(question.getProjectId()!=null) {
      Project project = projectDao.get(question.getProjectId());
      question.setProject(project);
    }
    Date now = new Date();
    question.setModified(now);
    if(question.getId()==null) {
View Full Code Here

    if(member.getRoleId()!=null) {
      Role role = roleDao.get(member.getRoleId());
      member.setRole(role);
    }
    if(member.getProjectId()!=null) {
      Project project = projectDao.get(member.getProjectId());
      member.setProject(project);
    }
    if(member.getId()==null) {
      memberDao.save(member);
    } else {
View Full Code Here

    updateStatistic(statistic);
  }

  public void updateStatistic(Statistic statistic) {
    if(statistic.getProject()==null && statistic.getProjectId()!=null) {
      Project project = projectDao.get(statistic.getProjectId());
      statistic.setProject(project);
    }
    if(statistic.getId()==null) {
      statisticDao.save(statistic);
    } else {
View Full Code Here

    }
  }

  private void validateUniqueId(Project project) {
    String uniqueId = project.getUniqueId();
    Project persisted = projectDao.findProject(uniqueId);
    if(persisted!=null && (project.getId()==null ||
        NumberUtils.compare(project.getId(), persisted.getId())==0)) {
      Long count = projectDao.countProjects();
      uniqueId += "-" + ++count;
    }
    project.setUniqueId(uniqueId);
  }
View Full Code Here

    if(feature.getRoleId()!=null) {
      Role role = roleDao.get(feature.getRoleId());
      feature.setRole(role);
    }
    if(feature.getProjectId()!=null) {
      Project project = projectDao.get(feature.getProjectId());
      feature.setProject(project);
    }
    if(feature.getId()==null) {
      projectFeatureDao.save(feature);
    } else {
View Full Code Here

TOP

Related Classes of org.osforce.connect.entity.system.Project

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.