|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.springframework.web.servlet.mvc.AbstractController
es.mcu.yingo.controladores.SuperControlador
es.mcu.yingo.controladores.ControladorComprobarFichero
public class ControladorComprobarFichero
Utilidad que permite comprobar un fichero firmado en formato Xades,
obtener el hash del fichero, y detalles como el tamaño, etc.
Field Summary | |
---|---|
private static java.lang.String |
CLAVE_DATOS_VISTA
Clave para los datos que se enciarán a la vista |
private static java.lang.String |
CLAVE_PARAMETRO_FICHERO
Parámetro utilizado para recuperar el fichero |
private static java.lang.String |
FIRMA
Clave para comprobar la firma del fichero |
private static java.lang.String |
HASH
Clave para el resumen criptográfico del fichero |
private static java.lang.String |
MENSAJE_ERROR
Clave para el menjaje de error |
private ServicioFirmador |
servicioFirmador
Objeto que contiene utilidades de firma |
private java.util.Map<java.lang.String,java.lang.String> |
vistaFormulario
Map de vistas para mostra el formulario donde se podrá subir el fichero para ver el detalle |
private java.util.Map<java.lang.String,java.lang.String> |
vistaResFirma
Vista para mostrar el resultado de la comprobación de la firma del fichero |
private java.util.Map<java.lang.String,java.lang.String> |
vistaResHash
Vista para mostrar el resultado de los detalles del fichero |
Fields inherited from class es.mcu.yingo.controladores.SuperControlador |
---|
BUSCAR, CARGA, CLAVE_DATOS_RESULTADO, FICHERO, INICIO, logger, PAGINAR, PARAM_LISTA_ERROR |
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
---|
HEADER_CACHE_CONTROL, HEADER_EXPIRES, HEADER_PRAGMA, METHOD_GET, METHOD_HEAD, METHOD_POST |
Constructor Summary | |
---|---|
ControladorComprobarFichero()
|
Method Summary | |
---|---|
private org.springframework.web.servlet.ModelAndView |
accionComprobarFirma(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Acciones que se realizan para comprobar la firma |
private org.springframework.web.servlet.ModelAndView |
accionComprobarHash(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Accion que se lanza para comprobar el hash de un fichero |
private org.springframework.web.servlet.ModelAndView |
accionInicio(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Carga el formulario correspondiente al argumento que se le pasa en el request |
private org.springframework.web.servlet.ModelAndView |
crearVistaFormulario(javax.servlet.http.HttpServletRequest request)
Muestra el formulario |
protected org.springframework.web.servlet.ModelAndView |
distribuidor(java.lang.String accion,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Este método hace una llamada a las diversas acciones de los 'eventos' básicos, según el valor que viene cargado en la acción |
ServicioFirmador |
getServicioFirmador()
|
java.util.Map<java.lang.String,java.lang.String> |
getVistaFormulario()
Map de vistas para mostra el formulario donde se podrá subir el fichero para ver el detalle |
java.util.Map<java.lang.String,java.lang.String> |
getVistaResFirma()
Vista para mostrar el resultado de la comprobación de la firma del fichero |
java.util.Map<java.lang.String,java.lang.String> |
getVistaResHash()
Vista para mostrar el resultado de los detalles del fichero |
protected org.springframework.web.servlet.ModelAndView |
handleRequestInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Realiza las acciones requeridas, según sean mostrar el formulario para subir el fichero a comprobar, comprobar la firma u obtener el hash |
private org.springframework.web.multipart.MultipartFile |
obtenerFichero(javax.servlet.http.HttpServletRequest request)
Obtiene el stream del fichero subido en el formulario |
private Datos |
obtenerHash(javax.servlet.http.HttpServletRequest request)
Acción que se realiza cuando se compruba un Hash de un fichero |
void |
setServicioFirmador(ServicioFirmador servicioFirmador)
|
void |
setVistaFormulario(java.util.Map<java.lang.String,java.lang.String> vistaFormulario)
Map de vistas para mostra el formulario donde se podrá subir el fichero para ver el detalle |
void |
setVistaResFirma(java.util.Map<java.lang.String,java.lang.String> vistaResFirma)
Vista para mostrar el resultado de la comprobación de la firma del fichero |
void |
setVistaResHash(java.util.Map<java.lang.String,java.lang.String> vistaResHash)
Vista para mostrar el resultado de los detalles del fichero |
private void |
validarFirma(javax.servlet.http.HttpServletRequest request)
Valida que la firma sea correcta. |
Methods inherited from class es.mcu.yingo.controladores.SuperControlador |
---|
getAccion, getSpringContextUtilWeb, obtenerVistaAplicacion, recogerParametro, recogerTipoTareaRequest, setSpringContextUtilWeb |
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController |
---|
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession |
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator |
---|
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseExpiresHeader |
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
---|
getServletContext, getTempDir, getWebApplicationContext, isContextRequired |
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String MENSAJE_ERROR
private static final java.lang.String CLAVE_DATOS_VISTA
private static final java.lang.String HASH
private static final java.lang.String FIRMA
private static final java.lang.String CLAVE_PARAMETRO_FICHERO
private java.util.Map<java.lang.String,java.lang.String> vistaFormulario
private java.util.Map<java.lang.String,java.lang.String> vistaResHash
private java.util.Map<java.lang.String,java.lang.String> vistaResFirma
private ServicioFirmador servicioFirmador
Constructor Detail |
---|
public ControladorComprobarFichero()
Method Detail |
---|
protected org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
handleRequestInternal
in class org.springframework.web.servlet.mvc.AbstractController
request
- response
-
java.lang.Exception
protected org.springframework.web.servlet.ModelAndView distribuidor(java.lang.String accion, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
accion
- request
- response
-
java.lang.Exception
private org.springframework.web.servlet.ModelAndView accionComprobarFirma(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
request
- response
-
java.lang.Exception
private void validarFirma(javax.servlet.http.HttpServletRequest request) throws WebYingoException, java.io.IOException
request
-
WebYingoException
java.io.IOException
private org.springframework.web.servlet.ModelAndView accionComprobarHash(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
request
- response
-
java.lang.Exception
private Datos obtenerHash(javax.servlet.http.HttpServletRequest request) throws WebYingoException, java.io.IOException, java.security.NoSuchAlgorithmException, FicheroYingoException
request
-
WebYingoException
java.io.IOException
java.security.NoSuchAlgorithmException
FicheroYingoException
private org.springframework.web.multipart.MultipartFile obtenerFichero(javax.servlet.http.HttpServletRequest request) throws java.io.IOException, WebYingoException
request
-
java.io.IOException
WebYingoException
private org.springframework.web.servlet.ModelAndView accionInicio(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
request
- response
-
java.lang.Exception
private org.springframework.web.servlet.ModelAndView crearVistaFormulario(javax.servlet.http.HttpServletRequest request) throws java.lang.Exception
tarea
- datos
-
java.lang.Exception
public ServicioFirmador getServicioFirmador()
public void setServicioFirmador(ServicioFirmador servicioFirmador)
servicioFirmador
- the servicioFirmador to setpublic java.util.Map<java.lang.String,java.lang.String> getVistaFormulario()
public void setVistaFormulario(java.util.Map<java.lang.String,java.lang.String> vistaFormulario)
vistaFormulario
- the vistaFormulario to setpublic java.util.Map<java.lang.String,java.lang.String> getVistaResFirma()
public void setVistaResFirma(java.util.Map<java.lang.String,java.lang.String> vistaResFirma)
vistaResFirma
- the vistaResFirma to setpublic java.util.Map<java.lang.String,java.lang.String> getVistaResHash()
public void setVistaResHash(java.util.Map<java.lang.String,java.lang.String> vistaResHash)
vistaResHash
- the vistaResHash to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |