package com.ejie.ad74a.util.constantes;

import java.util.Locale;

import org.springframework.context.i18n.LocaleContextHolder;

import com.ejie.ad74a.util.comun.Utilidades;

/**
 * Tipos de entrada
 */

public enum ActoresEnum {

	AUTOMATICO(1L, "avisos.actor.auto", "avisos.combos.auto"), //
	DSS(2L, "avisos.actor.DSS", "avisos.combos.dss"), //
	PS(3L, "avisos.actor.PS", "avisos.combos.ps"), //
	SSB(4L, "avisos.actor.SSB", "avisos.combos.ssb"), //
	ADMIN(99L, "avisos.actor.admin", "avisos.combos.admin"); //

	private ActoresEnum(Long id, String labelDesc, String sortDesc) {
		this.labelDesc = labelDesc;
		this.sortDesc = sortDesc;
		this.id = id;
	}

	private Long id;
	private String labelDesc;
	private String sortDesc;

	public Long getId() {
		return this.id;
	}

	public String getLabelDesc() {
		return Utilidades.getLabelFromResource(Constantes.BASENAME_RESOURCE_AD74A_I18N, this.labelDesc,
				LocaleContextHolder.getLocale());
	}

	public String getLabelDesc(Locale locale) {
		return Utilidades.getLabelFromResource(Constantes.BASENAME_RESOURCE_AD74A_I18N, this.labelDesc, locale);
	}

	public String getSortDesc() {
		return Utilidades.getLabelFromResource(Constantes.BASENAME_RESOURCE_AD74A_I18N, this.sortDesc,
				LocaleContextHolder.getLocale());
	}

	public String getSortDesc(Locale locale) {
		return Utilidades.getLabelFromResource(Constantes.BASENAME_RESOURCE_AD74A_I18N, this.sortDesc, locale);
	}

}
