Package org.apache.abdera.ext.opensearch.server

Examples of org.apache.abdera.ext.opensearch.server.OpenSearchUrlInfo


    private OpenSearchInfo openSearchInfo;

    public ResponseContext process(final RequestContext requestContext, final WorkspaceManager workspaceManager, final CollectionAdapter collectionAdapter) {
        String method = requestContext.getMethod();
        if (method.equalsIgnoreCase("GET")) {
            OpenSearchUrlInfo urlInfo = this.getMatchingUrlInfo(requestContext);
            if (urlInfo != null) {
                OpenSearchUrlAdapter adapter = urlInfo.getOpenSearchUrlAdapter();
                if (adapter != null) {
                    Map<String, String> params = this.getUrlParametersFromRequest(requestContext, urlInfo);
                    return adapter.search(requestContext, params);
                } else {
                    return ProviderHelper.notfound(requestContext);
View Full Code Here


        this.openSearchInfo = openSearchInfo;
    }

    private OpenSearchUrlInfo getMatchingUrlInfo(RequestContext request) {
        String targetSearchPath = this.stripSlashes(request.getTargetPath().substring(0, request.getTargetPath().indexOf("?")));
        OpenSearchUrlInfo result = null;
        for (OpenSearchUrlInfo urlInfo : this.openSearchInfo.getUrls()) {
            String searchPath = this.stripSlashes(urlInfo.getSearchPath());
            if (searchPath.equals(targetSearchPath)) {
                result = urlInfo;
                break;
View Full Code Here

    public ResponseContext process(final RequestContext requestContext,
                                   final WorkspaceManager workspaceManager,
                                   final CollectionAdapter collectionAdapter) {
        String method = requestContext.getMethod();
        if (method.equalsIgnoreCase("GET")) {
            OpenSearchUrlInfo urlInfo = this.getMatchingUrlInfo(requestContext);
            if (urlInfo != null) {
                OpenSearchUrlAdapter adapter = urlInfo.getOpenSearchUrlAdapter();
                if (adapter != null) {
                    Map<String, String> params = this.getUrlParametersFromRequest(requestContext, urlInfo);
                    return adapter.search(requestContext, params);
                } else {
                    return ProviderHelper.notfound(requestContext);
View Full Code Here

    }

    private OpenSearchUrlInfo getMatchingUrlInfo(RequestContext request) {
        String targetSearchPath =
            this.stripSlashes(request.getTargetPath().substring(0, request.getTargetPath().indexOf("?")));
        OpenSearchUrlInfo result = null;
        for (OpenSearchUrlInfo urlInfo : this.openSearchInfo.getUrls()) {
            String searchPath = this.stripSlashes(urlInfo.getSearchPath());
            if (searchPath.equals(targetSearchPath)) {
                result = urlInfo;
                break;
View Full Code Here

TOP

Related Classes of org.apache.abdera.ext.opensearch.server.OpenSearchUrlInfo

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.