001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.journal.search;
016    
017    import com.liferay.portal.kernel.dao.search.DisplayTerms;
018    import com.liferay.portal.kernel.util.ParamUtil;
019    import com.liferay.portal.theme.ThemeDisplay;
020    import com.liferay.portal.util.WebKeys;
021    
022    import javax.portlet.PortletRequest;
023    
024    /**
025     * @author Raymond Augé
026     */
027    public class FeedDisplayTerms extends DisplayTerms {
028    
029            public static final String DESCRIPTION = "description";
030    
031            public static final String FEED_ID = "searchFeedId";
032    
033            public static final String GROUP_ID = "groupId";
034    
035            public static final String NAME = "name";
036    
037            public FeedDisplayTerms(PortletRequest portletRequest) {
038                    super(portletRequest);
039    
040                    ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute(
041                            WebKeys.THEME_DISPLAY);
042    
043                    description = ParamUtil.getString(portletRequest, DESCRIPTION);
044                    feedId = ParamUtil.getString(portletRequest, FEED_ID);
045                    groupId = ParamUtil.getLong(
046                            portletRequest, GROUP_ID, themeDisplay.getScopeGroupId());
047                    name = ParamUtil.getString(portletRequest, NAME);
048            }
049    
050            public String getDescription() {
051                    return description;
052            }
053    
054            public String getFeedId() {
055                    return feedId;
056            }
057    
058            public long getGroupId() {
059                    return groupId;
060            }
061    
062            public String getName() {
063                    return name;
064            }
065    
066            protected String description;
067            protected String feedId;
068            protected long groupId;
069            protected String name;
070    
071    }