コード例 #1
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;
  }
コード例 #2
0
  @Transactional
  public StoryTO rankToBottomOnWhatsNext(final WhatsNextStoryEntry entry)
      throws IllegalArgumentException {
    if (entry == null) {
      throw new IllegalArgumentException();
    }

    doRankToBottomOnWhatsNext(entry);
    StoryTO transferObj = transferObjectBusiness.constructQueuedStoryTO(entry);
    return transferObj;
  }
コード例 #3
0
  @Transactional
  public StoryTO rankUnderStoryOnWhatsNext(
      final WhatsNextStoryEntry entry, WhatsNextStoryEntry upperEntry) {
    if (entry == null) {
      throw new IllegalArgumentException();
    }

    RankUnderDelegate delegate =
        new RankUnderDelegate() {
          public Collection<? extends Rankable> getWithRankBetween(Integer lower, Integer upper) {
            return whatsNextStoryEntryDAO.getStoriesWithRankBetween(lower, upper, entry.getUser());
          }
        };

    rankingBusiness.rankUnder(entry, upperEntry, delegate);
    StoryTO transferObj = transferObjectBusiness.constructQueuedStoryTO(entry);
    return transferObj;
  }
コード例 #4
0
  public AssignedWorkTO getAssignedWorkFor(User user) {
    DateTime now = new DateTime();
    DateTime dayStart = now.withMillisOfDay(0);
    DateTime dayEnd = dayStart.plusDays(1);
    Interval interval = new Interval(dayStart, dayEnd);

    Collection<Task> tasks = taskDAO.getAllTasks(user, interval);
    Collection<Story> stories =
        storyDAO.getAllIterationStoriesByResponsibleAndInterval(user, interval);

    AssignedWorkTO returnable = transferObjectBusiness.constructAssignedWorkTO(tasks, stories);

    Collection<Story> finalStories = new ArrayList<Story>();
    finalStories.addAll(returnable.getStories());
    Collection<StoryRank> iterationRanks = storyRankDAO.getIterationRanksForStories(finalStories);
    Collection<StoryRank> projectRanks = storyRankDAO.getProjectRanksForStories(finalStories);

    setStoryRanks(returnable.getStories(), iterationRanks, projectRanks);

    return returnable;
  }