/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * The contents of this file are subject to the terms of the Liferay Enterprise
 * Subscription License ("License"). You may not use this file except in
 * compliance with the License. You can obtain a copy of the License by
 * contacting Liferay, Inc. See the License for the specific language governing
 * permissions and limitations under the License, including but not limited to
 * distribution rights of the Software.
 *
 *
 *
 */

package com.liferay.roles.item.selector.web.internal.organization.role;

import com.liferay.item.selector.ItemSelectorView;
import com.liferay.portal.kernel.model.role.RoleConstants;
import com.liferay.roles.item.selector.organization.role.OrganizationRoleItemSelectorCriterion;
import com.liferay.roles.item.selector.web.internal.BaseRoleItemSelectorView;

import java.util.Locale;

import org.osgi.service.component.annotations.Component;

/**
 * @author Roberto Díaz
 */
@Component(
	property = "item.selector.view.order:Integer=100",
	service = ItemSelectorView.class
)
public class OrganizationRoleItemSelectorView
	extends BaseRoleItemSelectorView<OrganizationRoleItemSelectorCriterion> {

	@Override
	public Class<OrganizationRoleItemSelectorCriterion>
		getItemSelectorCriterionClass() {

		return OrganizationRoleItemSelectorCriterion.class;
	}

	@Override
	public String getTitle(Locale locale) {
		return language.get(
			portal.getResourceBundle(locale), "organization-roles");
	}

	@Override
	public int getType() {
		return RoleConstants.TYPE_ORGANIZATION;
	}

}