Package sagan.projects

Examples of sagan.projects.ProjectRelease


        return "admin/project/index";
    }

    @RequestMapping(value = "new", method = GET)
    public String newProject(Model model) {
        ProjectRelease release = new ProjectRelease("1.0.0.BUILD-SNAPSHOT",
                ProjectRelease.ReleaseStatus.SNAPSHOT,
                false,
                "http://docs.spring.io/spring-new/docs/{version}/spring-new/htmlsingle/",
                "http://docs.spring.io/spring-new/docs/{version}/javadoc-api/",
                "org.springframework.new",
View Full Code Here


    @RequestMapping(value = "{id}", method = POST)
    public String save(@Valid Project project, @RequestParam(defaultValue = "") List<String> releasesToDelete,
                       @RequestParam String groupId) {
        Iterator<ProjectRelease> iReleases = project.getProjectReleases().iterator();
        while (iReleases.hasNext()) {
            ProjectRelease release = iReleases.next();
            if ("".equals(release.getVersion()) || releasesToDelete.contains(release.getVersion())) {
                iReleases.remove();
            }
            release.setGroupId(groupId);
            String version = release.getVersion();
            release.setApiDocUrl(release.getApiDocUrl().replaceAll(VERSION_PATTERN, version));
            release.setRefDocUrl(release.getRefDocUrl().replaceAll(VERSION_PATTERN, version));

        }
        service.save(project);

        return "redirect:" + project.getId();
View Full Code Here

    // @OrderColumn
    // See https://hibernate.atlassian.net/browse/HHH-1268
    @Test
    public void deleteRelease() {
        Project project = service.getProject("spring-framework");
        ProjectRelease release = project.getProjectReleases().remove(0);
        assertThat(release.getVersion(), equalTo("4.0.1.BUILD-SNAPSHOT"));
        service.save(project);

        repo.flush();
    }
View Full Code Here

TOP

Related Classes of sagan.projects.ProjectRelease

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.