package com.ejie.ab61.comun;

import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

import com.ejie.ab61.comun.utilidades.config.Config;
import com.ejie.x38.util.Constants;

public class Constantes {

	/**
	 * 
	 */
	private Constantes() {

	}

	public static final String FICHERO_CONFIGURACION = "/ab61/ab61.properties";
	public static final String CODIGO_APLICACION = "ab61";

	public static final int MAGIC_NUMBER_0 = 0;
	public static final int MAGIC_NUMBER_1 = 1;
	public static final int MAGIC_NUMBER_2 = 2;
	public static final int MAGIC_NUMBER_3 = 3;
	public static final int MAGIC_NUMBER_4 = 4;
	public static final int MAGIC_NUMBER_5 = 5;
	public static final int MAGIC_NUMBER_6 = 6;
	public static final int MAGIC_NUMBER_7 = 7;
	public static final int MAGIC_NUMBER_8 = 8;
	public static final int MAGIC_NUMBER_9 = 9;
	public static final int MAGIC_NUMBER_10 = 10;
	public static final int MAGIC_NUMBER_11 = 11;
	public static final int MAGIC_NUMBER_12 = 12;
	public static final int MAGIC_NUMBER_13 = 13;
	public static final int MAGIC_NUMBER_14 = 14;
	public static final int MAGIC_NUMBER_15 = 15;
	public static final int MAGIC_NUMBER_16 = 16;
	public static final int MAGIC_NUMBER_17 = 17;
	public static final int MAGIC_NUMBER_19 = 19;
	public static final int MAGIC_NUMBER_20 = 20;
	public static final int MAGIC_NUMBER_21 = 21;
	public static final int MAGIC_NUMBER_22 = 22;
	public static final int MAGIC_NUMBER_23 = 23;
	public static final int MAGIC_NUMBER_24 = 24;
	public static final int MAGIC_NUMBER_25 = 25;
	public static final int MAGIC_NUMBER_26 = 26;
	public static final int MAGIC_NUMBER_28 = 28;
	public static final int MAGIC_NUMBER_29 = 29;
	public static final int MAGIC_NUMBER_30 = 30;
	public static final int MAGIC_NUMBER_31 = 31;
	public static final int MAGIC_NUMBER_33 = 33;
	public static final int MAGIC_NUMBER_40 = 40;
	public static final int MAGIC_NUMBER_43 = 43;
	public static final int MAGIC_NUMBER_47 = 47;
	public static final int MAGIC_NUMBER_48 = 48;
	public static final int MAGIC_NUMBER_50 = 50;
	public static final int MAGIC_NUMBER_60 = 60;
	public static final int MAGIC_NUMBER_73 = 73;
	public static final int MAGIC_NUMBER_76 = 76;
	public static final int MAGIC_NUMBER_80 = 80;
	public static final int MAGIC_NUMBER_90 = 90;
	public static final int MAGIC_NUMBER_100 = 100;
	public static final int MAGIC_NUMBER_107 = 107;
	public static final int MAGIC_NUMBER_110 = 110;
	public static final int MAGIC_NUMBER_145 = 145;
	public static final int MAGIC_NUMBER_146 = 146;
	public static final int MAGIC_NUMBER_182 = 182;
	public static final int MAGIC_NUMBER_200 = 200;
	public static final int MAGIC_NUMBER_230 = 230;
	public static final int MAGIC_NUMBER_249 = 249;
	public static final int MAGIC_NUMBER_250 = 250;
	public static final int MAGIC_NUMBER_277 = 277;
	public static final int MAGIC_NUMBER_365 = 365;
	public static final int MAGIC_NUMBER_366 = 366;
	public static final int MAGIC_NUMBER_400 = 400;
	public static final int MAGIC_NUMBER_500 = 500;
	public static final int MAGIC_NUMBER_1000 = 1000;
	public static final int MAGIC_NUMBER_1900 = 1900;
	public static final int MAGIC_NUMBER_3000 = 3000;
	public static final int MAGIC_NUMBER_16384 = 16384;
	public static final int MAGIC_NUMBER_65536 = 65536;

