org.esupportail.portal.channels.CIntranet.actions.intranet
Class Download

java.lang.Object
  extended byorg.esupportail.portal.utils.channels.SubChannel
      extended byorg.esupportail.portal.channels.CIntranet.actions.intranet.AbstractAction
          extended byorg.esupportail.portal.channels.CIntranet.actions.intranet.Download
All Implemented Interfaces:
org.jasig.portal.ICacheable, org.jasig.portal.IMimeResponse, org.esupportail.portal.utils.channels.ISubChannel

public class Download
extends AbstractAction
implements org.jasig.portal.IMimeResponse

Download

Cette classe prend en charge le téléchargement d'un document

(c)Copyright ESup-Portail 2004

Version:
$Revision: 1.1.2.4 $
Author:
Mathieu Larchet

Constructor Summary
Download(org.esupportail.portal.utils.channels.MainChannel mainChannel)
          Constructeur
 
Method Summary
 void clearChannel()
          Nettoyage du canal Override Subchannel.clearChannel method
 void downloadData(java.io.OutputStream out)
          Construit le flux de sortie du fichier Implements IMimeResponse interface
 java.lang.String getContentType()
          Retourne le type MIME du document Implements IMimeResponse interface
 java.util.Map getHeaders()
          Retourne la tables des headers HTTP Implements IMimeResponse interface
 java.io.InputStream getInputStream()
          Retourne le flux de lecture du fichier Implements IMimeResponse interface
 int getLevel()
          Indique le niveau requis pour réaliser cette action Implements AbstractAction.getLevel() method
 java.lang.String getName()
          Retourne le nom du fichier Implements IMimeResponse interface Warning : méthode inutilisée
 java.lang.Boolean init(org.jasig.portal.ChannelRuntimeData rd)
          Etape 2/4 du cycle de vie de la SubChannel Prépare le document à télécharger Override SubChannel.init() method
 void reportDownloadError(java.lang.Exception e)
          Indique une erreur en cours de téléchargement Implements IMimeResponse interface
 
Methods inherited from class org.esupportail.portal.channels.CIntranet.actions.intranet.AbstractAction
initialize
 
Methods inherited from class org.esupportail.portal.utils.channels.SubChannel
addDefaultXslParameters, addDownloadXslParameter, generateKey, getMainChannel, getMediaPath, getPackageName, getRuntimeData, getSSL, getXML, getXSL, getXSLParameter, isCacheValid, log, log, renderXML, setDefaultXslParameters, setOutput, setSSL, setXML, setXML, setXSL, setXSLParameter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Download

public Download(org.esupportail.portal.utils.channels.MainChannel mainChannel)
Constructeur

Parameters:
mainChannel - La channel principale
Method Detail

getLevel

public int getLevel()
Indique le niveau requis pour réaliser cette action Implements AbstractAction.getLevel() method

Specified by:
getLevel in class AbstractAction
Returns:
level Le niveau requis pour accéder à cette action

init

public java.lang.Boolean init(org.jasig.portal.ChannelRuntimeData rd)
                       throws org.jasig.portal.PortalException,
                              org.esupportail.portal.utils.channels.FrameWorkException
Etape 2/4 du cycle de vie de la SubChannel Prépare le document à télécharger Override SubChannel.init() method

Specified by:
init in interface org.esupportail.portal.utils.channels.ISubChannel
Parameters:
rd - Les runtimeData
Returns:
Boolean TRUE si tout se passe bien, FALSE sinon
Throws:
org.jasig.portal.PortalException
org.esupportail.portal.utils.channels.FrameWorkException

clearChannel

public void clearChannel()
Nettoyage du canal Override Subchannel.clearChannel method

Specified by:
clearChannel in interface org.esupportail.portal.utils.channels.ISubChannel

getContentType

public java.lang.String getContentType()
Retourne le type MIME du document Implements IMimeResponse interface

Specified by:
getContentType in interface org.jasig.portal.IMimeResponse
Returns:
type Le type MIME

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Retourne le flux de lecture du fichier Implements IMimeResponse interface

Specified by:
getInputStream in interface org.jasig.portal.IMimeResponse
Returns:
input Le flux (null si aucun flux)
Throws:
java.io.IOException

downloadData

public void downloadData(java.io.OutputStream out)
                  throws java.io.IOException
Construit le flux de sortie du fichier Implements IMimeResponse interface

Specified by:
downloadData in interface org.jasig.portal.IMimeResponse
Parameters:
out - Le flux de sortie
Throws:
java.io.IOException

getName

public java.lang.String getName()
Retourne le nom du fichier Implements IMimeResponse interface Warning : méthode inutilisée

Specified by:
getName in interface org.jasig.portal.IMimeResponse
Returns:
name Le nom du fichier

getHeaders

public java.util.Map getHeaders()
Retourne la tables des headers HTTP Implements IMimeResponse interface

Specified by:
getHeaders in interface org.jasig.portal.IMimeResponse
Returns:
map Les headers

reportDownloadError

public void reportDownloadError(java.lang.Exception e)
Indique une erreur en cours de téléchargement Implements IMimeResponse interface

Specified by:
reportDownloadError in interface org.jasig.portal.IMimeResponse
Parameters:
e - L'exception rencontrée