Examples of Lockdiscovery


Examples of org.apache.jackrabbit.webdav.lock.LockDiscovery

    public void sendLockResponse(ActiveLock lock) throws IOException {
        CodedUrlHeader ltHeader = new CodedUrlHeader(DavConstants.HEADER_LOCK_TOKEN, lock.getToken());
        httpResponse.setHeader(ltHeader.getHeaderName(), ltHeader.getHeaderValue());

        DavPropertySet propSet = new DavPropertySet();
        propSet.add(new LockDiscovery(lock));
        sendXmlResponse(propSet, SC_OK);
    }
View Full Code Here

Examples of org.apache.jackrabbit.webdav.lock.LockDiscovery

     * @throws java.io.IOException
     * @see DavServletResponse#sendRefreshLockResponse(org.apache.jackrabbit.webdav.lock.ActiveLock[])
     */
    public void sendRefreshLockResponse(ActiveLock[] locks) throws IOException {
        DavPropertySet propSet = new DavPropertySet();
        propSet.add(new LockDiscovery(locks));
        sendXmlResponse(propSet, SC_OK);
    }
View Full Code Here

Examples of org.apache.jackrabbit.webdav.lock.LockDiscovery

            }

            DavPropertySet ps = responses[0].getProperties(DavServletResponse.SC_OK);
            if (ps.contains(DavPropertyName.LOCKDISCOVERY)) {
                DavProperty p = ps.get(DavPropertyName.LOCKDISCOVERY);
                LockDiscovery ld = LockDiscovery.createFromXml(p.toXml(domFactory));
                NodeId parentId = getParentId(ps, sessionInfo);
                return retrieveLockInfo(ld, sessionInfo, nodeId, parentId);
            else {
                // no lock present
                log.debug("No Lock present on node with id " + saveGetIdString(nodeId, sessionInfo));
View Full Code Here

Examples of org.apache.jackrabbit.webdav.lock.LockDiscovery

            execute(method, sessionInfo);

            String lockToken = method.getLockToken();
            ((SessionInfoImpl) sessionInfo).addLockToken(lockToken, sessionScoped);

            LockDiscovery disc = method.getResponseAsLockDiscovery();
            return retrieveLockInfo(disc, sessionInfo, nodeId, null);
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
View Full Code Here

Examples of org.apache.jackrabbit.webdav.lock.LockDiscovery

            }

            DavPropertySet ps = responses[0].getProperties(DavServletResponse.SC_OK);
            if (ps.contains(DavPropertyName.LOCKDISCOVERY)) {
                DavProperty<?> p = ps.get(DavPropertyName.LOCKDISCOVERY);
                LockDiscovery ld = LockDiscovery.createFromXml(p.toXml(DomUtil.createDocument()));
                NodeId parentId = getParentId(uri, ps, sessionInfo);
                return retrieveLockInfo(ld, sessionInfo, nodeId, parentId);
            else {
                // no lock present
                log.debug("No Lock present on node with id " + saveGetIdString(nodeId, sessionInfo));
View Full Code Here

Examples of org.apache.jackrabbit.webdav.lock.LockDiscovery

            execute(method, sessionInfo);

            String lockToken = method.getLockToken();
            ((SessionInfoImpl) sessionInfo).addLockToken(lockToken, sessionScoped);

            LockDiscovery disc = method.getResponseAsLockDiscovery();
            return retrieveLockInfo(disc, sessionInfo, nodeId, null);
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
View Full Code Here

Examples of org.apache.jackrabbit.webdav.lock.LockDiscovery

        // supported lock property
        properties.add(supportedLock);

        // set current lock information. If no lock is applied to this resource,
        // an empty xlockdiscovery will be returned in the response.
        properties.add(new LockDiscovery(getLocks()));

        // name of the jcr workspace
        properties.add(new DefaultDavProperty<String>(ItemResourceConstants.JCR_WORKSPACE_NAME,
                getRepositorySession().getWorkspace().getName()));
    }
View Full Code Here

Examples of org.apache.wink.webdav.model.Lockdiscovery

        activelock.setOwner(lockinfo.getOwner());
        // set infinite timeout
        activelock.setTimeout(LOCK_TIMEOUT);
        // a lock token is not necessary for MS compatibility

        Lockdiscovery lockdiscovery = new Lockdiscovery();
        lockdiscovery.getActivelock().add(activelock);
        Prop prop = new Prop();
        prop.setLockdiscovery(lockdiscovery);

        Response response =
            RuntimeDelegate.getInstance().createResponseBuilder().entity(prop).build();
View Full Code Here

Examples of org.apache.wink.webdav.model.Lockdiscovery

        }
        if (sourceProp.getGetlastmodified() != null) {
            provider.setPropertyValue(this, response, new Getlastmodified(), synd);
        }
        if (sourceProp.getLockdiscovery() != null) {
            provider.setPropertyValue(this, response, new Lockdiscovery(), synd);
        }
        if (sourceProp.getResourcetype() != null) {
            provider.setPropertyValue(this, response, new Resourcetype(), synd);
        }
        if (sourceProp.getSupportedlock() != null) {
View Full Code Here

Examples of org.apache.wink.webdav.model.Lockdiscovery

        }
        if (sourceProp.getGetlastmodified() != null) {
            provider.setPropertyValue(this, response, new Getlastmodified(), synd);
        }
        if (sourceProp.getLockdiscovery() != null) {
            provider.setPropertyValue(this, response, new Lockdiscovery(), synd);
        }
        if (sourceProp.getResourcetype() != null) {
            provider.setPropertyValue(this, response, new Resourcetype(), synd);
        }
        if (sourceProp.getSupportedlock() != 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.