	/** StringBuilder initilization value */
	public static final int STRING_BUILDER_INIT = 4096;

	/** CONSTANTES PARA TRATAMIENTO DE MENSAJES RECIBIDOS EN LA COLA */
	public static final String MESG_LIST_BD = "messageListBD";
	public static final String CAT_TIPOLOGY = "categoryTipology";
	public static final String TASKID = "taskID";
	public static final String MESG_CUID = "messageGUID";
	public static final String TIPOLOGY_TRA = "TRAMITACION";
	public static final String NAME = "Name";
	public static final String VALUE = "Value";
	public static final String DELIVERED_INFO = "DeliveredNotificationInfo";
	public static final String EVENT_WHAT = "EventWhat";
	public static final String FOLDER_ID = "folderID";
	public static final String FOLDER_NUMBER = "folderNumber";
	public static final String SOLICITUD_ID = "solicitudID";
	public static final String FECHA_REGISTRO = "registryTimestamp";
	public static final String PROCEDURE_ID = "ProcedureID";
	public static final String DO_TIMESTAMP = "doTimestamp";
	public static final String REGISTRY_TIMESTAMP = "registryTimestamp";
	public static final String PLATEA_TYPE = "PlateaType";
	public static final String PLATEA_SUBTYPE = "PlateaSubType";
	public static final String STATUS = "Status";
	public static final String TASK_ID = "taskID";
	public static final String PLATEA_TYPE_APERTURA = "APERTURA";
	public static final String PLATEA_TYPE_ESTDOCU = "ESTDOCU";
	public static final String PLATEA_STATUS_APERTURA_FINALIZADA = "4";
	public static final String PLATEA_STATUS_APERTURA_SUGERIDA = "1";
	public static final String PLATEA_TYPE_NOTIFICACION = "NOTIFICACION";
	public static final String PLATEA_TYPE_COMUNICACION = "COMUNICACION";
	public static final String PLATEA_TYPE_RECINOTI = "RECINOTI";
	public static final String PLATEA_TYPE_GENERICA = "GENERICA";
	public static final String PLATEA_TYPE_CERREXP = "CERREXP";
	public static final String PLATEA_TYPE_APORTELEMATICA = "APORTELEMATICA";
	public static final String PLATEA_TYPE_APORPRESENCIAL = "APORPRESENCIAL";
	public static final String TASK_ID_APERTURA = "APERTURA";
	public static final String TASK_ID_estudio = "estudio";
	public static final String TASK_ID_creanoti_subsana = "creanoti_subsana";
	public static final String TASK_ID_acusenotificacion_subsana_telematica = "acusenotificacion_subsana_telematica";
	public static final String TASK_ID_creanoti_resol_fav = "creanoti_resol_fav";
	public static final String TASK_ID_creanoti_resol_den = "creanoti_resol_den";
	public static final String TASK_ID_comunicacion_resol = "comunicacion_resol";
	public static final String TASK_ID_acusenotificacion_resol_fav_telematica = "acusenotificacion_resol_fav_telematica";
	public static final String TASK_ID_acusenotificacion_resol_den_telematica = "acusenotificacion_resol_den_telematica";
	public static final String TASK_ID_creanoti_resolucion_modificacion = "creanoti_resolucion_modificacion";
	public static final String TASK_ID_creanoti_resolucion_rev_total = "creanoti_resolucion_rev_total";
	public static final String TASK_ID_creanoti_resolucion_rev_parcial = "creanoti_resolucion_rev_parcial";
	public static final String TASK_ID_reintegro = "reintegro";
	public static final String TASK_ID_creanoti_renuncia = "creanoti_renuncia";
	public static final String TASK_ID_creanoti_desistimiento = "creanoti_desistimiento";
	public static final String TASK_ID_cierre = "cierre";
	public static final String TASK_ID_creanoti_recurso_den = "creanoti_recurso_den";
	public static final String ESTUDIO_situacionID = "situacionID";
	public static final String ESTUDIO_situacionID_estudiotecnico = "Estudio Técnico/Ikasketa Teknikoa";

