Examples of IfHeader


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

     * @param factory
     */
    public WebdavRequestImpl(HttpServletRequest httpRequest, DavLocatorFactory factory) {
        this.httpRequest = httpRequest;
        this.factory = factory;
        this.ifHeader = new IfHeader(httpRequest);

        String host = getHeader("Host");
        String scheme = getScheme();
        hrefPrefix = scheme + "://" + host + getContextPath();
    }
View Full Code Here

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

                session = getSessionByReference(subscriptionId);
            }

            if (session == null) {
                // try tokens present in the if-header
                IfHeader ifHeader = new IfHeader(request);
                for (Iterator it = ifHeader.getAllTokens(); it.hasNext();) {
                    String token = it.next().toString();
                    if (containsReference(token)) {
                        session = getSessionByReference(token);
                        break;
                    }
View Full Code Here

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

                method = new PostMethod(uri);
                // ship lock-tokens as if-header to circumvent problems with
                // locks created by this session.
                String[] locktokens = sessionInfo.getLockTokens();
                if (locktokens != null && locktokens.length > 0) {
                    IfHeader ifH = new IfHeader(locktokens);
                    method.setRequestHeader(ifH.getHeaderName(), ifH.getHeaderValue());
                }
            }
        }
View Full Code Here

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

            checkSessionInfo(sessionInfo);
            Set<String> allLockTokens = ((SessionInfoImpl) sessionInfo).getAllLockTokens();
            // TODO: ev. build tagged if header
            if (!allLockTokens.isEmpty()) {
                String[] locktokens = allLockTokens.toArray(new String[allLockTokens.size()]);
                IfHeader ifH = new IfHeader(locktokens);
                method.setRequestHeader(ifH.getHeaderName(), ifH.getHeaderValue());
            }
        }
       
        initMethod(method, sessionInfo);
    }
View Full Code Here

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

     * @param factory
     */
    public WebdavRequestImpl(HttpServletRequest httpRequest, DavLocatorFactory factory) {
        this.httpRequest = httpRequest;
        this.factory = factory;
        this.ifHeader = new IfHeader(httpRequest);

        String host = getHeader("Host");
        String scheme = getScheme();
        hrefPrefix = scheme + "://" + host + getContextPath();
    }
View Full Code Here

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

     * @param factory
     */
    public WebdavRequestImpl(HttpServletRequest httpRequest, DavLocatorFactory factory) {
        this.httpRequest = httpRequest;
        this.factory = factory;
        this.ifHeader = new IfHeader(httpRequest);

        String host = getHeader("Host");
        String scheme = getScheme();
        hrefPrefix = scheme + "://" + host + getContextPath();
    }
View Full Code Here

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

     * @param createAbsoluteURI defines if we must create a absolute URI. if false a absolute path will be created
     */
    public WebdavRequestImpl(HttpServletRequest httpRequest, DavLocatorFactory factory, boolean createAbsoluteURI) {
        this.httpRequest = httpRequest;
        this.factory = factory;
        this.ifHeader = new IfHeader(httpRequest);

        String host = getHeader("Host");
        String scheme = getScheme();
        String uriPrefix = scheme + "://" + host + getContextPath();
        this.hrefPrefix = createAbsoluteURI ? uriPrefix : getContextPath();
View Full Code Here

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

                session = getSessionByReference(subscriptionId);
            }

            if (session == null) {
                // try tokens present in the if-header
                IfHeader ifHeader = new IfHeader(request);
                for (Iterator it = ifHeader.getAllTokens(); it.hasNext();) {
                    String token = it.next().toString();
                    if (containsReference(token)) {
                        session = getSessionByReference(token);
                        break;
                    }
View Full Code Here

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

    private static void addIfHeader(SessionInfo sInfo, HttpMethod method) {
        try {
            String[] locktokens = sInfo.getLockTokens();
            if (locktokens != null && locktokens.length > 0) {
                IfHeader ifH = new IfHeader(locktokens);
                method.setRequestHeader(ifH.getHeaderName(), ifH.getHeaderValue());
            }
        } catch (RepositoryException e) {
            // should never get here
            log.error("Unable to retrieve lock tokens: omitted from request header.");
        }
View Full Code Here

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

                method = new PostMethod(uri);
                // ship lock-tokens as if-header to cirvumvent problems with
                // locks created by this session.
                String[] locktokens = sessionInfo.getLockTokens();
                if (locktokens != null && locktokens.length > 0) {
                    IfHeader ifH = new IfHeader(locktokens);
                    method.setRequestHeader(ifH.getHeaderName(), ifH.getHeaderValue());
                }
            }
        }
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.