Ejemplo n.º 1
0
  /** {@inheritDoc} */
  @Override
  public void addJobAndSendToMailingList(final Job job) {
    final Job savedJob = this.addJob(job);

    final Map<String, Object> context = CollectionUtils.getHashMap();
    context.put("jobId", savedJob.getId());
    context.put("jobTitle", savedJob.getJobTitle());
    context.put("businessLocation", savedJob.getRegionOther());
    context.put("businessName", savedJob.getBusinessName());
    context.put("description", savedJob.getDescription());
    context.put("jobRestrictions", savedJob.getJobRestrictions());
    context.put("updateDate", savedJob.getUpdateDate());
    context.put("businessEmail", savedJob.getBusinessEmail());
    context.put("serverAddress", serverSettings.getServerAddress());

    notificationService.sendEmail(
        ((Configuration) this.getJRecruiterSetting("mail.jobposting.email")).getMessageText(),
        savedJob.getJobTitle(),
        context,
        "add-job");
    final String tweetMessage =
        "New Job: " + savedJob.getJobTitle() + " @ " + savedJob.getBusinessName();

    final URI uri = createShortenedJobDetailUrl(savedJob);
    //  notificationService.sendTweetToTwitter(tweetMessage + ": " + uri.toString());

  }
Ejemplo n.º 2
0
  /** {@inheritDoc} */
  @Override
  public void updateJob(final Job job) {

    if (job.getStatistic() == null) {
      Statistic statistic = new Statistic(job.getId(), Long.valueOf(0), null, Long.valueOf(0));
      statistic.setJob(job);
      job.setStatistic(statistic);
    }

    final Job savedJob = jobDao.save(job);

    saveJobStatistics(savedJob);

    String tweetMessage = "Job Update: " + job.getJobTitle() + " @ " + job.getBusinessName();

    final URI uri = createShortenedJobDetailUrl(job);

    tweetMessage = tweetMessage + ": " + uri.toString();
    //  notificationService.sendTweetToTwitter(tweetMessage);

  }