gpt4 book ai didi

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

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

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

WebdavRequest.getDavSession介绍

暂无

代码示例

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

private static Session getRepositorySession(WebdavRequest request) throws DavException {
  DavSession ds = request.getDavSession();
  return JcrDavSession.getRepositorySession(ds);
}

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

/**
 * Releases the reference from the request to the session. If no further
 * references to the session exist, the session will be removed from the
 * cache.
 *
 * @param request
 * @see DavSessionProvider#releaseSession(org.apache.jackrabbit.webdav.WebdavRequest)
 */
public void releaseSession(WebdavRequest request) {
  DavSession session = request.getDavSession();
  if (session != null) {
    session.removeReference(request);
  }
  // remove the session from the request
  request.setDavSession(null);
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-webdav-server

@Override
  public void releaseSession(WebdavRequest request)
  {
    DavSession ds = request.getDavSession();
    if (ds != null && ds instanceof XWikiDavSession) {
      XWikiDavSession session = (XWikiDavSession) ds;
      String[] lockTokens = session.getLockTokens();
      for (String token : lockTokens) {
        session.removeLockToken(token);
      }
    } else {
      // session is null. nothing to be done.
    }
    request.setDavSession(null);
  }
}

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

public void releaseSession(WebdavRequest request) {
  ConfluenceDavSession confluenceDavSession = (ConfluenceDavSession) request.getDavSession();
  if (null != confluenceDavSession) {
    confluenceDavSession.setCurrentlyBeingUsed(false);
    /* To update the session map cache - Modified cached objects need to be put-back. */
    setConfluenceDavSessionIntoSessionMap(confluenceDavSession);
  }
  AuthenticatedUserThreadLocal.setUser(null);
  request.setDavSession(null);
}

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

/**
   * Only removes the <code>DavSession</code> object from the given request object.
   * and remove all the lock tokens from the underlying repository session
   * in order make sure they can be reset when attaching a session to the
   * next request. Finally the session provider is informed, that the
   * session is no longer used.
   *
   * @param request
   * @see DavSessionProvider#releaseSession(org.apache.jackrabbit.webdav.WebdavRequest)
   */
  public void releaseSession(WebdavRequest request) {
    DavSession ds = request.getDavSession();
    if (ds != null && ds instanceof DavSessionImpl) {
      Session repSession = ((DavSessionImpl)ds).getRepositorySession();
      for (String lockToken : repSession.getLockTokens()) {
        repSession.removeLockToken(lockToken);
      }
      sesProvider.releaseSession(repSession);
      log.debug("Releasing session '"+ ds + "' from request '" + request + "'");
    } // else : session is null. nothing to be done.
    request.setDavSession(null);
  }
}

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

Session repositorySesssion = JcrDavSession.getRepositorySession(request.getDavSession());
String reqWspName = resource.getLocator().getWorkspaceName();
String wsName = repositorySesssion.getWorkspace().getName();

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