Package sagan.tools

Examples of sagan.tools.ToolSuitePlatform


            extractPlatformDownloadLink(download);
        }
    }

    private void extractPlatformDownloadLink(Download download) {
        ToolSuitePlatform platform = createOrFindPlatform(download.getOs(), download.getVersion());
        EclipseVersion eclipseVersion = createOrFindEclipseVersion(download.getEclipseVersion(), platform);
        Architecture architecture = createOrFindArchitecture(download.getDescription(), eclipseVersion, platform);

        DownloadLink link = downloadLinkExtractor.createDownloadLink(download);
        architecture.getDownloadLinks().add(link);
View Full Code Here


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

    private ToolSuitePlatform createOrFindPlatform(String os, String name) {
        ToolSuitePlatform platform = platformMap.get(os);
        if (platform == null) {
            platform = new ToolSuitePlatform(os, new ArrayList<>());
            platformMap.put(os, platform);
        }
        return platform;
    }
View Full Code Here

        List<Architecture> architectures = Collections.singletonList(new Architecture(
                "Mac OS X (Cocoa, 64bit)", downloadLinks));
        List<EclipseVersion> eclipseVersions = Collections
                .singletonList(new EclipseVersion("1.2", architectures));

        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);
View Full Code Here

        List<Architecture> architectures = Collections.singletonList(new Architecture(
                "Mac OS X (Cocoa, 64bit)", downloadLinks));
        List<EclipseVersion> eclipseVersions = Collections
                .singletonList(new EclipseVersion("1.2", architectures));

        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);
View Full Code Here

        assertThat(toolSuite.getPlatformList().get(1).getName(), equalTo("Mac"));
    }

    @Test
    public void addsAnEclipseVersionToEachPlatform() throws Exception {
        ToolSuitePlatform mac = toolSuite.getPlatformList().get(0);
        assertThat(mac.getEclipseVersions().size(), equalTo(1));
        assertThat(mac.getEclipseVersions().get(0).getName(), equalTo("4.3"));

        ToolSuitePlatform windows = toolSuite.getPlatformList().get(0);
        assertThat(windows.getEclipseVersions().size(), equalTo(1));
        assertThat(windows.getEclipseVersions().get(0).getName(), equalTo("4.3"));
    }
View Full Code Here

        assertThat(windows.getEclipseVersions().get(0).getName(), equalTo("4.3"));
    }

    @Test
    public void addsAnArchitectureToTheEclipseVersionInEachPlatform() throws Exception {
        ToolSuitePlatform mac = toolSuite.getPlatformList().get(1);
        EclipseVersion eclipseVersion = mac.getEclipseVersions().get(0);
        assertThat(eclipseVersion.getArchitectures().size(), equalTo(1));
        assertThat(eclipseVersion.getArchitectures().get(0).getName(), equalTo("Mac OS X (Cocoa)"));

        ToolSuitePlatform windows = toolSuite.getPlatformList().get(0);
        EclipseVersion windowsEclipseVersion = windows.getEclipseVersions().get(0);
        assertThat(windowsEclipseVersion.getArchitectures().size(), equalTo(1));
        assertThat(windowsEclipseVersion.getArchitectures().get(0).getName(), equalTo("Windows (64bit)"));
    }
View Full Code Here

        assertThat(toolSuite.getPlatformList().get(1).getName(), equalTo("Mac"));
    }

    @Test
    public void addsAnEclipseVersionToThePlatform() throws Exception {
        ToolSuitePlatform platform = toolSuite.getPlatformList().get(1);
        assertThat(platform.getEclipseVersions().size(), equalTo(1));
        assertThat(platform.getEclipseVersions().get(0).getName(), equalTo("4.3"));
    }
View Full Code Here

        assertThat(platform.getEclipseVersions().get(0).getName(), equalTo("4.3"));
    }

    @Test
    public void addsAnArchitectureToTheEclipseVersion() throws Exception {
        ToolSuitePlatform platform = toolSuite.getPlatformList().get(1);
        EclipseVersion eclipseVersion = platform.getEclipseVersions().get(0);
        assertThat(eclipseVersion.getArchitectures().size(), equalTo(1));
        assertThat(eclipseVersion.getArchitectures().get(0).getName(), equalTo("Mac OS X (Cocoa)"));
    }
View Full Code Here

        assertThat(eclipseVersion.getArchitectures().get(0).getName(), equalTo("Mac OS X (Cocoa)"));
    }

    @Test
    public void addsADownloadLinkTheArchitecture() throws Exception {
        ToolSuitePlatform platform = toolSuite.getPlatformList().get(1);
        EclipseVersion eclipseVersion = platform.getEclipseVersions().get(0);
        Architecture architecture = eclipseVersion.getArchitectures().get(0);

        assertThat(architecture.getDownloadLinks().size(), equalTo(2));
        assertThat(
                architecture.getDownloadLinks().get(0).getUrl(),
View Full Code Here

        v35Mac32Links.add(new DownloadLink("http://example.com/spring-tool-suite-3.5.1.RELEASE-e4.3.2-macosx-cocoa-installer.dmg",
                "dmg", "323MB", os, architecture));
        v35MacArchitectures.add(new Architecture("Mac OS X (Cocoa)", v35Mac32Links));
        macEclipseVersions.add(new EclipseVersion("4.3.2", v35MacArchitectures));

        platforms.put("mac", new ToolSuitePlatform("Mac", macEclipseVersions));

        os = "windows";
        List<Architecture> winArchitectures = new ArrayList<>();
        List<DownloadLink> win32Links = new ArrayList<>();
        architecture = "32";
        win32Links.add(new DownloadLink("http://example.com/spring-tool-suite-3.6.0.RELEASE-e4.4-win32.zip",
                "zip", "323MB", os, architecture));
        winArchitectures.add(new Architecture("Windows", win32Links));

        List<DownloadLink> win64Links = new ArrayList<>();
        architecture = "64";
        win64Links.add(new DownloadLink("http://example.com/spring-tool-suite-3.6.0.RELEASE-e4.4-win32-x86_64.zip",
                "zip", "323MB", os, architecture));
        winArchitectures.add(new Architecture("Windows (64bit)", win64Links));
        platforms.put("windows", new ToolSuitePlatform("Windows", Collections.singletonList(new EclipseVersion("4.4",
                winArchitectures))));

        os = "linux";
        List<Architecture> linuxArchitectures = new ArrayList<>();
        List<DownloadLink> linux32Links = new ArrayList<>();
        architecture = "32";
        linux32Links.add(new DownloadLink("http://example.com/spring-tool-suite-3.6.0.RELEASE-e4.4-linux-gtk.tar.gz",
                "tar.gz", "323MB", os, architecture));
        linux32Links.add(new DownloadLink("http://example.com/linux.sh", "sh", "323MB", os, architecture));
        linuxArchitectures.add(new Architecture("Linux (GTK)", linux32Links));

        List<DownloadLink> linux64Links = new ArrayList<>();
        architecture = "64";
        linux64Links
                .add(new DownloadLink("http://example.com/spring-tool-suite-3.6.0.RELEASE-e4.4-linux-gtk-x86_64.tar.gz",
                        "tar.gz", "323MB", os, architecture));
        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.ToolSuitePlatform

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.