Examples of WebdavResource


Examples of org.apache.webdav.lib.WebdavResource

        // Setup Client Side

        HttpURL httpSandboxUrl = new HttpURL( "http://localhost:" + PORT + CONTEXT + "/sandbox/" );
        HttpURL httpSnapshotsUrl = new HttpURL( "http://localhost:" + PORT + CONTEXT + "/snapshots/" );

        davSandbox = new WebdavResource( httpSandboxUrl );
        davSnapshots = new WebdavResource( httpSnapshotsUrl );

        davSandbox.setDebug( 8 );
        davSnapshots.setDebug( 8 );

        davSandbox.setPath( CONTEXT + "/sandbox/" );
View Full Code Here

Examples of org.apache.webdav.lib.WebdavResource

            {
                return false;
            }

            //WebdavFile f = new WebdavFile(getURL(p2));
            WebdavResource f = getResource(p2);

            if(!f.exists() || !f.isCollection()) //!f.isDirectory() || !f.canRead())
            {
                Log.debug("Access denied.");

                return false;
            }
View Full Code Here

Examples of org.apache.webdav.lib.WebdavResource

            //System.out.println(", processPath 2: "+p);
            //WebdavFile f = new WebdavFile(getURL(p));
            Log.out("\n\n\nprocessPath URL: " + p);

            WebdavResource f = getResource(p);
            String p2 = p;

            if(f.exists() && f.isCollection())
            {
                try
                {
                    //p2 = f.toURL(); //CanonicalPath();
                    if(!p2.endsWith("/"))
View Full Code Here

Examples of org.apache.webdav.lib.WebdavResource

        try
        {
            Log.out("sortLs PWD: " + pwd);

            //WebdavFile fl = new WebdavFile(new URL(pwd), user, pass);
            WebdavResource fp = getResource(pwd);

            //new WebdavResource(getURL(pwd));
            //files = f.list();
            //File[] f = fl.listFiles();
            WebdavResource[] f = fp.listWebdavResources();

            //if(files == null) return new String[0];
            files = new String[f.length];
            size = new String[f.length];
            perms = new int[f.length];
View Full Code Here

Examples of org.apache.webdav.lib.WebdavResource

    }

    private WebdavResource getResource(String res)
                                throws HttpException, IOException
    {
        return new WebdavResource(getURL(res));
    }
View Full Code Here

Examples of org.apache.webdav.lib.WebdavResource

                Log.debug("Uploading " + file + " to " + resPath + " as " +
                          name);

                //HttpURL url = getURL(resPath);
                WebdavResource res = getResource(resPath);

                //new WebdavResource(url);

                /*
                if(res.checkinMethod()) Log.debug("Checkin OK");
                else Log.debug("Checkin FAILED");

                Enumeration e = res.getAllowedMethods();
                while(e != null && e.hasMoreElements())
                {
                        Log.debug("Method: " + e.nextElement().toString());
                }
                */
                if(res.putMethod(new File(file)))
                {
                    fireProgressUpdate(file, DataConnection.FINISHED, -1);
                }
                else
                {
View Full Code Here

Examples of org.apache.webdav.lib.WebdavResource

            HttpState state = new HttpState();
            state.setCredentials(null, new UsernamePasswordCredentials(
                    url.getUser(),
                    url.getPassword()));                      
            HttpConnection conn = new HttpConnection(url.getHost(), url.getPort());
            WebdavResource resource = new WebdavResource(new HttpURL(this.targetUrl));
            if(!resource.exists()) {
                throw new SAXException("The WebDAV resource don't exist");
            }
            optionsMethod.execute(state, conn);
            if(!optionsMethod.isAllowed("SEARCH")) {
                throw new SAXException("The server don't support the SEARCH method");
View Full Code Here

Examples of org.apache.webdav.lib.WebdavResource

                update = true;
            } else {
                depth = this.depth;
            }
            if (this.resource == null) {
                this.resource = new WebdavResource(this.url, action, depth);
            } else if (update) {
                this.resource.setProperties(action, depth);
            }
            if (this.action > WebdavResource.NOACTION) {
                if (this.resource.isCollection()) {
View Full Code Here

Examples of org.apache.webdav.lib.WebdavResource

    HttpClient client;
    try {
      final HttpURL url = new HttpURL(username, password, hostname, port, "/");

      // WebdavResource resource = null;
      WebdavResource resource = new WebdavResource() {
      };

      if (fileSystemOptions != null) {
        String proxyHost = WebdavFileSystemConfigBuilder.getInstance().getProxyHost(
            fileSystemOptions);
        int proxyPort = WebdavFileSystemConfigBuilder.getInstance().getProxyPort(
            fileSystemOptions);

        if (proxyHost != null && proxyPort > 0) {
          // resource = new WebdavResource(url, proxyHost, proxyPort);
          resource.setProxy(proxyHost, proxyPort);
        }
      }

      /*
       * if (resource == null) { resource = new WebdavResource(url); }
       * resource.setProperties(WebdavResource.NOACTION, 1);
       */
      resource.setHttpURL(url, WebdavResource.NOACTION, 1);

      client = resource.retrieveSessionInstance();
      HttpClientHandler handler = new HttpClientHandler();
      int httpClientVersion = handler.getHttpClientMajorVersion();
      if (httpClientVersion == 2) {
        // VFS only supports httpclient v2 for now...
        client.setHttpConnectionManager(new WebdavConnectionManager());
View Full Code Here

Examples of org.apache.webdav.lib.WebdavResource

                update = true;
            } else {
                depth = this.depth;
            }
            if (this.resource == null) {
                this.resource = new WebdavResource(this.url, action, depth);
            } else if (update) {
                this.resource.setProperties(action, depth);
            }
            if (this.action > WebdavResource.NOACTION) {
                if (this.resource.isCollection()) {
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.