Package org.osforce.connect.entity.system

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


    this.userRegisterEmailTask = userRegisterEmailTask;
  }

  @AfterReturning("execution(* org.osforce.connect.service.system.UserService.registerUser(..))")
  public void registerUser(JoinPoint jp) {
    Project project = (Project) jp.getArgs()[1];
    if(StringUtils.equals(project.getCategory().getCode(), "people")) {
      Map<Object, Object> context = CollectionUtil.newHashMap();
      context.put("siteId", project.getCategory().getSiteId());
      context.put("projectId", project.getId());
      context.put("userId", project.getEnteredId());
      userRegisterEmailTask.doAsyncTask(context);
    }
  }
View Full Code Here


  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(
View Full Code Here

    this.profileActivityStreamTask = profileActivityStreamTask;
  }

  @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);
      }
      statistic.countAdd();
      statistic.setProjectId(project.getId());
      statisticService.createStatistic(statistic);
    }
  }
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.