|
||||||||||
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.ControladorBajarFichero
public class ControladorBajarFichero
Realiza las operaciones necesarias para descargar los ficheros
Este controlador recibirá un objeto UtilFichero
que apuntará
al servidor de ficheros de donde se recuperarán los archivos
Field Summary | |
---|---|
private UtilFichero |
utilFichero
Utilidad que permite acceder al fichero |
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
---|
HEADER_CACHE_CONTROL, HEADER_EXPIRES, HEADER_PRAGMA, METHOD_GET, METHOD_HEAD, METHOD_POST |
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
logger |
Constructor Summary | |
---|---|
ControladorBajarFichero()
Constructor por defecto |
Method Summary | |
---|---|
private void |
escribirCabeceras(java.lang.String mime,
java.lang.String nombreFichero,
javax.servlet.http.HttpServletResponse response)
Escribe las cabeceras en el response para descarga. |
protected void |
escribirFichero(java.lang.String nombreFichero,
javax.servlet.http.HttpServletResponse response)
Escribe el fichero en el outputstream del response |
UtilFichero |
getUtilFichero()
Utilidad que permite acceder al fichero |
protected org.springframework.web.servlet.ModelAndView |
handleRequestInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Recupera el fichero que se indique y lo vuelca en el response |
void |
setUtilFichero(UtilFichero utilFichero)
Utilidad que permite acceder al fichero |
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 UtilFichero utilFichero
Constructor Detail |
---|
public ControladorBajarFichero()
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
- command
- errors
-
java.lang.Exception
protected void escribirFichero(java.lang.String nombreFichero, javax.servlet.http.HttpServletResponse response) throws FicheroYingoException, java.io.IOException
nombreFichero
- response
-
FicheroPcrtException
java.io.IOException
FicheroYingoException
private void escribirCabeceras(java.lang.String mime, java.lang.String nombreFichero, javax.servlet.http.HttpServletResponse response)
mime
- nombreFichero
- response
- public UtilFichero getUtilFichero()
public void setUtilFichero(UtilFichero utilFichero)
utilFichero
- the utilFichero to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |