Package net.sourceforge.processdash.tool.bridge

Examples of net.sourceforge.processdash.tool.bridge.ResourceCollectionInfo


    public static Long uploadSingleFile(URL remoteUrl, String resourceName,
            InputStream data) throws IOException,
            LockFailureException {
        byte[] response = doAnonymousPostRequest(remoteUrl, UPLOAD_ACTION,
            resourceName, data);
        ResourceCollectionInfo remoteList = XmlCollectionListing
                .parseListing(new ByteArrayInputStream(response));
        return remoteList.getChecksum(resourceName);
    }
View Full Code Here


            if (timestamp == null)
                return false;
            ResourceFilter filter = ResourceFilterFactory
                    .getForRequest(Collections.singletonMap(
                        ResourceFilterFactory.LAST_MOD_PARAM, timestamp));
            ResourceCollectionInfo changedFiles = new ResourceListing(
                    client.localCollection, filter);
            return changedFiles.listResourceNames().isEmpty();
        } catch (Exception e) {
            return false;
        }
    }
View Full Code Here

    private ResourceCollectionDiff getDiff() throws IOException {
        // start by initiating the HTTP connection to the server
        URLConnection conn = makeGetRequest(LIST_ACTION);
        conn.connect();
        // now, while the server is thinking, do our calculations locally.
        ResourceCollectionInfo localList = new ResourceListing(localCollection,
                ResourceFilterFactory.DEFAULT_FILTER);
        // finally, retrieve the list from the server and compare the two.
        ResourceCollectionInfo remoteList = XmlCollectionListing
                .parseListing(new BufferedInputStream(conn.getInputStream()));
        return new ResourceCollectionDiff(localList, remoteList);
    }
View Full Code Here

        }
    }

    private ResourceCollectionInfo downloadFiles(URLConnection conn)
            throws IOException {
        ResourceCollectionInfo info = null;

        InputStream response = new BufferedInputStream(conn.getInputStream());
        ZipInputStream zipIn = new ZipInputStream(response);
        ZipEntry e;
        while ((e = zipIn.getNextEntry()) != null) {
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.tool.bridge.ResourceCollectionInfo

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.