	public static final String PLATEA_SUBTYPE_JUSTIFICACION = "17";
	public static final String PLATEA_SUBTYPE_SUBSANACION = "4";
	public static final String ACCION_TELEMATICA_OID = "oid";
	public static final String INSTANCEID = "instanceId";

	/** TIPOS DE EVENTOS */
	public static final String R02_REQUEST = "R02_REQUEST";
	public static final String R02_TASK = "R02_TASK";
	public static final String R02_NOTIFICATION = "R02_NOTIFICATION";
	public static final String OFICIO_PLATEATYPE = "INIOFICIO";
	public static final String ACCIONESTELEMATICAS_PLATEATYPE = "APORTELEMATICA";
	public static final String R02_SIGN = "R02_SIGN";

	public static final String CODIGO_APLICACION_TAREAS_TRAMITACION = "r02g";

	public static class Language {
		public static final String CASTELLANO = "ES";
		public static final String EUSKERA = "EU";

	}

	public static class Idioma {
		public static int CASTELLANO = 0;
		public static int EUSKERA = 1;

	}

	/* Tipos de personas */
	public static final String TITULAR = "TITULAR";
	public static final String PARTICIPACIONID_NULA = "0";
	public static final Locale ES_LOCALE = new Locale(Constants.CASTELLANO);
	public static final Locale EU_LOCALE = new Locale(Constants.EUSKARA);

	public static final String ES_STR = "es";
	public static final String EU_STR = "eu";

	public static final String AUDIT_USER = "ab61#ab61#ab61";

	public static final Long TIPO_CANAL_AVISO_SMS = new Long(1);
	public static final Long TIPO_CANAL_AVISO_EMAIL = new Long(2);

	public static final String PIF_TIEMPO_EXISTENCIA = CargarPropiedades.getConfigAplicacion("PIF.TIEMPO");
	public static final String PIF_PATH = CargarPropiedades.getConfigAplicacion("PIF.PATH");
	public static final String PIF_CARPETA_PID = "w43df";

	public static final String PL_TRATAMIENTO_TAREAS = "PL_TRATAMIENTO_TAREAS";
	public static final String EXPEDIENTE_ELECTRONICO_ADAPTER = "com.ejie.ab61.adaptadores.X43ExpedienteElectronicoAdaptadorService";

	public static final int PARTICIPANTE_TITULAR = 0;
	public static final int PARTICIPANTE_REPRESENTANTE = 1;
	public static final int PARTICIPANTE_OTRO_AFECTADO = 2;

	public static final String PERSONA_CONTACTO = "PERSONASCONTACTO";
	public static final String DENUNCIADO = "DENUNCIADO";
	public static final String REPRESENTANTE_LEGAL = "REPRESENTANTELEGAL";
	public static final long PARTICIPACION_SOLICITANTE = 1;

	public static class TiposDocumento {
		public static final Long DNI = (long) 1;
		public static final Long CIF = (long) 2;
		public static final Long NIE = (long) 3;
		public static final Long PASAPORTE = (long) 4;
		public static final Long OTROS = (long) 5;

	}

	public static class TiposSexo {
		public static final Long HOMBRE = (long) 1;
		public static final Long MUJER = (long) 2;
	}

	public static class TiposTercero {
		public static final Long SOLICITANTE = (long) 1;
		public static final Long PERSONA_CONTACTO = (long) 2;
		public static final Long AFECTADO = (long) 3;
		public static final Long INTERESADO = (long) 4;
		public static final Long RECLAMANTE = (long) 5;

		public static final Long REPRESENTANTE_LEGAL = (long) 6;
		public static final Long DENUNCIADO = (long) 7;
		public static final Long SANCIONADO = (long) 8;
		/*
		 * Solicitante Persona de Contacto Afectado Interesado Reclamante
		 * Representante Legal Reclamado Sancionado Titular de la actividad
		 */
	}

