Package org.tmatesoft.svn.core.internal.server.dav

Examples of org.tmatesoft.svn.core.internal.server.dav.DAVException


                }
            }
        }
   
        if (path == null) {
            throw new DAVException("Not all parameters passed.", HttpServletResponse.SC_BAD_REQUEST, SVNLogType.NETWORK, DAVXMLUtil.SVN_DAV_ERROR_TAG,
                    DAVElement.SVN_DAV_ERROR_NAMESPACE);
        }
       
        if (SVNRevision.isValidRevisionNumber(startRev) && SVNRevision.isValidRevisionNumber(endRev) &&
                endRev > startRev) {
            throw new DAVException("End revision must not be younger than start revision", HttpServletResponse.SC_BAD_REQUEST, SVNLogType.NETWORK,
                    DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE);
        }
       
        if (SVNRevision.isValidRevisionNumber(pegRev) && SVNRevision.isValidRevisionNumber(startRev) &&
                startRev > pegRev) {
            throw new DAVException("Start revision must not be younger than peg revision", HttpServletResponse.SC_BAD_REQUEST, SVNLogType.NETWORK,
                    DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE);
        }
       
        FSLocationsFinder locationsFinder = new FSLocationsFinder(getDAVResource().getFSFS());
        locationsFinder.getNodeLocationSegments(path, pegRev, startRev, endRev, this);
View Full Code Here


        if (range != null) {
            mode = DAV_MODE_WRITE_SEEKABLE;
        }
       
        SVNDeltaReader deltaReader = null;
        DAVException error = null;
        try {
            deltaReader = openStream(resource, mode);
        } catch (DAVException dave) {
            error = new DAVException("Unable to PUT new contents for {0}.", new Object[] { SVNEncodingUtil.xmlEncodeCDATA(getURI()) },
                    HttpServletResponse.SC_FORBIDDEN, dave, 0);
        }

        if (error == null && range != null) {
            error = new DAVException("Resource body read/write cannot use ranges (at this time)", HttpServletResponse.SC_NOT_IMPLEMENTED, 0);
        }

        DAVException error2 = null;
        if (error == null) {
            String path = resource.getResourceURI().getPath();
            FSRoot root = resource.getRoot();
            FSFS fsfs = resource.getFSFS();
            FSTransactionInfo txn = resource.getTxnInfo();
            Collection lockTokens = resource.getLockTokens();
            String userName = resource.getUserName();
            FSCommitter committer = getCommitter(fsfs, root, txn, lockTokens, userName);
            ISVNDeltaConsumer deltaConsumer = getDeltaConsumer(root, committer, fsfs, userName, lockTokens);
            SVNDeltaGenerator deltaGenerator = new SVNDeltaGenerator();
            InputStream inputStream = null;
            try {
                inputStream = getRequestInputStream();
                byte[] buffer = new byte[2048];
                int readCount = -1;
                while ((readCount = inputStream.read(buffer)) != -1) {
                    if (readCount == 0) {
                        continue;
                    }
                    if (deltaReader != null) {
                        deltaReader.nextWindow(buffer, 0, readCount, path, deltaConsumer);
                    } else {
                        deltaGenerator.sendDelta(path, buffer, readCount, deltaConsumer);
                    }
                }
            } catch (IOException ioe) {
                error = new DAVException("An error occurred while reading the request body.", HttpServletResponse.SC_BAD_REQUEST, 0);
            } catch (SVNException svne) {
                error = DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                        "could not write the file contents", null);
            } finally {
                SVNFileUtil.closeFile(inputStream);
                if (deltaReader != null) {
                    try {
                        deltaReader.reset(path, deltaConsumer);
                    } catch (SVNException svne) {
                        error2 = DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                                "error finalizing applying windows", null);
                    }
                   
                    if (error2 != null && error == null) {
                        error = error2;
                    }
                    deltaConsumer.textDeltaEnd(path);
                }
            }
        }
       
        if (error == null) {
            resource.setExists(true);
        }

        try {
            autoCheckIn(resource, error != null, false, avInfo);
        } catch (DAVException dave) {
            error2 = dave;
        }
       
        if (error != null) {
            throw error;
        }
       
        if (error2 != null) {
            error2 = new DAVException("The PUT was successful, but there was a problem automatically checking in the resource or its parent collection.",
                    null, error2.getResponseCode(), error2, 0);
            //TODO: add here better logging
        }

        DAVLockInfoProvider lockProvider = null;
        try {
View Full Code Here

            invalidXMLRoot();
        }
    }

    protected void invalidXMLRoot() throws SVNException {
        throw new DAVException("The request body must be present and must be a DAV:merge element.", HttpServletResponse.SC_BAD_REQUEST, 0);
    }
