Пример #1
0
 @Override
 public void onPublishRelease(GwtConversation conversation, String releaseId) {
   Project project = conversation.getProject();
   Release release = (Release) getDaoService().getEntityById(releaseId);
   if (!release.isProject(project)) throw new PermissionDeniedException();
   release.release(project, conversation.getSession().getUser(), webApplication);
 }
Пример #2
0
 private void fillReleases(ContextBuilder context) {
   List<Release> releases = new ArrayList<Release>(project.getReleases());
   Collections.sort(releases, Release.DATE_REVERSE_COMPARATOR);
   for (Release release : releases) {
     if (!release.isReleased()) continue;
     fillRelease(context.addSubContext("releases"), release);
   }
 }
Пример #3
0
 @Override
 public void onRequestReleaseIssues(GwtConversation conversation, String releaseId) {
   assertProjectSelected(conversation);
   Project project = conversation.getProject();
   Release release = releaseDao.getById(releaseId);
   if (!release.isProject(project)) throw new PermissionDeniedException();
   conversation.sendToClient(release.getIssues());
 }
Пример #4
0
 public final boolean addReleases(Collection<scrum.server.release.Release> releases) {
   if (releases == null) throw new IllegalArgumentException("releases == null");
   boolean added = false;
   for (scrum.server.release.Release release : releases) {
     added = added | this.releasesIds.add(release.getId());
   }
   return added;
 }
Пример #5
0
 private void fillProject(ContextBuilder context) {
   context.put("id", project.getId());
   context.put("label", project.getLabel());
   context.put("vision", project.getVision());
   context.put("shortDescription", project.getShortDescription());
   context.put("description", wiki2html(project.getDescription()));
   context.put("longDescription", wiki2html(project.getLongDescription()));
   Release currentRelease = project.getCurrentRelease();
   context.put("currentRelease", currentRelease == null ? "?" : currentRelease.getLabel());
 }
Пример #6
0
 private void processReleaseTemplates() {
   List<Release> releases = new ArrayList<Release>(project.getReleases());
   Collections.sort(releases, Release.DATE_REVERSE_COMPARATOR);
   for (Release release : releases) {
     if (!release.isReleased()) continue;
     ContextBuilder context = new ContextBuilder();
     fillRelease(context.putSubContext("release"), release);
     String reference = release.getReference();
     processEntityTemplate(context, reference);
   }
 }
Пример #7
0
 private void fillSprintBacklog(ContextBuilder context) {
   Sprint sprint = project.getCurrentSprint();
   context.put("label", sprint.getLabel());
   context.put("goal", wiki2html(sprint.getGoal()));
   context.put("begin", sprint.getBegin().toString(Date.FORMAT_LONGMONTH_DAY_YEAR));
   context.put("end", sprint.getEnd().toString(Date.FORMAT_LONGMONTH_DAY_YEAR));
   Release release = sprint.getRelease();
   if (release != null) context.put("release", release.getLabel());
   List<Requirement> requirements = new ArrayList<Requirement>(sprint.getRequirements());
   Collections.sort(requirements, project.getRequirementsOrderComparator());
   for (Requirement requirement : requirements) {
     fillStory(context.addSubContext("stories"), requirement);
   }
 }
Пример #8
0
 private void fillRelease(ContextBuilder context, Release release) {
   context.put("id", release.getId());
   context.put("reference", release.getReference());
   context.put("label", release.getLabel());
   context.put("note", wiki2html(release.getNote()));
   context.put("releaseNotes", wiki2html(release.getReleaseNotes()));
   context.put("releaseDate", release.getReleaseDate());
   context.put("released", release.isReleased());
   context.put("major", release.isMajor());
   context.put("bugfix", release.isBugfix());
   fillComments(context, release);
 }
Пример #9
0
 public final boolean addRelease(scrum.server.release.Release release) {
   if (release == null) throw new IllegalArgumentException("release == null");
   boolean added = this.releasesIds.add(release.getId());
   if (added) updateLastModified();
   if (added) fireModified("releases+=" + release);
   return added;
 }
Пример #10
0
 public String getFixReleasesAsString() {
   Set<Release> releases = getFixReleases();
   if (releases.isEmpty()) return null;
   if (releases.size() == 1) return "Release " + Utl.getElement(releases, 0).getLabel();
   StringBuilder sb = new StringBuilder();
   sb.append("Releases ");
   boolean first = true;
   for (Release release : releases) {
     if (first) {
       first = false;
     } else {
       sb.append(", ");
     }
     sb.append(release.getLabel());
   }
   return sb.toString();
 }
Пример #11
0
 public final boolean removeRelease(scrum.server.release.Release release) {
   if (release == null) throw new IllegalArgumentException("release == null");
   if (this.releasesIds == null) return false;
   boolean removed = this.releasesIds.remove(release.getId());
   if (removed) updateLastModified();
   if (removed) fireModified("releases-=" + release);
   return removed;
 }
Пример #12
0
 public final boolean containsRelease(scrum.server.release.Release release) {
   if (release == null) return false;
   return this.releasesIds.contains(release.getId());
 }