	public static class Plantillas {
		public static final String DEFECTOS_ES = "defectosES";
		public static final String DEFECTOS_EU = "defectosEu";
		public static final String ACLARACIONES_ES = "aclaracionesEs";
		public static final String ACLARACIONES_EU = "aclaracionesEu";
		public static final String SUBSANAR = "SUBSANAR";
		public static final String codigoAplicacion = "ab61";
		public static final int ORIGEN_EXPEDIENTE = 1;
		public static final int ORIGEN_PROCEDIMIENTO = 2;
		public static final int ORIGEN_INSPECCION = 3;
		public static final int ORIGEN_ESTABLECIMIENTO = 4;
	}

	public static class TiposObjetoPlantilla {
		public static final Integer NUMERICO = 1;
		public static final Integer ALFA_NUMERICO = 2;
		public static final Integer FECHA = 3;
		public static final Integer WEB_SERVICE = 4;
		public static final Integer TABLA = 5;
		public static final Integer FORMULARIO = 6;
		public static final Integer LISTA = 7;
	}

	public static class origen {
		public static final int EXPEDIENTES = 1;
		public static final int LISTADOS = 2;
		public static final int GESTION_PLANTILLAS = 3;
		public static final int GESTION_MODULO_ADMINISTRACION = 5;
		public static final int PROCEDIMIENTOS = 4;
		public static final int CONFIGURACION = 6;
		public static final int EXPEDIENTES_RELACIONADOS = 7;
		public static final int TIPOS_DE_DOCUMENTO = 8;
		public static final int DOCUMENTOS = 9;
		public static final int DOCUMENTOS_LISTADOS = 10;
		public static final int FECHAS_EXPEDIENTE = 11;
		public static final int PARAMETROS_CONFIG = 12;
	}

	public static class TiposDirecciones {
		public static final Long DIRECCION_SOLICITANTE = (long) 1;
		public static final Long UBICACION_INVERSION = (long) 2;
		public static final Long DIRECCION_POSTAL = (long) 4;

	}

	public static final int COD_APLICACION_AB60 = 1;

	// //////////////////////////////////////////////////////////////////////
	// PARAMETROS CONFIGURACION DE PLANTILLAS
	// ////////////////////////////////////////////////////////////////////////

	public static final String CONFIG_MAXIMO_TRAZAS = "Configuracion_maximo_trazas";

	public static final int VALOR_DESCARGAR = 0;
	public static final int VALOR_TRAMITAR_ONLINE = 1;
	public static final int VALOR__DESCARGAR_Y_ONLINE = 2;

	public static final String CONFIGURACION_DOCUMENTOS = "Configuracion_Documentos";
	public static final String CONFIGURACION_CUENTA_CONSENTIMIENTO = "Consultar_cuenta";
	public static final String CONFIGURACION_CUENTA_CONSENTIMIENTO_SI = "S";
	public static final String CONFIGURACION_CUENTA_CONSENTIMIENTO_NO = "N";

	public static final String CARPETA_COPIA_BUZON_PIF = "/apps/copy_ab61/";

	public static final int CONFIG_EVENTO_EJGV_GETREQUESTINFORMATION = 1;
	public static final int CONFIG_EVENTO_EJGV_DOKUSI = 2;
	public static final int CONFIG_EVENTO_TAREAS = 3;
	public static final int CONFIG_EVENTO_INICIO_OFICIO = 4;
	public static final int CONFIG_EVENTO_ACCIONES_TELEMATICAS = 5;

	public static final int TECNICO_TURISMO = 1;
	public static final int TECNICO_CONSUMO = 3;
	public static final int TECNICO_COMERCIO = 2;
	public static final Long MAXIMO_DOC_MODIFICADOS = (long) 10;

	public static final int SOLUCION_UNO = 1;
	public static final int SOLUCION_DOS = 2;
	public static final int SOLUCION_TRES = 3;
	public static final int SOLUCION_CUATRO = 4;
	public static final int SOLUCION_CINCO = 5;

	public static final String CONSTANTE_SIDX_FECHAREGISTRO = "trazas.fechaRegistroStr";
	public static final String AB61 = "AB61";

