Skip to content

Commit

Permalink
Aggiunto e gestito fogli di stile delle 2 versioni
Browse files Browse the repository at this point in the history
  • Loading branch information
gifracr committed Jan 10, 2017
1 parent 01c2797 commit acdcd54
Show file tree
Hide file tree
Showing 2 changed files with 3,077 additions and 2 deletions.
Expand Up @@ -303,8 +303,15 @@ public void scaricaFatturaHtml(ActionContext actioncontext) throws IOException,
ItemIterable<CmisObject> files = fatturaFolder.getChildren();
for (CmisObject cmisObject : files) {
if (cmisObject.getProperty(PropertyIds.SECONDARY_OBJECT_TYPE_IDS).getValues().contains("P:sigla_fatture_attachment:trasmissione_fattura")){
TransformerFactory tFactory = TransformerFactory.newInstance();
Source xslDoc = new StreamSource(this.getClass().getResourceAsStream("/it/cnr/contab/docamm00/bp/fatturapa_v1.1.xsl"));
TransformerFactory tFactory = TransformerFactory.newInstance();
Source xslDoc = null;
if (documentoEleTestata.getDocumentoEleTrasmissione().getFormatoTrasmissione().equals("FPA12")){
xslDoc = new StreamSource(this.getClass().getResourceAsStream("/it/cnr/contab/docamm00/bp/fatturapa_v1.2.xsl"));
} else if (documentoEleTestata.getDocumentoEleTrasmissione().getFormatoTrasmissione().equals("SDI11")){
xslDoc = new StreamSource(this.getClass().getResourceAsStream("/it/cnr/contab/docamm00/bp/fatturapa_v1.1.xsl"));
} else {
throw new ApplicationException("Il formato trasmissione indicato da SDI non rientra tra i formati attesi");
}
Source xmlDoc = new StreamSource(((Document)cmisObject).getContentStream().getStream());
HttpServletResponse response = ((HttpActionContext)actioncontext).getResponse();
OutputStream os = response.getOutputStream();
Expand Down

0 comments on commit acdcd54

Please sign in to comment.