public BlogEntry createNewBlogEntry(Release release) { BlogEntry blogEntry = new BlogEntry(this); blogEntry.setTitle("Release " + release.getLabel()); String text = release.isReleased() ? release.getReleaseNotes() : release.createIzemizedReleaseNotes(); blogEntry.setText(text); getDao().createBlogEntry(blogEntry); return blogEntry; }
public Release createNewRelease(Release parentRelease) { Release release = new Release(this); Date date = Date.today(); if (parentRelease != null) { release.setParentRelease(parentRelease); release.setLabel( parentRelease.getLabel() + " Bugfix " + (parentRelease.getBugfixReleases().size() + 1)); Date parentDate = parentRelease.getReleaseDate(); if (parentDate != null && parentDate.isAfter(date)) date = parentDate; } release.setReleaseDate(date); getDao().createRelease(release); return release; }