001
014
015 package com.liferay.portlet.rolesadmin.search;
016
017 import com.liferay.portal.kernel.dao.search.DAOParamUtil;
018 import com.liferay.portal.kernel.util.ParamUtil;
019 import com.liferay.portal.model.RoleConstants;
020
021 import javax.portlet.PortletRequest;
022
023
026 public class RoleSearchTerms extends RoleDisplayTerms {
027
028 public RoleSearchTerms(PortletRequest portletRequest) {
029 super(portletRequest);
030
031 description = DAOParamUtil.getString(portletRequest, DESCRIPTION);
032 name = DAOParamUtil.getString(portletRequest, NAME);
033 type = ParamUtil.getInteger(portletRequest, TYPE);
034 }
035
036 public Integer[] getTypesObj() {
037 if ((type == RoleConstants.TYPE_ORGANIZATION) ||
038 (type == RoleConstants.TYPE_REGULAR) ||
039 (type == RoleConstants.TYPE_SITE)) {
040
041 return new Integer[] {type};
042 }
043 else {
044 return new Integer[0];
045 }
046 }
047
048 }