View Full Code Here

        if (setETag) {
            setResponseHeader(ETAG_HEADER, null);
        }
       
        if (result != 0) {
            throw new DAVException(null, null, result, null, SVNLogType.NETWORK, Level.FINE, null, null, null, 0, null);
        }
      
        LinkedList ifHeaders = DAVServletUtil.processIfHeader(getRequestHeader(HTTPHeader.IF_HEADER));
       
        if (lockToken != null) {
            DAVIFState ifState = new DAVIFState(DAVIFState.IF_CONDITION_NORMAL, null, lockToken, DAVIFStateType.IF_OPAQUE_LOCK);
            DAVIFHeader ifHeader = new DAVIFHeader(resource.getResourceURI().getRequestURI(), true);
            ifHeader.addIFState(ifState);
            if (ifHeaders == null) {
                ifHeaders = new LinkedList();
            }
            ifHeaders.addFirst(ifHeader);
        }
       
        if (lockInfoProvider == null) {
            lockInfoProvider = DAVLockInfoProvider.createLockInfoProvider(this, false);
        }
       
        DAVException exception = null;
        DAVResponse response = null;
        DAVValidateWalker validateHandler = new DAVValidateWalker();
        if (resource.exists() && depth.getID() > 0) {
            DAVResourceWalker walker = new DAVResourceWalker();
            int walkType = DAVResourceWalker.DAV_WALKTYPE_NORMAL | DAVResourceWalker.DAV_WALKTYPE_LOCKNULL;
            try {
                response = walker.walk(lockInfoProvider, resource, ifHeaders, flags, lockScope, walkType, validateHandler, DAVDepth.DEPTH_INFINITY);
            } catch (DAVException dave) {
                exception = dave;
            }
        } else {
            try {
                validateHandler.validateResourceState(ifHeaders, resource, lockInfoProvider, lockScope, flags);
            } catch (DAVException dave) {
                exception = dave;
            }
        }
       
        if (exception == null && (flags & DAV_VALIDATE_PARENT) != 0) {
            DAVResource parentResource = null;
            try {
                parentResource = DAVResourceHelper.createParentResource(resource);
            } catch (DAVException dave) {
                exception = dave;
            }
           
            if (exception == null) {
                try {
                    validateHandler.validateResourceState(ifHeaders, parentResource, lockInfoProvider, lockScope, flags | DAV_VALIDATE_IS_PARENT);
                } catch (DAVException dave) {
                    exception = dave;
                }
               
                if (exception != null) {
                    String description = "A validation error has occurred on the parent resource, preventing the operation on the resource specified by the Request-URI.";
                    if (exception.getMessage() != null) {
                        description += " The error was: " + exception.getMessage();
                    }
                    response = new DAVResponse(description, parentResource.getResourceURI().getRequestURI(), response, null, exception.getResponseCode());
                    exception = null;
                }
            }
        }
       
        if (exception == null && response != null) {
            if ((flags & DAV_VALIDATE_USE_424) != 0) {
                throw new DAVException("An error occurred on another resource, preventing the requested operation on this resource.",
                        SC_FAILED_DEPENDANCY, 0, response);
            }
           
            DAVPropsResult propStat = null;
            if ((flags & DAV_VALIDATE_ADD_LD) != 0) {
                propStat = new DAVPropsResult();
                propStat.addPropStatsText("<D:propstat>\n<D:prop><D:lockdiscovery/></D:prop>\n<D:status>HTTP/1.1 424 Failed Dependency</D:status>\n</D:propstat>\n");
            }
           
            response = new DAVResponse("An error occurred on another resource, preventing the requested operation on this resource.",
                    resource.getResourceURI().getRequestURI(), response, propStat, SC_FAILED_DEPENDANCY);
           
            throw new DAVException("Error(s) occurred on resources during the validation process.", SC_MULTISTATUS, 0, response);
        }
       
        if (exception != null) {
            exception.setResponse(response);
            throw exception;
        }
       
    }
