001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
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    }