Skip to content

Commit

Permalink
FIX log
Browse files Browse the repository at this point in the history
  • Loading branch information
mspasiano committed Feb 4, 2019
1 parent a111866 commit 1a29090
Show file tree
Hide file tree
Showing 6 changed files with 788 additions and 811 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<sonar.skip>true</sonar.skip>
<java.version>1.8</java.version>
<spring.version>4.3.3.RELEASE</spring.version>
<jada.version>6.0.46</jada.version>
<jada.version>6.0.47</jada.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sigla.build.number>${maven.build.timestamp}</sigla.build.number>
<slf4j.version>1.7.21</slf4j.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import it.cnr.jada.comp.ApplicationException;
import it.cnr.jada.comp.ComponentException;
import it.cnr.jada.ejb.CRUDComponentSession;
import it.cnr.jada.util.Log;
import it.cnr.jada.util.OrderedHashtable;
import it.cnr.jada.util.action.SearchProvider;
import it.cnr.jada.util.action.SelezionatoreListaBP;
Expand All @@ -45,6 +44,8 @@
import org.apache.http.HttpStatus;
import org.apache.pdfbox.io.MemoryUsageSetting;
import org.apache.pdfbox.multipdf.PDFMergerUtility;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.http.HttpServletResponse;
import java.io.*;
Expand All @@ -57,7 +58,7 @@

public abstract class AbstractFirmaDigitaleDocContBP extends SelezionatoreListaBP implements SearchProvider {
private static final long serialVersionUID = 1L;
private static final Log log = Log.getInstance(AbstractFirmaDigitaleDocContBP.class);
private static final Logger log = LoggerFactory.getLogger(AbstractFirmaDigitaleDocContBP.class);
protected String controlloCodiceFiscale;
private UtenteFirmaDettaglioBulk firmatario;

Expand Down Expand Up @@ -188,33 +189,25 @@ public boolean isSignButtonEnabled() {

public boolean isDeleteButtonHidden() {
StatoTrasmissione oggettobulk = (StatoTrasmissione) getModel();
if (oggettobulk.getStato_trasmissione().equals(MandatoBulk.STATO_TRASMISSIONE_PREDISPOSTO))
return false;
return true;
return !oggettobulk.getStato_trasmissione().equals(MandatoBulk.STATO_TRASMISSIONE_PREDISPOSTO);
}

public boolean isDeleteSignButtonHidden() {
StatoTrasmissione oggettobulk = (StatoTrasmissione) getModel();
if (firmatario == null)
return true;
if (oggettobulk.getStato_trasmissione().equals(MandatoBulk.STATO_TRASMISSIONE_PRIMA_FIRMA))
return false;
return true;
return !oggettobulk.getStato_trasmissione().equals(MandatoBulk.STATO_TRASMISSIONE_PRIMA_FIRMA);
}

public boolean isPdfDocumentiButtonHidden() {
StatoTrasmissione oggettobulk = (StatoTrasmissione) getModel();
if (oggettobulk.getStato_trasmissione().equals(MandatoBulk.STATO_TRASMISSIONE_PREDISPOSTO))
return false;
return true;
return !oggettobulk.getStato_trasmissione().equals(MandatoBulk.STATO_TRASMISSIONE_PREDISPOSTO);
}

public boolean isZipDocumentiButtonHidden() {
StatoTrasmissione oggettobulk = (StatoTrasmissione) getModel();
if (!oggettobulk.getStato_trasmissione().equals(MandatoBulk.STATO_TRASMISSIONE_NON_INSERITO) &&
!oggettobulk.getStato_trasmissione().equals(MandatoBulk.STATO_TRASMISSIONE_PREDISPOSTO))
return false;
return true;
return oggettobulk.getStato_trasmissione().equals(MandatoBulk.STATO_TRASMISSIONE_NON_INSERITO) ||
oggettobulk.getStato_trasmissione().equals(MandatoBulk.STATO_TRASMISSIONE_PREDISPOSTO);
}

@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -432,11 +425,11 @@ public void sign(ActionContext actioncontext, FirmaOTPBulk firmaOTPBulk) throws
}

protected void executeSign(ActionContext actioncontext, List<StatoTrasmissione> selectelElements, FirmaOTPBulk firmaOTPBulk) throws Exception {
Map<String, String> subjectDN = Optional.ofNullable(SpringUtil.getBean("documentiContabiliService",DocumentiContabiliService.class).getCertSubjectDN(firmaOTPBulk.getUserName(),
Map<String, String> subjectDN = Optional.ofNullable(SpringUtil.getBean("documentiContabiliService", DocumentiContabiliService.class).getCertSubjectDN(firmaOTPBulk.getUserName(),
firmaOTPBulk.getPassword()))
.orElseThrow(() -> new ApplicationException("Errore nella lettura dei certificati!\nVerificare Nome Utente e Password!"));
if (Optional.ofNullable(controlloCodiceFiscale).filter(s -> s.equalsIgnoreCase("Y")).isPresent()) {
SpringUtil.getBean("documentiContabiliService",DocumentiContabiliService.class).controllaCodiceFiscale(
SpringUtil.getBean("documentiContabiliService", DocumentiContabiliService.class).controllaCodiceFiscale(
subjectDN,
((CNRUserInfo) actioncontext.getUserInfo()).getUtente()
);
Expand Down
Loading

0 comments on commit 1a29090

Please sign in to comment.