Package org.apache.roller.weblogger.ui.rendering.pagers

Examples of org.apache.roller.weblogger.ui.rendering.pagers.SearchResultsFeedPager


                feedRequest.getFormat(), null, null, /* cat and term are null but added to the url in the pager */
                null, false, true);
       
        // if there is no query, then we are done
        if(feedRequest.getTerm() == null) {
            pager = new SearchResultsFeedPager(urlStrategy, pagerUrl, feedRequest.getPage(),
                    feedRequest, results, false);
            return;
        }
       
        this.entryCount = WebloggerRuntimeConfig.getIntProperty("site.newsfeeds.defaultEntries");
       
        // setup the search
        IndexManager indexMgr = WebloggerFactory.getWeblogger().getIndexManager();
       
        SearchOperation search = new SearchOperation(indexMgr);
        search.setTerm(feedRequest.getTerm());
       
        if(WebloggerRuntimeConfig.isSiteWideWeblog(feedRequest.getWeblogHandle())) {
            this.websiteSpecificSearch  = false;
        } else {
            search.setWebsiteHandle(feedRequest.getWeblogHandle());
        }
       
        if(StringUtils.isNotEmpty(feedRequest.getWeblogCategoryName())) {
            search.setCategory(feedRequest.getWeblogCategoryName());
        }
       
        // execute search
        indexMgr.executeIndexOperationNow(search);
       
        if (search.getResultsCount() > -1) {
            Hits hits = search.getResults();
            this.hits = search.getResultsCount();
           
            // Convert the Hits into WeblogEntryData instances.
            convertHitsToEntries(hits);
        }
       
        // search completed, setup pager based on results
        pager = new SearchResultsFeedPager(urlStrategy, pagerUrl, feedRequest.getPage(),
                feedRequest, results, (hits > (offset+limit)));
    }
View Full Code Here


                feedRequest.getFormat(), null, null, /* cat and term are null but added to the url in the pager */
                null, false, true);
       
        // if there is no query, then we are done
        if(feedRequest.getTerm() == null) {
            pager = new SearchResultsFeedPager(urlStrategy, pagerUrl, feedRequest.getPage(),
                    feedRequest, results, false);
            return;
        }
       
        this.entryCount = WebloggerRuntimeConfig.getIntProperty("site.newsfeeds.defaultEntries");
       
        // setup the search
        IndexManager indexMgr = WebloggerFactory.getWeblogger().getIndexManager();
       
        SearchOperation search = new SearchOperation(indexMgr);
        search.setTerm(feedRequest.getTerm());
       
        if(WebloggerRuntimeConfig.isSiteWideWeblog(feedRequest.getWeblogHandle())) {
            this.websiteSpecificSearch  = false;
        } else {
            search.setWebsiteHandle(feedRequest.getWeblogHandle());
        }
       
        if(StringUtils.isNotEmpty(feedRequest.getWeblogCategoryName())) {
            search.setCategory(feedRequest.getWeblogCategoryName());
        }
       
        // execute search
        indexMgr.executeIndexOperationNow(search);
       
        if (search.getResultsCount() > -1) {
            Hits hits = search.getResults();
            this.hits = search.getResultsCount();
           
            // Convert the Hits into WeblogEntryData instances.
            convertHitsToEntries(hits);
        }
       
        // search completed, setup pager based on results
        pager = new SearchResultsFeedPager(urlStrategy, pagerUrl, feedRequest.getPage(),
                feedRequest, results, (hits > (offset+limit)));
    }
View Full Code Here

                feedRequest.getFormat(), null, null, /* cat and term are null but added to the url in the pager */
                null, false, true);
       
        // if there is no query, then we are done
        if(feedRequest.getTerm() == null) {
            pager = new SearchResultsFeedPager(urlStrategy, pagerUrl, feedRequest.getPage(),
                    feedRequest, results, false);
            return;
        }
       
        this.entryCount = WebloggerRuntimeConfig.getIntProperty("site.newsfeeds.defaultEntries");
       
        // setup the search
        IndexManager indexMgr = WebloggerFactory.getWeblogger().getIndexManager();
       
        SearchOperation search = new SearchOperation(indexMgr);
        search.setTerm(feedRequest.getTerm());
       
        if(WebloggerRuntimeConfig.isSiteWideWeblog(feedRequest.getWeblogHandle())) {
            this.websiteSpecificSearch  = false;
        } else {
            search.setWebsiteHandle(feedRequest.getWeblogHandle());
        }
       
        if(StringUtils.isNotEmpty(feedRequest.getWeblogCategoryName())) {
            search.setCategory(feedRequest.getWeblogCategoryName());
        }
       
        // execute search
        indexMgr.executeIndexOperationNow(search);
       
        if (search.getResultsCount() > -1) {
            Hits hits = search.getResults();
            this.hits = search.getResultsCount();
           
            // Convert the Hits into WeblogEntryData instances.
            convertHitsToEntries(hits);
        }
       
        // search completed, setup pager based on results
        pager = new SearchResultsFeedPager(urlStrategy, pagerUrl, feedRequest.getPage(),
                feedRequest, results, (hits > (offset+limit)));
    }
View Full Code Here

TOP

Related Classes of org.apache.roller.weblogger.ui.rendering.pagers.SearchResultsFeedPager

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.