Package sagan.tools

Examples of sagan.tools.ToolSuiteDownloads


            updateSiteArchives.add(archive);
        }
    }

    public ToolSuiteDownloads build() {
        return new ToolSuiteDownloads(shortName, releaseName, whatsNew, platformMap, updateSiteArchives);
    }
View Full Code Here


        this.toolsService = toolsService;
    }

    @RequestMapping(method = { GET, HEAD })
    public String index(Model model) throws Exception {
        ToolSuiteDownloads stsDownloads = toolsService.getStsGaDownloads();
        model.addAttribute("stsDownloadLinks", stsDownloads.getPreferredDownloadLinks());
        model.addAttribute("stsVersion", stsDownloads.getReleaseName());
        ToolSuiteDownloads ggtsDownloads = toolsService.getGgtsGaDownloads();
        model.addAttribute("ggtsDownloadLinks", ggtsDownloads.getPreferredDownloadLinks());
        model.addAttribute("ggtsVersion", ggtsDownloads.getReleaseName());
        return "tools/index";
    }
View Full Code Here

        return "tools/index";
    }

    @RequestMapping(value = "/sts", method = { GET, HEAD })
    public String stsIndex(Model model) throws Exception {
        ToolSuiteDownloads stsDownloads = toolsService.getStsGaDownloads();
        model.addAttribute("downloadLinks", stsDownloads.getPreferredDownloadLinks());
        model.addAttribute("version", stsDownloads.getReleaseName());
        return "tools/sts/index";
    }
View Full Code Here

        return "tools/sts/welcome";
    }

    @RequestMapping(value = "/sts/all", method = { GET, HEAD })
    public String allStsDownloads(Model model) throws Exception {
        ToolSuiteDownloads stsDownloads = toolsService.getStsGaDownloads();
        ToolSuiteDownloads milestoneDownloads = toolsService.getStsMilestoneDownloads();
        model.addAttribute("gaRelease", stsDownloads);
        model.addAttribute("milestoneRelease", milestoneDownloads);
        model.addAttribute("updateSiteArchives", stsDownloads.getArchives());
        return "tools/sts/all";
    }
View Full Code Here

        return "tools/sts/all";
    }

    @RequestMapping(value = "/ggts", method = { GET, HEAD })
    public String ggtsIndex(Model model) throws Exception {
        ToolSuiteDownloads ggtsDownloads = toolsService.getGgtsGaDownloads();
        model.addAttribute("downloadLinks", ggtsDownloads.getPreferredDownloadLinks());
        model.addAttribute("version", ggtsDownloads.getReleaseName());
        return "tools/ggts/index";
    }
View Full Code Here

        return "tools/ggts/index";
    }

    @RequestMapping(value = "/ggts/all", method = { GET, HEAD })
    public String allGgtsDownloads(Model model) throws Exception {
        ToolSuiteDownloads gaDownloads = toolsService.getGgtsGaDownloads();
        ToolSuiteDownloads milestoneDownloads = toolsService.getGgtsMilestoneDownloads();
        model.addAttribute("gaRelease", gaDownloads);
        model.addAttribute("milestoneRelease", milestoneDownloads);
        model.addAttribute("updateSiteArchives", gaDownloads.getArchives());
        return "tools/ggts/all";
    }
View Full Code Here

        ToolSuitePlatform windows = new ToolSuitePlatform("windows", eclipseVersions);
        platforms.put("windows", windows);

        List<UpdateSiteArchive> archives = Collections.emptyList();
        ToolSuiteDownloads toolSuite = new ToolSuiteDownloads("STS", "3.1.2.RELEASE",
                "http://static.springsource.org/sts/nan/v312/NewAndNoteworthy.html", platforms, archives);
        when(service.getStsGaDownloads()).thenReturn(toolSuite);
        controller.stsIndex(model);

        @SuppressWarnings("unchecked")
        Set<DownloadLink> actual = (Set<DownloadLink>) model.get("downloadLinks");
        assertThat(actual, equalTo(toolSuite.getPreferredDownloadLinks()));
        assertThat((String) model.get("version"), equalTo("3.1.2.RELEASE"));

    }
View Full Code Here

        ToolSuitePlatform windows = new ToolSuitePlatform("windows", eclipseVersions);
        platforms.put("windows", windows);

        List<UpdateSiteArchive> archives = Collections.emptyList();
        ToolSuiteDownloads toolSuite = new ToolSuiteDownloads("GGTS", "3.1.2.RELEASE",
                "http://static.springsource.org/sts/nan/v312/NewAndNoteworthy.html", platforms, archives);
        when(service.getGgtsGaDownloads()).thenReturn(toolSuite);
        controller.ggtsIndex(model);

        @SuppressWarnings("unchecked")
        Set<DownloadLink> actual = (Set<DownloadLink>) model.get("downloadLinks");
        assertThat(actual, equalTo(toolSuite.getPreferredDownloadLinks()));
        assertThat((String) model.get("version"), equalTo("3.1.2.RELEASE"));

    }
View Full Code Here

public class ToolSuiteTests {

    @Test
    public void testPreferredDownloadLinks() throws Exception {
        ToolSuiteDownloads toolSuite = buildToolSuite();

        Set<DownloadLink> links = new HashSet<>();
        links.add(new DownloadLink("http://example.com/spring-tool-suite-3.6.0.RELEASE-e4.4-win32.zip",
                "zip", "323MB", "windows", "32"));
        links.add(new DownloadLink("http://example.com/spring-tool-suite-3.6.0.RELEASE-e4.4-win32-x86_64.zip",
                "zip", "323MB", "windows", "64"));
        links.add(new DownloadLink("http://example.com/spring-tool-suite-3.6.0.RELEASE-e4.4-macosx-cocoa.tar.gz",
                "tar.gz", "323MB", "mac", "32"));
        links.add(new DownloadLink("http://example.com/spring-tool-suite-3.6.0.RELEASE-e4.4-macosx-cocoa-x86_64.tar.gz",
                "tar.gz", "323MB", "mac", "64"));
        links.add(new DownloadLink("http://example.com/spring-tool-suite-3.6.0.RELEASE-e4.4-linux-gtk.tar.gz",
                "tar.gz", "323MB", "linux", "32"));
        links.add(new DownloadLink("http://example.com/spring-tool-suite-3.6.0.RELEASE-e4.4-linux-gtk-x86_64.tar.gz",
                "tar.gz", "323MB", "linux", "64"));

        assertThat(toolSuite.getPreferredDownloadLinks(), equalTo(links));
    }
View Full Code Here

        linuxArchitectures.add(new Architecture("Linux (GTK, 64bit)", linux64Links));
        platforms.put("linux", new ToolSuitePlatform("Linux", Collections.singletonList(new EclipseVersion("4.3",
                linuxArchitectures))));

        List<UpdateSiteArchive> archives = Collections.emptyList();
        return new ToolSuiteDownloads("ShortName", "3.6.0.RELEASE",
                "http://static.springsource.org/sts/nan/latest/NewAndNoteworthy.html", platforms, archives);
    }
View Full Code Here

TOP

Related Classes of sagan.tools.ToolSuiteDownloads

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.