View Full Code Here

    }
   
    protected SVNDeltaReader openStream(DAVResource resource, int mode) throws DAVException {
        if (mode == DAV_MODE_WRITE_TRUNC || mode == DAV_MODE_WRITE_SEEKABLE) {
            if (resource.getType() != DAVResourceType.WORKING) {
                throw new DAVException("Resource body changes may only be made to working resources [at this time].",
                        HttpServletResponse.SC_METHOD_NOT_ALLOWED, 0);
            }
        }
       
        if (mode == DAV_MODE_WRITE_SEEKABLE) {
            throw new DAVException("Resource body writes cannot use ranges [at this time].", HttpServletResponse.SC_NOT_IMPLEMENTED, 0);
        }
       
        String path = resource.getResourceURI().getPath();
        FSRoot root = resource.getRoot();
        FSFS fsfs = resource.getFSFS();
View Full Code Here

        return null;
    }
   
    protected void moveResource(DAVResource srcResource, DAVResource dstResource) throws DAVException {
        if (srcResource.getType() != DAVResourceType.REGULAR || dstResource.getType() != DAVResourceType.REGULAR || !getConfig().isAutoVersioning()) {
            throw new DAVException("MOVE only allowed on two public URIs, and autoversioning must be active.",
                    HttpServletResponse.SC_METHOD_NOT_ALLOWED, 0);
        }
       
        checkOut(dstResource, true, false, false, null);
        FSCommitter committer = getCommitter(dstResource.getFSFS(), dstResource.getRoot(), dstResource.getTxnInfo(), dstResource.getLockTokens(),
View Full Code Here

        checkIn(dstResource, false, false);
    }
   
    protected void copyResource(DAVResource srcResource, DAVResource dstResource) throws DAVException {
        if (dstResource.isBaseLined() && dstResource.getType() == DAVResourceType.VERSION) {
            throw new DAVException("Illegal: COPY Destination is a baseline.", HttpServletResponse.SC_PRECONDITION_FAILED, 0);
        }
        if (dstResource.getType() == DAVResourceType.REGULAR && !getConfig().isAutoVersioning()) {
            throw new DAVException("COPY called on regular resource, but autoversioning is not active.", HttpServletResponse.SC_METHOD_NOT_ALLOWED, 0);
        }
        if (dstResource.getType() == DAVResourceType.REGULAR) {
            checkOut(dstResource, true, false, false, null);
        }
       
        FSFS srcFSFS = srcResource.getFSFS();
        FSFS dstFSFS = dstResource.getFSFS();
        if (!srcFSFS.getDBRoot().equals(dstFSFS.getDBRoot())) {
            throw new DAVException("Copy source and destination are in different repositories.", null, HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                    null, SVNLogType.NETWORK, Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE, 0, null);
        }

        FSCommitter committer = getCommitter(dstResource.getFSFS(), dstResource.getRoot(), dstResource.getTxnInfo(), dstResource.getLockTokens(),
                dstResource.getUserName());
View Full Code Here

            if (resourceType == DAVResourceType.VERSION && resource.isBaseLined()) {
                return null;
            }
           
            if (resourceType != DAVResourceType.REGULAR) {
                throw new DAVException("auto-checkout attempted on non-regular version-controlled resource.", null,
                        HttpServletResponse.SC_METHOD_NOT_ALLOWED, null, SVNLogType.NETWORK, Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG,
                        DAVElement.SVN_DAV_ERROR_NAMESPACE, SVNErrorCode.UNSUPPORTED_FEATURE.getCode(), null);
            }
           
            if (resource.isBaseLined()) {
                new DAVException("auto-checkout attempted on baseline collection, which is not supported.", null,
                        HttpServletResponse.SC_METHOD_NOT_ALLOWED, null, SVNLogType.NETWORK, Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG,
                        DAVElement.SVN_DAV_ERROR_NAMESPACE, SVNErrorCode.UNSUPPORTED_FEATURE.getCode(), null);
            }
        
            String sharedActivity = DAVServlet.getSharedActivity();
            String sharedTxnName = null;
            FSTransactionInfo sharedTxnInfo = null;
            if (sharedActivity == null) {
                try {
                    sharedActivity = SVNUUIDGenerator.formatUUID(SVNUUIDGenerator.generateUUID());
                } catch (SVNException svne) {
                    throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                            "cannot generate UUID for a shared activity", null);
                }
               
                sharedTxnInfo = DAVServletUtil.createActivity(resource, fsfs);
                sharedTxnName = sharedTxnInfo.getTxnId();
                DAVServletUtil.storeActivity(resource, sharedTxnInfo.getTxnId());
                DAVServlet.setSharedActivity(sharedActivity);
            }
           
            if (sharedTxnName == null) {
                sharedTxnName = DAVServletUtil.getTxn(resource.getActivitiesDB(), sharedActivity);
                if (sharedTxnName == null) {
                    throw new DAVException("Cannot look up a txn_name by activity", null, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, null,
                            SVNLogType.NETWORK, Level.FINE, null, null, null, 0, null);
                }
            }
           
            resource = DAVWorkingResourceHelper.createWorkingResource(resource, sharedActivity, sharedTxnName, true);
            resource.setIsAutoCkeckedOut(true);
            FSTransactionInfo txnInfo = DAVServletUtil.openTxn(fsfs, resource.getTxnName());
            FSTransactionRoot txnRoot = null;
            try {
                txnRoot = fsfs.createTransactionRoot(txnInfo);
            } catch (SVNException svne) {
                throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                        "Could not open a (transaction) root in the repository", null);
            }
           
            resource.setTxnInfo(txnInfo);
            resource.setRoot(txnRoot);
            return null;
        }
       
        if (resourceType != DAVResourceType.VERSION) {
            throw new DAVException("CHECKOUT can only be performed on a version resource [at this time].", null,
                    HttpServletResponse.SC_METHOD_NOT_ALLOWED, null, SVNLogType.NETWORK, Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG,
                    DAVElement.SVN_DAV_ERROR_NAMESPACE, SVNErrorCode.UNSUPPORTED_FEATURE.getCode(), null);
        }
       
        if (isCreateActivity) {
            throw new DAVException("CHECKOUT can not create an activity at this time. Use MKACTIVITY first.", null,
                    HttpServletResponse.SC_NOT_IMPLEMENTED, null, SVNLogType.NETWORK, Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG,
                    DAVElement.SVN_DAV_ERROR_NAMESPACE, SVNErrorCode.UNSUPPORTED_FEATURE.getCode(), null);
        }
       
        if (isUnreserved) {
            throw new DAVException("Unreserved checkouts are not yet available. A version history may not be checked out more than once, into a specific activity.",
                    null, HttpServletResponse.SC_NOT_IMPLEMENTED, null, SVNLogType.NETWORK, Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG,
                    DAVElement.SVN_DAV_ERROR_NAMESPACE, SVNErrorCode.UNSUPPORTED_FEATURE.getCode(), null);
        }
       
        if (activities == null) {
            throw new DAVException("An activity must be provided for checkout.", null, HttpServletResponse.SC_CONFLICT, null, SVNLogType.NETWORK,
                    Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE, SVNErrorCode.INCOMPLETE_DATA.getCode(),
                    null);
        }
       
        if (activities.size() != 1) {
            throw new DAVException("Only one activity may be specified within the CHECKOUT.", null, HttpServletResponse.SC_CONFLICT, null,
                    SVNLogType.NETWORK, Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE,
                    SVNErrorCode.INCORRECT_PARAMS.getCode(), null);
        }
       
        DAVURIInfo parse = null;
       
        try {
            parse = DAVPathUtil.simpleParseURI((String) activities.get(0), resource);
        } catch (SVNException svne) {
            throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_CONFLICT, "The activity href could not be parsed properly.",
                    null);
        }
       
        if (parse.getActivityID() == null) {
            throw new DAVException("The provided href is not an activity URI.", null, HttpServletResponse.SC_CONFLICT, null, SVNLogType.NETWORK,
                    Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE, SVNErrorCode.INCORRECT_PARAMS.getCode(),
                    null);
        }
       
        String txnName = DAVServletUtil.getTxn(resource.getActivitiesDB(), parse.getActivityID());
        if (txnName == null) {
            throw new DAVException("The specified activity does not exist.", null, HttpServletResponse.SC_CONFLICT, null, SVNLogType.NETWORK,
                    Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE,
                    SVNErrorCode.APMOD_ACTIVITY_NOT_FOUND.getCode(), null);
        }
       
        if (resource.isBaseLined() || !SVNRevision.isValidRevisionNumber(resource.getRevision())) {
            long youngestRevision = -1;
            try {
                youngestRevision = fsfs.getYoungestRevision();
            } catch (SVNException svne) {
                throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                        "Could not determine the youngest revision for verification against the baseline being checked out.", null);
            }
           
            if (resource.getRevision() != youngestRevision) {
                throw new DAVException("The specified baseline is not the latest baseline, so it may not be checked out.", null,
                        HttpServletResponse.SC_CONFLICT, null, SVNLogType.NETWORK, Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG,
                        DAVElement.SVN_DAV_ERROR_NAMESPACE, SVNErrorCode.APMOD_BAD_BASELINE.getCode(), null);
            }
        } else {
            FSTransactionInfo txnInfo = DAVServletUtil.openTxn(fsfs, txnName);
            FSTransactionRoot txnRoot = null;
            String reposPath = resource.getResourceURI().getPath();
           
            try {
                txnRoot = fsfs.createTransactionRoot(txnInfo);
            } catch (SVNException svne) {
                throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                        "Could not open the transaction tree.", null);
            }
           
            long txnCreatedRevision = -1;
            try {
                FSRevisionNode node = txnRoot.getRevisionNode(reposPath);
                txnCreatedRevision = node.getCreatedRevision();
            } catch (SVNException svne) {
                throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                        "Could not get created-rev of transaction node.", null);
            }
           
            if (SVNRevision.isValidRevisionNumber(txnCreatedRevision)) {
                SVNDebugLog.getDefaultLog().logFine(SVNLogType.DEFAULT, "resource.getRevision(): " + resource.getRevision() + ", txnCreatedRevision: " + txnCreatedRevision);
                SVNDebugLog.getDefaultLog().logFine(SVNLogType.DEFAULT, "resource type: " + resource.getType());
                if (resource.getRevision() < txnCreatedRevision) {
                    throw new DAVException("resource out of date; try updating", null, HttpServletResponse.SC_CONFLICT, null, SVNLogType.NETWORK,
                            Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE,
                            SVNErrorCode.FS_CONFLICT.getCode(), null);
                } else if (resource.getRevision() > txnCreatedRevision) {
                    String txnNodeRevID = null;
                    try {
                        FSRevisionNode node = txnRoot.getRevisionNode(reposPath);
                        txnNodeRevID = node.getId().getNodeID();
                    } catch (SVNException svne) {
                        SVNErrorMessage err = svne.getErrorMessage();
                        throw new DAVException("Unable to fetch the node revision id of the version resource within the transaction.", null,
                                HttpServletResponse.SC_CONFLICT, err, SVNLogType.FSFS, Level.FINE, null,
                                DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE, err.getErrorCode().getCode(), null);
                    }
                   
                    String urlNodeRevID = null;
                    try {
                        FSRoot root = resource.getRoot();
                        FSRevisionNode node = root.getRevisionNode(reposPath);
                        urlNodeRevID = node.getId().getNodeID();
                    } catch (SVNException svne) {
                        SVNErrorMessage err = svne.getErrorMessage();
                        throw new DAVException("Unable to fetch the node revision id of the version resource within the revision.", null,
                                HttpServletResponse.SC_CONFLICT, err, SVNLogType.FSFS, Level.FINE, null,
                                DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE, err.getErrorCode().getCode(), null);
                    }
                   
                    if (!urlNodeRevID.equals(txnNodeRevID)) {
                        throw new DAVException("version resource newer than txn (restart the commit)", null, HttpServletResponse.SC_CONFLICT,
                                null, SVNLogType.NETWORK, Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE,
                                SVNErrorCode.FS_CONFLICT.getCode(), null);
                    }
                }
            }
