Examples of DAVResponse


Examples of org.apache.xindice.webadmin.webdav.DAVResponse

    protected Database db;
    protected Collection collection;

    public void setUp() throws Exception {
        request = new DAVRequest(httpRequest);
        response = new DAVResponse(httpResponse);

        db = Database.getDatabase(new Configuration(DOMParser.toDocument(DatabaseTest.DATABASE)));

        String name = "webdav_test";
        collection = db.createCollection(name, new Configuration(
View Full Code Here

Examples of org.apache.xindice.webadmin.webdav.DAVResponse

                }
                response.setStatus(WebdavStatus.SC_NOT_IMPLEMENTED);
                return;
            }

            m.execute(new DAVRequest(request), new DAVResponse(response), target);
            return;
        }

        // HTML requests are all the rest
        Collection col = target.getCollection();
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.server.dav.handlers.DAVResponse

   * @param servletResponse response
   * @throws IOException occurs when IO has problem
   */
  public static void handleError(DAVException error, HttpServletResponse servletResponse) throws IOException {
    SVNDebugLog.getDefaultLog().logFine(SVNLogType.NETWORK, error);
    DAVResponse response = error.getResponse();
    if (response == null) {
      DAVException stackErr = error;
      while (stackErr != null && stackErr.getTagName() == null) {
        stackErr = stackErr.getPreviousException();
      }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.server.dav.handlers.DAVResponse

        SVNDebugLog.getDefaultLog().logFine(SVNLogType.NETWORK, logBuffer.toString());
    }
   
    public static void handleError(DAVException error, HttpServletResponse servletResponse) throws IOException {
        SVNDebugLog.getDefaultLog().logFine(SVNLogType.NETWORK, error);
        DAVResponse response = error.getResponse();
        if (response == null) {
            DAVException stackErr = error;
            while (stackErr != null && stackErr.getTagName() == null) {
                stackErr = stackErr.getPreviousException();
            }
View Full Code Here

Examples of org.w3c.www.webdav.xml.DAVResponse

    DAVNode.exportChildren(doc, dms.getNode(), odms, true);
      } catch (DOMException ex) {
    ex.printStackTrace();
      }
  } else {
      DAVResponse dr  = null;
      if (msg != null) {
    dr = DAVFactory.createResponse(url, status, msg, doc);
      } else {
    dr = DAVFactory.createResponse(url, status, doc);
      }
View Full Code Here

Examples of org.w3c.www.webdav.xml.DAVResponse

    props = getProperties(request, document);
      } else {
    DAVProperties dp = dpf.getProperties();
//    props = getProperties(request, document, dp);
    DAVPropStat[] dps = getPropStat(request, document, dp);
    DAVResponse dr = DAVFactory.createResponse(
//        getURL(request).toExternalForm(),
        getURL(request).getFile(),
        document);
    for (int i=0; i< dps.length; i++) {
        dr.addDAVNode(dps[i]);
    }
    return dr;
      }
  } else { // default is all property values
      props = getProperties(request, document);
View Full Code Here

Examples of org.w3c.www.webdav.xml.DAVResponse

      if (df != null) {
          v.addElement(df.getResponse(request,
              dpf,
              document));
          if (deep && (fr instanceof ContainerResource)) {
        DAVResponse responses[] =
            df.getChildResponses(request,
               dpf,
               document,
               deep);
        if (responses != null) {
            int len = responses.length;
            for (int i = 0 ; i < len ; i++) {
          v.addElement(responses[i]);
            }
        }
          }
      } else {
          // what should I do there?
      }
        } catch (InvalidResourceException ex) {
      // build error response?
        } finally {
      rr.unlock();
        }
    }
      }
      DAVResponse responses[] = new DAVResponse[v.size()];
      v.copyInto(responses);
      return responses;
  }
  return null;
    }
View Full Code Here

Examples of org.w3c.www.webdav.xml.DAVResponse

  Document       document =
      DAVBody.createDocument(DAVNode.MULTISTATUS_NODE);
  DAVMultiStatus dms      =
      DAVFactory.createMultiStatus(document.getDocumentElement());
  DAVPropFind propfind    = null;
  DAVResponse dr          = null;
  if (body != null) {
      propfind = body.getPropFind();
  }
  switch (depth)
      {
View Full Code Here

Examples of org.w3c.www.webdav.xml.DAVResponse

  // prepare undo
  Object oldvalues[] = this.values;
  DAVBody        body     = getBody(request);
  Document       document =
      DAVBody.createDocument(DAVNode.MULTISTATUS_NODE);
  DAVResponse dr =
      DAVFactory.createResponse(getURL(request).getFile(),
                                                    //toExternalForm(),
              document);
  // attach the response to the document
  document.getDocumentElement().appendChild(dr.getNode());

  if (body != null) {
      DAVPropertyUpdate dpu = body.getPropertyUpdate();
      if (dpu != null) {
    DAVPropAction dpas[] = dpu.getActions();
    DAVPropStat   dps    = null;
    int len = dpas.length;
    try {
        for (int i = 0 ; i < len ; i++) {
      DAVPropAction dpa = dpas[i];
      switch (dpa.getAction())
          {
          case DAVPropAction.SET:
        dps = setDAVProperties(
                   dpa.getProperties(),
                   document);
        break;
          case DAVPropAction.REMOVE:
        dps = removeDAVProperties(
                dpa.getProperties(),
                document);
        break;
          default:
        // error
        Reply error =
            request.makeReply(HTTP.BAD_REQUEST);
        error.setContent("Invalid request");
        throw new HTTPException (error);
          }
      if (dps != null) {
          dr.addDAVNode(dps);
      }
        }
        saveDeadProperties();
    } catch (DAVPropertyException ex) {
        // stop all an undo change
        reloadDeadProperties();
        this.values = oldvalues;
        // report error
        DAVPropStat dpss[] = (DAVPropStat[])ex.getReason();
        for (int j = 0 ; j < dpss.length ; j++) {
      dr.addDAVNode(dpss[j]);
        }
        dr.setDescription(ex.getMessage());
    }
    return createDAVReply(request,
              WEBDAV.MULTI_STATUS,
              document);
      }
View Full Code Here

Examples of org.w3c.www.webdav.xml.DAVResponse

      URL source,
      URL destination,
      DAVBody body)
  throws MultiStatusException
    {
  DAVResponse dr = null;
  org.w3c.www.protocol.webdav.DAVRequest request = null;
  org.w3c.www.protocol.webdav.DAVReply   reply   = null;
  // perform the PUT request to send the body.
  // headers
  Hashtable headers = new Hashtable();
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.