gpt4 book ai didi

org.apache.jackrabbit.webdav.WebdavRequest.getDepth()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 06:11:05 25 4
gpt4 key购买 nike

本文整理了Java中org.apache.jackrabbit.webdav.WebdavRequest.getDepth()方法的一些代码示例,展示了WebdavRequest.getDepth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebdavRequest.getDepth()方法的具体详情如下:
包路径:org.apache.jackrabbit.webdav.WebdavRequest
类名称:WebdavRequest
方法名:getDepth

WebdavRequest.getDepth介绍

暂无

代码示例

代码示例来源:origin: com.atlassian.confluence.extra.webdav/webdav-plugin

httpServletRequest.getHeader(WebdavConstants.HEADER_DESTINATION),
      webdavRequest.isOverwrite(),
      webdavRequest.getDepth(DavConstants.DEPTH_INFINITY) == DavConstants.DEPTH_0);
case DavMethods.DAV_PROPFIND:
  return new PropFindMethod(
      targetUri,
      webdavRequest.getPropFindProperties(),
      webdavRequest.getDepth(DavConstants.DEPTH_INFINITY)
  );
case DavMethods.DAV_DELETE:

代码示例来源:origin: org.apache.jackrabbit/jackrabbit-webdav

/**
 * The PROPFIND method
 *
 * @param request
 * @param response
 * @param resource
 * @throws IOException
 */
protected void doPropFind(WebdavRequest request, WebdavResponse response,
             DavResource resource) throws IOException, DavException {
  if (!resource.exists()) {
    response.sendError(DavServletResponse.SC_NOT_FOUND);
    return;
  }
  int depth = request.getDepth(DEPTH_INFINITY);
  DavPropertyNameSet requestProperties = request.getPropFindProperties();
  int propfindType = request.getPropFindType();
  MultiStatus mstatus = new MultiStatus();
  mstatus.addResourceProperties(resource, requestProperties, propfindType, depth);
  response.sendMultiStatus(mstatus);
}

代码示例来源:origin: apache/jackrabbit

/**
 * The PROPFIND method
 *
 * @param request
 * @param response
 * @param resource
 * @throws IOException
 */
protected void doPropFind(WebdavRequest request, WebdavResponse response,
             DavResource resource) throws IOException, DavException {
  if (!resource.exists()) {
    response.sendError(DavServletResponse.SC_NOT_FOUND);
    return;
  }
  int depth = request.getDepth(DEPTH_INFINITY);
  DavPropertyNameSet requestProperties = request.getPropFindProperties();
  int propfindType = request.getPropFindType();
  MultiStatus mstatus = new MultiStatus();
  mstatus.addResourceProperties(resource, requestProperties, propfindType, depth);
  response.sendMultiStatus(mstatus);
}

代码示例来源:origin: org.apache.jackrabbit/jackrabbit-webdav

/**
 * The COPY method
 *
 * @param request
 * @param response
 * @param resource
 * @throws IOException
 * @throws DavException
 */
protected void doCopy(WebdavRequest request, WebdavResponse response,
           DavResource resource) throws IOException, DavException {
  // only depth 0 and infinity is allowed
  int depth = request.getDepth(DEPTH_INFINITY);
  if (!(depth == DEPTH_0 || depth == DEPTH_INFINITY)) {
    response.sendError(DavServletResponse.SC_BAD_REQUEST);
    return;
  }
  DavResource destResource = getResourceFactory().createResource(request.getDestinationLocator(), request, response);
  int status = validateDestination(destResource, request, true);
  if (status > DavServletResponse.SC_NO_CONTENT) {
    response.sendError(status);
    return;
  }
  resource.copy(destResource, depth == DEPTH_0);
  response.setStatus(status);
}

代码示例来源:origin: apache/jackrabbit

/**
 * The COPY method
 *
 * @param request
 * @param response
 * @param resource
 * @throws IOException
 * @throws DavException
 */
protected void doCopy(WebdavRequest request, WebdavResponse response,
           DavResource resource) throws IOException, DavException {
  // only depth 0 and infinity is allowed
  int depth = request.getDepth(DEPTH_INFINITY);
  if (!(depth == DEPTH_0 || depth == DEPTH_INFINITY)) {
    response.sendError(DavServletResponse.SC_BAD_REQUEST);
    return;
  }
  DavResource destResource = getResourceFactory().createResource(request.getDestinationLocator(), request, response);
  int status = validateDestination(destResource, request, true);
  if (status > DavServletResponse.SC_NO_CONTENT) {
    response.sendError(status);
    return;
  }
  resource.copy(destResource, depth == DEPTH_0);
  response.setStatus(status);
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com