	public static final Integer TIPO_DOCUMENTO_DE_PLANTILLA = 1;
	public static final Integer TIPO_DOCUMENTO_DE_DOCUMENTO = 2;

	public static final String ID_PROC = "*ID_PROC*";

	public static final String INICIAL_ANYO = "y";
	public static final String INICIAL_MES = "m";
	public static final String INICIAL_DIA = "d";
	public static final String FORMATO_FECHA_ES = "dd/MM/yyyy";
	public static final String FORMATO_FECHA_EU = "yyyy/MM/dd";

	public static final Integer APORTADO_EXPEDIENTE_NO = 1;
	public static final Integer APORTADO_EXPEDIENTE_SI = 2;
	public static final Integer APORTADO_EXPEDIENTE_NO_APORTAR = 3;

	public static final Integer TIPO_URL_COMPLETA = 2;

	public static String LETRA_LONG = "l";
	public static String LETRA_FLOAT = "f";
	public static String LETRA_DOUBLE = "d";

	/**
	 * Class: PIDGesrectur
	 * 
	 *  
	 *
	 */
	public static class PIDTurismo {
		/**
		 * OWNER String.
		 */
		public static final String OWNER = "AB61";
		/**
		 * OWNER String.
		 */
		public static final String ACL = "pid_acl_turismo";
		/**
		 * OWNER String.
		 */
		public static final String FILESTORE = "pid_filestore_turismo_01";

		/**
		 *  
		 */
		private PIDTurismo() {
		}

		/**
		 * Class: Metadata
		 * 
		 *  
		 *
		 */
		public static class Metadata {
			@SuppressWarnings("serial")
			public static final List<String> ALL = new ArrayList<String>() {
				{
					add(OBJECTNAME);
					add(KEYWORDS);
				}
			};

			/**
			 * OBJECTNAME String.
			 */
			public static final String OBJECTNAME = "object_name";// Nombre del
																	// fichero
																	// (String)
			public static final String KEYWORDS = "keywords"; // Nombre de la
																// aplicación
																// que llama al
																// servicio
																// (String)

			/**
			 *  
			 */
			private Metadata() {
			}
		}
	}

	// //////////////////////////////////////////////////////////////////////
	// CONSTANTES NORA
	// ////////////////////////////////////////////////////////////////////////
	public static final String NORA_DB = Config.getConfigAplicacion("NORA.DB");

	// SOLUCIÓN 1
	// Obtener el PL/SQL de Carga a partir de la tabla AB6119T00
	// Llamar al PL/SQL de Carga
	// Actualizar el Título en Tramitagune (sólo para configuración 1 y 2)
	// Llamar al PL/SQL para el Tratamiento de las Fechas
	//
	// SOLUCIÓN 2
	// Obtener el ID_SOLICITUD del Mensaje (AB6117T00), en la configuración
	// igual a 1
	// Obtener el OID del Mensaje (AB6117T00), en la configuración igual a 2
	// Llamar al servicio web (getRequestInformation) para obtener la solicitud,
	// en la configuración igual a 1
	// Llamar al servicio web (retrieveDocument) para obtener la solicitud, en
	// la configuración igual a 2
	// Almacenar la Solitud en AB6118T00
	// Obtener el PL/SQL de Carga a partir de la tabla AB6119T00
	// Llamar al PL/SQL de Carga
	// Actualizar el Título en Tramitagune (sólo para la configuración igual a
	// 1)
	// Llamar al PL/SQL para el Tratamiento de las Fechas
	//
	// SOLUCIÓN 3
	// Llamar al PL/SQL para el Tratamiento de las Fechas
	//
	// SOLUCIÓN 4
	// Obtener el PL/SQL de Carga a partir de la tabla AB6119T00
	// Llamar al PL/SQL de Carga
	// Actualizar el Título en Tramitagune
	// Actualizar el FOLDER_NUMBER del Expediente
	//
	// SOLUCIÓN 5
	// Obtener el PL/SQL de Carga a partir de la tabla AB6119T00
	// Llamar al PL/SQL de Carga

}
