Package org.apache.jackrabbit.webdav.client.methods

Examples of org.apache.jackrabbit.webdav.client.methods.SearchMethod


    /**
     * @see RepositoryService#executeQuery(SessionInfo, String, String,java.util.Map,long,long,java.util.Map
     */
    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language, Map<String, String> namespaces, long limit, long offset, Map<String, QValue> values) throws RepositoryException {
        SearchMethod method = null;
        try {
            String uri = uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName());
            SearchInfo sInfo = new SearchInfo(language,
                    Namespace.EMPTY_NAMESPACE, statement, namespaces);

            if (limit != -1) {
                sInfo.setNumberResults(limit);
            }
            if (offset != -1) {
                sInfo.setOffset(offset);
            }

            if (!(values == null || values.isEmpty())) {
                throw new UnsupportedOperationException("Implementation missing:  JCR-2107");
            }

            method = new SearchMethod(uri, sInfo);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatus ms = method.getResponseBodyAsMultiStatus();
            NamePathResolver resolver = getNamePathResolver(sessionInfo);
            return new QueryInfoImpl(ms, idFactory, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
        finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
    }
View Full Code Here


    /**
     * @see RepositoryService#executeQuery(SessionInfo, String, String,java.util.Map,long,long,java.util.Map
     */
    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language, Map<String, String> namespaces, long limit, long offset, Map<String, QValue> values) throws RepositoryException {
        SearchMethod method = null;
        try {
            String uri = uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName());
            SearchInfo sInfo = new SearchInfo(language,
                    Namespace.EMPTY_NAMESPACE, statement, namespaces);

            if (limit != -1) {
                sInfo.setNumberResults(limit);
            }
            if (offset != -1) {
                sInfo.setOffset(offset);
            }

            if (!(values == null || values.isEmpty())) {
                throw new UnsupportedOperationException("Implementation missing:  JCR-2107");
            }

            method = new SearchMethod(uri, sInfo);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatus ms = method.getResponseBodyAsMultiStatus();
            NamePathResolver resolver = getNamePathResolver(sessionInfo);
            return new QueryInfoImpl(ms, idFactory, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
        finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
    }
View Full Code Here

    /**
     * @see RepositoryService#executeQuery(SessionInfo, String, String,java.util.Map,long,long,java.util.Map
     */
    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language, Map<String, String> namespaces, long limit, long offset, Map<String, QValue> values) throws RepositoryException {
        SearchMethod method = null;
        try {
            String uri = uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName());
            SearchInfo sInfo = new SearchInfo(language,
                    Namespace.EMPTY_NAMESPACE, statement, namespaces);

            if (limit != -1) {
                sInfo.setNumberResults(limit);
            }
            if (offset != -1) {
                sInfo.setOffset(offset);
            }

            if (!(values == null || values.isEmpty())) {
                throw new UnsupportedOperationException("Implementation missing:  JCR-2107");
            }

            method = new SearchMethod(uri, sInfo);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatus ms = method.getResponseBodyAsMultiStatus();
            NamePathResolver resolver = getNamePathResolver(sessionInfo);
            return new QueryInfoImpl(ms, idFactory, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
        finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
    }
View Full Code Here

    /**
     * @see RepositoryService#executeQuery(SessionInfo, String, String,java.util.Map,long,long,java.util.Map
     */
    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language, Map<String, String> namespaces, long limit, long offset, Map<String, QValue> values) throws RepositoryException {
        SearchMethod method = null;
        try {
            String uri = uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName());
            SearchInfo sInfo = new SearchInfo(language,
                    Namespace.EMPTY_NAMESPACE, statement, namespaces);

            if (limit != -1) {
                sInfo.setNumberResults(limit);
            }
            if (offset != -1) {
                sInfo.setOffset(offset);
            }

            if (!(values == null || values.isEmpty())) {
                throw new UnsupportedOperationException("Implementation missing:  JCR-2107");
            }

            method = new SearchMethod(uri, sInfo);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatus ms = method.getResponseBodyAsMultiStatus();
            NamePathResolver resolver = getNamePathResolver(sessionInfo);
            return new QueryInfoImpl(ms, idFactory, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
        finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
    }
View Full Code Here

    /**
     * @see RepositoryService#executeQuery(SessionInfo, String, String,java.util.Map,long,long,java.util.Map
     */
    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language, Map<String, String> namespaces, long limit, long offset, Map<String, QValue> values) throws RepositoryException {
        SearchMethod method = null;
        try {
            String uri = uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName());
            SearchInfo sInfo = new SearchInfo(language,
                    Namespace.EMPTY_NAMESPACE, statement, namespaces);

            if (limit != -1) {
                sInfo.setNumberResults(limit);
            }
            if (offset != -1) {
                sInfo.setOffset(offset);
            }

            if (!(values == null || values.isEmpty())) {
                throw new UnsupportedOperationException("Implementation missing:  JCR-2107");
            }

            method = new SearchMethod(uri, sInfo);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatus ms = method.getResponseBodyAsMultiStatus();
            NamePathResolver resolver = getNamePathResolver(sessionInfo);
            return new QueryInfoImpl(ms, idFactory, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
        finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
    }
View Full Code Here

    /**
     * @see RepositoryService#executeQuery(SessionInfo, String, String,java.util.Map,long,long,java.util.Map
     */
    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language, Map<String, String> namespaces, long limit, long offset, Map<String, QValue> values) throws RepositoryException {
        SearchMethod method = null;
        try {
            String uri = uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName());
            SearchInfo sInfo = new SearchInfo(
                    language, ItemResourceConstants.NAMESPACE,
                    statement, namespaces);

            if (limit != -1) {
                sInfo.setNumberResults(limit);
            }
            if (offset != -1) {
                sInfo.setOffset(offset);
            }

            if (!(values == null || values.isEmpty())) {
                throw new UnsupportedOperationException("Implementation missing:  JCR-2107");
            }

            method = new SearchMethod(uri, sInfo);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatus ms = method.getResponseBodyAsMultiStatus();
            NamePathResolver resolver = getNamePathResolver(sessionInfo);
            return new QueryInfoImpl(ms, idFactory, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
        finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
    }
View Full Code Here

    /**
     * @see RepositoryService#executeQuery(SessionInfo, String, String,java.util.Map,long,long,java.util.Map
     */
    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language, Map<String, String> namespaces, long limit, long offset, Map<String, QValue> values) throws RepositoryException {
        SearchMethod method = null;
        try {
            String uri = uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName());
            SearchInfo sInfo = new SearchInfo(
                    language, ItemResourceConstants.NAMESPACE,
                    statement, namespaces);

            if (limit != -1) {
                sInfo.setNumberResults(limit);
            }
            if (offset != -1) {
                sInfo.setOffset(offset);
            }

            if (!(values == null || values.isEmpty())) {
                throw new UnsupportedOperationException("Implementation missing:  JCR-2107");
            }

            method = new SearchMethod(uri, sInfo);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatus ms = method.getResponseBodyAsMultiStatus();
            NamePathResolver resolver = getNamePathResolver(sessionInfo);
            return new QueryInfoImpl(ms, idFactory, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
        finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
    }
View Full Code Here

    /**
     * @see RepositoryService#executeQuery(SessionInfo, String, String,java.util.Map,long,long,java.util.Map
     */
    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language, Map<String, String> namespaces, long limit, long offset, Map<String, QValue> values) throws RepositoryException {
        SearchMethod method = null;
        try {
            String uri = uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName());
            SearchInfo sInfo = new SearchInfo(
                    language, ItemResourceConstants.NAMESPACE,
                    statement, namespaces);

            if (limit != -1) {
                sInfo.setNumberResults(limit);
            }
            if (offset != -1) {
                sInfo.setOffset(offset);
            }

            if (!(values == null || values.isEmpty())) {
                throw new UnsupportedOperationException("Implementation missing:  JCR-2107");
            }

            method = new SearchMethod(uri, sInfo);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatus ms = method.getResponseBodyAsMultiStatus();
            NamePathResolver resolver = getNamePathResolver(sessionInfo);
            return new QueryInfoImpl(ms, idFactory, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
        finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
    }
View Full Code Here

    /**
     * @see RepositoryService#executeQuery(SessionInfo, String, String, Map)
     */
    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language, Map namespaces) throws RepositoryException {
        SearchMethod method = null;
        try {
            String uri = uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName());
            SearchInfo sInfo = new SearchInfo(language,
                    Namespace.EMPTY_NAMESPACE, statement, namespaces);
            method = new SearchMethod(uri, sInfo);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatus ms = method.getResponseBodyAsMultiStatus();
            NamePathResolver resolver = getNamePathResolver(sessionInfo);
            return new QueryInfoImpl(ms, sessionInfo, uriResolver, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
        finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
    }
View Full Code Here

    /**
     * @see RepositoryService#executeQuery(SessionInfo, String, String,java.util.Map,long,long,java.util.Map
     */
    public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language, Map namespaces, long limit, long offset, Map<String, QValue> values) throws RepositoryException {
        SearchMethod method = null;
        try {
            String uri = uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName());
            SearchInfo sInfo = new SearchInfo(language,
                    Namespace.EMPTY_NAMESPACE, statement, namespaces);
           
            sInfo.setNumberResults(limit);
            sInfo.setOffset(offset);

            if (!(values == null || values.isEmpty())) {
                throw new UnsupportedOperationException("Implementation missing:  JCR-2107");
            }

            method = new SearchMethod(uri, sInfo);
            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();

            MultiStatus ms = method.getResponseBodyAsMultiStatus();
            NamePathResolver resolver = getNamePathResolver(sessionInfo);
            return new QueryInfoImpl(ms, sessionInfo, uriResolver, resolver, valueFactory, getQValueFactory());
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
        finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.webdav.client.methods.SearchMethod

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.