Package org.apache.jackrabbit.webdav.header

Examples of org.apache.jackrabbit.webdav.header.CodedUrlHeader


            }
            initMethod(method, sessionInfo);

            if (batchId != null) {
                // add batchId as separate header
                CodedUrlHeader ch = new CodedUrlHeader(TransactionConstants.HEADER_TRANSACTIONID, batchId);
                method.setRequestHeader(ch.getHeaderName(), ch.getHeaderValue());
            }

            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();
View Full Code Here


            }

            // create a new lock
            ActiveLock lock = resource.lock(lockInfo);

            CodedUrlHeader header = new CodedUrlHeader(
                    DavConstants.HEADER_LOCK_TOKEN, lock.getToken());
            response.setHeader(header.getHeaderName(), header.getHeaderValue());

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

     */
    public String getLockToken() {
        checkUsed();
        Header ltHeader = getResponseHeader(DavConstants.HEADER_LOCK_TOKEN);
        if (ltHeader != null) {
            CodedUrlHeader cuh = new CodedUrlHeader(DavConstants.HEADER_LOCK_TOKEN, ltHeader.getValue());
            return cuh.getCodedUrl();
        } else {
            // not Lock-Token header must be sent in response to a 'refresh'.
            // see the validation performed while processing the response.
            return null;
        }
View Full Code Here

    private static Logger log = LoggerFactory.getLogger(UnLockMethod.class);

    public UnLockMethod(String uri, String lockToken) {
        super(uri);
        Header lth = new CodedUrlHeader(DavConstants.HEADER_LOCK_TOKEN, lockToken);
        setRequestHeader(lth);
    }
View Full Code Here

            }

            // create a new lock
            ActiveLock lock = resource.lock(lockInfo);

            CodedUrlHeader header = new CodedUrlHeader(
                    DavConstants.HEADER_LOCK_TOKEN, lock.getToken());
            response.setHeader(header.getHeaderName(), header.getHeaderValue());

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

        if (subscriptionInfo == null) {
            throw new IllegalArgumentException("SubscriptionInfo must not be null.");
        }
        // optional subscriptionId (only required to modify an existing subscription)
        if (subscriptionId != null) {
           setRequestHeader(new CodedUrlHeader(HEADER_SUBSCRIPTIONID, subscriptionId));
        }
        // optional timeout header
        long to = subscriptionInfo.getTimeOut();
        if (to != DavConstants.UNDEFINED_TIMEOUT) {
            setRequestHeader(new TimeoutHeader(subscriptionInfo.getTimeOut()));
View Full Code Here

    public String getSubscriptionId() {
        checkUsed();
        Header sbHeader = getResponseHeader(HEADER_SUBSCRIPTIONID);
        if (sbHeader != null) {
            CodedUrlHeader cuh = new CodedUrlHeader(HEADER_SUBSCRIPTIONID, sbHeader.getValue());
            return cuh.getCodedUrl();
        }
        return null;
    }
View Full Code Here

     * @see org.apache.jackrabbit.webdav.observation.ObservationDavServletResponse#sendSubscriptionResponse(org.apache.jackrabbit.webdav.observation.Subscription)
     */
    public void sendSubscriptionResponse(Subscription subscription) throws IOException {
        String id = subscription.getSubscriptionId();
        if (id != null) {
            Header h = new CodedUrlHeader(ObservationConstants.HEADER_SUBSCRIPTIONID, id);
            httpResponse.setHeader(h.getHeaderName(), h.getHeaderValue());
        }
        DavPropertySet propSet = new DavPropertySet();
        propSet.add(new SubscriptionDiscovery(subscription));
        sendXmlResponse(propSet, SC_OK);
    }
View Full Code Here

    private static Logger log = LoggerFactory.getLogger(UnLockMethod.class);

    public UnLockMethod(String uri, String lockToken) {
        super(uri);
        Header lth = new CodedUrlHeader(DavConstants.HEADER_LOCK_TOKEN, lockToken);
        setRequestHeader(lth);
    }
View Full Code Here

        if (subscriptionInfo == null) {
            throw new IllegalArgumentException("SubscriptionInfo must not be null.");
        }
        // optional subscriptionId (only required to modify an existing subscription)
        if (subscriptionId != null) {
           setRequestHeader(new CodedUrlHeader(HEADER_SUBSCRIPTIONID, subscriptionId));
        }
        // optional timeout header
        long to = subscriptionInfo.getTimeOut();
        if (to != DavConstants.UNDEFINED_TIMEOUT) {
            setRequestHeader(new TimeoutHeader(subscriptionInfo.getTimeOut()));
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.webdav.header.CodedUrlHeader

Copyright © 2018 www.massapicom. 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.