001
014
015 package com.liferay.portlet.journal.search;
016
017 import com.liferay.portal.kernel.dao.search.SearchContainer;
018 import com.liferay.portlet.journal.model.JournalFeed;
019
020 import java.util.ArrayList;
021 import java.util.List;
022
023 import javax.portlet.PortletRequest;
024 import javax.portlet.PortletURL;
025
026
029 public class FeedSearch extends SearchContainer<JournalFeed> {
030
031 static List<String> headerNames = new ArrayList<String>();
032
033 static {
034 headerNames.add("id");
035 headerNames.add("description");
036 }
037
038 public static final String EMPTY_RESULTS_MESSAGE = "no-feeds-were-found";
039
040 public FeedSearch(PortletRequest portletRequest, PortletURL iteratorURL) {
041 super(
042 portletRequest, new FeedDisplayTerms(portletRequest),
043 new FeedSearchTerms(portletRequest), DEFAULT_CUR_PARAM,
044 DEFAULT_DELTA, iteratorURL, headerNames, EMPTY_RESULTS_MESSAGE);
045
046 FeedDisplayTerms displayTerms = (FeedDisplayTerms)getDisplayTerms();
047
048 iteratorURL.setParameter(
049 FeedDisplayTerms.DESCRIPTION, displayTerms.getDescription());
050 iteratorURL.setParameter(
051 FeedDisplayTerms.FEED_ID, displayTerms.getFeedId());
052 iteratorURL.setParameter(FeedDisplayTerms.NAME, displayTerms.getName());
053 iteratorURL.setParameter(
054 FeedDisplayTerms.GROUP_ID,
055 String.valueOf(displayTerms.getGroupId()));
056 }
057
058 }