gpt4 book ai didi

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

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

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

WebdavRequest.setDavSession介绍

暂无

代码示例

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

public void releaseSession( WebdavRequest request )
{
  request.setDavSession( null );
}

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

@Override
public void releaseSession( WebdavRequest request )
{
  request.setDavSession( null );
}

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

/**
 * Acquires a DavSession either from the session cache or creates a new
 * one by login to the repository.
 * Upon success, the WebdavRequest will reference that session.
 *
 * @param request
 * @throws DavException if no session could be obtained.
 * @see DavSessionProvider#attachSession(org.apache.jackrabbit.webdav.WebdavRequest)
 */
public boolean attachSession(WebdavRequest request)
  throws DavException {
  DavSession session = cache.get(request);
  request.setDavSession(session);
  return true;
}

代码示例来源: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 boolean attachSession(WebdavRequest request) throws DavException
{
  // Retrieve the workspace name.
  String workspaceName = request.getRequestLocator().getWorkspaceName();
  // Empty workspaceName rather means default (null).
  if (workspaceName != null && "".equals(workspaceName)) {
    workspaceName = null;
  }
  DavSession ds = new XWikiDavSession();
  request.setDavSession(ds);
  return true;
}

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

public boolean attachSession( WebdavRequest request )
  throws DavException
{
  if ( !isAuthorized( request ) )
  {
    throw new DavException( HttpServletResponse.SC_UNAUTHORIZED );
  }
  request.setDavSession( new ContinuumBuildAgentDavSession() );
  return true;
}

代码示例来源: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

request.setDavSession(ds);
  return true;
} catch (NoSuchWorkspaceException e) {

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

public boolean attachSession(WebdavRequest request) throws DavException {
  ConfluenceDavSession confluenceDavSession = getConfluenceDavSession(request);
  if (null == confluenceDavSession) {
    log.debug("Looks like this request is not authenticated. We'll try to authenticate our user now.");
    confluenceDavSession = authenticate(request);
  }
  confluenceDavSession.setUserAgent(request.getHeader(WebdavConstants.HEADER_USER_AGENT));
  confluenceDavSession.updateActivityTimestamp();
  confluenceDavSession.setCurrentlyBeingUsed(true);
  setConfluenceDavSessionIntoSessionMap(confluenceDavSession);
  setConfluenceDavSessionIntoHttpSession(request, confluenceDavSession);
  request.setDavSession(confluenceDavSession);
  AuthenticatedUserThreadLocal.setUser(userAccessor.getUser(confluenceDavSession.getUserName()));
  return true;
}

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

request.setDavSession( new ArchivaDavSession() );
                  WebdavMethodUtil.getMethodPermission( request.getMethod() ) ) )
    request.setDavSession( new ArchivaDavSession() );
    return true;

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