001    /**
002     * Copyright (c) 2000-2010 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.assetpublisher.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 Julio Camarero
025     */
026    public class AssetDisplayTerms extends DisplayTerms {
027    
028            public static final String DESCRIPTION = "description";
029    
030            public static final String GROUP_ID = "groupId";
031    
032            public static final String TITLE = "title";
033    
034            public static final String USER_NAME = "user-name";
035    
036            public AssetDisplayTerms(PortletRequest portletRequest) {
037                    super(portletRequest);
038    
039                    description = ParamUtil.getString(portletRequest, DESCRIPTION);
040                    groupId = ParamUtil.getLong(portletRequest, GROUP_ID);
041                    title = ParamUtil.getString(portletRequest, TITLE);
042                    userName = ParamUtil.getString(portletRequest, USER_NAME);
043            }
044    
045            public String getDescription() {
046                    return description;
047            }
048    
049            public long getGroupId() {
050                    return groupId;
051            }
052    
053            public String getTitle() {
054                    return title;
055            }
056    
057            public String getUserName() {
058                    return userName;
059            }
060    
061            protected String description;
062            protected long groupId;
063            protected String title;
064            protected String userName;
065    
066    }