List of usage examples for org.apache.commons.validator ValidatorException ValidatorException
public ValidatorException(String message)
From source file:es.pode.administracion.presentacion.informes.listarInformesFederados.ListarInformesFederadosControllerImpl.java
/** * @see es.pode.administracion.presentacion.informes.listarInformesFederados.ListarInformesFederadosController#recuperarInformeFederado(org.apache.struts.action.ActionMapping, es.pode.administracion.presentacion.informes.listarInformesFederados.RecuperarInformeFederadoForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) *//* w w w . j a v a2 s . c o m*/ public final void recuperarInformeFederado(ActionMapping mapping, es.pode.administracion.presentacion.informes.listarInformesFederados.RecuperarInformeFederadoForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { try { String fichero = (String) form.getNombre(); DataHandler dataHandler = null; SrvInformeService informeService = this.getSrvInformeService(); try { dataHandler = informeService.recuperarInformesFederados(fichero); } catch (Exception e) { logger.error("Error al recuperar el fichero"); } if (dataHandler == null) { logger.error("El fichero recuperado est vacio"); throw new ValidatorException("{recuperarInforme.FALLO}"); } if (fichero.endsWith(".pdf")) { response.setContentType("application/pdf"); } else if (fichero.endsWith(".html") || fichero.endsWith(".htm")) { response.setContentType("application/html"); } else if (fichero.endsWith(".xls")) { response.setContentType("application/xls"); } else if (fichero.endsWith(".doc")) { response.setContentType("application/doc"); } response.setHeader("Content-Disposition", "attachment;filename=" + fichero); OutputStream out = response.getOutputStream(); InputStream in = dataHandler.getInputStream(); if (logger.isDebugEnabled()) logger.debug("recuperando el fichero federado" + fichero); byte[] buffer = new byte[BUFFER_SIZE]; int count; while ((count = in.read(buffer, 0, BUFFER_SIZE)) != -1) { out.write(buffer, 0, count); } out.flush(); out.close(); } catch (ValidatorException e) { throw e; } catch (Exception e) { logger.error("Se ha producido el siguiente error: " + e); throw e; } }
From source file:es.pode.administracion.presentacion.informes.eliminarInforme.EliminarInformeControllerImpl.java
/** * @see es.pode.administracion.presentacion.informes.eliminarInforme.EliminarInformeController#obtenerInforme(org.apache.struts.action.ActionMapping, es.pode.administracion.presentacion.informes.eliminarInforme.ObtenerInformeForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) *///ww w .j a v a 2 s. com public final void obtenerInforme(ActionMapping mapping, es.pode.administracion.presentacion.informes.eliminarInforme.ObtenerInformeForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { try { Iterator iter = (form.getIds()).iterator(); int i = 0; String listaId = ""; while (iter.hasNext()) { String nombre = (String) iter.next(); listaId = listaId + nombre + ":"; i = i + 1; } form.setListaId(listaId.trim()); form.setInformes((String[]) form.getIds().toArray(new String[0])); } catch (Exception e) { log.error("Se ha producido un error al recuperar los informes: " + e); throw new ValidatorException("{errors.obtenerInforme}"); } }
From source file:es.pode.modificador.presentacion.configurar.cambios.modificar.ModificarTerminoControllerImpl.java
/** * @see es.pode.modificador.presentacion.configurar.cambios.modificar.ModificarTerminoController#modificar(org.apache.struts.action.ActionMapping, es.pode.modificador.presentacion.configurar.cambios.modificar.ModificarForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) *//*w w w . j ava 2 s .c o m*/ public final void modificar(ActionMapping mapping, es.pode.modificador.presentacion.configurar.cambios.modificar.ModificarForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { if (form.getIdioma() != null) { if (form.getIdioma().equals("")) { this.getCambioSession(request).setIdioma(null); } else { this.getCambioSession(request).setIdioma(form.getIdioma()); } } if (form.getValorViejo() != null) { if (form.getValorViejo().equals("")) { this.getCambioSession(request).setValor(null); } else { this.getCambioSession(request).setValor(form.getValorViejo()); } } if (form.getValorNuevo() != null) { if (form.getValorNuevo().equals("")) { throw new ValidatorException("{modificarTermino.msgErrorValorNuevo}"); } else { this.getCambioSession(request).setValorNuevo(form.getValorNuevo()); } } this.getCambioSession(request).setAlcance(Boolean.valueOf(form.getAlcanceMetadatos())); this.getCambioSession(request).setReplaceAll(Boolean.valueOf(form.getAlcanceTermino())); this.getCambioSession(request).setExprReg(Boolean.valueOf(form.getExprReg())); }
From source file:es.pode.administracion.presentacion.adminusuarios.modificarUsuario.ModificarUsuarioControllerImpl.java
/** * @see es.pode.administracion.presentacion.adminusuarios.modificarUsuario.ModificarUsuarioController#recuperarUsuario(org.apache.struts.action.ActionMapping, * es.pode.administracion.presentacion.adminusuarios.modificarUsuario.RecuperarUsuarioForm, * javax.servlet.http.HttpServletRequest, * javax.servlet.http.HttpServletResponse) *//*from w ww . j a va 2 s. c o m*/ public final void recuperarUsuario(ActionMapping mapping, es.pode.administracion.presentacion.adminusuarios.modificarUsuario.RecuperarUsuarioForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { try { String idiomaSelected = LdapUserDetailsUtils.getIdioma(); I18n i18n = I18n.getInstance(); LocalizacionIdiomaVO[] localizadorNavegacionIdioma = i18n .obtenerIdiomasPlataformaLocalizados(idiomaSelected); form.setIdiomaBackingList(Arrays.asList(localizadorNavegacionIdioma), "idLocalizacion", "name"); LocalizacionIdiomaVO[] localizadorBusquedaIdioma = i18n .obtenerIdiomasBuscablesLocalizados(idiomaSelected); form.setIdiomaBusquedaBackingList(Arrays.asList(localizadorBusquedaIdioma), "idLocalizacion", "name"); Long id = Long.valueOf(request.getParameter("id")); if (id == null) { throw new ValidatorException("{errors.modificarusuario.idNulo}"); } else { UsuarioVO usuario = this.getSrvAdminUsuariosService().descripcionUsuario(id); form.setTipoEmpaquetador(usuario.getTipoEmpaquetador()); form.setApellido1(usuario.getApellido1()); form.setNombre(usuario.getNombre()); form.setUsuario(usuario.getUsuario()); form.setId(usuario.getId()); form.setEmail(usuario.getEmail()); form.setApellido2(usuario.getApellido2()); form.setIdioma(usuario.getIdioma()); form.setIdiomaBusqueda(usuario.getIdiomaBusqueda()); form.setNIF(usuario.getNIF()); form.setTipoCatalogador(usuario.getTipoCatalogador()); form.setOpenIdUrl(usuario.getOpenIdUrl()); //convertimos los bytes de cuota a mbytes para mostrarlos por pantalla long cuota = (long) (usuario.getCuota() / 1048576); form.setCuota(Long.valueOf(cuota).toString()); // form.setRepitaClave(usuario.getClave()); } } catch (ValidatorException va) { throw va; } catch (Exception e) { log.error("Error!!: " + e); throw new ValidatorException("{modificarUsuario.error}"); } }
From source file:es.pode.administracion.presentacion.adminusuarios.modificarGrupo.ModificarGruposControllerImpl.java
/** * @see es.pode.administracion.presentacion.adminusuarios.modificarGrupo.ModificarGruposController#recuperarRoles(org.apache.struts.action.ActionMapping, * es.pode.administracion.presentacion.adminusuarios.modificarGrupo.RecuperarRolesForm, * javax.servlet.http.HttpServletRequest, * javax.servlet.http.HttpServletResponse) *//* w w w .java 2 s. c o m*/ public final void recuperarRoles(ActionMapping mapping, es.pode.administracion.presentacion.adminusuarios.modificarGrupo.RecuperarRolesForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { try { String descripcion = request.getParameter("descripcion"); if (log.isDebugEnabled()) log.debug("El valor de id es " + descripcion); //VALIDACION DE CARACTERES INCORRECTOS Pattern mask = Pattern.compile("[^\\\\?\\\\!\\>\\#\\&\\<\\@\\$\\/\\\'\\\"]+"); Matcher matcher = null; matcher = mask.matcher(descripcion); if (!matcher.matches()) { if (log.isDebugEnabled()) log.debug("nombre caracter ilegal"); throw new ValidatorException("{errors.altagrupo.descripcion.caracterIlegal}"); } Long id = Long.valueOf(request.getParameter("id")); if (log.isDebugEnabled()) log.debug("Chequeo si la descripcion ya esta asociada a otro grupo"); GrupoVO grupoVO = this.getSrvAdminUsuariosService().descripcionGrupo(id); if ((this.getSrvAdminUsuariosService().existeDescripcion(descripcion, id)).booleanValue()) { if (log.isDebugEnabled()) log.debug("Ya existe un grupo en el sistema con esa descripcion"); throw new ValidatorException("{errors.modificaciongrupo.descripcionExistente}"); } if (descripcion.length() > 0) { grupoVO.setDescripcion(descripcion); this.getModificarGrupoBSession(request).setGrupoVO(grupoVO); if (log.isDebugEnabled()) log.debug("guardo el grupoVO en sesion"); } else { if (log.isDebugEnabled()) log.debug("La descripcion introducida es nula"); throw new ValidatorException("{errors.modificaciongrupo.descripcion}"); } try { RolVO[] rolVO = this.getSrvAdminUsuariosService().listarRoles(); RolVOCheck[] rolVOCheck = null; rolVOCheck = obtenerRolCheck(rolVO, grupoVO); // form.setRolesAsArray(rolVO); form.setRolesAsArray(rolVOCheck); } catch (Exception e) { log.error("Error: " + e); throw new ValidatorException("{modificarGrupo.errorRoles}"); } } catch (ValidatorException validator) { throw validator; } catch (Exception e) { log.error("Error: " + e); throw new ValidatorException("{modificarGrupo.errorRoles}"); } }
From source file:es.pode.gestorFlujo.presentacion.objetosCompartidos.ObjetosCompartidosControllerImpl.java
/** * @see es.pode.gestorFlujo.presentacion.objetosCompartidos.ObjetosCompartidosController#cargarODESCompartidos(org.apache.struts.action.ActionMapping, es.pode.gestorFlujo.presentacion.objetosCompartidos.CargarODESCompartidosForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) *///from w ww .j av a 2 s. c om public final void cargarODESCompartidos(ActionMapping mapping, es.pode.gestorFlujo.presentacion.objetosCompartidos.CargarODESCompartidosForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { try { if (logger.isDebugEnabled()) logger.debug("Cargando objetos compartidos"); SrvPublicacionService publi = this.getSrvPublicacionService(); SrvLocalizadorService localizador = this.getSrvLocalizadorService(); SrvAdminUsuariosService admin = this.getSrvAdminUsuariosService(); TransicionAutorVO[] odes = null; try { String[] todosUsuariosGrupos = admin .obtenerListaUsuariosGrupoTrabajo(LdapUserDetailsUtils.getUsuario()); // // String[] todosUsuariosGrupos=new String[] {LdapUserDetailsUtils.getUsuario()}; if (todosUsuariosGrupos != null && todosUsuariosGrupos.length > 0) { logger.info("Obtenidos lista de usuarios de los grupos pertenecientes de usuario:[" + LdapUserDetailsUtils.getUsuario() + "Numero de usuarios:[" + todosUsuariosGrupos.length); odes = publi.obtenODEsCompartidosPorUsuarios(todosUsuariosGrupos); logger.info("Obtenidos odes de esos usuarios, numero de odes pendientes de publicacion [" + odes.length); } else { logger.info("Obtenidos lista de todos los ODES, pues el usuario:[" + LdapUserDetailsUtils.getUsuario() + " es parte de todos los grupos"); odes = publi.obtenODESCompartidos(); logger.info("Obtenidos odes de todos los usuarios, numero de odes pendientes de publicacion[" + odes.length); } } catch (Exception ex) { logger.error("Imposible obtener los odes pendientes de publicacion", ex); throw new ValidatorException("{gestorFlujo.error.inesperado}"); } if (odes != null && odes.length > 0) { TransicionConTamainoVO[] odesTamaino = new TransicionConTamainoVO[odes.length]; String[] identificadoresOdesCompartidos = new String[odes.length]; if (logger.isDebugEnabled()) { logger.debug("Entramos en el mapeo de " + odes.length + " elementos"); } for (int i = 0; i < odes.length; i++) { TransicionConTamainoVO conTamaino = new TransicionConTamainoVO(); if (logger.isDebugEnabled()) logger.debug("Estamos en la posicion: " + i); conTamaino.setComentarios(odes[i].getComentarios()); conTamaino.setFecha(odes[i].getFecha()); conTamaino.setIdODE(odes[i].getIdODE()); identificadoresOdesCompartidos[i] = odes[i].getIdODE();//Los guardamos para hacer la consulta al localizador conTamaino.setIdUsuario(odes[i].getIdUsuarioCreacion());//Nombre del creador!!!!!!!!!!!! conTamaino.setTitulo(odes[i].getTitulo()); odesTamaino[i] = conTamaino; } Long[] tamainoOdes = null; if (identificadoresOdesCompartidos != null && identificadoresOdesCompartidos.length > 0) { tamainoOdes = localizador.consultaEspacioLocalizadores(identificadoresOdesCompartidos); } for (int i = 0; i < odes.length; i++) { // Vamos a insertar le tamaino en MB,no en bytes; double mb = (double) tamainoOdes[i] / (1024 * 1024); String pattern = "###.##"; java.text.DecimalFormat myFormatter = new java.text.DecimalFormat(pattern); String output = myFormatter.format(mb); odesTamaino[i].setTamaino(output); if (logger.isDebugEnabled()) logger.debug("Tamaino del ODE compartido con id:" + odesTamaino[i].getIdODE() + ", su div[" + mb + "] y su tamaino es:" + output); } form.setListaODESAsArray(odesTamaino); } else { if (logger.isDebugEnabled()) logger.debug("No tiene objetos compartidos"); form.setListaODESAsArray(odes); } } catch (Exception e) { logger.error("Error al obtener los objetos compartidos: ", e); throw new ValidatorException("{gestor.flujo.error.obtener.compartidos}"); } }
From source file:es.pode.administracion.presentacion.planificador.crearTarea.CrearTareaControllerImpl.java
/** * Mtodo que discrimina la tarea a crear * //from w ww . j a v a 2 s . co m * Retorna 1: Carga de ODEs 2: Reindexado 3: Eliminar ODEs 4:Infome fecha 5:Informe rango 6:Informe usuario 7:Informe Federado 8:Informe catalogo * * @param mapping * @param request * @param response * @throws Exception */ public final String crearTarea(ActionMapping mapping, CrearTareaForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { if (log.isDebugEnabled()) log.debug("CREAR TAREA"); TrabajoVO trabajo = new TrabajoVO(); trabajo.setTrabajo(form.getTrabajo()); Boolean existe = this.getSrvPlanificadorService().existeTrabajo(trabajo); /* Comprobamos si la tarea ya existe */ try { if (existe.booleanValue()) throw new ValidatorException("{tareas.tareaExiste}"); } catch (ValidatorException e2) { saveErrorMessage(request, "tareas.tareaExiste"); return "Error"; } /* Comprobamos si el nombre de tarea tiene caracteres raros */ try { if (!utilidades.validacionCaracter(form.getTrabajo())) throw new ValidatorException("{tareas.nombreIncorrecto}"); } catch (ValidatorException e2) { saveErrorMessage(request, "tareas.nombreIncorrecto"); return "Error"; } String dia = new String(form.getDia()); String mes = new String(form.getMes()); String anio = new String(form.getAnio()); String hora = new String(form.getHora()); String minutos = new String(form.getMinutos()); if (dia.equalsIgnoreCase("") || mes.equalsIgnoreCase("") || anio.equalsIgnoreCase("") || hora.equalsIgnoreCase("") || minutos.equalsIgnoreCase("")) { log.error("Error al introducir la fecha."); throw new ValidatorException("{tareas.errors.dateHora.required}"); } //}catch(Exception e) //{ //throw new ValidatorException("{tareas.errors.fecha.incorrecta}"); //} try { new Integer(dia).intValue(); new Integer(mes).intValue(); new Integer(anio).intValue(); } catch (Exception e) { log.error("Alguno de los campos de la fecha no son nmeros"); throw new ValidatorException("{tareas.fechaIncorrecta}"); } try { new Integer(hora).intValue(); new Integer(minutos).intValue(); } catch (Exception e) { log.error("Alguno de los campos de la hora no son nmeros"); throw new ValidatorException("{tareas.horaIncorrecta}"); } try { if (log.isDebugEnabled()) log.debug("VALIDAMOS LAS FECHAS"); Date fechaActual = new Date(); SimpleDateFormat format = new SimpleDateFormat("ddMMyyyyHHmmss"); format.setLenient(false); Date fechaIn = null; if (log.isDebugEnabled()) log.debug("antes de validar la hora"); boolean horaValida = utilidades.validacionHoraHHMM(hora, minutos); if (log.isDebugEnabled()) log.debug("horaValida es " + horaValida); boolean fechaValida = utilidades.validacionFechaDDMMAAAAHHMM(dia, mes, anio, "yyyyMMdd"); if (log.isDebugEnabled()) log.debug("fechaValida es " + fechaValida); if (!fechaValida && !horaValida) throw new ValidatorException("{tareas.fechaYHoraIncorrectas}"); if (!horaValida) throw new ValidatorException("{tareas.horaIncorrecta}"); if (!fechaValida) throw new ValidatorException("{tareas.fechaIncorrecta}"); if ((new Integer(mes).intValue() < 10) && (mes.length() == 1)) mes = "0" + mes; if ((new Integer(dia).intValue() < 10) && (dia.length() == 1)) dia = "0" + dia; if ((new Integer(hora).intValue() < 10) && (hora.length() == 1)) hora = "0" + hora; if ((new Integer(minutos).intValue() < 10) && (minutos.length() == 1)) minutos = "0" + minutos; log.debug("dia " + dia + " mes " + mes + " anio " + anio + " hora " + hora + " minutos " + minutos); fechaIn = format.parse(dia + mes + anio + hora + minutos + "59"); if (fechaActual.getTime() > fechaIn.getTime()) { log.error("La fecha introducida es anterior a la actual"); throw new ValidatorException("{tareas.fechaAnteriorActual}"); } } catch (java.text.ParseException pe) { log.error("Error al introducir la fecha " + pe); throw new ValidatorException("{tareas.errors.fecha.incorrecta}"); } catch (ValidatorException e2) { log.error("e2 " + e2); throw e2; } //seleccionamos la 2 pantalla a la que se debe ir dependiendo del tipo de tarea seleccionada String tipoTarea = null; String tipoTareaDevolver = null; try { if (log.isDebugEnabled()) log.debug("obtenerTipoInforme"); tipoTarea = form.getTipoTarea(); //Si el tipoTarea es Reindexado, carga ODEs o eliminar ODEs el tipo tarea se mantiene if (tipoTarea.equalsIgnoreCase("estadoOdes") || tipoTarea.equalsIgnoreCase("operacionesRealizadas") || tipoTarea.equalsIgnoreCase("nivelAgregacion") || tipoTarea.equalsIgnoreCase("coberturaCurricular") || tipoTarea.equalsIgnoreCase("odesLicencias") || tipoTarea.equalsIgnoreCase("usuarios") || tipoTarea.equalsIgnoreCase("procesosPlanificados")) { if (log.isDebugEnabled()) log.debug("cargo informe con fechas"); tipoTareaDevolver = "InformeFecha"; } else if (tipoTarea.equalsIgnoreCase("terminosBusqueda") || tipoTarea.equalsIgnoreCase("masValorado") || tipoTarea.equalsIgnoreCase("masMostrado") || tipoTarea.equalsIgnoreCase("masPrevisualizado") || tipoTarea.equalsIgnoreCase("masVisualizado") || tipoTarea.equalsIgnoreCase("masDescargado") || tipoTarea.equalsIgnoreCase("tamanio")) { if (log.isDebugEnabled()) log.debug("cargo informe con rango"); tipoTareaDevolver = "InformeFechaRango"; } else if (tipoTarea.equalsIgnoreCase("odesUsuario")) { if (log.isDebugEnabled()) log.debug("cargo informe con usuario"); tipoTareaDevolver = "InformeFechaUsuario"; } else if (tipoTarea.indexOf("Federada") != -1) { tipoTareaDevolver = "InformeFederado"; } else if (tipoTarea.equalsIgnoreCase("repositorio")) { tipoTareaDevolver = "InformeCatalogo"; } else tipoTareaDevolver = tipoTarea; if (log.isDebugEnabled()) log.debug("tipoTarea -> " + tipoTarea); } catch (Exception e) { saveErrorMessage(request, "tareas.error"); return "Error"; } if (log.isDebugEnabled()) log.debug("devuelvo el tipo de tarea -> " + tipoTareaDevolver); return (String) tipoTareaDevolver; }
From source file:es.pode.empaquetador.presentacion.basico.organizacion.RenombrarOrganizacionBasicoControllerImpl.java
/** * @see es.pode.empaquetador.presentacion.basico.organizacion.RenombrarOrganizacionBasicoController#submit(org.apache.struts.action.ActionMapping, es.pode.empaquetador.presentacion.basico.organizacion.SubmitForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) *//*from w w w. j av a 2 s. co m*/ public final void submit(ActionMapping mapping, es.pode.empaquetador.presentacion.basico.organizacion.SubmitForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { String action = form.getAction(); String title = form.getTitle(); ResourceBundle i18n = ResourceBundle.getBundle("application-resources", (Locale) request.getSession().getAttribute(ConstantesAgrega.DEFAULT_LOCALE)); if (i18n.getString("gestor_basico.renombrar.organizacion.aceptar").equals(action)) { if (logger.isDebugEnabled()) logger.debug("Aceptar pulsado en renombrar organizacion"); if (title == null || "".equals(title.trim())) { throw new ValidatorException("{presentacion.basico.organizacion.not.null}"); } OrganizacionVO orgPrincipal = buscarOrganizacionPrincipal( this.getEmpaquetadorSession(request).getOde()); orgPrincipal.setTitle(title); if (logger.isDebugEnabled()) logger.debug("Llamando a modificar organizacion con parametros identificador = " + this.getEmpaquetadorSession(request).getIdLocalizador() + " : organizacion = " + orgPrincipal); try { this.getSrvGestorManifestService().modificarOrganizacion( this.getEmpaquetadorSession(request).getIdLocalizador(), orgPrincipal); } catch (Exception e) { logger.error(e); throw new ValidatorException("{gestor_basico.renombrar.organizacion.error}"); } } }
From source file:es.pode.empaquetador.presentacion.avanzado.organizaciones.crear.CrearOrganizacionControllerImpl.java
public final void submit(ActionMapping mapping, es.pode.empaquetador.presentacion.avanzado.organizaciones.crear.SubmitForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { CrearOrganizacionSession sesOrga = this.getCrearOrganizacionSession(request); String titulo = form.getTitle(); titulo = titulo.trim();//from w w w .jav a 2 s. c o m java.util.Locale locale = (Locale) request.getSession().getAttribute(ConstantesAgrega.DEFAULT_LOCALE); ResourceBundle i18n = ResourceBundle.getBundle("application-resources", locale); String action = form.getAction(); if (action.equals(i18n.getString("portal_empaquetado_crearOrganizaciones.aceptar"))) { if ((titulo == null) || (titulo.equals(""))) { throw new ValidatorException("{portal_empaquetado.exception}"); } } sesOrga.setTitle(titulo); }
From source file:es.pode.empaquetador.presentacion.avanzado.submanifiestos.gestor.GestorSubmanifiestosControllerImpl.java
/** * @see es.pode.empaquetador.presentacion.avanzado.submanifiestos.gestor.GestorSubmanifiestosController#submit(org.apache.struts.action.ActionMapping, * es.pode.empaquetador.presentacion.avanzado.submanifiestos.gestor.SubmitForm, * javax.servlet.http.HttpServletRequest, * javax.servlet.http.HttpServletResponse) *///from w ww. j a v a2 s . co m public final void submit(ActionMapping mapping, es.pode.empaquetador.presentacion.avanzado.submanifiestos.gestor.SubmitForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { java.util.Locale locale = (Locale) request.getSession().getAttribute(ConstantesAgrega.DEFAULT_LOCALE); ResourceBundle i18n = ResourceBundle.getBundle(APPLICATION_RESOURCES, locale); String accion = form.getAction(); if ((accion.equals(i18n.getString(ELIMINAR))) || (accion.equals(i18n.getString(DESAGREGAR)))) { if (form.getIdentifierRowSelection() != null && form.getIdentifierRowSelection().size() > 0) { form.setIdentificadores(form.getIdentifierRowSelection()); } else { throw new ValidatorException("{exportar.subirArchivo}"); } } }