Examples of DavSession


Examples of org.apache.jackrabbit.webdav.DavSession

            if ((lockToken != null || txId != null) && subscriptionId != null) {
                throw new DavException(DavServletResponse.SC_PRECONDITION_FAILED, "Ambiguous headers: either TransactionId/Lock-Token or SubscriptionId can be present, not both.");
            }

            DavSession session = null;
            // try to retrieve a cached session
            if (lockToken != null && containsReference(lockToken)) {
                session = getSessionByReference(lockToken);
            } else if (txId != null && containsReference(txId)) {
                session = getSessionByReference(txId);
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavSession

     * @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;
    }
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavSession

     *
     * @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);
    }
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavSession

            Session repSession = sesProvider.getSession(request, repository, workspaceName);
            if (repSession == null) {
                log.debug("Could not to retrieve a repository session.");
                return false;
            }
            DavSession ds = new DavSessionImpl(repSession);
            log.debug("Attaching session '"+ ds + "' to request '" + request + "'");
            request.setDavSession(ds);
            return true;
        } catch (NoSuchWorkspaceException e) {
            // the default error-code for NoSuchWorkspaceException is 409 conflict
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavSession

     *
     * @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();
            String[] lockTokens = repSession.getLockTokens();
            for (int i = 0; i < lockTokens.length; i++) {
                repSession.removeLockToken(lockTokens[i]);
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavSession

        }
        if (info.getDepth() > DavConstants.DEPTH_0) {
            throw new DavException(DavServletResponse.SC_BAD_REQUEST, "Invalid Depth header: " + info.getDepth());
        }

        DavSession davSession = resource.getSession();
        if (davSession == null) {
            throw new DavException(DavServletResponse.SC_BAD_REQUEST, "The resource must provide a non-null session object in order to create '" + getType().getReportName()+ "' report.");
        }
        session = JcrDavSession.getRepositorySession(resource.getSession());
        if (session == null) {
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavSession

            Session repSession = sesProvider.getSession(request, repository, workspaceName);
            if (repSession == null) {
                log.debug("Could not to retrieve a repository session.");
                return false;
            }
            DavSession ds = new DavSessionImpl(repSession);
            log.debug("Attaching session '"+ ds + "' to request '" + request + "'");
            request.setDavSession(ds);
            return true;
        } catch (NoSuchWorkspaceException e) {
            // the default error-code for NoSuchWorkspaceException is 409 conflict
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavSession

     *
     * @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);
            }
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavSession

     * @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;
    }
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavSession

     *
     * @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);
    }
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.