コード例 #1
0
 @Transactional
 public void removeFromWhatsNext(User user, Task task) throws IllegalArgumentException {
   WhatsNextEntry entry = whatsNextEntryDAO.getWhatsNextEntryFor(user, task);
   if (entry != null) {
     whatsNextEntryDAO.remove(entry);
   }
 }
コード例 #2
0
  @Transactional
  public DailyWorkTaskTO rankUnderTaskOnWhatsNext(User user, Task task, Task upperTask)
      throws IllegalArgumentException {
    WhatsNextEntry entry = whatsNextEntryDAO.getWhatsNextEntryFor(user, task);

    if (entry == null) {
      entry = addToWhatsNext(user, task);
    }

    WhatsNextEntry upperEntry = null;
    if (upperTask != null) {
      upperEntry = whatsNextEntryDAO.getWhatsNextEntryFor(user, upperTask);
    }

    return rankUnderTaskOnWhatsNext(entry, upperEntry);
  }
コード例 #3
0
 @Transactional
 public WhatsNextEntry addToWhatsNext(User user, Task task) {
   WhatsNextEntry entry = new WhatsNextEntry();
   entry.setTask(task);
   entry.setUser(user);
   whatsNextEntryDAO.store(entry);
   taskBusiness.addResponsible(task, user);
   doRankToBottomOnWhatsNext(entry);
   return entry;
 }
コード例 #4
0
  public Collection<DailyWorkTaskTO> getQueuedTasksForUser(User user) {
    Collection<WhatsNextEntry> entries = whatsNextEntryDAO.getWhatsNextEntriesFor(user);
    Collection<DailyWorkTaskTO> returned = new ArrayList<DailyWorkTaskTO>();

    for (WhatsNextEntry entry : entries) {
      DailyWorkTaskTO item = transferObjectBusiness.constructQueuedDailyWorkTaskTO(entry);
      returned.add(item);
    }

    return returned;
  }
コード例 #5
0
 public void removeTaskFromWorkQueues(Task task) {
   whatsNextEntryDAO.removeAllByTask(task);
 }
コード例 #6
0
 @Transactional
 public DailyWorkTaskTO rankToBottomOnWhatsNext(User user, Task task)
     throws IllegalArgumentException {
   return rankToBottomOnWhatsNext(whatsNextEntryDAO.getWhatsNextEntryFor(user, task));
 }
コード例 #7
0
 @Transactional
 private void doRankToBottomOnWhatsNext(WhatsNextEntry entry) throws IllegalArgumentException {
   rankingBusiness.rankToBottom(entry, whatsNextEntryDAO.getLastTaskInRank(entry.getUser()));
 }