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

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


    testUserRoot.mkdirs();
    CompressionUtils.unzip(new ClassPathResource("TEST_USER.zip").getFile(), testUserRoot);
    testUserRoot.deleteOnExit();
    MockServletConfig servletConfig = new MockServletConfig();
    servletConfig.addInitParameter("SVNParentPath", testUserRoot.getAbsolutePath());
    DAVConfig davConfig = new DAVConfig(servletConfig);
    svnController.setDAVConfig(davConfig);
  }
View Full Code Here


  @PostConstruct
  public void init() {
    initParam.put("SVNParentPath", config.getHome().getRepoDirectoryRoot().getAbsolutePath());
    FSRepositoryFactory.setup();
    try {
      myDAVConfig = new DAVConfig(getServletConfig());
    } catch (SVNException e) {
      myDAVConfig = null;
    }
  }
View Full Code Here

       
        DAVDepth depth = getRequestDepth(DAVDepth.DEPTH_INFINITY);
        //TODO: check the depth is not less than 0; if it is, send BAD_REQUEST
       
        if (depth == DAVDepth.DEPTH_INFINITY && resource.isCollection()) {
            DAVConfig config = getConfig();
            if (!config.isAllowDepthInfinity()) {
                String message = "PROPFIND requests with a Depth of \"infinity\" are not allowed for " +
                    SVNEncodingUtil.xmlEncodeCDATA(getURI()) + ".";
                response(message, DAVServlet.getStatusLine(HttpServletResponse.SC_FORBIDDEN), HttpServletResponse.SC_FORBIDDEN);
                return;
            }
View Full Code Here

    }

    private void saveValue(DAVElement propName, SVNPropertyValue value) throws DAVException {
        String reposPropName = getReposPropName(propName);
        if (reposPropName == null) {
            DAVConfig config = myResource.getRepositoryManager().getDAVConfig();
            if (config.isAutoVersioning()) {
                reposPropName = propName.getName();
            } else {
                throw new DAVException("Properties may only be defined in the {0} and {1} namespaces.",
                        new Object[] { DAVElement.SVN_SVN_PROPERTY_NAMESPACE, DAVElement.SVN_CUSTOM_PROPERTY_NAMESPACE },
                        HttpServletResponse.SC_CONFLICT, 0);
View Full Code Here

        DAVResourceType resourceType = uri.getType();
        if (resourceType != DAVResourceType.REGULAR && resourceType != DAVResourceType.WORKING && resourceType != DAVResourceType.ACTIVITY) {
            throw new DAVException("DELETE called on invalid resource type.", HttpServletResponse.SC_METHOD_NOT_ALLOWED, 0);
        }
       
        DAVConfig config = getConfig();
        if (resourceType == DAVResourceType.REGULAR && !config.isAutoVersioning()) {
            throw new DAVException("DELETE called on regular resource, but autoversioning is not active.",
                    HttpServletResponse.SC_METHOD_NOT_ALLOWED, 0);
        }
       
        if (resourceType == DAVResourceType.ACTIVITY) {
View Full Code Here

        FSFS fsfs = resource.getFSFS();
        String path = resource.getResourceURI().getPath();
        if (!resource.exists()) {
            SVNProperties revisionProps = new SVNProperties();
            revisionProps.put(SVNRevisionProperty.AUTHOR, resource.getUserName());
            DAVConfig config = resource.getRepositoryManager().getDAVConfig();
            if (resource.isSVNClient()) {
                throw new DAVException("Subversion clients may not lock nonexistent paths.", HttpServletResponse.SC_METHOD_NOT_ALLOWED,
                        DAVErrorCode.LOCK_SAVE_LOCK);
            } else if (!config.isAutoVersioning()) {
                throw new DAVException("Attempted to lock non-existent path; turn on autoversioning first.",
                        HttpServletResponse.SC_METHOD_NOT_ALLOWED, DAVErrorCode.LOCK_SAVE_LOCK);
            }
           
            long youngestRev = SVNRepository.INVALID_REVISION;
View Full Code Here

TOP

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

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.