Package org.exoplatform.applications.ooplugin.client

Examples of org.exoplatform.applications.ooplugin.client.DavPropFind


      public void run()
      {
         try
         {
            DavPropFind davPropFind = new DavPropFind(config.getContext());
            davPropFind.setResourcePath(currentPath);
            davPropFind.setRequiredProperty(WebDavProp.DISPLAYNAME);
            davPropFind.setRequiredProperty(WebDavProp.RESOURCETYPE);
            davPropFind.setRequiredProperty(WebDavProp.GETLASTMODIFIED);
            davPropFind.setRequiredProperty(WebDavProp.GETCONTENTLENGTH);
            davPropFind.setRequiredProperty(WebDavProp.VERSIONNAME);
            davPropFind.setRequiredProperty(WebDavProp.COMMENT);
            davPropFind.setRequiredProperty(JCR_MIMETYPE, JCR_NAMESPACE);
            davPropFind.setDepth(1);

            int status;

            try
            {
               status = davPropFind.execute();
            }
            catch (TimeOutException exc)
            {
               davPropFind = new DavPropFind(config.getContext());
               davPropFind.setResourcePath(currentPath);
               davPropFind.setRequiredProperty(WebDavProp.DISPLAYNAME);
               davPropFind.setRequiredProperty(WebDavProp.RESOURCETYPE);
               davPropFind.setRequiredProperty(WebDavProp.GETLASTMODIFIED);
               davPropFind.setRequiredProperty(WebDavProp.GETCONTENTLENGTH);
               davPropFind.setRequiredProperty(WebDavProp.VERSIONNAME);
               davPropFind.setRequiredProperty(WebDavProp.COMMENT);
               davPropFind.setRequiredProperty(JCR_MIMETYPE, JCR_NAMESPACE);
               davPropFind.setDepth(1);
               status = davPropFind.execute();
            }

            String serverPrefix = config.getServerPrefix();
            String currentHref = serverPrefix + currentPath;

            if (status != HTTPStatus.MULTISTATUS)
            {
               showMessageBox("Can't open remote directory. ErrorCode: " + status);
               return;
            }

            Multistatus multistatus = davPropFind.getMultistatus();

            responses.clear();

            ArrayList<ResponseDoc> tmpResponses = multistatus.getResponses();
            for (int i = 0; i < tmpResponses.size(); i++)
View Full Code Here

TOP

Related Classes of org.exoplatform.applications.ooplugin.client.DavPropFind

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.