Package org.tmatesoft.svn.core.internal.io.dav.http

Examples of org.tmatesoft.svn.core.internal.io.dav.http.IHTTPConnection.request()


        return activityURL;
    }
   
    public HTTPStatus doDelete(String path) throws SVNException {
        IHTTPConnection httpConnection = getConnection();
        return httpConnection.request("DELETE", path, null, (StringBuffer) null, 404, 204, null, null);
    }

    public HTTPStatus doDelete(String repositoryPath, String path, long revision) throws SVNException {
        HTTPHeader header = new HTTPHeader();
        if (revision >= 0) {
View Full Code Here


            locationPath = SVNEncodingUtil.uriEncode(locationPath);
            request = DAVMergeHandler.generateLockDataRequest(request, locationPath, repositoryPath, myLocks);
        }
       
        IHTTPConnection httpConnection = getConnection();
        HTTPStatus status = httpConnection.request("DELETE", path, header, request, 204, 0, null, null);
        if (status.getError() != null) {
            SVNErrorCode errCode = status.getError().getErrorCode();
            if (errCode == SVNErrorCode.FS_BAD_LOCK_TOKEN || errCode == SVNErrorCode.FS_NO_LOCK_TOKEN ||
                    errCode == SVNErrorCode.FS_LOCK_OWNER_MISMATCH || errCode == SVNErrorCode.FS_PATH_ALREADY_LOCKED) {
                Map childTokens = null;
View Full Code Here

                request = new StringBuffer();
                String locationPath = getLocation().getPath();
                locationPath = SVNEncodingUtil.uriEncode(locationPath);
               
                request = DAVMergeHandler.generateLockDataRequest(request, locationPath, repositoryPath, childTokens);
                HTTPStatus status2 = httpConnection.request("DELETE", path, header, request, 204, 404, null, null);
                if (status2.getError() != null) {
                    SVNErrorManager.error(status2.getError(), SVNLogType.NETWORK);
                }
                return status2;
            }
View Full Code Here

        return status;
    }

    public HTTPStatus doMakeCollection(String path) throws SVNException {
        IHTTPConnection httpConnection = getConnection();
        return httpConnection.request("MKCOL", path, null, (StringBuffer) null, 201, 0, null, null);
    }
   
    public HTTPStatus doPutDiff(String repositoryPath, String path, InputStream data, long size, String baseChecksum, String textChecksum) throws SVNException {       
        HTTPHeader headers = new HTTPHeader();
        headers.setHeaderValue(HTTPHeader.CONTENT_TYPE_HEADER, HTTPHeader.SVNDIFF_MIME_TYPE);
View Full Code Here

        }
        if (textChecksum != null) {
            headers.setHeaderValue(HTTPHeader.TEXT_MD5, textChecksum);
        }
        IHTTPConnection httpConnection = getConnection();
        return httpConnection.request("PUT", path, headers, data, 201, 204, null, null);
    }
   
    public HTTPStatus doMerge(String activityURL, boolean response, DefaultHandler handler) throws SVNException {
        String locationPath = SVNEncodingUtil.uriEncode(getLocation().getPath());
        StringBuffer request = DAVMergeHandler.generateMergeRequest(null, locationPath, activityURL, myLocks);
View Full Code Here

                value += " release-locks";
            }
            header.setHeaderValue(HTTPHeader.SVN_OPTIONS_HEADER, value);
        }
        IHTTPConnection httpConnection = getConnection();
        return httpConnection.request("MERGE", getLocation().getURIEncodedPath(), header, request, -1, 0, null, handler);
    }
   
    public HTTPStatus doCheckout(String activityPath, String repositoryPath, String path, boolean allow404) throws SVNException {
        StringBuffer request = new StringBuffer();
        Collection namespaces = new LinkedList();
View Full Code Here

            header = new HTTPHeader();
            header.setHeaderValue(HTTPHeader.IF_HEADER, "(<" + myLocks.get(repositoryPath) + ">)");
        }
       
        IHTTPConnection httpConnection = getConnection();
        HTTPStatus status = httpConnection.request("CHECKOUT", path, header, request, 201, allow404 ? 404 : 0,
                null, null);
        if (allow404 && status.getCode() == 404 && status.getError() != null) {
            status.setError(null);
        }
        // update location to be a path!
View Full Code Here

        HTTPHeader header = new HTTPHeader();
        header.setHeaderValue(HTTPHeader.DESTINATION_HEADER, dst);
        header.setHeaderValue(HTTPHeader.DEPTH_HEADER, depth > 0 ? "infinity" : "0");
        SVNErrorMessage context = SVNErrorMessage.create(SVNErrorCode.RA_DAV_REQUEST_FAILED, "COPY of {0}", src);
        IHTTPConnection httpConnection = getConnection();
        HTTPStatus status = httpConnection.request("COPY", src, header, (StringBuffer) null, -1, 0, null, null, context);
        if (status.getCode() >= 300 && status.getError() != null) {
            SVNErrorMessage err = status.getError();
            SVNErrorManager.error(err, SVNLogType.NETWORK);
        }       
    }
View Full Code Here

    }

    protected void exchangeCapabilities() throws SVNException {
        String path = SVNEncodingUtil.uriEncode(getLocation().getPath());
        IHTTPConnection httpConnection = getConnection();
        HTTPStatus status = httpConnection.request("OPTIONS", path, null, (StringBuffer) null, 200, 0, null, null);
        if (status.getCode() == 200) {
          parseCapabilities(status);
        } else {
          SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_OPTIONS_REQ_FAILED,
              "OPTIONS request (for capabilities) got HTTP response code {0}",
View Full Code Here

        if (!force && myActivityCollectionURL != null) {
            return myActivityCollectionURL;
        }
        DAVOptionsHandler handler = new DAVOptionsHandler();
        IHTTPConnection httpConnection = getConnection();
        httpConnection.request("OPTIONS", path, null, DAVOptionsHandler.OPTIONS_REQUEST, -1, 0, null, handler);
        myActivityCollectionURL = handler.getActivityCollectionURL();
        if (myActivityCollectionURL == null) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_OPTIONS_REQ_FAILED,
                    "The OPTIONS request did not include the requested activity-collection-set; this often means that the URL is not WebDAV-enabled");
            SVNErrorManager.error(err, SVNLogType.NETWORK);
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.