View Full Code Here

        return DAVWorkingResourceHelper.createWorkingResource(resource, parse.getActivityID(), txnName, false);
    }

    protected DAVResource checkIn(DAVResource resource, boolean keepCheckedOut, boolean createVersionResource) throws DAVException {
        if (resource.getType() != DAVResourceType.WORKING) {
            throw new DAVException("CHECKIN called on non-working resource.", null, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, null,
                    SVNLogType.NETWORK, Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE,
                    SVNErrorCode.UNSUPPORTED_FEATURE.getCode(), null);
        }
       
        DAVResource versionResource = null;
        DAVResourceURI resourceURI = resource.getResourceURI();
        String sharedActivity = DAVServlet.getSharedActivity();
        if (sharedActivity != null && sharedActivity.equals(resource.getActivityID())) {
            String sharedTxnName = DAVServletUtil.getTxn(resource.getActivitiesDB(), sharedActivity);
            if (sharedTxnName == null) {
                throw new DAVException("Cannot look up a txn_name by activity", HttpServletResponse.SC_INTERNAL_SERVER_ERROR, 0);
            }
           
            if (resource.getTxnName() != null && !sharedTxnName.equals(resource.getTxnName())) {
                throw new DAVException("Internal txn_name doesn't match autoversioning transaction.", HttpServletResponse.SC_INTERNAL_SERVER_ERROR, 0);
            }
           
            if (resource.getTxnInfo() == null) {
                throw new DAVException("Autoversioning txn isn't open when it should be.", HttpServletResponse.SC_INTERNAL_SERVER_ERROR, 0);
            }
           
            DAVServletUtil.setAutoRevisionProperties(resource);
            FSCommitter committer = getCommitter(resource.getFSFS(), resource.getRoot(), resource.getTxnInfo(), resource.getLockTokens(),
                    resource.getUserName());
View Full Code Here

        return versionResource;
    }
   
    protected void uncheckOut(DAVResource resource) throws DAVException {
        if (resource.getType() != DAVResourceType.WORKING) {
            throw new DAVException("UNCHECKOUT called on non-working resource.", null, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, null,
                    SVNLogType.NETWORK, Level.FINE, null, DAVXMLUtil.SVN_DAV_ERROR_TAG, DAVElement.SVN_DAV_ERROR_NAMESPACE,
                    SVNErrorCode.UNSUPPORTED_FEATURE.getCode(), null);
        }
       
        FSTransactionInfo txnInfo = resource.getTxnInfo();
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.internal.server.dav.DAVException

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.