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

Examples of org.tmatesoft.svn.core.internal.io.dav.http.HTTPStatus


                }
                getDescription().append(cdata);
            }
        } else if (element == DAVElement.STATUS) {
            try {
                HTTPStatus status = HTTPStatus.createHTTPStatus(cdata.toString());
                if (parent != DAVElement.PROPSTAT) {
                    myResponseContainsError |= status.getCodeClass() != 2;
                } else {
                    myPropstatContainsError = status.getCodeClass() != 2;
                }
            } catch (ParseException e) {
                SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_REQUEST_FAILED,
                        "The response contains a non-conforming HTTP status line"), SVNLogType.NETWORK);
View Full Code Here


        } else if (element == DAVElement.STATUS) {
            if (cdata == null) {
                invalidXML();
            }
            try {
                HTTPStatus status = HTTPStatus.createHTTPStatus(cdata.toString());
                if (status == null) {
                    invalidXML();
                }
                myStatusCode = status.getCode();
            } catch (ParseException e) {
                invalidXML();
            }
            return;
        } else if (element == DAVElement.HREF) {
View Full Code Here

            long revision = Math.max(startRevision, endRevision);
            path = SVNEncodingUtil.uriEncode(path);
            DAVBaselineInfo info = DAVUtil.getBaselineInfo(connection, this, path, revision, false, false, null);
            path = SVNPathUtil.append(info.baselineBase, info.baselinePath);
            try {
                HTTPStatus status = connection.doReport(path, request, davHandler);
                if (status.getError() != null) {
                    SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
                }
            } catch (SVNException e) {
                if (e.getErrorMessage() != null && e.getErrorMessage().getErrorCode() == SVNErrorCode.UNKNOWN &&
                        davHandler.isCompatibleMode()) {
                    cachingHandler.handleLogEntry(SVNLogEntry.EMPTY_ENTRY);
View Full Code Here

            DAVLocationsHandler davHandler = new DAVLocationsHandler(handler);
            String root = getLocation().getPath();
            root = SVNEncodingUtil.uriEncode(root);
            DAVBaselineInfo info = DAVUtil.getBaselineInfo(connection, this, root, pegRevision, false, false, null);           
            path = SVNPathUtil.append(info.baselineBase, info.baselinePath);
            HTTPStatus status = connection.doReport(path, request, davHandler);
            if (status.getCode() == 501) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NOT_IMPLEMENTED,
                        "'get-locations' REPORT not implemented");
                SVNErrorManager.error(err, status.getError(), SVNLogType.NETWORK);
            } else if (status.getError() != null) {
                SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
            }
            return davHandler.getEntriesCount();
        } finally {
            closeConnection();
        }
View Full Code Here

            String root = absolutePath ? myRepositoryRoot.getPath() : getLocation().getPath();
            root = SVNEncodingUtil.uriEncode(root);
            DAVBaselineInfo info = DAVUtil.getBaselineInfo(connection, this, root, pegRevision, false,
                    false, null);           
            path = SVNPathUtil.append(info.baselineBase, info.baselinePath);
            HTTPStatus status = connection.doReport(path, request, davHandler);
            if (status.getCode() == 501) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NOT_IMPLEMENTED,
                        "'get-location-segments' REPORT not implemented");
                SVNErrorManager.error(err, status.getError(), SVNLogType.NETWORK);
            } else if (status.getError() != null) {
                SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
            }
            return davHandler.getTotalRevisions();
        } finally {
            closeConnection();
        }
View Full Code Here

           
            DAVBaselineInfo info = DAVUtil.getBaselineInfo(connection, this, thisSessionPath, pegRevision, false, false, null);
            String finalBCPath = SVNPathUtil.append(info.baselineBase, info.baselinePath);
            StringBuffer requestBody = DAVDeletedRevisionHandler.generateGetDeletedRevisionRequest(null, path, pegRevision, endRevision);
            DAVDeletedRevisionHandler handler = new DAVDeletedRevisionHandler();
            HTTPStatus status = connection.doReport(finalBCPath, requestBody, handler);
            if (status.getCode() == 501) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NOT_IMPLEMENTED, "'get-deleted-rev' REPORT not implemented");
                SVNErrorManager.error(err, status.getError(), SVNLogType.NETWORK);
            }
            return handler.getRevision();
        } finally {
            closeConnection();
        }
View Full Code Here

            paths = new String[]{""};
        }
        StringBuffer request = DAVMergeInfoHandler.generateMergeInfoRequest(null, revision, paths,
                inherit, includeDescendants);
        DAVMergeInfoHandler handler = new DAVMergeInfoHandler();
        HTTPStatus status = connection.doReport(path, request, handler);
        if (status.getCode() == 501) {
          SVNErrorMessage err = status.getError() != null ? status.getError() : SVNErrorMessage.create(SVNErrorCode.UNSUPPORTED_FEATURE, "Server does not support mergeinfo");
          SVNErrorManager.error(err, SVNLogType.NETWORK);
        }
        if (status.getError() != null) {
            SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
        }
        Map mergeInfo = handler.getMergeInfo();
        if (mergeInfo == null) {
          return null;
        }
View Full Code Here

                if (closeEditorOnException) {
                    editor.closeEdit();
                }
                throw e;
            }
            HTTPStatus status = connection.doReport(bcPath, request, handler, spool);
            if (status.getError() != null) {
                SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
            }
        } finally {
            if (handler != null) {
                handler.closeConnection();
            }
View Full Code Here

      try {
        openConnection();
            String path = getLocation().getURIEncodedPath();
            DAVConnection connection = getConnection();
            path = DAVUtil.getVCCPath(connection, this, path);
      HTTPStatus status = connection.doReport(path, request, handler);
            if (status.getError() != null) {
                if (status.getError().getErrorCode() == SVNErrorCode.UNSUPPORTED_FEATURE) {
                    SVNErrorMessage err2 = SVNErrorMessage.create(status.getError().getErrorCode(),
                            "Server does not support date-based operations");
                    SVNErrorManager.error(err2, status.getError(), SVNLogType.NETWORK);
                }
                SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
            }
      } finally {
        closeConnection();
      }
      return handler.getRevisionNumber();
View Full Code Here

                    }
                    whichProps = (DAVElement[]) individualProps.toArray(new DAVElement[individualProps.size()]);
                }
                final int parentPathSegments = SVNPathUtil.getSegmentsCount(path);
                Map dirEntsMap = new SVNHashMap();
                HTTPStatus status = DAVUtil.getProperties(connection, path, DAVUtil.DEPTH_ONE, null, whichProps, dirEntsMap);
                if (status.getError() != null) {
                    SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
                }
                if (!hasRepositoryRoot()) {
                    connection.fetchRepositoryRoot(this);                   
                }
                SVNURL repositryRoot = getRepositoryRoot(false);
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.internal.io.dav.http.HTTPStatus

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.