Examples of ProxyNupkg


Examples of ru.aristar.jnuget.files.ProxyNupkg

        assertFalse(file.exists());
       
        Index index = new Index();
        TempNupkgFile tempNupkgFile = new TempNupkgFile(this.getClass().getResourceAsStream("/NUnit.2.5.9.10348.nupkg"));
        RemoteNupkg remoteNupkg = new RemoteNupkg(tempNupkgFile.getNuspecFile(), tempNupkgFile.getHash(), mockId, tempNupkgFile.getUpdated(), new URI("http://site.org"));
        ProxyNupkg proxyNupkg = new ProxyNupkg(null, remoteNupkg);
        index.put(proxyNupkg);

        //WHEN
        try (FileOutputStream fileOutputStream = new FileOutputStream(file)) {
            index.saveTo(fileOutputStream);
View Full Code Here

Examples of ru.aristar.jnuget.files.ProxyNupkg

    @Override
    public Collection<Nupkg> getPackages() {
        ArrayList<Nupkg> nupkgs = new ArrayList<>();
        try {
            for (RemoteNupkg remoteNupkg : remoteSource.getPackages()) {
                nupkgs.add(new ProxyNupkg(hostedSource, remoteNupkg));
            }
        } catch (Exception e) {
            logger.warn("Не удалось получить пакеты из удаленного хранилища", e);
        }
        nupkgs.addAll(hostedSource.getPackages());
View Full Code Here

Examples of ru.aristar.jnuget.files.ProxyNupkg

    @Override
    public Collection<Nupkg> getLastVersionPackages() {
        Collection<Nupkg> nupkgs = new HashSet<>();
        try {
            for (RemoteNupkg remoteNupkg : remoteSource.getLastVersionPackages()) {
                nupkgs.add(new ProxyNupkg(hostedSource, remoteNupkg));
            }
        } catch (Exception e) {
            logger.warn("Не удалось получить пакеты из удаленного хранилища", e);
        }
        nupkgs.addAll(hostedSource.getLastVersionPackages());
View Full Code Here

Examples of ru.aristar.jnuget.files.ProxyNupkg

    @Override
    public Collection<Nupkg> getPackages(String id) {
        HashMap<Version, Nupkg> packages = new HashMap<>();
        try {
            for (RemoteNupkg remoteNupkg : remoteSource.getPackages(id)) {
                packages.put(remoteNupkg.getVersion(), new ProxyNupkg(hostedSource, remoteNupkg));
            }
        } catch (Exception e) {
            logger.warn("Не удалось получить пакеты из удаленного хранилища", e);
        }
        for (Nupkg nupkg : hostedSource.getPackages(id)) {
View Full Code Here

Examples of ru.aristar.jnuget.files.ProxyNupkg

    }

    @Override
    public void refreshPackage(Nupkg nupkg) {
        if (nupkg instanceof ProxyNupkg) {
            ProxyNupkg proxyNupkg = (ProxyNupkg) nupkg;
            proxyNupkg.setPackageSource(hostedSource);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.