Package org.osforce.connect.entity.system

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


    if(topic.getAnswerId()!=null) {
      Reply answer = replyDao.get(topic.getAnswerId());
      topic.setAnswer(answer);
    }
    if(topic.getEnteredId()!=null) {
      User enteredBy = userDao.get(topic.getEnteredId());
      topic.setEnteredBy(enteredBy);
    }
    if(topic.getModifiedId()!=null) {
      User modifiedBy = userDao.get(topic.getModifiedId());
      topic.setModifiedBy(modifiedBy);
    }
    if(topic.getForumId()!=null) {
      Forum forum = forumDao.get(topic.getForumId());
      topic.setForum(forum);
View Full Code Here


    updateMessage(message);
  }

  public void updateMessage(Message message) {
    if(message.getEnteredId()!=null) {
      User enteredBy = userDao.get(message.getEnteredId());
      message.setEnteredBy(enteredBy);
    }
    if(message.getFromId()!=null) {
      Project from = projectDao.get(message.getFromId());
      message.setFrom(from);
View Full Code Here

    updateForum(forum);
  }

  public void updateForum(Forum forum) {
    if(forum.getEnteredId()!=null) {
      User enteredBy = userDao.get(forum.getEnteredId());
      forum.setEnteredBy(enteredBy);
    }
    if(forum.getModifiedId()!=null) {
      User modifiedBy = userDao.get(forum.getModifiedId());
      forum.setModifiedBy(modifiedBy);
    }
    if(forum.getProjectId()!=null) {
      Project project = projectDao.get(forum.getProjectId());
      forum.setProject(project);
View Full Code Here

    updatePhoto(photo);
  }

  public void updatePhoto(Photo photo) {
    if(photo.getEnteredId()!=null) {
      User enteredBy = userDao.get(photo.getEnteredId());
      photo.setEnteredBy(enteredBy);
    }
    if(photo.getModifiedId()!=null) {
      User modifiedBy = userDao.get(photo.getModifiedId());
      photo.setModifiedBy(modifiedBy);
    }
    if(photo.getAlbumId()!=null) {
      Album album = albumDao.get(photo.getAlbumId());
      photo.setAlbum(album);
View Full Code Here

    updateAlbum(album);
  }

  public void updateAlbum(Album album) {
    if(album.getEnteredId()!=null) {
      User enteredBy = userDao.get(album.getEnteredId());
      album.setEnteredBy(enteredBy);
    }
    if(album.getModifiedId()!=null) {
      User modifiedBy = userDao.get(album.getModifiedId());
      album.setModifiedBy(modifiedBy);
    }
    if(album.getProjectId()!=null) {
      Project project = projectDao.get(album.getProjectId());
      album.setProject(project);
View Full Code Here

  @Override
  protected void prepareMessage(MimeMessageHelper helper,
      Map<Object, Object> context) throws Exception {
    Long userId = (Long) context.get("userId");
    Long projectId = (Long) context.get("projectId");
    User user = userService.getUser(userId);
    Project project = projectService.getProject(projectId);
    context.put("user", user);
    context.put("project", project);
    context.put("site", project.getCategory().getSite());
    helper.addTo(user.getEmail(), user.getNickname());
    //
    String subject = FreeMarkerTemplateUtils.processTemplateIntoString(
        configuration.getTemplate(USER_REGISTER_SUBJECT), context);
    String content = FreeMarkerTemplateUtils.processTemplateIntoString(
        configuration.getTemplate(USER_REGISTER_CONTENT), context);
    helper.setSubject(subject);
    helper.setText(content, true);
    //
    user.setEnabled(false);
    userService.updateUser(user);
  }
View Full Code Here

  }

  @AfterReturning("execution(* org.osforce.connect.service.profile.ProfileService.viewProfile(..))")
  public void viewProfile(JoinPoint jp) throws Exception {
    Project project = (Project) jp.getArgs()[0];
    User user = (User) jp.getArgs()[1];
    Map<Object, Object> context = CollectionUtil.newHashMap();
    context.put("projectId", project.getId());
    context.put("user", user);
    profileViewCountTask.doAsyncTask(context);
  }
View Full Code Here

  }

  @Override
  protected void doTask(Map<Object, Object> context) throws Exception {
    Long projectId = (Long) context.get("projectId");
    User user = (User) context.get("user");
    Project project = projectService.getProject(projectId);
    if(user==null || NumberUtils
        .compare(project.getEnteredBy().getId(), user.getId())!=0) {
      Statistic statistic = statisticService.getStatistic(
          Statistic.TYPE_VIEW, project.getProfile().getId(), Profile.NAME);
      if(statistic==null) {
        statistic = new Statistic(Statistic.TYPE_VIEW, project.getProfile().getId(), Profile.NAME);
      }
View Full Code Here

TOP

Related Classes of org.osforce.connect.entity.system.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.