ecar.servlet.relatorio
Class AbstractServletReportXmlXsl

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by ecar.servlet.relatorio.AbstractServletReportXmlXsl
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
LayoutArquivoExportacao, RelacaoItemEstrutura, RelatorioAcessoUsuario, RelatorioAcompanhamento, RelatorioAcompanhamento_BKP_07032007, RelatorioAcompanhamentoImpresso, RelatorioApendiceDois, RelatorioApendiceTres, RelatorioExemplo, RelatorioItemEstrutura, RelatorioOcorrenciasImportacao, RevisaoItemEstrutura, RevisaoItemEstruturaMetasFisicas

public abstract class AbstractServletReportXmlXsl
extends javax.servlet.http.HttpServlet

Author:
fabios
See Also:
Serialized Form

Field Summary
private  java.lang.String caminhoArquivoSaidaGravar
           
protected  org.apache.log4j.Logger logger
           
private  java.lang.String saida
           
static java.lang.String SAIDA_DOWNLOAD
           
static java.lang.String SAIDA_DOWNLOAD_E_GRAVAR
           
static java.lang.String SAIDA_GRAVAR
           
 
Constructor Summary
AbstractServletReportXmlXsl()
          Construtor.
 
Method Summary
 java.lang.String getCaminhoArquivoSaidaGravar()
          Retorna String caminhoArquivoSaidaGravar.
abstract  java.lang.String getErrorPage(javax.servlet.http.HttpServletRequest request, java.lang.String mensagem)
           
 java.lang.String getSaida()
          Retorna String saida.
abstract  java.lang.StringBuffer getXml(javax.servlet.http.HttpServletRequest request)
           
abstract  java.lang.String getXslFileName()
           
private  void parser(java.io.File stylesheet, java.lang.StringBuffer xml, javax.servlet.http.HttpServletResponse response)
          Mescla dados do XML com XSL.
private  void parserPPT(java.lang.String caminhoImagens, java.lang.StringBuffer xml, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Mescla dados do XML com XSL e exporta o relatorio para PPT.
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Prepara relatorio para ser impresso, mesclando XSL e XML.
 void setCaminhoArquivoSaidaGravar(java.lang.String caminhoArquivoSaidaGravar)
          Atribui valor especificado para String caminhoArquivoSaidaGravar.
 void setSaida(java.lang.String saida)
          Atribui velor especificado para String saida.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.apache.log4j.Logger logger

SAIDA_DOWNLOAD

public static java.lang.String SAIDA_DOWNLOAD

SAIDA_GRAVAR

public static java.lang.String SAIDA_GRAVAR

SAIDA_DOWNLOAD_E_GRAVAR

public static java.lang.String SAIDA_DOWNLOAD_E_GRAVAR

saida

private java.lang.String saida

caminhoArquivoSaidaGravar

private java.lang.String caminhoArquivoSaidaGravar
Constructor Detail

AbstractServletReportXmlXsl

public AbstractServletReportXmlXsl()
Construtor.

Method Detail

getSaida

public java.lang.String getSaida()
Retorna String saida.

Returns:
String
Since:
N/C

setSaida

public void setSaida(java.lang.String saida)
Atribui velor especificado para String saida.

Parameters:
String - saida
Since:
N/C

service

public final void service(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws javax.servlet.ServletException,
                          java.io.IOException
Prepara relatorio para ser impresso, mesclando XSL e XML.

Overrides:
service in class javax.servlet.http.HttpServlet
Parameters:
HttpServletRequest - request
HttpServletResponse - response
Throws:
ECARException
java.io.IOException
javax.servlet.ServletException
Since:
N/C

getXml

public abstract java.lang.StringBuffer getXml(javax.servlet.http.HttpServletRequest request)
                                       throws ECARException
Parameters:
HttpServletRequest - request
Returns:
StringBuffer
Throws:
ECARException
Since:
N/C

getXslFileName

public abstract java.lang.String getXslFileName()
Returns:
String
Since:
N/C

getErrorPage

public abstract java.lang.String getErrorPage(javax.servlet.http.HttpServletRequest request,
                                              java.lang.String mensagem)
Parameters:
HttpServletRequest - request
String - mensagem
Returns:
String
Since:
N/C

parser

private void parser(java.io.File stylesheet,
                    java.lang.StringBuffer xml,
                    javax.servlet.http.HttpServletResponse response)
             throws ECARException
Mescla dados do XML com XSL.

Parameters:
String - stylesheet
StringBuffer - xml
HttpServletResponse - response
Throws:
ECARException
Since:
N/C

parserPPT

private void parserPPT(java.lang.String caminhoImagens,
                       java.lang.StringBuffer xml,
                       javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws ECARException
Mescla dados do XML com XSL e exporta o relatorio para PPT.

Parameters:
String - stylesheet
StringBuffer - xml
HttpServletResponse - response
Throws:
ECARException
Since:
N/C

getCaminhoArquivoSaidaGravar

public java.lang.String getCaminhoArquivoSaidaGravar()
Retorna String caminhoArquivoSaidaGravar.

Returns:
String - (caminhoArquivoSaidaGravar)
Since:
N/C

setCaminhoArquivoSaidaGravar

public void setCaminhoArquivoSaidaGravar(java.lang.String caminhoArquivoSaidaGravar)
Atribui valor especificado para String caminhoArquivoSaidaGravar.

Parameters:
String - caminhoArquivoSaidaGravar
Since:
N/C


Copyright © 2007, PRODEPA - Processamento de Dados do Pará