001    /**
002     * Copyright (c) 2000-2012 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    
020    import javax.portlet.PortletRequest;
021    
022    /**
023     * @author Brian Wing Shun Chan
024     * @author Vilmos Papp
025     */
026    public class FileEntryDisplayTerms extends DisplayTerms {
027    
028            public static final String DOCUMENT = "document";
029    
030            public static final String DOWNLOADS = "downloads";
031    
032            public static final String LOCKED = "locked";
033    
034            public static final String SELECTED_GROUP_ID = "selectedGroupId";
035    
036            public static final String SIZE = "size";
037    
038            public FileEntryDisplayTerms(PortletRequest portletRequest) {
039                    super(portletRequest);
040    
041                    document = ParamUtil.getString(portletRequest, DOCUMENT);
042                    downloads = ParamUtil.getInteger(portletRequest, DOWNLOADS);
043                    keywords = ParamUtil.getString(portletRequest, DisplayTerms.KEYWORDS);
044                    locked = ParamUtil.getBoolean(portletRequest, LOCKED);
045                    selectedGroupId = ParamUtil.getLong(portletRequest, SELECTED_GROUP_ID);
046                    size = ParamUtil.getString(portletRequest, SIZE);
047            }
048    
049            public String getDocument() {
050                    return document;
051            }
052    
053            public int getDownloads() {
054                    return downloads;
055            }
056    
057            public long getSelectedGroupId() {
058                    return selectedGroupId;
059            }
060    
061            public String getSize() {
062                    return size;
063            }
064    
065            public boolean isLocked() {
066                    return locked;
067            }
068    
069            public void setSelectedGroupId(long selectedGroupId) {
070                    this.selectedGroupId = selectedGroupId;
071            }
072    
073            protected String document;
074            protected int downloads;
075            protected boolean locked;
076            protected long selectedGroupId;
077            protected String size;
078    
079    }