asList("causalePagamentoBolli", "causalePagamentoOneri",
+ "codicePagamentoBolli", "codicePagamentoOneri", "companyId", "completa", "createDate",
+ "dataEffettuazione", "dettPraticaId", "dtInvioSignal", "dtProtocollo", "geoDtRelazione", "gestita",
+ "groupId", "importoBolli", "importoSpeseIstruttoria", "integrazione", "intPraticaId",
+ "mezzoPagamentoBolli", "mezzoPagamentoOneri", "modifiedDate", "pagAdeguamentoSismico",
+ "pagAltriCasiCulturali", "pagAltriCasiPaesaggistici", "pagAltro", "pagamentoIdBolli",
+ "pagamentoIdOneri", "pagCalcolatoAdeguamentoSismico", "pagCalcolatoMiglioramentoSismico",
+ "pagCalcolatoOperaNonQuantificabile", "pagCalcolatoRiparazioneInterventoLocale", "pagCondotte",
+ "pagConsultazioniArchivio", "pagEffettivoAdeguamentoSismico", "pagEffettivoMiglioramentoSismico",
+ "pagEffettivoOperaNonQuantificabile", "pagEffettivoRiparazioneInterventoLocale", "pagGrandiStrutture",
+ "pagImmobiliPreesistenti", "pagImpiantiEolici", "pagInterventiRestauroManufatti", "pagLottizzazioni",
+ "pagManifestiPubblicitari", "pagMiglioramentoSismico", "pagMiglioramentoSismicoSicilia",
+ "pagNoteUtente", "pagNuovaCostruzione", "pagNuoveRealizzazioni", "pagOperaNonQuantificabile",
+ "pagPalificazioni", "pagPareriDiMassima", "pagRilascioAttestazioni", "pagRiparazioneInterventoLocale",
+ "pagSoggettiAdAutorizzazione", "pagVarianti", "pagVariantiPareriResi", "protocollo",
+ "soggettoSostituitoId", "status", "statusByUserId", "statusByUserName", "statusDate", "statusTask",
+ "tipoIntegrazione", "uuid_", "userId", "userName", "varianteNumero", "version");
DETT_PRATICA_FIELDS = new ArrayList<>();
DETT_PRATICA_FIELDS_TYPES = new HashMap<>();
for (int i = 0; i < DettPraticaImpl.TABLE_COLUMNS.length; i++) {
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DettPraticaImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DettPraticaImpl.java
index af8ecaa3..dd20c18f 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DettPraticaImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DettPraticaImpl.java
@@ -1,28 +1,19 @@
/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
+ * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/
package it.tref.liferay.portos.bo.model.impl;
import it.tref.liferay.portos.bo.model.IntPratica;
-import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil;
-import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil;
import it.tref.liferay.portos.bo.util.AzioniPraticheUtil;
import java.text.SimpleDateFormat;
-import java.util.LinkedHashMap;
import java.util.Locale;
-import java.util.Map;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
@@ -37,7 +28,6 @@ import com.liferay.portal.kernel.util.Validator;
/**
* The extended model implementation for the DettPratica service. Represents a row in the
* "portos_bo_DettPratica" database table, with each column mapped to a property of this class.
- *
*
* Helper methods and all application logic should be put in this class. Whenever methods are added, rerun
* ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.bo.model.DettPratica} interface.
@@ -55,22 +45,7 @@ public class DettPraticaImpl extends DettPraticaBaseImpl {
private static final Log _log = LogFactoryUtil.getLog(DettPraticaImpl.class);
- public DettPraticaImpl() {
- }
-
- public Map getTipologieSoggetto(){
- Map soggetti = SoggettoLocalServiceUtil.getTipologieSoggetti();
- if(getNoCollaudo() || getNominaCollaudatore())
- soggetti.remove(TipoSoggettoUtil.COLLAUDATORE);
-
- if(getNormLavoriNoDirettore() || getNominaDirettoreLavori())
- soggetti.remove(TipoSoggettoUtil.DIRETTORE_LAVORI);
-
- if(getNormLavoriInProprio() || getNominaImpresa())
- soggetti.remove(TipoSoggettoUtil.DITTA);
-
- return soggetti;
- }
+ public DettPraticaImpl() {}
@Override
public String getTitle(Locale locale) {
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java
index 4989d4cb..155bb68d 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java
@@ -1,13 +1,9 @@
/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
+ * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/
package it.tref.liferay.portos.bo.model.impl;
@@ -36,6 +32,7 @@ import org.apache.commons.lang.StringUtils;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
+import com.liferay.portal.kernel.util.HtmlUtil;
import com.liferay.portal.kernel.util.LocaleUtil;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
@@ -43,7 +40,6 @@ import com.liferay.portal.kernel.util.Validator;
/**
* The extended model implementation for the IntPratica service. Represents a row in the
* "portos_bo_IntPratica" database table, with each column mapped to a property of this class.
- *
*
* Helper methods and all application logic should be put in this class. Whenever methods are added, rerun
* ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.bo.model.IntPratica} interface.
@@ -61,8 +57,7 @@ public class IntPraticaImpl extends IntPraticaBaseImpl {
private static final Log _log = LogFactoryUtil.getLog(IntPraticaImpl.class);
private Integer distanzaOrtodromica = null;
- public IntPraticaImpl() {
- }
+ public IntPraticaImpl() {}
@Override
public String getTitle(Locale locale, boolean completed) {
@@ -108,65 +103,59 @@ public class IntPraticaImpl extends IntPraticaBaseImpl {
}
return completata;
}
-
+
@Override
- public int getTipoRichiesta(){
- switch(getTipoProcedura()){
+ public int getTipoRichiesta() {
+ switch (getTipoProcedura()) {
case Constants.PROCEDURA_P1:
case Constants.PROCEDURA_Q1:
return Constants.BENI_MOBILI;
-
case Constants.PROCEDURA_P2:
case Constants.PROCEDURA_Q2:
return Constants.BENI_IMMOBILI;
-
case Constants.PROCEDURA_P3:
case Constants.PROCEDURA_Q3:
return Constants.VIARCH;
-
case Constants.PROCEDURA_P4:
case Constants.PROCEDURA_Q4:
return Constants.AUT_URBANISTICA;
-
case Constants.PROCEDURA_P5:
case Constants.PROCEDURA_Q5:
return Constants.SETTORI_SPECIALI;
-
case Constants.PROCEDURA_P6:
case Constants.PROCEDURA_Q6:
return Constants.AUT_PAESAGGISTICA;
-
case Constants.PROCEDURA_P7:
case Constants.PROCEDURA_Q7:
return Constants.LIEVE_ENTITA;
-
- //case Constants.PROCEDURA_P8:
+ case Constants.PROCEDURA_P8:
+ case Constants.PROCEDURA_Q8:
case Constants.PROCEDURA_P9:
- //case Constants.PROCEDURA_Q8:
case Constants.PROCEDURA_Q9:
return Constants.SANATORIE;
-
case Constants.PROCEDURA_P10:
case Constants.PROCEDURA_Q10:
return Constants.VINCOLI;
-
default:
return 0;
-
}
}
-
+
+ @Override
public String getIndirizzo() throws SystemException {
+
Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(getTerritorioId());
Comune comune = ComuneLocalServiceUtil.fetchComune(territorio.getComuneId());
DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(getIntPraticaId());
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(),
territorio.getCodiceProvincia());
- return comune.getDenominazione() + " (" + provincia.getSigla() + ")
" + dettPratica.getVia();
+ return comune.getDenominazione() + " (" + provincia.getSigla() + ")
"
+ + HtmlUtil.escape(dettPratica.getVia());
}
@Override
public Integer calcolaDistanzaOrtodromica(double lat, double lng) throws SystemException {
+
String localizzazione = null;
distanzaOrtodromica = null;
DettPratica dett = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(getIntPraticaId());
@@ -189,8 +178,7 @@ public class IntPraticaImpl extends IntPraticaBaseImpl {
@Override
public Integer getDistanzaOrtodromica() {
+
return distanzaOrtodromica;
}
-
-
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeServiceImpl.java
index dc4c12bb..2486fd36 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeServiceImpl.java
@@ -1,20 +1,15 @@
/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
+ * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/
package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.AllegatoManuale;
import it.tref.liferay.portos.bo.model.Avviso;
-import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.AllegatoManualeServiceBaseImpl;
import java.util.List;
@@ -27,11 +22,9 @@ import com.liferay.portal.service.ServiceContext;
/**
* The implementation of the allegato manuale remote service.
- *
*
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* their definitions into the {@link it.tref.liferay.portos.bo.service.AllegatoManualeService} interface.
- *
*
* This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS
* credentials because this service can be accessed remotely.
@@ -96,7 +89,7 @@ public class AllegatoManualeServiceImpl extends AllegatoManualeServiceBaseImpl {
@Override
public AllegatoManuale deleteAllegatoManuale(AllegatoManuale allegatoManuale) throws SystemException {
- Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(allegatoManuale.getAvvisoId());
+ Avviso avviso = avvisoLocalService.fetchAvviso(allegatoManuale.getAvvisoId());
if (Validator.isNotNull(avviso) && Validator.isNull(avviso.getFileEntryIdInvio())) {
return allegatoManualeLocalService.deleteAllegatoManuale(allegatoManuale);
} else {
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java
index 96406b4a..fff6ea31 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java
@@ -15,13 +15,6 @@ import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Provincia;
import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.model.Territorio;
-import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.DelegaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.AsseverazioneLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
@@ -62,10 +55,8 @@ import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User;
import com.liferay.portal.service.ServiceContext;
-import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
-import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
/**
* The implementation of the asseverazione local service.
@@ -105,7 +96,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
public String testoAsseverazione(String tipo, String codiceFiscale, long dettPraticaId, String relazioni)
throws PortalException, SystemException, IOException {
- DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
+ DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId);
return testoAsseverazione(tipo, codiceFiscale, dettPratica, relazioni);
}
@@ -119,7 +110,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
private String testoAsseverazione(String tipo, String codiceFiscale, DettPratica dettPratica, String relazioni,
boolean anteprima) throws SystemException, PortalException, IOException {
- List soggetti = SoggettoLocalServiceUtil.getValidTmpByIntPratica_TipologiaSoggetto(
+ List soggetti = soggettoLocalService.getValidTmpByIntPratica_TipologiaSoggetto(
dettPratica.getIntPraticaId(), tipo);
Soggetto soggetto = null;
for (Soggetto iter : soggetti) {
@@ -136,7 +127,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
return testoAsseverazione(tipo, nome, cognome, codiceFiscale, soggetto.getAmbitoProfessione(), dettPratica,
relazioni, anteprima, albo, albon, albop);
}
- User user = UserLocalServiceUtil.fetchUserByScreenName(dettPratica.getCompanyId(), codiceFiscale);
+ User user = userLocalService.fetchUserByScreenName(dettPratica.getCompanyId(), codiceFiscale);
if (Validator.isNotNull(user)) {
return testoAsseverazione(tipo, user.getFirstName(), user.getLastName(), user.getScreenName(),
StringPool.BLANK, dettPratica, relazioni, anteprima, StringPool.BLANK, StringPool.BLANK,
@@ -199,8 +190,8 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
boolean rischio = (RG.equals("3") || RG.equals("4") || RG.equals("5") || RI.equals("3") || RI.equals("4")
|| PG.equals("3") || PG.equals("4") || PI.equals("3") || PI.equals("4") || PI.equals("5"));
boolean coniugio = Validator.isNotNull(relazioni);
- IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
- Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
+ IntPratica intPratica = intPraticaLocalService.getIntPratica(dettPratica.getIntPraticaId());
+ Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
float ag = 0;
if (Validator.isNotNull(dettPratica.getAg())) {
ag = Float.parseFloat(dettPratica.getAg().replace(StringPool.COMMA, StringPool.PERIOD));
@@ -326,14 +317,14 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId);
long intPraticaId = dettPratica.getIntPraticaId();
IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
- User titolaredigitaleUser = UserLocalServiceUtil.getUser(intPratica.getUserId());
+ User titolaredigitaleUser = userLocalService.getUser(intPratica.getUserId());
if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())
|| TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())
|| TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) {
Set nuoviSoggetti = new HashSet<>(soggettoLocalService.getValidTmpByDettPratica(dettPraticaId));
List cfNuoviSoggetti = soggettoLocalService.getCfValidTmpByDettPratica(dettPraticaId);
List nuoviDelegati = new ArrayList(
- DelegaLocalServiceUtil.findCfByDettPratica_Tipologia_InEsito(dettPraticaId, new String[] {
+ delegaLocalService.findCfByDettPratica_Tipologia_InEsito(dettPraticaId, new String[] {
TipoSoggettoUtil.COMMITTENTE, TipoSoggettoUtil.DIRETTORE_LAVORI, TipoSoggettoUtil.GEOLOGO,
TipoSoggettoUtil.DITTA, TipoSoggettoUtil.PROGETTISTA },
new String[] { AsseverazioniUtil.STATO_ESEGUITA }));
@@ -396,7 +387,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
asseverazione.setEsito(AsseverazioniUtil.STATO_ASSEGNATA);
asseverazione.setDtEsito(null);
if (asseverazione.getFileEntryId() != 0) {
- DLAppLocalServiceUtil.deleteFileEntry(asseverazione.getFileEntryId());
+ dlAppLocalService.deleteFileEntry(asseverazione.getFileEntryId());
asseverazione.setFileEntryId(0);
}
asseverazionePersistence.update(asseverazione);
@@ -468,10 +459,10 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
testoAsseverazione = AsseverazioniUtil.retrieveAsseverazioneText(asseverazione,
asseverazione.getCodiceFiscale());
}
- IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(asseverazione.getIntPraticaId());
- Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
- Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId());
- Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(asseverazione.getCompanyId(),
+ IntPratica intPratica = intPraticaLocalService.getIntPratica(asseverazione.getIntPraticaId());
+ Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
+ Comune comune = comuneLocalService.getComune(territorio.getComuneId());
+ Provincia provincia = provinciaLocalService.fetchByC_C(asseverazione.getCompanyId(),
comune.getCodiceProvincia());
parameters.put("html", testoAsseverazione);
parameters.put("modello", asseverazione.getModello());
@@ -516,7 +507,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
Asseverazione asseverazione = getAsseverazione(asseverazioneId);
if (asseverazione.getEsito().equalsIgnoreCase(AsseverazioniUtil.STATO_ESEGUITA)
&& asseverazione.getFileEntryId() != 0) {
- DLAppLocalServiceUtil.deleteFileEntry(asseverazione.getFileEntryId());
+ dlAppLocalService.deleteFileEntry(asseverazione.getFileEntryId());
asseverazione.setEsito(null);
asseverazione.setDtEsito(null);
asseverazione.setFileEntryId(0);
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java
index d6bce8b4..d5ba7b99 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java
@@ -1,21 +1,15 @@
/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
+ * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/
package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.model.IntPratica;
-import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.AvvisoLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
@@ -64,16 +58,13 @@ import com.liferay.portal.model.User;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
-import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
import com.liferay.util.dao.orm.CustomSQLUtil;
/**
* The implementation of the avviso local service.
- *
*
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* their definitions into the {@link it.tref.liferay.portos.bo.service.AvvisoLocalService} interface.
- *
*
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS
* credentials because this service can only be accessed from within the same VM.
@@ -89,7 +80,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
* it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil} to access the avviso local service.
*/
- private static final Log _log = LogFactoryUtil.getLog(AvvisoLocalServiceImpl.class.getName());
+ private static final Log _log = LogFactoryUtil.getLog(AvvisoLocalServiceImpl.class);
@Override
public Avviso createStandardAvvisoPratica(IntPratica intPratica, long classPk, String className,
@@ -145,21 +136,20 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
serviceContext);
} else {
byte[] bytes = Base64.decode(base64File.substring(28));
- long attachmentFolderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(serviceContext.getCompanyId(),
+ long attachmentFolderId = configurazioneLocalService.findByC_ChiaveLong(serviceContext.getCompanyId(),
ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
- Folder attachmentFolder = DLAppLocalServiceUtil.getFolder(attachmentFolderId);
+ Folder attachmentFolder = dlAppLocalService.getFolder(attachmentFolderId);
long repositoryId = attachmentFolder.getRepositoryId();
String folderName = PraticaUtil.getFolderName(classPk);
Folder folder = null;
try {
- folder = DLAppLocalServiceUtil.getFolder(repositoryId, attachmentFolder.getFolderId(), folderName);
+ folder = dlAppLocalService.getFolder(repositoryId, attachmentFolder.getFolderId(), folderName);
} catch (NoSuchFolderException e) {
- folder = DLAppLocalServiceUtil.addFolder(serviceContext.getUserId(),
- attachmentFolder.getRepositoryId(), attachmentFolder.getFolderId(), folderName,
- StringPool.BLANK, serviceContext);
+ folder = dlAppLocalService.addFolder(serviceContext.getUserId(), attachmentFolder.getRepositoryId(),
+ attachmentFolder.getFolderId(), folderName, StringPool.BLANK, serviceContext);
}
String targetFileName = getFileNameAvviso(classPk, StatoPraticaConstants.SANZIONE_DOC1, null, "F") + ".pdf";
- FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry(serviceContext.getUserId(), repositoryId,
+ FileEntry fileEntry = dlAppLocalService.addFileEntry(serviceContext.getUserId(), repositoryId,
folder.getFolderId(), StringPool.BLANK, ContentTypes.APPLICATION_PDF, targetFileName,
targetFileName, StringPool.BLANK, bytes, serviceContext);
return addAvviso(intPraticaId, StringPool.BLANK, new Date(), tipoAvviso, stato, 0L, classPk, className,
@@ -380,20 +370,17 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
if (Validator.isNotNull(avviso.getFileEntryIdBase())) {
dlAppLocalService.deleteFileEntry(avviso.getFileEntryIdBase());
}
- } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) {
- }
+ } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) {}
try {
if (Validator.isNotNull(avviso.getFileEntryIdInvio())) {
dlAppLocalService.deleteFileEntry(avviso.getFileEntryIdInvio());
}
- } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) {
- }
+ } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) {}
try {
if (Validator.isNotNull(avviso.getFileEntryIdProtocollo())) {
dlAppLocalService.deleteFileEntry(avviso.getFileEntryIdProtocollo());
}
- } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) {
- }
+ } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) {}
} catch (PortalException e) {
throw new SystemException(e);
}
@@ -1072,15 +1059,15 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
public Avviso addFileFirmato(long avvisoId, long classPk, String fileToSave, ServiceContext serviceContext)
throws Exception {
- Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(avvisoId);
- long folderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(avviso.getCompanyId(), avvisoLocalService
- .getAllTipoDocumentoFolderProps().get(avviso.getTipoDocumento()));
+ Avviso avviso = fetchAvviso(avvisoId);
+ long folderId = configurazioneLocalService.findByC_ChiaveLong(avviso.getCompanyId(),
+ getAllTipoDocumentoFolderProps().get(avviso.getTipoDocumento()));
String fileName = getFileNameAvviso(classPk, avviso.getTipoDocumento(), avviso.getAvvisoId(), "F");
if (Validator.isNotNull(folderId)) {
- Folder folder = DLAppLocalServiceUtil.getFolder(folderId);
+ Folder folder = dlAppLocalService.getFolder(folderId);
if (Validator.isNotNull(folder)) {
byte[] bytes = Base64.decode(fileToSave);
- FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry(avviso.getUserId(), folder.getRepositoryId(),
+ FileEntry fileEntry = dlAppLocalService.addFileEntry(avviso.getUserId(), folder.getRepositoryId(),
folderId, fileName, MimeTypesUtil.getContentType(fileName + ".p7m"), fileName + ".p7m",
StringPool.BLANK, StringPool.BLANK, bytes, serviceContext);
avviso.setFileEntryIdInvio(fileEntry.getFileEntryId());
@@ -1130,7 +1117,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
} else if (Validator.isNotNull(numeroProtocollo) || Validator.isNotNull(dataDa) || Validator.isNotNull(dataA)) {
Order defaultOrder = OrderFactoryUtil.asc("dtProtocollo");
query.addOrder(defaultOrder);
- lista = AvvisoLocalServiceUtil.dynamicQuery(query, start, end);
+ lista = dynamicQuery(query, start, end);
}
return lista;
}
@@ -1242,7 +1229,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
@Override
public Avviso getAvvisoVidimazione(long intPraticaId, long dettPraticaID) throws SystemException {
- DynamicQuery dynamicQuery = AvvisoLocalServiceUtil.dynamicQuery();
+ DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento").in(
new String[] { StatoPraticaConstants.VIDIMATA }));
dynamicQuery.add(PropertyFactoryUtil.forName("fileEntryIdProtocollo").ne(0L));
@@ -1260,7 +1247,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
@Override
public Avviso getLastAvvisoIntegrazione(long intPraticaId) throws SystemException {
- DynamicQuery dynamicQuery = AvvisoLocalServiceUtil.dynamicQuery();
+ DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento").in(
new String[] { StatoPraticaConstants.INTEGRAZIONE, StatoPraticaConstants.PREAVVISO_CONTRARIO }));
dynamicQuery.add(PropertyFactoryUtil.forName("fileEntryIdProtocollo").ne(0L));
@@ -1272,4 +1259,4 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
List ritorno = dynamicQuery(dynamicQuery, 0, 1);
return ritorno.isEmpty() ? null : ritorno.get(0);
}
-}
\ No newline at end of file
+}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/CollaudoLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/CollaudoLocalServiceImpl.java
index 2465a553..28323c27 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/CollaudoLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/CollaudoLocalServiceImpl.java
@@ -14,7 +14,6 @@ import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento;
-import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.CollaudoLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.PagamentoConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
@@ -92,7 +91,7 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
public Collaudo addCollaudo(long intPraticaId, ServiceContext serviceContext) throws PortalException,
SystemException {
- IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
+ IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
Collaudo collaudo = initCollaudo(serviceContext);
collaudo.setGroupId(intPratica.getGroupId());
collaudo.setIntPraticaId(intPraticaId);
@@ -173,7 +172,7 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
public void updateEsitoPagamento(long pagamentoId, long collaudoId, String stato) throws SystemException,
PortalException {
- updateEsitoPagamento(pagamentoId, collaudoId, 0l, stato);
+ updateEsitoPagamento(pagamentoId, collaudoId, 0, stato);
}
@Override
@@ -249,7 +248,7 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
serviceContext.setScopeGroupId(collaudo.getGroupId());
serviceContext.setCompanyId(collaudo.getCompanyId());
serviceContext.setUserId(collaudo.getUserId());
- MailUtil.invioMailNotifica(collaudo.getIntPraticaId(), 0l, collaudoId, Collaudo.class.getName(), to, cc, ccn,
+ MailUtil.invioMailNotifica(collaudo.getIntPraticaId(), 0, collaudoId, Collaudo.class.getName(), to, cc, ccn,
"NOTIFICA-BO", templateVariables, null, serviceContext);
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java
index 3248fe1b..6b6f5b7f 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java
@@ -20,7 +20,6 @@ import it.tref.liferay.portos.bo.DenominazioneException;
import it.tref.liferay.portos.bo.DuplicateComuneException;
import it.tref.liferay.portos.bo.model.Comune;
import it.tref.liferay.portos.bo.model.Territorio;
-import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ComuneLocalServiceBaseImpl;
import java.util.ArrayList;
@@ -282,7 +281,7 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
List organizationList = OrganizationLocalServiceUtil.getUserOrganizations(userId);
if (Validator.isNotNull(organizationList)) {
for (Organization org : organizationList) {
- List territori = TerritorioLocalServiceUtil.getTerritori(org.getCompanyId(),
+ List territori = territorioLocalService.getTerritori(org.getCompanyId(),
org.getGroupId(), QueryUtil.ALL_POS, QueryUtil.ALL_POS);
if (Validator.isNotNull(territori)) {
for (Territorio terr : territori) {
@@ -309,7 +308,7 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
if (Validator.isNotNull(organizationList)) {
for (Organization org : organizationList) {
if (org.getGroupId() == ufficioId) {
- List territori = TerritorioLocalServiceUtil.getTerritori(org.getCompanyId(),
+ List territori = territorioLocalService.getTerritori(org.getCompanyId(),
org.getGroupId(), QueryUtil.ALL_POS, QueryUtil.ALL_POS);
if (Validator.isNotNull(territori)) {
for (Territorio terr : territori) {
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneServiceImpl.java
index 931ec094..e6aec32e 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneServiceImpl.java
@@ -9,7 +9,6 @@
package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.Comune;
-import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ComuneServiceBaseImpl;
import java.util.List;
@@ -40,12 +39,12 @@ public class ComuneServiceImpl extends ComuneServiceBaseImpl {
@Override
public Comune getComune(long comuneId) throws PortalException, SystemException {
- return ComuneLocalServiceUtil.getComune(comuneId);
+ return comuneLocalService.getComune(comuneId);
}
@Override
public List getComunes(int start, int end) throws SystemException {
- return ComuneLocalServiceUtil.getComunes(start, end);
+ return comuneLocalService.getComunes(start, end);
}
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComunicazioneLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComunicazioneLocalServiceImpl.java
index 601c6caf..a5c3ec5b 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComunicazioneLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComunicazioneLocalServiceImpl.java
@@ -1,13 +1,9 @@
/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
+ * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/
package it.tref.liferay.portos.bo.service.impl;
@@ -42,11 +38,9 @@ import com.liferay.portal.service.ServiceContext;
/**
* The implementation of the comunicazione local service.
- *
*
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* their definitions into the {@link it.tref.liferay.portos.bo.service.ComunicazioneLocalService} interface.
- *
*
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS
* credentials because this service can only be accessed from within the same VM.
@@ -58,9 +52,7 @@ import com.liferay.portal.service.ServiceContext;
*/
public class ComunicazioneLocalServiceImpl extends ComunicazioneLocalServiceBaseImpl {
/*
- * NOTE FOR DEVELOPERS:
- *
- * Never reference this interface directly. Always use {@link
+ * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link
* it.tref.liferay.portos.bo.service.ComunicazioneLocalServiceUtil} to access the comunicazione local service.
*/
@@ -155,7 +147,7 @@ public class ComunicazioneLocalServiceImpl extends ComunicazioneLocalServiceBase
JSONObject templateVariable = JSONFactoryUtil.createJSONObject();
templateVariable.put("receiver", receiver);
templateVariable.put("link", url);
- MailUtil.invioMailNotifica(comunicazione.getIntPraticaId(), 0l, comunicazioneId, Comunicazione.class.getName(),
+ MailUtil.invioMailNotifica(comunicazione.getIntPraticaId(), 0, comunicazioneId, Comunicazione.class.getName(),
to, cc, ccn, "INVIO-RICHIESTA-ASSEVERAZIONE", templateVariable, null, serviceContext);
}
@@ -184,7 +176,7 @@ public class ComunicazioneLocalServiceImpl extends ComunicazioneLocalServiceBase
serviceContext.setScopeGroupId(comunicazione.getGroupId());
serviceContext.setCompanyId(comunicazione.getCompanyId());
serviceContext.setUserId(comunicazione.getUserId());
- MailUtil.invioMailNotifica(comunicazione.getIntPraticaId(), 0l, comunicazioneId, Comunicazione.class.getName(),
+ MailUtil.invioMailNotifica(comunicazione.getIntPraticaId(), 0, comunicazioneId, Comunicazione.class.getName(),
to, cc, ccn, "NOTIFICA-BO", templateVariables, null, serviceContext);
}
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ConfigurazioneServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ConfigurazioneServiceImpl.java
index e2367af1..1ae5c6b9 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ConfigurazioneServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ConfigurazioneServiceImpl.java
@@ -1,18 +1,13 @@
/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
+ * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/
package it.tref.liferay.portos.bo.service.impl;
-import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ConfigurazioneServiceBaseImpl;
import com.liferay.portal.kernel.exception.PortalException;
@@ -21,11 +16,9 @@ import com.liferay.portal.service.ServiceContext;
/**
* The implementation of the configurazione remote service.
- *
*
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* their definitions into the {@link it.tref.liferay.portos.bo.service.ConfigurazioneService} interface.
- *
*
* This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS
* credentials because this service can be accessed remotely.
@@ -44,19 +37,19 @@ public class ConfigurazioneServiceImpl extends ConfigurazioneServiceBaseImpl {
@Override
public long findByC_ChiaveLong(long companyId, String chiave) throws SystemException {
- return ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, chiave);
+ return configurazioneLocalService.findByC_ChiaveLong(companyId, chiave);
}
@Override
public String findByC_ChiaveString(long companyId, String chiave) throws SystemException {
- return ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId, chiave);
+ return configurazioneLocalService.findByC_ChiaveString(companyId, chiave);
}
@Override
public void storeConfig(String chiave, String valore, ServiceContext serviceContext) throws PortalException,
SystemException {
- ConfigurazioneLocalServiceUtil.storeConfig(chiave, valore, serviceContext);
+ configurazioneLocalService.storeConfig(chiave, valore, serviceContext);
}
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java
index 0cf7715b..666b097f 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java
@@ -15,11 +15,6 @@ import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.IntPratica;
-import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.TempisticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ControlloPraticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.Constants;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
@@ -83,8 +78,6 @@ import com.liferay.portal.service.OrganizationLocalServiceUtil;
import com.liferay.portal.service.RoleLocalServiceUtil;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserGroupRoleLocalServiceUtil;
-import com.liferay.portal.service.UserLocalServiceUtil;
-import com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil;
import com.liferay.portal.util.PortalUtil;
import com.liferay.portal.workflow.kaleo.model.KaleoInstance;
import com.liferay.portal.workflow.kaleo.service.KaleoInstanceLocalServiceUtil;
@@ -150,14 +143,14 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
serviceContext.getAssetLinkEntryIds(), now);
// ADT: BUG BO GESTIONE WORKFLOW
Map wfContextMap = new HashMap();
- DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
+ DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId);
if (dettPratica != null && dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)) {
wfContextMap.put("wf_variante", "OK");
}
// Workflow
WorkflowHandlerRegistryUtil.startWorkflowInstance(entry.getCompanyId(), entry.getGroupId(), entry.getUserId(),
ControlloPratica.class.getName(), entry.getPrimaryKey(), entry, serviceContext, wfContextMap);
- TempisticaLocalServiceUtil.addTempistica(intPraticaId, dettPraticaId, TempisticaConstants.TIPO_PRATICA,
+ tempisticaLocalService.addTempistica(intPraticaId, dettPraticaId, TempisticaConstants.TIPO_PRATICA,
entry.getCreateDate(), serviceContext);
return entry;
}
@@ -278,13 +271,13 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public boolean generazioneDocumento(long controlloPraticaId, String jsonParams, String tipoAvviso,
long userIdFirma, Map workflowContext) throws PortalException, SystemException {
- ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId);
- DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId());
+ ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
+ DettPratica dettPratica = dettPraticaLocalService.getDettPratica(controlloPratica.getDettPraticaId());
ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(controlloPratica.getCompanyId());
serviceContext.setScopeGroupId(controlloPratica.getGroupId());
serviceContext.setUserId(controlloPratica.getUserId());
- IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
+ IntPratica intPratica = intPraticaLocalService.getIntPratica(dettPratica.getIntPraticaId());
String userCodiceFiscale = GestioneFirmeUtil.getCodiceFiscaleFirma(controlloPratica.getCompanyId(),
controlloPratica.getGroupId(), intPratica.getStatoPratica());
if (!intPratica.getStatoPratica().equalsIgnoreCase(StatoPraticaConstants.CONFORME)) {
@@ -299,14 +292,14 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public boolean generaDocumentoFinale(long controlloPraticaId, String jsonParams, long userIdFirma,
Map workflowContext) throws PortalException, SystemException {
- ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId);
- DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId());
+ ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
+ DettPratica dettPratica = dettPraticaLocalService.getDettPratica(controlloPratica.getDettPraticaId());
ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(controlloPratica.getCompanyId());
serviceContext.setScopeGroupId(controlloPratica.getGroupId());
serviceContext.setUserId(controlloPratica.getUserId());
String statoPratica = getEsitoFinale(controlloPraticaId, workflowContext);
- User user = UserLocalServiceUtil.fetchUser(userIdFirma);
+ User user = userLocalService.fetchUser(userIdFirma);
String codiceFiscale = StringPool.BLANK;
if (user != null) {
codiceFiscale = user.getScreenName();
@@ -385,7 +378,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
private String getEsitoFinale(long controlloPraticaId, Map workflowContext)
throws PortalException, SystemException {
- ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId);
+ ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
Map parametri = WorkflowUtil.getFormParameters(controlloPratica);
String esitoScelta = (String) parametri.get("esito");
if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) {
@@ -416,8 +409,8 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public String getJsonListaIstruttori(long controlloPraticaId, Map workflowContext)
throws PortalException, SystemException {
- ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId);
- int unitaOperativa = IntPraticaLocalServiceUtil.getIntPratica(controlloPratica.getIntPraticaId())
+ ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
+ int unitaOperativa = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId())
.getUnitaOperativa();
boolean preassegnazione = (0 == unitaOperativa);
long companyId = controlloPratica.getCompanyId();
@@ -466,73 +459,89 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public String getJsonEsitoPratica(long controlloPraticaId, Map workflowContext)
throws PortalException, SystemException {
- ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId);
+ ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
IntPratica intPratica = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId());
switch (intPratica.getTipoRichiesta()) {
case Constants.SANATORIE:
- return JSON_SANATORIA;
+ return getJsonSanatoria();
case Constants.VIARCH:
- return JSON_VIARCH;
+ return getJsonViarch();
case Constants.VINCOLI:
- return JSON_VINCOLI;
+ return getJsonVincoli();
}
- return JSON_AUTORIZZAZIONE;
+ return getJsonAutorizzazione();
}
- private static final String JSON_AUTORIZZAZIONE = getJsonAutorizzazione();
- private static final String JSON_SANATORIA = getJsonSanatoria();
- private static final String JSON_VIARCH = getJsonViarch();
- private static final String JSON_VINCOLI = getJsonVincoli();
+ private static String jsonAutorizzazione = null;
private static String getJsonAutorizzazione() {
- JSONArray esito = JSONFactoryUtil.createJSONArray();
- esito.put(etichettaEsito(StatoPraticaConstants.CONFORME));
- esito.put(etichettaEsito(StatoPraticaConstants.NON_CONFORME));
- esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE));
- esito.put(etichettaEsito(StatoPraticaConstants.PREAVVISO_CONTRARIO));
- esito.put(etichettaEsito(StatoPraticaConstants.NO_PARERE));
- JSONObject ret = JSONFactoryUtil.createJSONObject();
- ret.put("esito", esito);
- return ret.toString();
+ if (jsonAutorizzazione == null) {
+ JSONArray esito = JSONFactoryUtil.createJSONArray();
+ esito.put(etichettaEsito(StatoPraticaConstants.CONFORME));
+ esito.put(etichettaEsito(StatoPraticaConstants.NON_CONFORME));
+ esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE));
+ esito.put(etichettaEsito(StatoPraticaConstants.PREAVVISO_CONTRARIO));
+ esito.put(etichettaEsito(StatoPraticaConstants.NO_PARERE));
+ JSONObject json = JSONFactoryUtil.createJSONObject();
+ json.put("esito", esito);
+ jsonAutorizzazione = esito.toString();
+ }
+ return jsonAutorizzazione;
}
+ private static String jsonSanatoria = null;
+
private static String getJsonSanatoria() {
- JSONArray esito = JSONFactoryUtil.createJSONArray();
- esito.put(etichettaEsito(StatoPraticaConstants.CONFORME));
- esito.put(etichettaEsito("Perizia sanzione", StatoPraticaConstants.INTEGRAZIONE, true));
- esito.put(etichettaEsito(StatoPraticaConstants.NON_CONFORME));
- esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE));
- esito.put(etichettaEsito(StatoPraticaConstants.PREAVVISO_CONTRARIO));
- esito.put(etichettaEsito(StatoPraticaConstants.NO_PARERE));
- JSONObject ret = JSONFactoryUtil.createJSONObject();
- ret.put("esito", esito);
- return ret.toString();
+ if (jsonSanatoria == null) {
+ JSONArray esito = JSONFactoryUtil.createJSONArray();
+ esito.put(etichettaEsito(StatoPraticaConstants.CONFORME));
+ esito.put(etichettaEsito("Perizia sanzione", StatoPraticaConstants.INTEGRAZIONE, true));
+ esito.put(etichettaEsito(StatoPraticaConstants.NON_CONFORME));
+ esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE));
+ esito.put(etichettaEsito(StatoPraticaConstants.PREAVVISO_CONTRARIO));
+ esito.put(etichettaEsito(StatoPraticaConstants.NO_PARERE));
+ JSONObject json = JSONFactoryUtil.createJSONObject();
+ json.put("esito", esito);
+ jsonSanatoria = json.toString();
+ }
+ return jsonSanatoria;
}
+ private static String jsonViarch = null;
+
private static String getJsonViarch() {
- JSONArray esito = JSONFactoryUtil.createJSONArray();
- esito.put(etichettaEsito("Attiva VIArch", StatoPraticaConstants.CONFORME));
- esito.put(etichettaEsito("Concludi VIArch", StatoPraticaConstants.NON_CONFORME));
- esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE));
- JSONObject ret = JSONFactoryUtil.createJSONObject();
- ret.put("esito", esito);
- return ret.toString();
+ if (jsonViarch == null) {
+ JSONArray esito = JSONFactoryUtil.createJSONArray();
+ esito.put(etichettaEsito("Attiva VIArch", StatoPraticaConstants.CONFORME));
+ esito.put(etichettaEsito("Concludi VIArch", StatoPraticaConstants.NON_CONFORME));
+ esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE));
+ esito.put(etichettaEsito(StatoPraticaConstants.NO_PARERE));
+ JSONObject json = JSONFactoryUtil.createJSONObject();
+ json.put("esito", esito);
+ jsonViarch = json.toString();
+ }
+ return jsonViarch;
}
+ private static String jsonVincoli = null;
+
private static String getJsonVincoli() {
- JSONArray esito = JSONFactoryUtil.createJSONArray();
- esito.put(etichettaEsito("Attestazione", StatoPraticaConstants.CONFORME));
- esito.put(etichettaEsito(StatoPraticaConstants.NON_CONFORME));
- esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE));
- esito.put(etichettaEsito(StatoPraticaConstants.PREAVVISO_CONTRARIO));
- esito.put(etichettaEsito(StatoPraticaConstants.NO_PARERE));
- JSONObject ret = JSONFactoryUtil.createJSONObject();
- ret.put("esito", esito);
- return ret.toString();
+ if (jsonVincoli == null) {
+ JSONArray esito = JSONFactoryUtil.createJSONArray();
+ esito.put(etichettaEsito("Attestazione", StatoPraticaConstants.CONFORME));
+ esito.put(etichettaEsito(StatoPraticaConstants.NON_CONFORME));
+ esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE));
+ esito.put(etichettaEsito(StatoPraticaConstants.PREAVVISO_CONTRARIO));
+ esito.put(etichettaEsito(StatoPraticaConstants.NO_PARERE));
+ JSONObject json = JSONFactoryUtil.createJSONObject();
+ json.put("esito", esito);
+ jsonVincoli = json.toString();
+ }
+ return jsonVincoli;
}
private static JSONObject etichettaEsito(String value) {
@@ -570,9 +579,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return controlloPraticaPersistence.update(controlloPratica);
}
- /**
- * ADT: BUG ID=5 - tracciamento operazione aggiungi varianti al controllo
- */
+ // ADT: BUG ID=5 - tracciamento operazione aggiungi varianti al controllo
@Override
@Indexable(type = IndexableType.REINDEX)
public ControlloPratica addPraticheAlControlloVarianti(long controlloPraticaId, long dettPraticaId,
@@ -603,7 +610,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public String getReturnValueScriptIniziale(long controlloPraticaId) throws PortalException, SystemException {
ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
- DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId());
+ DettPratica dettPratica = dettPraticaLocalService.getDettPratica(controlloPratica.getDettPraticaId());
if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) {
return "portos1_integrazioni";
} else {
@@ -615,7 +622,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public String getTipoEsito(long controlloPraticaId) throws SystemException, PortalException {
String tipoEsito = StringPool.BLANK;
- ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.fetchControlloPratica(controlloPraticaId);
+ ControlloPratica controlloPratica = fetchControlloPratica(controlloPraticaId);
ClassLoader classLoaderKaleo = (ClassLoader) PortletBeanLocatorUtil.locate(
com.liferay.portal.workflow.kaleo.service.ClpSerializer.getServletContextName(), "portletClassLoader");
DynamicQuery dqKaleo = DynamicQueryFactoryUtil.forClass(KaleoInstance.class, classLoaderKaleo);
@@ -658,12 +665,12 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
@Override
public Long calculateDateAvvioProcedimento(long controlloPraticaId) throws SystemException, PortalException {
- ControlloPratica controllo = ControlloPraticaLocalServiceUtil.fetchControlloPratica(controlloPraticaId);
- IntPratica pratica = IntPraticaLocalServiceUtil.fetchIntPratica(controllo.getIntPraticaId());
+ ControlloPratica controllo = fetchControlloPratica(controlloPraticaId);
+ IntPratica pratica = intPraticaLocalService.fetchIntPratica(controllo.getIntPraticaId());
Date apertura = pratica.getDtPratica();
Date chiusura = null;
long stop = 0;
- List avvisi = AvvisoLocalServiceUtil.findByIntPratica(
+ List avvisi = avvisoLocalService.findByIntPratica(
pratica.getIntPraticaId(),
QueryUtil.ALL_POS,
QueryUtil.ALL_POS,
@@ -764,11 +771,11 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
do {
controlli = controlloPraticaPersistence.findWithDynamicQuery(queryCP, start, start + 10);
for (ControlloPratica controllo : controlli) {
- IntPratica pratica = IntPraticaLocalServiceUtil.getIntPratica(controllo.getIntPraticaId());
+ IntPratica pratica = intPraticaLocalService.getIntPratica(controllo.getIntPraticaId());
if ((0 == unitaOperativa) || (pratica.getUnitaOperativa() == unitaOperativa)) {
long workflowInstanceId = 0L;
try {
- workflowInstanceId = WorkflowInstanceLinkLocalServiceUtil.getWorkflowInstanceLink(companyId,
+ workflowInstanceId = workflowInstanceLinkLocalService.getWorkflowInstanceLink(companyId,
groupId, ControlloPratica.class.getName(), controllo.getPrimaryKey())
.getWorkflowInstanceId();
} catch (NoSuchWorkflowInstanceLinkException e) {}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DelegaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DelegaLocalServiceImpl.java
index ea2cc9b1..99f44fdd 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DelegaLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DelegaLocalServiceImpl.java
@@ -9,7 +9,6 @@
package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.Delega;
-import it.tref.liferay.portos.bo.service.AsseverazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.DelegaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.bean.FirmeBean;
import it.tref.liferay.portos.bo.shared.util.FirmeUtil;
@@ -44,7 +43,6 @@ import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.model.DLFolder;
-import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil;
/**
@@ -390,7 +388,7 @@ public class DelegaLocalServiceImpl extends DelegaLocalServiceBaseImpl {
long userId = serviceContext.getUserId();
DLFolder folderTemplate = DLFolderLocalServiceUtil.getFolder(serviceContext.getThemeDisplay()
.getCompanyGroupId(), 0L, "Template");
- FileEntry fileEntryIdTemplate = DLAppLocalServiceUtil.getFileEntry(serviceContext.getThemeDisplay()
+ FileEntry fileEntryIdTemplate = dlAppLocalService.getFileEntry(serviceContext.getThemeDisplay()
.getCompanyGroupId(), folderTemplate.getFolderId(), "Modello Asseverazione");
DLFolder folderAllegati = DLFolderLocalServiceUtil.getFolder(serviceContext.getThemeDisplay()
.getCompanyGroupId(), 0L, "Allegati");
@@ -419,7 +417,7 @@ public class DelegaLocalServiceImpl extends DelegaLocalServiceBaseImpl {
relazioni = (String) dichiarazioniMap.get("relazioni");
}
User user = userLocalService.getUser(userId);
- parameters.put("html", AsseverazioneLocalServiceUtil.testoAsseverazione(TipoSoggettoUtil.GEOLOGO, user,
+ parameters.put("html", asseverazioneLocalService.testoAsseverazione(TipoSoggettoUtil.GEOLOGO, user,
dettPraticaId, relazioni));
parameters.put("modello", "AS-GEO");
ReportResultDto result = ReportUtil.generateReport(delega.getCompanyId(), userId, reportDto, null);
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java
index 91a360f0..42d04b41 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java
@@ -19,7 +19,6 @@ import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.model.Tempistica;
-import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.DettPraticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.PagamentoConstants;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
@@ -1015,6 +1014,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
String interventoVoceP7, boolean nominaImpresa, boolean nominaDirettoreLavori, boolean nominaCollaudatore,
boolean tcNoOpereEscavazione) throws PortalException, SystemException {
+ _log.info("Ciao1");
Date now = new Date();
DettPratica dettPratica = dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId);
dettPratica.setModifiedDate(serviceContext.getModifiedDate(now));
@@ -1699,7 +1699,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
dettPratica.setCodiceFiscalePrincipaleArcheologo(codiceFiscale);
break;
}
- dettPratica = DettPraticaLocalServiceUtil.updateDettPratica(dettPratica);
+ dettPratica = updateDettPratica(dettPratica);
return dettPratica;
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaServiceImpl.java
index b040acd1..fe72968d 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaServiceImpl.java
@@ -14,8 +14,6 @@ package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.Territorio;
-import it.tref.liferay.portos.bo.service.DettPraticaServiceUtil;
-import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.DettPraticaServiceBaseImpl;
import it.tref.liferay.portos.bo.service.permission.DettPraticaEntryPermission;
import it.tref.liferay.portos.bo.service.permission.DettPraticaPermission;
@@ -66,7 +64,7 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
public DettPratica addDettPratica(long territorioId, String tipoProcedura, ServiceContext serviceContext)
throws PortalException, SystemException {
- Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(territorioId);
+ Territorio territorio = territorioLocalService.getTerritorio(territorioId);
DettPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.ADD_ENTRY);
return dettPraticaLocalService.addDettPratica(territorioId, tipoProcedura, serviceContext);
}
@@ -333,7 +331,7 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
@Override
public DettPratica updateEsito(long dettPraticaId, int stato) throws IOException, SystemException, PortalException {
- DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
+ DettPratica dettPratica = getDettPratica(dettPraticaId);
DettPraticaPermission.check(getPermissionChecker(), dettPratica.getGroupId(), ActionKeys.ADD_ENTRY);
return dettPraticaLocalService.updateEsito(dettPraticaId, stato);
}
@@ -342,7 +340,7 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
public DettPratica updateEsitoIntegrazione(long dettPraticaId, int stato) throws IOException, SystemException,
PortalException {
- DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
+ DettPratica dettPratica = getDettPratica(dettPraticaId);
DettPraticaPermission.check(getPermissionChecker(), dettPratica.getGroupId(), ActionKeys.ADD_ENTRY);
return dettPraticaLocalService.updateEsitoIntegrazione(dettPraticaId, stato);
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java
index c1861a62..2a1f500e 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java
@@ -1,13 +1,9 @@
/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
+ * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/
package it.tref.liferay.portos.bo.service.impl;
@@ -52,11 +48,9 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
/**
* The implementation of the doc pratica local service.
- *
*
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* their definitions into the {@link it.tref.liferay.portos.bo.service.DocPraticaLocalService} interface.
- *
*
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS
* credentials because this service can only be accessed from within the same VM.
@@ -79,8 +73,7 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
if (Validator.isNotNull(docPratica.getDlFileEntryId())) {
dlAppLocalService.deleteFileEntry(docPratica.getDlFileEntryId());
}
- } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) {
- } catch (PortalException e) {
+ } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) {} catch (PortalException e) {
throw new SystemException(e);
}
return super.deleteDocPratica(docPratica);
@@ -198,7 +191,7 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
long companyId = territorio.getCompanyId();
long groupId = territorio.getGroupId();
// TODO forse è meglio ragionare con un'altra logica per i permessi
- User user = UserLocalServiceUtil.getRoleUsers(
+ User user = userLocalService.getRoleUsers(
RoleLocalServiceUtil.getRole(intPratica.getCompanyId(), RoleConstants.ADMINISTRATOR).getRoleId())
.get(0);
try {
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/FineLavoriLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/FineLavoriLocalServiceImpl.java
index 62b78c54..17a645e1 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/FineLavoriLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/FineLavoriLocalServiceImpl.java
@@ -1,13 +1,9 @@
/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
+ * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/
package it.tref.liferay.portos.bo.service.impl;
@@ -18,7 +14,6 @@ import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.FineLavori;
import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento;
-import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.FineLavoriLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.PagamentoConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
@@ -55,11 +50,9 @@ import com.liferay.portal.service.ServiceContext;
/**
* The implementation of the fine lavori local service.
- *
*
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* their definitions into the {@link it.tref.liferay.portos.bo.service.FineLavoriLocalService} interface.
- *
*
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS
* credentials because this service can only be accessed from within the same VM.
@@ -103,7 +96,7 @@ public class FineLavoriLocalServiceImpl extends FineLavoriLocalServiceBaseImpl {
public FineLavori addFineLavori(long intPraticaId, ServiceContext serviceContext) throws PortalException,
SystemException {
- IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
+ IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
FineLavori fineLavori = initFineLavori(serviceContext);
fineLavori.setGroupId(intPratica.getGroupId());
fineLavori.setIntPraticaId(intPraticaId);
@@ -196,7 +189,7 @@ public class FineLavoriLocalServiceImpl extends FineLavoriLocalServiceBaseImpl {
public void updateEsitoPagamento(long pagamentoId, long fineLavoriId, String stato) throws SystemException,
PortalException {
- updateEsitoPagamento(pagamentoId, fineLavoriId, 0l, stato);
+ updateEsitoPagamento(pagamentoId, fineLavoriId, 0, stato);
}
@Override
@@ -275,7 +268,7 @@ public class FineLavoriLocalServiceImpl extends FineLavoriLocalServiceBaseImpl {
serviceContext.setScopeGroupId(fineLavori.getGroupId());
serviceContext.setCompanyId(fineLavori.getCompanyId());
serviceContext.setUserId(fineLavori.getUserId());
- MailUtil.invioMailNotifica(fineLavori.getIntPraticaId(), 0l, fineLavoriId, FineLavori.class.getName(), to, cc,
+ MailUtil.invioMailNotifica(fineLavori.getIntPraticaId(), 0, fineLavoriId, FineLavori.class.getName(), to, cc,
ccn, "NOTIFICA-BO", templateVariables, null, serviceContext);
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/HistoryWorkflowActionLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/HistoryWorkflowActionLocalServiceImpl.java
index 5a598c7d..c8643406 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/HistoryWorkflowActionLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/HistoryWorkflowActionLocalServiceImpl.java
@@ -1,21 +1,14 @@
/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
+ * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/
package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.HistoryWorkflowAction;
-import it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.HistoryWorkflowActionLocalServiceBaseImpl;
import java.util.List;
@@ -28,17 +21,12 @@ import com.liferay.portal.kernel.exception.SystemException;
/**
* The implementation of the history workflow action local service.
- *
*
- * All custom service methods should be put in this class. Whenever methods are
- * added, rerun ServiceBuilder to copy their definitions into the
- * {@link it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalService}
- * interface.
- *
+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
+ * their definitions into the {@link it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalService} interface.
*
- * This is a local service. Methods of this service will not have security
- * checks based on the propagated JAAS credentials because this service can only
- * be accessed from within the same VM.
+ * This is a local service. Methods of this service will not have security checks based on the propagated JAAS
+ * credentials because this service can only be accessed from within the same VM.
*
*
* @author Davide Barbagallo, 3F Consulting + Manifattura Web Group s.r.l.
@@ -47,11 +35,9 @@ import com.liferay.portal.kernel.exception.SystemException;
*/
public class HistoryWorkflowActionLocalServiceImpl extends HistoryWorkflowActionLocalServiceBaseImpl {
/*
- * NOTE FOR DEVELOPERS:
- *
- * Never reference this interface directly. Always use {@link
- * it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalServiceUtil}
- * to access the history workflow action local service.
+ * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link
+ * it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalServiceUtil} to access the history workflow action
+ * local service.
*/
@Override
@@ -64,7 +50,7 @@ public class HistoryWorkflowActionLocalServiceImpl extends HistoryWorkflowAction
query.addOrder(OrderFactoryUtil.asc("createDate"));
else
query.addOrder(OrderFactoryUtil.desc("createDate"));
- return HistoryWorkflowActionLocalServiceUtil.dynamicQuery(query);
+ return dynamicQuery(query);
}
@Override
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java
index 6f63cd0f..60be4c0b 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java
@@ -26,11 +26,6 @@ import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.model.StoricoSoggettoPratica;
import it.tref.liferay.portos.bo.model.Tempistica;
import it.tref.liferay.portos.bo.model.Territorio;
-import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.StoricoSoggettoPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.IntPraticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.service.persistence.IntPraticaFinderUtil;
import it.tref.liferay.portos.bo.shared.bean.FirmeBean;
@@ -102,7 +97,6 @@ import com.liferay.portal.security.permission.PermissionThreadLocal;
import com.liferay.portal.service.GroupLocalServiceUtil;
import com.liferay.portal.service.OrganizationLocalServiceUtil;
import com.liferay.portal.service.ServiceContext;
-import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
@@ -150,7 +144,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
throws SystemException, PortalException {
User user = userLocalService.getUser(serviceContext.getUserId());
- Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(territorioId);
+ Territorio territorio = territorioLocalService.getTerritorio(territorioId);
Date now = new Date();
IntPratica intPratica = createIntPratica(counterLocalService.increment(IntPratica.class.getName()));
intPratica.setCompanyId(serviceContext.getCompanyId());
@@ -177,7 +171,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
Date dtPratica, ServiceContext serviceContext) throws PortalException, SystemException {
Date now = new Date();
- Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(territorioId);
+ Territorio territorio = territorioLocalService.getTerritorio(territorioId);
IntPratica intPratica = intPraticaPersistence.create(counterLocalService.increment(IntPratica.class.getName()));
intPratica.setCompanyId(serviceContext.getCompanyId());
intPratica.setUserId(userId);
@@ -400,7 +394,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
}
private DynamicQuery queryPosizione() {
- DynamicQuery query = IntPraticaLocalServiceUtil.dynamicQuery();
+ DynamicQuery query = dynamicQuery();
query.add(RestrictionsFactoryUtil.ne("numeroProgetto", StringPool.BLANK));
query.add(RestrictionsFactoryUtil.isNotNull("numeroProgetto"));
return query;
@@ -443,16 +437,16 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
IntPratica intPratica = getIntPratica(intPraticaId);
intPratica.setModifiedDate(new Date());
- User oldUser = UserLocalServiceUtil.getUser(intPratica.getUserId());
- User newUser = UserLocalServiceUtil.getUser(soggettoId);
+ User oldUser = userLocalService.getUser(intPratica.getUserId());
+ User newUser = userLocalService.getUser(soggettoId);
// sostituisci int pratica
intPratica.setUserId(soggettoId);
intPratica.setUserName(newUser.getFullName());
- DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId);
+ DettPratica dettPratica = dettPraticaLocalService.getLastCompletedByIntPratica(intPraticaId);
dettPratica.setCodiceFiscaleDelegatoCommittente(newUser.getScreenName());
- DettPraticaLocalServiceUtil.updateDettPratica(dettPratica);
+ dettPraticaLocalService.updateDettPratica(dettPratica);
// registra storico
- StoricoSoggettoPraticaLocalServiceUtil.addStoricoSoggettoPratica(intPraticaId, oldUser.getFirstName(),
+ storicoSoggettoPraticaLocalService.addStoricoSoggettoPratica(intPraticaId, oldUser.getFirstName(),
oldUser.getLastName(), oldUser.getScreenName(), serviceContext);
Indexer indexer = IndexerRegistryUtil.getIndexer(IntPratica.class);
intPratica = updateIntPratica(intPratica);
@@ -542,7 +536,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
private DynamicQuery createQueryProgetti(long companyId, long soggettoId) throws SystemException, PortalException {
- DynamicQuery dynamicQuery = intPraticaLocalService.dynamicQuery();
+ DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("companyId").eq(companyId));
dynamicQuery.add(PropertyFactoryUtil.forName("userId").eq(soggettoId));
dynamicQuery.add(RestrictionsFactoryUtil.ne("statoPratica", StatoPraticaConstants.ANNULLATA));
@@ -587,7 +581,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
private DynamicQuery createQueryArchivio(long companyId, long soggettoId, List ids) throws SystemException,
PortalException {
- DynamicQuery dynamicQuery = intPraticaLocalService.dynamicQuery();
+ DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("companyId").eq(companyId));
Disjunction disjunction = RestrictionsFactoryUtil.disjunction();
@@ -636,7 +630,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
private DynamicQuery createQueryAltriProgetti(long companyId, List ids) throws SystemException,
PortalException {
- DynamicQuery dynamicQuery = intPraticaLocalService.dynamicQuery();
+ DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("companyId").eq(companyId));
dynamicQuery.add(RestrictionsFactoryUtil.ne("status", WorkflowConstants.STATUS_ANY));
@@ -860,7 +854,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
queryCP.add(RestrictionsFactoryUtil.eq("intPraticaId", intPratica.getIntPraticaId()));
queryCP.addOrder(OrderFactoryUtil.desc("controlloPraticaId"));
@SuppressWarnings("unchecked")
- List appList = ControlloPraticaLocalServiceUtil.dynamicQuery(queryCP, QueryUtil.ALL_POS,
+ List appList = controlloPraticaLocalService.dynamicQuery(queryCP, QueryUtil.ALL_POS,
QueryUtil.ALL_POS);
for (ControlloPratica controlloPratica : appList) {
_log.info("disattivazione - ControlloPraticaId=" + controlloPratica.getControlloPraticaId());
@@ -1203,7 +1197,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
DynamicQuery queryCP = DynamicQueryFactoryUtil.forClass(ControlloPratica.class);
queryCP.add(RestrictionsFactoryUtil.eq("intPraticaId", intPratica.getIntPraticaId()));
@SuppressWarnings("unchecked")
- List appList = ControlloPraticaLocalServiceUtil.dynamicQuery(queryCP,
+ List appList = controlloPraticaLocalService.dynamicQuery(queryCP,
QueryUtil.ALL_POS, QueryUtil.ALL_POS);
for (ControlloPratica controlloPratica : appList) {
controlloIndexer.delete(companyId, controlloPratica.getUuid());
@@ -1220,14 +1214,14 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
public void reIndexFasciolo(String numeroProgetto, long companyId) throws SystemException {
IntPratica intPratica = null;
- intPratica = IntPraticaLocalServiceUtil.findByNumeroProgetto(numeroProgetto);
+ intPratica = findByNumeroProgetto(numeroProgetto);
reIndexFascicolo(intPratica, companyId);
}
@Override
public void reIndexFasciolo(long intPraticaId, long companyId) throws PortalException, SystemException {
- IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
+ IntPratica intPratica = getIntPratica(intPraticaId);
reIndexFascicolo(intPratica, companyId);
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaServiceImpl.java
index b6d9f7d3..85e92def 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaServiceImpl.java
@@ -14,8 +14,6 @@ package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Territorio;
-import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.IntPraticaServiceBaseImpl;
import it.tref.liferay.portos.bo.service.permission.IntPraticaPermission;
import it.tref.liferay.portos.bo.shared.util.ActionKeys;
@@ -62,7 +60,7 @@ public class IntPraticaServiceImpl extends IntPraticaServiceBaseImpl {
@Override
public void deleteIntPratica(long intPraticaId, long userId) throws PortalException, SystemException {
- IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
+ IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
if (ValidazionePraticaUtil.canDeletePratica(intPraticaId, userId)) {
intPraticaLocalService.deleteIntPratica(intPratica);
} else {
@@ -73,8 +71,8 @@ public class IntPraticaServiceImpl extends IntPraticaServiceBaseImpl {
@Override
public void sospendiPratica(long intPraticaId, boolean sospesa) throws PortalException, SystemException {
- IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
- Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
+ IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
+ Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.SOSPENDI_FASCICOLO);
intPraticaLocalService.sospendiPratica(intPraticaId, sospesa);
}
@@ -83,8 +81,8 @@ public class IntPraticaServiceImpl extends IntPraticaServiceBaseImpl {
public void cambiaTitolare(long intPraticaId, long soggettoId, ServiceContext serviceContext)
throws PortalException, SystemException {
- IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
- Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
+ IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
+ Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.CAMBIO_TITOLARE);
intPraticaLocalService.cambiaTitolare(intPraticaId, soggettoId, serviceContext);
}
@@ -92,8 +90,8 @@ public class IntPraticaServiceImpl extends IntPraticaServiceBaseImpl {
@Override
public void updateStatoPratica(long intPraticaId, String statoPratica) throws PortalException, SystemException {
- IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
- Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
+ IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
+ Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.CAMBIO_STATO);
intPraticaLocalService.updateStatoPratica(intPraticaId, statoPratica);
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java
index 6499b1c9..a591028b 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java
@@ -1,13 +1,9 @@
/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
+ * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/
package it.tref.liferay.portos.bo.service.impl;
@@ -45,15 +41,12 @@ import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
-import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
/**
* The implementation of the pagamento local service.
- *
*
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* their definitions into the {@link it.tref.liferay.portos.bo.service.PagamentoLocalService} interface.
- *
*
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS
* credentials because this service can only be accessed from within the same VM.
@@ -72,7 +65,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
private static final Log _log = LogFactoryUtil.getLog(PagamentoLocalServiceImpl.class);
@SuppressWarnings("serial")
- private static Map pagamenti = new HashMap() {
+ private static final Map PAGAMENTI = new HashMap() {
{
put("pagSoggettiAdAutorizzazione", 30.00);
put("pagInterventiRestauroManufatti", 35.00);
@@ -96,7 +89,8 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
@Override
public Map getPagamenti() {
- return PagamentoLocalServiceImpl.pagamenti;
+
+ return PAGAMENTI;
}
@Override
@@ -176,17 +170,17 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
intPraticaId = dettPratica.getIntPraticaId();
if (updateReference) {
switch (tipoPagamento) {
- case PagamentoConstants.PAGAMENTO_ONERI:
- dettPratica.setPagamentoIdOneri(pagamento.getPagamentoId());
- dettPratica.setCodicePagamentoOneri(pagamento.getCodice());
- dettPratica.setCausalePagamentoOneri(pagamento.getCausale());
- dettPratica.setMezzoPagamentoOneri(mezzo);
- break;
- case PagamentoConstants.PAGAMENTO_BOLLI:
- dettPratica.setPagamentoIdBolli(pagamento.getPagamentoId());
- dettPratica.setCodicePagamentoBolli(pagamento.getCodice());
- dettPratica.setCausalePagamentoBolli(pagamento.getCausale());
- dettPratica.setMezzoPagamentoBolli(mezzo);
+ case PagamentoConstants.PAGAMENTO_ONERI:
+ dettPratica.setPagamentoIdOneri(pagamento.getPagamentoId());
+ dettPratica.setCodicePagamentoOneri(pagamento.getCodice());
+ dettPratica.setCausalePagamentoOneri(pagamento.getCausale());
+ dettPratica.setMezzoPagamentoOneri(mezzo);
+ break;
+ case PagamentoConstants.PAGAMENTO_BOLLI:
+ dettPratica.setPagamentoIdBolli(pagamento.getPagamentoId());
+ dettPratica.setCodicePagamentoBolli(pagamento.getCodice());
+ dettPratica.setCausalePagamentoBolli(pagamento.getCausale());
+ dettPratica.setMezzoPagamentoBolli(mezzo);
}
dettPratica = dettPraticaLocalService.updateDettPratica(dettPratica);
}
@@ -195,13 +189,13 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
intPraticaId = fineLavori.getIntPraticaId();
if (updateReference) {
switch (tipoPagamento) {
- case PagamentoConstants.PAGAMENTO_ONERI:
- throw new SystemException("error.fields.fineLavori.pagamento.classPk.invalid");
- case PagamentoConstants.PAGAMENTO_BOLLI:
- fineLavori.setPagamentoId(pagamento.getPagamentoId());
- fineLavori.setCodicePagamento(pagamento.getCodice());
- fineLavori.setCausalePagamento(pagamento.getCausale());
- fineLavori.setMezzoPagamento(mezzo);
+ case PagamentoConstants.PAGAMENTO_ONERI:
+ throw new SystemException("error.fields.fineLavori.pagamento.classPk.invalid");
+ case PagamentoConstants.PAGAMENTO_BOLLI:
+ fineLavori.setPagamentoId(pagamento.getPagamentoId());
+ fineLavori.setCodicePagamento(pagamento.getCodice());
+ fineLavori.setCausalePagamento(pagamento.getCausale());
+ fineLavori.setMezzoPagamento(mezzo);
}
fineLavori = fineLavoriLocalService.updateFineLavori(fineLavori);
}
@@ -210,13 +204,13 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
intPraticaId = collaudo.getIntPraticaId();
if (updateReference) {
switch (tipoPagamento) {
- case PagamentoConstants.PAGAMENTO_ONERI:
- throw new SystemException("error.fields.collaudo.pagamento.classPk.invalid");
- case PagamentoConstants.PAGAMENTO_BOLLI:
- collaudo.setPagamentoId(pagamento.getPagamentoId());
- collaudo.setCodicePagamento(pagamento.getCodice());
- collaudo.setCausalePagamento(pagamento.getCausale());
- collaudo.setMezzoPagamento(mezzo);
+ case PagamentoConstants.PAGAMENTO_ONERI:
+ throw new SystemException("error.fields.collaudo.pagamento.classPk.invalid");
+ case PagamentoConstants.PAGAMENTO_BOLLI:
+ collaudo.setPagamentoId(pagamento.getPagamentoId());
+ collaudo.setCodicePagamento(pagamento.getCodice());
+ collaudo.setCausalePagamento(pagamento.getCausale());
+ collaudo.setMezzoPagamento(mezzo);
}
collaudo = collaudoLocalService.updateCollaudo(collaudo);
}
@@ -376,7 +370,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
public Pagamento deletePagamento(long pagamentoId) throws PortalException, SystemException {
Pagamento pagamento = super.deletePagamento(pagamentoId);
- DLAppLocalServiceUtil.deleteFileEntry(pagamento.getFileEntryId());
+ dlAppLocalService.deleteFileEntry(pagamento.getFileEntryId());
deleteDettPraticaPagamento(pagamento);
return pagamento;
}
@@ -387,7 +381,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
pagamento = super.deletePagamento(pagamento);
if (Validator.isNotNull(pagamento.getFileEntryId())) {
try {
- DLAppLocalServiceUtil.deleteFileEntry(pagamento.getFileEntryId());
+ dlAppLocalService.deleteFileEntry(pagamento.getFileEntryId());
} catch (PortalException | SystemException e) {
_log.info("L'allegato del pagamento " + pagamento.getPagamentoId() + " non esisteva.");
}
@@ -627,4 +621,4 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
}
return updatePagamento(pagamento);
}
-}
\ No newline at end of file
+}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoServiceImpl.java
index 8f2ad593..2a4c545b 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoServiceImpl.java
@@ -16,7 +16,6 @@ import it.tref.liferay.portos.bo.model.Collaudo;
import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.FineLavori;
import it.tref.liferay.portos.bo.model.Pagamento;
-import it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.PagamentoServiceBaseImpl;
import it.tref.liferay.portos.bo.service.permission.PendingPagamentiPermission;
import it.tref.liferay.portos.bo.shared.util.ActionKeys;
@@ -54,7 +53,7 @@ public class PagamentoServiceImpl extends PagamentoServiceBaseImpl {
public void sostituisciPagamento(long pagamentoId, String codiceFiscaleCommittente, String mezzo, String url,
ServiceContext serviceContext) throws PortalException, SystemException {
- Pagamento pagamento = PagamentoLocalServiceUtil.getPagamento(pagamentoId);
+ Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId);
long userId = findTitolare(pagamentoId);
if (getUserId() == userId || DelegheUtil.hasDelegaPagamento(userId, pagamento.getClassPk())) {
pagamentoLocalService.sostituisciPagamento(pagamentoId, codiceFiscaleCommittente, mezzo, url,
@@ -94,7 +93,7 @@ public class PagamentoServiceImpl extends PagamentoServiceBaseImpl {
public void updatePagamentoManuale(long pagamentoId, String numeroBollettino, byte[] content,
String sourceFileName, ServiceContext serviceContext) throws IOException, PortalException, SystemException {
- Pagamento pagamento = PagamentoLocalServiceUtil.getPagamento(pagamentoId);
+ Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId);
long userId = findTitolare(pagamentoId);
if (getUserId() == userId || DelegheUtil.hasDelegaPagamento(userId, pagamento.getClassPk())) {
pagamentoLocalService.updatePagamentoManuale(pagamentoId, numeroBollettino, content, sourceFileName,
@@ -107,7 +106,7 @@ public class PagamentoServiceImpl extends PagamentoServiceBaseImpl {
private long findTitolare(long pagamentoId) throws PortalException, SystemException {
- Pagamento pagamento = PagamentoLocalServiceUtil.getPagamento(pagamentoId);
+ Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId);
long userId = 0L;
if (DettPratica.class.getName().equals(pagamento.getClassName())) {
DettPratica dettPratica = dettPraticaLocalService.getDettPratica(pagamento.getClassPk());
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java
index ec3aa637..59946ca1 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java
@@ -1,13 +1,9 @@
/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
+ * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/
package it.tref.liferay.portos.bo.service.impl;
@@ -41,18 +37,15 @@ import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User;
import com.liferay.portal.service.ServiceContext;
-import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.util.PortalUtil;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
/**
* The implementation of the parere geologo local service.
- *
*
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* their definitions into the {@link it.tref.liferay.portos.bo.service.ParereGeologoLocalService} interface.
- *
*
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS
* credentials because this service can only be accessed from within the same VM.
@@ -77,7 +70,7 @@ public class ParereGeologoLocalServiceImpl extends ParereGeologoLocalServiceBase
long parereGeologoId = counterLocalService.increment(ParereGeologo.class.getName());
ParereGeologo parereGeologo = parereGeologoPersistence.create(parereGeologoId);
parereGeologo.setCompanyId(serviceContext.getCompanyId());
- User user = UserLocalServiceUtil.getUser(serviceContext.getUserId());
+ User user = userLocalService.getUser(serviceContext.getUserId());
parereGeologo.setUserId(user.getUserId());
parereGeologo.setUserName(user.getScreenName());
parereGeologo.setCreateDate(serviceContext.getCreateDate());
@@ -96,7 +89,7 @@ public class ParereGeologoLocalServiceImpl extends ParereGeologoLocalServiceBase
ServiceContext serviceContext) throws PortalException, SystemException {
ParereGeologo parereGeologo = getParereGeologo(parereGeologoId);
- User geologo = UserLocalServiceUtil.getUser(serviceContext.getUserId());
+ User geologo = userLocalService.getUser(serviceContext.getUserId());
if (Validator.isNotNull(geologo) && serviceContext.getUserId() == geologo.getUserId()) {
Date now = new Date();
parereGeologo.setModifiedDate(serviceContext.getModifiedDate());
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoServiceImpl.java
index ce944916..b7317aa6 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoServiceImpl.java
@@ -15,8 +15,6 @@ package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.ParereGeologo;
import it.tref.liferay.portos.bo.model.Territorio;
-import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ParereGeologoServiceBaseImpl;
import it.tref.liferay.portos.bo.service.permission.IntPraticaPermission;
import it.tref.liferay.portos.bo.shared.util.ActionKeys;
@@ -53,8 +51,8 @@ public class ParereGeologoServiceImpl extends ParereGeologoServiceBaseImpl {
public ParereGeologo addParereGeologo(long geologoUserId, long intPraticaId, long dettPraticaId,
String noteRichiedente, ServiceContext serviceContext) throws SystemException, PortalException {
- IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
- Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
+ IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
+ Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.RICHIEDI_PARERE_GEOLOGO);
return parereGeologoLocalService.addParereGeologo(geologoUserId, intPraticaId, dettPraticaId, noteRichiedente, serviceContext);
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java
index abe5056d..486c0e3d 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java
@@ -1,13 +1,9 @@
/**
- * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
+ * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*/
package it.tref.liferay.portos.bo.service.impl;
@@ -22,6 +18,7 @@ import it.tref.liferay.portos.bo.util.DocumentiPraticaUtil;
import it.tref.liferay.portos.bo.util.SoggettiUtil;
import it.tref.liferay.portos.bo.util.WorkflowConstants;
+import java.util.Collections;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
@@ -48,11 +45,9 @@ import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
/**
* The implementation of the soggetto local service.
- *
*
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* their definitions into the {@link it.tref.liferay.portos.bo.service.SoggettoLocalService} interface.
- *
*
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS
* credentials because this service can only be accessed from within the same VM.
@@ -1233,51 +1228,53 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery);
}
- @SuppressWarnings("serial")
- private static final Map TIPOLOGIE_SOGGETTI = new LinkedHashMap() {
- {
- put(TipoSoggettoUtil.COMMITTENTE,
+ private static Map tipologieSoggetti = null;
+
+ @Override
+ public Map getTipologieSoggetti() {
+
+ if (tipologieSoggetti == null) {
+ Map m = new LinkedHashMap<>();
+ m.put(TipoSoggettoUtil.COMMITTENTE,
LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.COMMITTENTE));
- put(TipoSoggettoUtil.PROGETTISTA,
+ m.put(TipoSoggettoUtil.PROGETTISTA,
LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.PROGETTISTA));
- put(TipoSoggettoUtil.DIRETTORE_LAVORI,
+ m.put(TipoSoggettoUtil.DIRETTORE_LAVORI,
LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.DIRETTORE_LAVORI));
- put(TipoSoggettoUtil.DITTA, LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.DITTA));
- put(TipoSoggettoUtil.GEOLOGO, LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.GEOLOGO));
- put(TipoSoggettoUtil.COLLAUDATORE,
+ m.put(TipoSoggettoUtil.DITTA, LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.DITTA));
+ m.put(TipoSoggettoUtil.GEOLOGO, LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.GEOLOGO));
+ m.put(TipoSoggettoUtil.COLLAUDATORE,
LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.COLLAUDATORE));
- put(TipoSoggettoUtil.ARCHEOLOGO,
+ m.put(TipoSoggettoUtil.ARCHEOLOGO,
LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.ARCHEOLOGO));
- put(TipoSoggettoUtil.ALTRO_SOGGETTO,
+ m.put(TipoSoggettoUtil.ALTRO_SOGGETTO,
LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.ALTRO_SOGGETTO));
+ tipologieSoggetti = Collections.unmodifiableMap(m);
}
- };
+ return tipologieSoggetti;
+ }
- @Override
- public Map getTipologieSoggetti() {
- return TIPOLOGIE_SOGGETTI;
- }
-
- @SuppressWarnings("serial")
- private static final Map AMBITI_PROFESSIONALI = new LinkedHashMap() {
- {
- put("strutturale", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutturale"));
- put("fondazioni", LanguageUtil.get(Locale.ITALIAN, "label-ambito-fondazioni"));
- put("strutt-ele", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-ele"));
- put("solai", LanguageUtil.get(Locale.ITALIAN, "label-ambito-solai"));
- put("copertura", LanguageUtil.get(Locale.ITALIAN, "label-ambito-copertura"));
- put("strutt-pref", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-pref"));
- put("strutt-in-legno", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-legno"));
- put("strutt-in-acciaio", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-acciaio"));
- put("strutt-in-ca", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-ca"));
- put("strutt-in-muratura", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-muratura"));
- put("architettonico", LanguageUtil.get(Locale.ITALIAN, "label-ambito-architettonico"));
- put("ambitoProf-altro", LanguageUtil.get(Locale.ITALIAN, "label-ambito-altro"));
- }
- };
+ private static Map ambitiProfessionali = null;
@Override
public Map getAmbitiProfessionali() {
- return AMBITI_PROFESSIONALI;
+
+ if (ambitiProfessionali == null) {
+ Map m = new LinkedHashMap<>();
+ m.put("strutturale", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutturale"));
+ m.put("fondazioni", LanguageUtil.get(Locale.ITALIAN, "label-ambito-fondazioni"));
+ m.put("strutt-ele", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-ele"));
+ m.put("solai", LanguageUtil.get(Locale.ITALIAN, "label-ambito-solai"));
+ m.put("copertura", LanguageUtil.get(Locale.ITALIAN, "label-ambito-copertura"));
+ m.put("strutt-pref", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-pref"));
+ m.put("strutt-in-legno", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-legno"));
+ m.put("strutt-in-acciaio", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-acciaio"));
+ m.put("strutt-in-ca", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-ca"));
+ m.put("strutt-in-muratura", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-muratura"));
+ m.put("architettonico", LanguageUtil.get(Locale.ITALIAN, "label-ambito-architettonico"));
+ m.put("ambitoProf-altro", LanguageUtil.get(Locale.ITALIAN, "label-ambito-altro"));
+ ambitiProfessionali = Collections.unmodifiableMap(m);
+ }
+ return ambitiProfessionali;
}
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/TempisticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/TempisticaLocalServiceImpl.java
index 6211ee4b..03dd3151 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/TempisticaLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/TempisticaLocalServiceImpl.java
@@ -16,8 +16,6 @@ import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.Tempistica;
import it.tref.liferay.portos.bo.model.impl.TempisticaImpl;
-import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.TempisticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
@@ -227,7 +225,7 @@ public class TempisticaLocalServiceImpl extends TempisticaLocalServiceBaseImpl {
public String getDtSottopostaAParere(long intPraticaId) throws SystemException {
// ADT: BUG SCADENZARIO
- DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId);
+ DettPratica dettPratica = dettPraticaLocalService.getLastCompletedByIntPratica(intPraticaId);
if (dettPratica != null && dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)) {
Date d = dettPratica.getDtProtocollo();
if (d != null) {
@@ -241,7 +239,7 @@ public class TempisticaLocalServiceImpl extends TempisticaLocalServiceBaseImpl {
Order defaultOrder = OrderFactoryUtil.desc("createDate");
queryAvv.addOrder(defaultOrder);
@SuppressWarnings("unchecked")
- List listaAvv = AvvisoLocalServiceUtil.dynamicQuery(queryAvv);
+ List listaAvv = avvisoLocalService.dynamicQuery(queryAvv);
return listaAvv.isEmpty() ? StringPool.BLANK : sdf.format(listaAvv.get(0).getDtInvio());
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/TerritorioLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/TerritorioLocalServiceImpl.java
index e7d718c2..05c5e9e7 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/TerritorioLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/TerritorioLocalServiceImpl.java
@@ -140,7 +140,7 @@ public class TerritorioLocalServiceImpl extends TerritorioLocalServiceBaseImpl {
dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property("codiceProvincia")));
Junction and = RestrictionsFactoryUtil.conjunction();
Date date = new Date();
- and.add(PropertyFactoryUtil.forName("groupId").ne(0l));
+ and.add(PropertyFactoryUtil.forName("groupId").ne(0L));
and.add(PropertyFactoryUtil.forName("dtIni").le(date));
Junction or = RestrictionsFactoryUtil.disjunction();
or.add(PropertyFactoryUtil.forName("dtFin").isNull());
@@ -159,7 +159,7 @@ public class TerritorioLocalServiceImpl extends TerritorioLocalServiceBaseImpl {
dynamicQuery.add(RestrictionsFactoryUtil.eq("codiceProvincia", codiceProvincia));
Junction and = RestrictionsFactoryUtil.conjunction();
Date date = new Date();
- and.add(PropertyFactoryUtil.forName("groupId").ne(0l));
+ and.add(PropertyFactoryUtil.forName("groupId").ne(0L));
and.add(PropertyFactoryUtil.forName("dtIni").le(date));
Junction or = RestrictionsFactoryUtil.disjunction();
or.add(PropertyFactoryUtil.forName("dtFin").isNull());
@@ -177,7 +177,7 @@ public class TerritorioLocalServiceImpl extends TerritorioLocalServiceBaseImpl {
dynamicQuery.add(PropertyFactoryUtil.forName("comuneId").eq(comuneId));
Junction and = RestrictionsFactoryUtil.conjunction();
Date date = new Date();
- and.add(PropertyFactoryUtil.forName("groupId").ne(0l));
+ and.add(PropertyFactoryUtil.forName("groupId").ne(0L));
and.add(PropertyFactoryUtil.forName("dtIni").le(date));
Junction or = RestrictionsFactoryUtil.disjunction();
or.add(PropertyFactoryUtil.forName("dtFin").isNull());
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/GestioneFirmeUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/GestioneFirmeUtil.java
index 35901c36..85379034 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/GestioneFirmeUtil.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/GestioneFirmeUtil.java
@@ -4,7 +4,7 @@ import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
-import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import com.liferay.portal.kernel.exception.PortalException;
@@ -20,13 +20,9 @@ import com.liferay.portal.service.UserLocalServiceUtil;
public class GestioneFirmeUtil {
@SuppressWarnings("serial")
- private static List tipoDocumentoFirmaBase = new ArrayList() {
- {
- add(StatoPraticaConstants.INVIO_AVVISO_MANUALE);
- add(StatoPraticaConstants.INTEGRAZIONE);
- add(StatoPraticaConstants.PREAVVISO_CONTRARIO);
- }
- };
+ private static List tipoDocumentoFirmaBase = Arrays. asList(
+ StatoPraticaConstants.INVIO_AVVISO_MANUALE, StatoPraticaConstants.INTEGRAZIONE,
+ StatoPraticaConstants.PREAVVISO_CONTRARIO);
public static boolean hasFirmaPermision(long userId, long groupId) throws PortalException, SystemException {
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
index c739e015..18e017b1 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
@@ -13,8 +13,8 @@
##
build.namespace=portos_bo
- build.number=3256
- build.date=1630403731363
+ build.number=3308
+ build.date=1630678547546
build.auto.upgrade=true
##
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/advanced_search.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/advanced_search.jsp
index cd82c6ee..3f5f7b59 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/advanced_search.jsp
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/advanced_search.jsp
@@ -30,65 +30,26 @@ List organizationList = OrganizationLocalServiceUtil.getUserOrgani
- Seleziona il tipo di pratica
-
-
-
-
-
-
-
-
-
- <%-- ADT - BUG-11 Aggiunta filtro ricerca --%>
-
+
+
+
+
- Stato Pratica
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivitaistruttore/advanced_search.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivitaistruttore/advanced_search.jsp
index b2c5e487..f95c27fe 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivitaistruttore/advanced_search.jsp
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivitaistruttore/advanced_search.jsp
@@ -41,47 +41,24 @@ List organizationList = OrganizationLocalServiceUtil.getUserOrgani
- Seleziona il tipo di pratica
-
-
-
+
+
+
+
- Stato Pratica
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/src/it/tref/portos/comunicazione/ComunicazioneMediata.java b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/src/it/tref/portos/comunicazione/ComunicazioneMediata.java
index c4be12d8..2bbaf21f 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/src/it/tref/portos/comunicazione/ComunicazioneMediata.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/src/it/tref/portos/comunicazione/ComunicazioneMediata.java
@@ -17,9 +17,6 @@ import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.ServiceContextFactory;
import com.liferay.util.bridges.mvc.MVCPortlet;
-/**
- * Portlet implementation class ComunicazioneMediata
- */
public class ComunicazioneMediata extends MVCPortlet {
private static Log _log = LogFactoryUtil.getLog(ComunicazioneMediata.class);
@@ -41,6 +38,7 @@ public class ComunicazioneMediata extends MVCPortlet {
}
public void updateComunicazione(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException {
+
long comunicazioneId = ParamUtil.getLong(actionRequest, "comunicazioneId");
String risposta = ParamUtil.getString(actionRequest, "risposta");
try {
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/AllegatiPraticaPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/AllegatiPraticaPortlet.java
index fdd2bf4a..748fc709 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/AllegatiPraticaPortlet.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/AllegatiPraticaPortlet.java
@@ -213,7 +213,7 @@ public class AllegatiPraticaPortlet extends MVCPortlet {
try {
long docPraticaId = ParamUtil.getLong(actionRequest, "docPraticaId");
DocPratica docPratica = DocPraticaServiceUtil.getDocPratica(docPraticaId);
- docPratica.setDettPraticaIdRimozione(0l);
+ docPratica.setDettPraticaIdRimozione(0);
DocPraticaLocalServiceUtil.updateDocPratica(docPratica);
} catch (PortalException | SystemException e) {
_log.error(e, e);
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java
index a7db0ed2..c1777f89 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java
@@ -50,6 +50,7 @@ import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.regex.Pattern;
@@ -63,6 +64,7 @@ import javax.servlet.http.HttpServletResponse;
import net.sf.jasperreports.engine.JRDataSource;
import net.sf.jasperreports.engine.JREmptyDataSource;
+import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
@@ -116,247 +118,40 @@ public class FascicoloFePortlet extends MVCPortlet {
private static Log _log = LogFactoryUtil.getLog(FascicoloFePortlet.class);
@Override
- public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException,
- PortletException {
+ public void serveResource(ResourceRequest request, ResourceResponse response) throws IOException, PortletException {
- ThemeDisplay themeDisplay = (ThemeDisplay) resourceRequest.getAttribute(WebKeys.THEME_DISPLAY);
- String id = resourceRequest.getResourceID();
- ServiceContext serviceContext;
+ _log.info("cmd = " + request.getResourceID());
try {
- serviceContext = ServiceContextFactory.getInstance(resourceRequest);
- if ("province".equals(id)) {
-
- JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
- List province = TerritorioLocalServiceUtil.getActiveProvince();
- for (String codiceProvincia : province) {
- JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
- Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(serviceContext.getCompanyId(),
- codiceProvincia);
- jsonObject.put("provinciaId", provincia.getCodiceProvincia());
- jsonObject.put("descLong", provincia.getSigla() + " - " + provincia.getProvincia());
- jsonArray.put(jsonObject);
- }
- writeJSON(resourceRequest, resourceResponse, jsonArray);
- } else if ("comuni".equals(id)) {
- String provinciaId = ParamUtil.getString(resourceRequest, "provinciaId");
- JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
- if (Validator.isNotNull(provinciaId) && !provinciaId.equals("0")) {
- List comuni = TerritorioLocalServiceUtil.getActiveComuniByCodiceProvincia(provinciaId);
- for (long comuneId : comuni) {
- JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
- Comune comune = ComuneLocalServiceUtil.getComune(comuneId);
- jsonObject.put("comuneId", comune.getComuneId());
- jsonObject.put("descLong", comune.getDenominazione());
- jsonArray.put(jsonObject);
- }
- }
- writeJSON(resourceRequest, resourceResponse, jsonArray);
- } else if ("zoneFasce".equals(id)) {
- long comuneId = ParamUtil.getLong(resourceRequest, "comuneId", 0L);
- JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
- if (Validator.isNotNull(comuneId)) {
- List territori = TerritorioLocalServiceUtil.getActiveTerritoriByComune(comuneId);
- for (Territorio territorio : territori) {
- JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
- jsonObject.put("territorioId", territorio.getTerritorioId());
- jsonObject.put("descLong", territorio.getZonaFasciaDesc());
- jsonArray.put(jsonObject);
- }
- }
- writeJSON(resourceRequest, resourceResponse, jsonArray);
- } else if ("soggettiDelega".equals(id)) {
- long intPraticaId = ParamUtil.getLong(resourceRequest, "intPraticaId", 0L);
- IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
- JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
- if (Validator.isNotNull(intPratica)) {
- List soggetti = SoggettoLocalServiceUtil.getValidTmpByIntPratica(intPraticaId);
- String cfTitolare = UserLocalServiceUtil.getUserById(intPratica.getUserId()).getScreenName();
- for (Soggetto soggetto : soggetti) {
- if (!soggetto.isRimosso() && !soggetto.getCodiceFiscale().equalsIgnoreCase(cfTitolare)) {
- JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
- jsonObject.put("soggettoId", soggetto.getSoggettoId());
- jsonObject.put("descLong", soggetto.getDescrizioneRuolo());
- jsonArray.put(jsonObject);
- }
- }
- }
- writeJSON(resourceRequest, resourceResponse, jsonArray);
- } else if ("tipologiaDelega".equals(id)) {
- long intPraticaId = ParamUtil.getLong(resourceRequest, "intPraticaId", 0L);
- long soggettoId = ParamUtil.getLong(resourceRequest, "soggettoId", 0L);
- IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
- Soggetto soggetto = SoggettoLocalServiceUtil.fetchSoggetto(soggettoId);
- JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
- if (Validator.isNotNull(intPratica) && Validator.isNotNull(soggetto)) {
- JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
- jsonObject.put("tipologiaDelegaId", DelegheUtil.TIPO_COMPILAZIONE);
- jsonObject.put(
- "descLong",
- LanguageUtil.get(serviceContext.getLocale(), "label-deleghe-tipologia-"
- + DelegheUtil.TIPO_COMPILAZIONE));
- jsonArray.put(jsonObject);
- if (TipoSoggettoUtil.GEOLOGO.equalsIgnoreCase(soggetto.getTipologiaSoggetto())) {
- jsonObject = JSONFactoryUtil.createJSONObject();
- jsonObject.put("tipologiaDelegaId", DelegheUtil.TIPO_GEOLOGO);
- jsonObject.put(
- "descLong",
- LanguageUtil.get(serviceContext.getLocale(), "label-deleghe-tipologia-"
- + DelegheUtil.TIPO_GEOLOGO));
- jsonArray.put(jsonObject);
- }
- jsonObject = JSONFactoryUtil.createJSONObject();
- jsonObject.put("tipologiaDelegaId", DelegheUtil.TIPO_FIRMA_INSERIMENTO_ALLEGATI);
- jsonObject.put(
- "descLong",
- LanguageUtil.get(serviceContext.getLocale(), "label-deleghe-tipologia-"
- + DelegheUtil.TIPO_FIRMA_INSERIMENTO_ALLEGATI));
- jsonArray.put(jsonObject);
- jsonObject = JSONFactoryUtil.createJSONObject();
- jsonObject.put("tipologiaDelegaId", DelegheUtil.TIPO_PAGAMENTO);
- jsonObject.put(
- "descLong",
- LanguageUtil.get(serviceContext.getLocale(), "label-deleghe-tipologia-"
- + DelegheUtil.TIPO_PAGAMENTO));
- jsonArray.put(jsonObject);
- }
- writeJSON(resourceRequest, resourceResponse, jsonArray);
- } else if ("isCompletedDelegaGeologo".equals(id)) {
- long classPk = ParamUtil.getLong(resourceRequest, "classPk");
- JSONObject json = JSONFactoryUtil.createJSONObject();
- json.put("isCompleted", ValidazionePraticaUtil.notCompletedSezioneGeologica(classPk).isEmpty());
- writeJSON(resourceRequest, resourceResponse, json);
- } else if ("confirmOtf".equals(id) || "otfSpese".equals(id) || "otfBolli".equals(id)) {
- long pagamentoId = ParamUtil.getLong(resourceRequest, "pagamentoId");
- PagamentoLocalServiceUtil.updateOtf(pagamentoId, true);
- JSONObject json = JSONFactoryUtil.createJSONObject();
- json.put("isCompleted", true);
- writeJSON(resourceRequest, resourceResponse, json);
- } else if ("resetOtf".equals(id)) {
- long pagamentoId = ParamUtil.getLong(resourceRequest, "pagamentoId");
- PagamentoLocalServiceUtil.updateOtf(pagamentoId, false);
- JSONObject json = JSONFactoryUtil.createJSONObject();
- json.put("isReset", true);
- writeJSON(resourceRequest, resourceResponse, json);
- } else if ("stampaFascicolo".equals(id)) {
- long intPraticaId = ParamUtil.getLong(resourceRequest, "intPraticaId");
- IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
- DLFolder folder = DLFolderLocalServiceUtil.getFolder(themeDisplay.getCompanyGroupId(), 0L, "Template");
- if (folder != null) {
- FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(themeDisplay.getCompanyGroupId(),
- folder.getFolderId(), "visualizza_fascicolo.jrxml");
- if (fileEntry != null) {
- JasperDesign jd = JRXmlLoader.load(fileEntry.getContentStream());
- JasperReport jasperReport = JasperCompileManager.compileReport(jd);
- Map parameters = ReportFascicoloUtil.generateParametersReportFascicolo(
- intPraticaId, themeDisplay.getLocale(), themeDisplay.getCompanyId());
- parameters.put(ReportConstants.LOGO_REGIONE,
- getClass().getResource(ReportConstants.PATH_LOGO_REGIONE).getPath());
- parameters.put(ReportConstants.LOGO_DIPARTIMENTO,
- getClass().getResource(ReportConstants.PATH_LOGO_DIPARTIMENTO).getPath());
- JRDataSource dataSource = new JREmptyDataSource();
- JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, dataSource);
- // Export to PDF.
- String titleDoc = intPratica.getNumeroProgetto() + StringPool.UNDERLINE + new Date().getTime()
- + ".pdf";
- jasperPrint.setName(titleDoc);
- HttpServletRequest request = PortalUtil.getHttpServletRequest(resourceRequest);
- HttpServletResponse response = PortalUtil.getHttpServletResponse(resourceResponse);
- ServletResponseUtil.sendFile(request, response, titleDoc,
- JasperExportManager.exportReportToPdf(jasperPrint), ContentTypes.APPLICATION_PDF);
- }
- }
- } else if ("stampaFascicoloVariante".equals(id)) {
- long intPraticaId = ParamUtil.getLong(resourceRequest, "intPraticaId");
- long dettPraticaId = ParamUtil.getLong(resourceRequest, "dettPraticaId");
- DettPratica dettPratica = DettPraticaLocalServiceUtil.fetchDettPratica(dettPraticaId);
- IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
- DLFolder folder = DLFolderLocalServiceUtil.getFolder(themeDisplay.getCompanyGroupId(), 0L, "Template");
- if (folder != null) {
- FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(themeDisplay.getCompanyGroupId(),
- folder.getFolderId(), "visualizza_fascicolo.jrxml");
- if (fileEntry != null) {
- JasperDesign jd = JRXmlLoader.load(fileEntry.getContentStream());
- JasperReport jasperReport = JasperCompileManager.compileReport(jd);
- Map parameters = ReportFascicoloUtil.generateParametersReportFascicoloVariante(
- intPraticaId, dettPratica.getDettPraticaId(), themeDisplay.getLocale(),
- themeDisplay.getCompanyId());
- parameters.put(ReportConstants.LOGO_REGIONE,
- getClass().getResource(ReportConstants.PATH_LOGO_REGIONE).getPath());
- parameters.put(ReportConstants.LOGO_DIPARTIMENTO,
- getClass().getResource(ReportConstants.PATH_LOGO_DIPARTIMENTO).getPath());
- JRDataSource dataSource = new JREmptyDataSource();
- JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, dataSource);
- // Export to PDF.
- String titleDoc = "variante_" + intPratica.getNumeroProgetto() + StringPool.UNDERLINE
- + new Date().getTime() + ".pdf";
- jasperPrint.setName(titleDoc);
- HttpServletRequest request = PortalUtil.getHttpServletRequest(resourceRequest);
- HttpServletResponse response = PortalUtil.getHttpServletResponse(resourceResponse);
- ServletResponseUtil.sendFile(request, response, titleDoc,
- JasperExportManager.exportReportToPdf(jasperPrint), ContentTypes.APPLICATION_PDF);
- }
- }
- } else if ("stampaFineLavori".equals(id)) {
- long intPraticaId = ParamUtil.getLong(resourceRequest, "intPraticaId");
- long fineLavoriId = ParamUtil.getLong(resourceRequest, "fineLavoriId");
- IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
- DLFolder folder = DLFolderLocalServiceUtil.getFolder(themeDisplay.getCompanyGroupId(), 0L, "Template");
- if (folder != null) {
- FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(themeDisplay.getCompanyGroupId(),
- folder.getFolderId(), "visualizza_fine_lavori.jrxml");
- if (fileEntry != null) {
- JasperDesign jd = JRXmlLoader.load(fileEntry.getContentStream());
- JasperReport jasperReport = JasperCompileManager.compileReport(jd);
- Map parameters = ReportFascicoloUtil
- .generateParametersReportFascicoloFineLavori(intPraticaId, fineLavoriId,
- themeDisplay.getLocale(), themeDisplay.getCompanyId());
- parameters.put(ReportConstants.LOGO_REGIONE,
- getClass().getResource(ReportConstants.PATH_LOGO_REGIONE).getPath());
- parameters.put(ReportConstants.LOGO_DIPARTIMENTO,
- getClass().getResource(ReportConstants.PATH_LOGO_DIPARTIMENTO).getPath());
- JRDataSource dataSource = new JREmptyDataSource();
- JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, dataSource);
- // Export to PDF.
- String titleDoc = "fine_lavori_" + intPratica.getNumeroProgetto() + StringPool.UNDERLINE
- + new Date().getTime() + ".pdf";
- jasperPrint.setName(titleDoc);
- HttpServletRequest request = PortalUtil.getHttpServletRequest(resourceRequest);
- HttpServletResponse response = PortalUtil.getHttpServletResponse(resourceResponse);
- ServletResponseUtil.sendFile(request, response, titleDoc,
- JasperExportManager.exportReportToPdf(jasperPrint), ContentTypes.APPLICATION_PDF);
- }
- }
- } else if ("stampaCollaudo".equals(id)) {
- long intPraticaId = ParamUtil.getLong(resourceRequest, "intPraticaId");
- long collaudoId = ParamUtil.getLong(resourceRequest, "collaudoId");
- IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
- DLFolder folder = DLFolderLocalServiceUtil.getFolder(themeDisplay.getCompanyGroupId(), 0L, "Template");
- if (folder != null) {
- FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(themeDisplay.getCompanyGroupId(),
- folder.getFolderId(), "visualizza_collaudo.jrxml");
- if (fileEntry != null) {
- JasperDesign jd = JRXmlLoader.load(fileEntry.getContentStream());
- JasperReport jasperReport = JasperCompileManager.compileReport(jd);
- Map parameters = ReportFascicoloUtil.generateParametersReportFascicoloCollaudo(
- intPraticaId, collaudoId, themeDisplay.getLocale(), themeDisplay.getCompanyId());
- parameters.put(ReportConstants.LOGO_REGIONE,
- getClass().getResource(ReportConstants.PATH_LOGO_REGIONE).getPath());
- parameters.put(ReportConstants.LOGO_DIPARTIMENTO,
- getClass().getResource(ReportConstants.PATH_LOGO_DIPARTIMENTO).getPath());
- JRDataSource dataSource = new JREmptyDataSource();
- JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, dataSource);
- // Export to PDF.
- String titleDoc = "collaudo_" + intPratica.getNumeroProgetto() + StringPool.UNDERLINE
- + new Date().getTime() + ".pdf";
- jasperPrint.setName(titleDoc);
- HttpServletRequest request = PortalUtil.getHttpServletRequest(resourceRequest);
- HttpServletResponse response = PortalUtil.getHttpServletResponse(resourceResponse);
- ServletResponseUtil.sendFile(request, response, titleDoc,
- JasperExportManager.exportReportToPdf(jasperPrint), ContentTypes.APPLICATION_PDF);
- }
- }
- } else {
- super.serveResource(resourceRequest, resourceResponse);
+ switch (request.getResourceID()) {
+ case "comuni":
+ resourceComuni(request, response);
+ break;
+ case "isCompletedDelegaGeologo":
+ resourceIsCompletedDelegaGeologo(request, response);
+ break;
+ case "province":
+ resourceProvince(request, response);
+ break;
+ case "soggettiDelega":
+ resourceSoggettiDelega(request, response);
+ break;
+ case "stampaCollaudo":
+ resourceStampaCollaudo(request, response);
+ break;
+ case "stampaFascicolo":
+ resourceStampaFascicolo(request, response);
+ break;
+ case "stampaFascicoloVariante":
+ resourceStampaFascicoloVariante(request, response);
+ break;
+ case "stampaFineLavori":
+ resourceStampaFineLavori(request, response);
+ break;
+ case "tipologiaDelega":
+ resourceTipologiaDelega(request, response);
+ break;
+ default:
+ super.serveResource(request, response);
}
} catch (Exception e) {
_log.error(e, e);
@@ -364,33 +159,266 @@ public class FascicoloFePortlet extends MVCPortlet {
}
}
- public void addFascicolo(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException,
- SystemException, IOException {
+ private void resourceComuni(ResourceRequest request, ResourceResponse response) throws IOException,
+ PortalException, SystemException {
+
+ JSONArray result = JSONFactoryUtil.createJSONArray();
+ String provinciaId = ParamUtil.getString(request, "provinciaId");
+ if (Validator.isNotNull(provinciaId) && !provinciaId.equals("0")) {
+ List comuni = TerritorioLocalServiceUtil.getActiveComuniByCodiceProvincia(provinciaId);
+ for (long comuneId : comuni) {
+ JSONObject jso = JSONFactoryUtil.createJSONObject();
+ Comune comune = ComuneLocalServiceUtil.getComune(comuneId);
+ jso.put("comuneId", comune.getComuneId());
+ jso.put("descLong", comune.getDenominazione());
+ result.put(jso);
+ }
+ }
+ writeJSON(request, response, result);
+ }
+
+ private void resourceStampaFineLavori(ResourceRequest request, ResourceResponse response) throws IOException,
+ JRException, PortalException, SystemException {
+
+ ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
+ long fineLavoriId = ParamUtil.getLong(request, "fineLavoriId");
+ IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
+ DLFolder folder = DLFolderLocalServiceUtil.getFolder(themeDisplay.getCompanyGroupId(), 0L, "Template");
+ if (folder != null) {
+ FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(themeDisplay.getCompanyGroupId(),
+ folder.getFolderId(), "visualizza_fine_lavori.jrxml");
+ if (fileEntry != null) {
+ JasperDesign jd = JRXmlLoader.load(fileEntry.getContentStream());
+ JasperReport jasperReport = JasperCompileManager.compileReport(jd);
+ Map parameters = ReportFascicoloUtil.generateParametersReportFascicoloFineLavori(
+ intPraticaId, fineLavoriId, themeDisplay.getLocale(), themeDisplay.getCompanyId());
+ parameters.put(ReportConstants.LOGO_REGIONE, getClass().getResource(ReportConstants.PATH_LOGO_REGIONE)
+ .getPath());
+ parameters.put(ReportConstants.LOGO_DIPARTIMENTO,
+ getClass().getResource(ReportConstants.PATH_LOGO_DIPARTIMENTO).getPath());
+ JRDataSource dataSource = new JREmptyDataSource();
+ JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, dataSource);
+ // Export to PDF.
+ String titleDoc = "fine_lavori_" + intPratica.getNumeroProgetto() + StringPool.UNDERLINE
+ + new Date().getTime() + ".pdf";
+ jasperPrint.setName(titleDoc);
+ HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(request);
+ HttpServletResponse httpResponse = PortalUtil.getHttpServletResponse(response);
+ ServletResponseUtil.sendFile(httpRequest, httpResponse, titleDoc,
+ JasperExportManager.exportReportToPdf(jasperPrint), ContentTypes.APPLICATION_PDF);
+ }
+ }
+ }
+
+ private void resourceIsCompletedDelegaGeologo(ResourceRequest request, ResourceResponse response)
+ throws IOException, PortalException, SystemException {
+
+ JSONObject result = JSONFactoryUtil.createJSONObject();
+ result.put("isCompleted",
+ ValidazionePraticaUtil.notCompletedSezioneGeologica(ParamUtil.getLong(request, "classPk")).isEmpty());
+ writeJSON(request, response, result);
+ }
+
+ private void resourceProvince(ResourceRequest request, ResourceResponse response) throws IOException,
+ SystemException {
+
+ ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
+ JSONArray result = JSONFactoryUtil.createJSONArray();
+ List province = TerritorioLocalServiceUtil.getActiveProvince();
+ for (String codiceProvincia : province) {
+ JSONObject jso = JSONFactoryUtil.createJSONObject();
+ Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(themeDisplay.getCompanyId(), codiceProvincia);
+ jso.put("provinciaId", provincia.getCodiceProvincia());
+ jso.put("descLong", provincia.getSigla() + " - " + provincia.getProvincia());
+ result.put(jso);
+ }
+ writeJSON(request, response, result);
+ }
+
+ private void resourceSoggettiDelega(ResourceRequest request, ResourceResponse response) throws IOException,
+ PortalException, SystemException {
+
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId", 0L);
+ IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
+ JSONArray result = JSONFactoryUtil.createJSONArray();
+ if (Validator.isNotNull(intPratica)) {
+ List soggetti = SoggettoLocalServiceUtil.getValidTmpByIntPratica(intPraticaId);
+ String cfTitolare = UserLocalServiceUtil.getUserById(intPratica.getUserId()).getScreenName();
+ for (Soggetto soggetto : soggetti) {
+ if (!soggetto.isRimosso() && !soggetto.getCodiceFiscale().equalsIgnoreCase(cfTitolare)) {
+ JSONObject jso = JSONFactoryUtil.createJSONObject();
+ jso.put("soggettoId", soggetto.getSoggettoId());
+ jso.put("descLong", soggetto.getDescrizioneRuolo());
+ result.put(jso);
+ }
+ }
+ }
+ writeJSON(request, response, result);
+ }
+
+ private void resourceStampaCollaudo(ResourceRequest request, ResourceResponse response) throws IOException,
+ JRException, PortalException, SystemException {
+
+ ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
+ long collaudoId = ParamUtil.getLong(request, "collaudoId");
+ IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
+ DLFolder folder = DLFolderLocalServiceUtil.getFolder(themeDisplay.getCompanyGroupId(), 0L, "Template");
+ if (folder != null) {
+ FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(themeDisplay.getCompanyGroupId(),
+ folder.getFolderId(), "visualizza_collaudo.jrxml");
+ if (fileEntry != null) {
+ JasperDesign jd = JRXmlLoader.load(fileEntry.getContentStream());
+ JasperReport jasperReport = JasperCompileManager.compileReport(jd);
+ Map parameters = ReportFascicoloUtil.generateParametersReportFascicoloCollaudo(
+ intPraticaId, collaudoId, themeDisplay.getLocale(), themeDisplay.getCompanyId());
+ parameters.put(ReportConstants.LOGO_REGIONE, getClass().getResource(ReportConstants.PATH_LOGO_REGIONE)
+ .getPath());
+ parameters.put(ReportConstants.LOGO_DIPARTIMENTO,
+ getClass().getResource(ReportConstants.PATH_LOGO_DIPARTIMENTO).getPath());
+ JRDataSource dataSource = new JREmptyDataSource();
+ JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, dataSource);
+ // Export to PDF.
+ String titleDoc = "collaudo_" + intPratica.getNumeroProgetto() + StringPool.UNDERLINE
+ + new Date().getTime() + ".pdf";
+ jasperPrint.setName(titleDoc);
+ HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(request);
+ HttpServletResponse httpResponse = PortalUtil.getHttpServletResponse(response);
+ ServletResponseUtil.sendFile(httpRequest, httpResponse, titleDoc,
+ JasperExportManager.exportReportToPdf(jasperPrint), ContentTypes.APPLICATION_PDF);
+ }
+ }
+ }
+
+ private void resourceStampaFascicolo(ResourceRequest request, ResourceResponse response) throws IOException,
+ JRException, PortalException, SystemException {
+
+ ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
+ IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
+ DLFolder folder = DLFolderLocalServiceUtil.getFolder(themeDisplay.getCompanyGroupId(), 0L, "Template");
+ if (folder != null) {
+ FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(themeDisplay.getCompanyGroupId(),
+ folder.getFolderId(), "visualizza_fascicolo.jrxml");
+ if (fileEntry != null) {
+ JasperDesign jd = JRXmlLoader.load(fileEntry.getContentStream());
+ JasperReport jasperReport = JasperCompileManager.compileReport(jd);
+ Map parameters = ReportFascicoloUtil.generateParametersReportFascicolo(intPraticaId,
+ themeDisplay.getLocale(), themeDisplay.getCompanyId());
+ parameters.put(ReportConstants.LOGO_REGIONE, getClass().getResource(ReportConstants.PATH_LOGO_REGIONE)
+ .getPath());
+ parameters.put(ReportConstants.LOGO_DIPARTIMENTO,
+ getClass().getResource(ReportConstants.PATH_LOGO_DIPARTIMENTO).getPath());
+ JRDataSource dataSource = new JREmptyDataSource();
+ JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, dataSource);
+ // Export to PDF.
+ String titleDoc = intPratica.getNumeroProgetto() + StringPool.UNDERLINE + new Date().getTime() + ".pdf";
+ jasperPrint.setName(titleDoc);
+ HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(request);
+ HttpServletResponse httpResponse = PortalUtil.getHttpServletResponse(response);
+ ServletResponseUtil.sendFile(httpRequest, httpResponse, titleDoc,
+ JasperExportManager.exportReportToPdf(jasperPrint), ContentTypes.APPLICATION_PDF);
+ }
+ }
+ }
+
+ private void resourceStampaFascicoloVariante(ResourceRequest request, ResourceResponse response)
+ throws IOException, JRException, PortalException, SystemException {
+
+ ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
+ long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
+ IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
+ DLFolder folder = DLFolderLocalServiceUtil.getFolder(themeDisplay.getCompanyGroupId(), 0L, "Template");
+ if (folder != null) {
+ FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(themeDisplay.getCompanyGroupId(),
+ folder.getFolderId(), "visualizza_fascicolo.jrxml");
+ if (fileEntry != null) {
+ JasperDesign jd = JRXmlLoader.load(fileEntry.getContentStream());
+ JasperReport jasperReport = JasperCompileManager.compileReport(jd);
+ Map parameters = ReportFascicoloUtil.generateParametersReportFascicoloVariante(
+ intPraticaId, dettPraticaId, themeDisplay.getLocale(), themeDisplay.getCompanyId());
+ parameters.put(ReportConstants.LOGO_REGIONE, getClass().getResource(ReportConstants.PATH_LOGO_REGIONE)
+ .getPath());
+ parameters.put(ReportConstants.LOGO_DIPARTIMENTO,
+ getClass().getResource(ReportConstants.PATH_LOGO_DIPARTIMENTO).getPath());
+ JRDataSource dataSource = new JREmptyDataSource();
+ JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, dataSource);
+ // Export to PDF.
+ String titleDoc = "variante_" + intPratica.getNumeroProgetto() + StringPool.UNDERLINE
+ + new Date().getTime() + ".pdf";
+ jasperPrint.setName(titleDoc);
+ HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(request);
+ HttpServletResponse httpResponse = PortalUtil.getHttpServletResponse(response);
+ ServletResponseUtil.sendFile(httpRequest, httpResponse, titleDoc,
+ JasperExportManager.exportReportToPdf(jasperPrint), ContentTypes.APPLICATION_PDF);
+ }
+ }
+ }
+
+ private void resourceTipologiaDelega(ResourceRequest request, ResourceResponse response) throws IOException,
+ PortalException, SystemException {
- long comuneId = ParamUtil.getLong(actionRequest, "comune");
+ IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(ParamUtil.getLong(request, "intPraticaId",
+ 0L));
+ Soggetto soggetto = SoggettoLocalServiceUtil.fetchSoggetto(ParamUtil.getLong(request, "soggettoId", 0L));
+ JSONArray result = JSONFactoryUtil.createJSONArray();
+ if (Validator.isNotNull(intPratica) && Validator.isNotNull(soggetto)) {
+ JSONObject jso = JSONFactoryUtil.createJSONObject();
+ jso.put("tipologiaDelegaId", DelegheUtil.TIPO_COMPILAZIONE);
+ jso.put("descLong",
+ LanguageUtil.get(Locale.ITALIAN, "label-deleghe-tipologia-" + DelegheUtil.TIPO_COMPILAZIONE));
+ result.put(jso);
+ if (TipoSoggettoUtil.GEOLOGO.equalsIgnoreCase(soggetto.getTipologiaSoggetto())) {
+ jso = JSONFactoryUtil.createJSONObject();
+ jso.put("tipologiaDelegaId", DelegheUtil.TIPO_GEOLOGO);
+ jso.put("descLong",
+ LanguageUtil.get(Locale.ITALIAN, "label-deleghe-tipologia-" + DelegheUtil.TIPO_GEOLOGO));
+ result.put(jso);
+ }
+ jso = JSONFactoryUtil.createJSONObject();
+ jso.put("tipologiaDelegaId", DelegheUtil.TIPO_FIRMA_INSERIMENTO_ALLEGATI);
+ jso.put("descLong",
+ LanguageUtil.get(Locale.ITALIAN, "label-deleghe-tipologia-"
+ + DelegheUtil.TIPO_FIRMA_INSERIMENTO_ALLEGATI));
+ result.put(jso);
+ jso = JSONFactoryUtil.createJSONObject();
+ jso.put("tipologiaDelegaId", DelegheUtil.TIPO_PAGAMENTO);
+ jso.put("descLong",
+ LanguageUtil.get(Locale.ITALIAN, "label-deleghe-tipologia-" + DelegheUtil.TIPO_PAGAMENTO));
+ result.put(jso);
+ }
+ writeJSON(request, response, result);
+ }
+
+ public void addFascicolo(ActionRequest request, ActionResponse response) throws PortalException, SystemException,
+ IOException {
+
+ long comuneId = ParamUtil.getLong(request, "comune");
Territorio territorio = TerritorioLocalServiceUtil.findByComuneId(comuneId, 0, 1).get(0);
- String tipoProcedura = ParamUtil.getString(actionRequest, "tipoProcedura");
- String successURL = ParamUtil.getString(actionRequest, "successURL");
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
+ String tipoProcedura = ParamUtil.getString(request, "tipoProcedura");
+ String successURL = ParamUtil.getString(request, "successURL");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
DettPratica dettPratica = DettPraticaServiceUtil.addDettPratica(territorio.getTerritorioId(), tipoProcedura,
serviceContext);
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "mvcPath",
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "mvcPath",
"/html/fascicolofe/edit_fascicolo.jsp");
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "dettPraticaId",
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "dettPraticaId",
String.valueOf(dettPratica.getDettPraticaId()));
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
}
- public void addDelega(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void addDelega(ActionRequest request, ActionResponse response) throws Exception {
try {
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
- long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
- String tipologia = ParamUtil.getString(actionRequest, "tipologiaDelega");
- long soggettoId = ParamUtil.getLong(actionRequest, "soggetto");
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
+ long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
+ String tipologia = ParamUtil.getString(request, "tipologiaDelega");
+ long soggettoId = ParamUtil.getLong(request, "soggetto");
if (ValidazionePraticaUtil.delegheCompilazioneIsEnable(dettPraticaId)) {
Soggetto soggetto = SoggettoLocalServiceUtil.getSoggetto(soggettoId);
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
DelegaServiceUtil.addDelega(serviceContext.getUserId(), intPratica.getIntPraticaId(), dettPraticaId,
tipologia, soggetto.getCodiceFiscale(), serviceContext);
@@ -401,10 +429,10 @@ public class FascicoloFePortlet extends MVCPortlet {
}
}
- public void annullaDelega(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void annullaDelega(ActionRequest request, ActionResponse response) throws Exception {
try {
- long delegaId = ParamUtil.getLong(actionRequest, "delegaId");
+ long delegaId = ParamUtil.getLong(request, "delegaId");
DelegaServiceUtil.annullaDelega(delegaId);
} catch (PortalException | SystemException e) {
_log.error(e, e);
@@ -412,11 +440,11 @@ public class FascicoloFePortlet extends MVCPortlet {
}
}
- public void addGestioneUtenti(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void addGestioneUtenti(ActionRequest request, ActionResponse response) throws Exception {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
- String successURL = ParamUtil.getString(actionRequest, "successURL");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
+ String successURL = ParamUtil.getString(request, "successURL");
try {
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId);
// ADT BUG VARIAZIONE SOGGETTO MULTI-CLICK
@@ -429,7 +457,7 @@ public class FascicoloFePortlet extends MVCPortlet {
lastDettPraticaEditableVS = DettPraticaServiceUtil.addDettPraticaClonedToIntPratica(intPraticaId,
lastDettPratica.getDettPraticaId(), TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO, serviceContext);
}
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "dettPraticaId",
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "dettPraticaId",
String.valueOf(lastDettPraticaEditableVS.getDettPraticaId()));
String fragmentURL = "_1_WAR_portosfeportlet_page_soggetti";
if (successURL.contains(StringPool.POUND)) {
@@ -437,40 +465,40 @@ public class FascicoloFePortlet extends MVCPortlet {
}
successURL += "#_1_WAR_portosfeportlet_tab=" + fragmentURL;
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
} catch (PortalException | SystemException e) {
- successURL = HttpUtil.setParameter(successURL, actionResponse.getNamespace() + "mvcPath",
+ successURL = HttpUtil.setParameter(successURL, response.getNamespace() + "mvcPath",
"/html/fascicolofe/view.jsp");
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
_log.error(e, e);
throw e;
}
}
- public void deleteGestioneUtenti(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void deleteGestioneUtenti(ActionRequest request, ActionResponse response) throws Exception {
try {
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
- String successURL = ParamUtil.getString(actionRequest, "successURL");
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
+ String successURL = ParamUtil.getString(request, "successURL");
DettPratica dettPratica = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId,
Arrays.asList(new String[] { TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO }));
if (Validator.isNull(dettPratica)) {
throw new SystemException("no variazione-soggetti in progress int fascicolo #" + intPraticaId);
}
dettPratica = DettPraticaServiceUtil.deleteDettPratica(dettPratica);
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
} catch (PortalException | SystemException e) {
_log.error(e, e);
throw e;
}
}
- public void addVariante(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void addVariante(ActionRequest request, ActionResponse response) throws Exception {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
- boolean isVariante = ParamUtil.getBoolean(actionRequest, "isVariante");
- String successURL = ParamUtil.getString(actionRequest, "successURL");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
+ boolean isVariante = ParamUtil.getBoolean(request, "isVariante");
+ String successURL = ParamUtil.getString(request, "successURL");
try {
if (!isVariante) {
throw new SystemException("Impossibile creare variante");
@@ -478,24 +506,23 @@ public class FascicoloFePortlet extends MVCPortlet {
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId);
DettPratica dettPratica = DettPraticaServiceUtil.addDettPraticaClonedToIntPratica(intPraticaId,
lastDettPratica.getDettPraticaId(), TipoIntegrazioneUtil.VARIANTE, serviceContext);
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "dettPraticaId",
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "dettPraticaId",
String.valueOf(dettPratica.getDettPraticaId()));
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "isNewVariante",
- StringPool.TRUE);
- actionResponse.sendRedirect(successURL);
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "isNewVariante", StringPool.TRUE);
+ response.sendRedirect(successURL);
} catch (PortalException | SystemException e) {
- successURL = HttpUtil.setParameter(successURL, actionResponse.getNamespace() + "mvcPath",
+ successURL = HttpUtil.setParameter(successURL, response.getNamespace() + "mvcPath",
"/html/fascicolofe/view.jsp");
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
_log.error(e, e);
throw e;
}
}
- public void deleteVariante(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void deleteVariante(ActionRequest request, ActionResponse response) throws Exception {
try {
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
DettPratica dettPratica = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId,
Arrays.asList(new String[] { TipoIntegrazioneUtil.VARIANTE }));
if (Validator.isNull(dettPratica)) {
@@ -508,12 +535,12 @@ public class FascicoloFePortlet extends MVCPortlet {
}
}
- public void addIntegrazione(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void addIntegrazione(ActionRequest request, ActionResponse response) throws Exception {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
- boolean isIntegrazione = ParamUtil.getBoolean(actionRequest, "isIntegrazione");
- String successURL = ParamUtil.getString(actionRequest, "successURL");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
+ boolean isIntegrazione = ParamUtil.getBoolean(request, "isIntegrazione");
+ String successURL = ParamUtil.getString(request, "successURL");
try {
if (!isIntegrazione) {
throw new SystemException("Impossibile creare integrazione");
@@ -521,22 +548,22 @@ public class FascicoloFePortlet extends MVCPortlet {
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId);
DettPratica dettPratica = DettPraticaServiceUtil.addDettPraticaClonedToIntPratica(intPraticaId,
lastDettPratica.getDettPraticaId(), TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE, serviceContext);
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "dettPraticaId",
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "dettPraticaId",
String.valueOf(dettPratica.getDettPraticaId()));
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
} catch (PortalException | SystemException e) {
- successURL = HttpUtil.setParameter(successURL, actionResponse.getNamespace() + "mvcPath",
+ successURL = HttpUtil.setParameter(successURL, response.getNamespace() + "mvcPath",
"/html/fascicolofe/view.jsp");
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
_log.error(e, e);
throw e;
}
}
- public void deleteIntegrazione(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void deleteIntegrazione(ActionRequest request, ActionResponse response) throws Exception {
try {
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
DettPratica dettPratica = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId,
Arrays.asList(new String[] { TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE }));
if (Validator.isNull(dettPratica)) {
@@ -549,11 +576,11 @@ public class FascicoloFePortlet extends MVCPortlet {
}
}
- public void addFineLavori(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void addFineLavori(ActionRequest request, ActionResponse response) throws Exception {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
- String successURL = ParamUtil.getString(actionRequest, "successURL");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
+ String successURL = ParamUtil.getString(request, "successURL");
DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId);
if (dettPratica == null) {
dettPratica = DettPraticaServiceUtil.getLastEditableByIntPratica(intPraticaId);
@@ -562,22 +589,22 @@ public class FascicoloFePortlet extends MVCPortlet {
FineLavori fineLavori = FineLavoriServiceUtil.addFineLavori(intPraticaId, serviceContext);
fineLavori.setNormEsenteCollaudo(dettPratica.getCollaudoStatico());
fineLavori = FineLavoriServiceUtil.updateFineLavori(fineLavori);
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "fineLavoriId",
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "fineLavoriId",
String.valueOf(fineLavori.getFineLavoriId()));
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
} catch (PortalException | SystemException e) {
- successURL = HttpUtil.setParameter(successURL, actionResponse.getNamespace() + "mvcPath",
+ successURL = HttpUtil.setParameter(successURL, response.getNamespace() + "mvcPath",
"/html/fascicolofe/view.jsp");
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
_log.error(e, e);
throw e;
}
}
- public void deleteFineLavori(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void deleteFineLavori(ActionRequest request, ActionResponse response) throws Exception {
try {
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
FineLavori fineLavori = FineLavoriServiceUtil.getLastEditable(intPraticaId);
if (Validator.isNull(fineLavori)) {
throw new SystemException("no Fine Lavori in progress in fascicolo #" + intPraticaId);
@@ -589,29 +616,29 @@ public class FascicoloFePortlet extends MVCPortlet {
}
}
- public void addCollaudo(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void addCollaudo(ActionRequest request, ActionResponse response) throws Exception {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
- String successURL = ParamUtil.getString(actionRequest, "successURL");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
+ String successURL = ParamUtil.getString(request, "successURL");
try {
Collaudo collaudo = CollaudoServiceUtil.addCollaudo(intPraticaId, serviceContext);
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "collaudoId",
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "collaudoId",
String.valueOf(collaudo.getCollaudoId()));
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
} catch (PortalException | SystemException e) {
- successURL = HttpUtil.setParameter(successURL, actionResponse.getNamespace() + "mvcPath",
+ successURL = HttpUtil.setParameter(successURL, response.getNamespace() + "mvcPath",
"/html/fascicolofe/view.jsp");
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
_log.error(e, e);
throw e;
}
}
- public void deleteCollaudo(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void deleteCollaudo(ActionRequest request, ActionResponse response) throws Exception {
try {
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
Collaudo collaudo = CollaudoServiceUtil.getLastEditable(intPraticaId);
if (Validator.isNull(collaudo)) {
throw new SystemException("no Collaudo in progress in fascicolo #" + intPraticaId);
@@ -623,87 +650,87 @@ public class FascicoloFePortlet extends MVCPortlet {
}
}
- public void verifyEntry(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void verifyEntry(ActionRequest request, ActionResponse response) throws Exception {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), actionRequest);
- long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), request);
+ long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
if (ValidazionePraticaUtil.praticaIsEditable(dettPraticaId)
&& serviceContext.getUserId() == dettPratica.getUserId()) {
- saveDatiDettPratica(dettPraticaId, actionRequest, actionResponse);
+ saveDatiDettPratica(dettPraticaId, request, response);
}
}
- public void saveDettPratica(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void saveDettPratica(ActionRequest request, ActionResponse response) throws Exception {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), actionRequest);
- long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), request);
+ long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
- String cmd = ParamUtil.getString(actionRequest, Constants.CMD);
- boolean bozza = ParamUtil.getBoolean(actionRequest, "bozza");
+ String cmd = ParamUtil.getString(request, Constants.CMD);
+ boolean bozza = ParamUtil.getBoolean(request, "bozza");
if (bozza) {
- saveDatiDettPratica(dettPraticaId, actionRequest, actionResponse);
+ saveDatiDettPratica(dettPraticaId, request, response);
} else if ("delega".equalsIgnoreCase(cmd)
&& DelegheUtil.hasDelegaAttiva(serviceContext.getUserId(), dettPratica.getDettPraticaId())) {
- concludiDelegaDomanda(actionRequest, actionResponse);
- String successURL = ParamUtil.getString(actionRequest, "successURL");
- actionResponse.sendRedirect(successURL);
+ concludiDelegaDomanda(request, response);
+ String successURL = ParamUtil.getString(request, "successURL");
+ response.sendRedirect(successURL);
} else if ("asseverazione".equalsIgnoreCase(cmd)
&& AsseverazioniUtil.hasAsseverazioneAttiva(serviceContext.getUserId(), dettPratica.getIntPraticaId())) {
- asseveraDomanda(actionRequest, actionResponse);
- String successURL = ParamUtil.getString(actionRequest, "successURL");
- actionResponse.sendRedirect(successURL);
+ asseveraDomanda(request, response);
+ String successURL = ParamUtil.getString(request, "successURL");
+ response.sendRedirect(successURL);
} else if ("domanda".equalsIgnoreCase(cmd)) {
- saveDatiDettPratica(dettPraticaId, actionRequest, actionResponse);
+ saveDatiDettPratica(dettPraticaId, request, response);
} else {
throw new SystemException("operazione non gestita");
}
}
- public void saveTipoPratica(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void saveTipoPratica(ActionRequest request, ActionResponse response) throws Exception {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), actionRequest);
- long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), request);
+ long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
- String cmd = ParamUtil.getString(actionRequest, Constants.CMD);
- boolean bozza = ParamUtil.getBoolean(actionRequest, "bozza");
+ String cmd = ParamUtil.getString(request, Constants.CMD);
+ boolean bozza = ParamUtil.getBoolean(request, "bozza");
if (bozza) {
- saveDatiTipoPratica(dettPraticaId, actionRequest, actionResponse);
+ saveDatiTipoPratica(dettPraticaId, request, response);
} else if ("delega".equalsIgnoreCase(cmd)
&& DelegheUtil.hasDelegaAttiva(serviceContext.getUserId(), dettPratica.getDettPraticaId())) {
- concludiDelegaDomanda(actionRequest, actionResponse);
- String successURL = ParamUtil.getString(actionRequest, "successURL");
- actionResponse.sendRedirect(successURL);
+ concludiDelegaDomanda(request, response);
+ String successURL = ParamUtil.getString(request, "successURL");
+ response.sendRedirect(successURL);
} else if ("asseverazione".equalsIgnoreCase(cmd)
&& AsseverazioniUtil.hasAsseverazioneAttiva(serviceContext.getUserId(), dettPratica.getIntPraticaId())) {
- asseveraDomanda(actionRequest, actionResponse);
- String successURL = ParamUtil.getString(actionRequest, "successURL");
- actionResponse.sendRedirect(successURL);
+ asseveraDomanda(request, response);
+ String successURL = ParamUtil.getString(request, "successURL");
+ response.sendRedirect(successURL);
} else if ("domanda".equalsIgnoreCase(cmd)) {
if (TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(dettPratica.getTipoIntegrazione())) {
- saveVariazioneSoggetti(dettPraticaId, actionRequest, actionResponse);
+ saveVariazioneSoggetti(dettPraticaId, request, response);
} else {
- saveDatiTipoPratica(dettPraticaId, actionRequest, actionResponse);
+ saveDatiTipoPratica(dettPraticaId, request, response);
}
} else {
throw new SystemException("operazione non gestita");
}
}
- public void saveFineLavori(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
-
- long fineLavoriId = ParamUtil.getLong(actionRequest, "fineLavoriId");
- boolean bozza = ParamUtil.getBoolean(actionRequest, "bozza");
- boolean parziale = ParamUtil.getBoolean(actionRequest, "tipoFineLavori");
- Date dataFineLavori = ParamUtil.getDate(actionRequest, "dataFineLavori",
- DateFormatFactoryUtil.getDate(actionRequest.getLocale()), null);
- String codiceFiscaleDelegato = ParamUtil.getString(actionRequest, "direttoreLavori");
- boolean normEsenteBollo = ParamUtil.getBoolean(actionRequest, "normEsenteBollo");
- boolean normEsenteCollaudo = ParamUtil.getBoolean(actionRequest, "normEsenteCollaudo");
- boolean isCheckedAltro = ParamUtil.getBoolean(actionRequest, "altro_checkbox");
- String comunicazioneDirettoreLavori = isCheckedAltro ? ParamUtil.getString(actionRequest,
+ public void saveFineLavori(ActionRequest request, ActionResponse response) throws Exception {
+
+ long fineLavoriId = ParamUtil.getLong(request, "fineLavoriId");
+ boolean bozza = ParamUtil.getBoolean(request, "bozza");
+ boolean parziale = ParamUtil.getBoolean(request, "tipoFineLavori");
+ Date dataFineLavori = ParamUtil.getDate(request, "dataFineLavori",
+ DateFormatFactoryUtil.getDate(request.getLocale()), null);
+ String codiceFiscaleDelegato = ParamUtil.getString(request, "direttoreLavori");
+ boolean normEsenteBollo = ParamUtil.getBoolean(request, "normEsenteBollo");
+ boolean normEsenteCollaudo = ParamUtil.getBoolean(request, "normEsenteCollaudo");
+ boolean isCheckedAltro = ParamUtil.getBoolean(request, "altro_checkbox");
+ String comunicazioneDirettoreLavori = isCheckedAltro ? ParamUtil.getString(request,
"comunicazioneDirettoreLavori") : StringPool.BLANK;
- long userId = PortalUtil.getUserId(actionRequest);
+ long userId = PortalUtil.getUserId(request);
try {
FineLavori fineLavori = FineLavoriServiceUtil.getFineLavori(fineLavoriId);
if (!fineLavori.isCompletata()) {
@@ -717,45 +744,45 @@ public class FascicoloFePortlet extends MVCPortlet {
normEsenteBollo, normEsenteCollaudo, comunicazioneDirettoreLavori);
}
}
- String redirect = ParamUtil.getString(actionRequest, "redirect");
+ String redirect = ParamUtil.getString(request, "redirect");
if (Validator.isNull(redirect)) {
- String successURL = ParamUtil.getString(actionRequest, "successURL");
+ String successURL = ParamUtil.getString(request, "successURL");
if (Validator.isNotNull(successURL)) {
- successURL = HttpUtil.removeParameter(successURL, actionResponse.getNamespace() + "fineLavoriId");
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "fineLavoriId",
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "fineLavoriId");
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "fineLavoriId",
String.valueOf(fineLavoriId));
- successURL = HttpUtil.removeParameter(successURL, actionResponse.getNamespace() + "openVerifyUrl");
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "openVerifyUrl",
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "openVerifyUrl");
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "openVerifyUrl",
String.valueOf(!bozza));
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
}
}
} catch (PortalException e) {
_log.error(e, e);
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- actionResponse.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fine-lavori.jsp");
- actionResponse.setRenderParameter("fineLavoriId", String.valueOf(fineLavoriId));
+ PortalUtil.copyRequestParameters(request, response);
+ response.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fine-lavori.jsp");
+ response.setRenderParameter("fineLavoriId", String.valueOf(fineLavoriId));
throw e;
} catch (Exception e) {
_log.error(e, e);
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- actionResponse.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fine-lavori.jsp");
- actionResponse.setRenderParameter("fineLavoriId", String.valueOf(fineLavoriId));
+ PortalUtil.copyRequestParameters(request, response);
+ response.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fine-lavori.jsp");
+ response.setRenderParameter("fineLavoriId", String.valueOf(fineLavoriId));
throw new PortalException(e);
}
}
- public void saveCollaudo(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
-
- long collaudoId = ParamUtil.getLong(actionRequest, "collaudoId");
- boolean bozza = ParamUtil.getBoolean(actionRequest, "bozza");
- boolean parziale = ParamUtil.getBoolean(actionRequest, "tipoCollaudo");
- Date dataCollaudo = ParamUtil.getDate(actionRequest, "dataCollaudo",
- DateFormatFactoryUtil.getDate(actionRequest.getLocale()), null);
- String codiceFiscaleDelegato = ParamUtil.getString(actionRequest, "collaudatore");
- boolean normEsenteBollo = ParamUtil.getBoolean(actionRequest, "normEsenteBollo");
- String noteCollaudo = ParamUtil.getString(actionRequest, "noteCollaudo", StringPool.BLANK);
- long userId = PortalUtil.getUserId(actionRequest);
+ public void saveCollaudo(ActionRequest request, ActionResponse response) throws Exception {
+
+ long collaudoId = ParamUtil.getLong(request, "collaudoId");
+ boolean bozza = ParamUtil.getBoolean(request, "bozza");
+ boolean parziale = ParamUtil.getBoolean(request, "tipoCollaudo");
+ Date dataCollaudo = ParamUtil.getDate(request, "dataCollaudo",
+ DateFormatFactoryUtil.getDate(request.getLocale()), null);
+ String codiceFiscaleDelegato = ParamUtil.getString(request, "collaudatore");
+ boolean normEsenteBollo = ParamUtil.getBoolean(request, "normEsenteBollo");
+ String noteCollaudo = ParamUtil.getString(request, "noteCollaudo", StringPool.BLANK);
+ long userId = PortalUtil.getUserId(request);
try {
Collaudo collaudo = CollaudoServiceUtil.getCollaudo(collaudoId);
if (!collaudo.isCompletata()) {
@@ -767,50 +794,48 @@ public class FascicoloFePortlet extends MVCPortlet {
parziale, false, dataCollaudo, codiceFiscaleDelegato, normEsenteBollo, noteCollaudo);
}
}
- String redirect = ParamUtil.getString(actionRequest, "redirect");
+ String redirect = ParamUtil.getString(request, "redirect");
if (Validator.isNull(redirect)) {
- String successURL = ParamUtil.getString(actionRequest, "successURL");
+ String successURL = ParamUtil.getString(request, "successURL");
if (Validator.isNotNull(successURL)) {
- successURL = HttpUtil.removeParameter(successURL, actionResponse.getNamespace() + "collaudoId");
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "collaudoId",
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "collaudoId");
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "collaudoId",
String.valueOf(collaudoId));
- successURL = HttpUtil.removeParameter(successURL, actionResponse.getNamespace() + "openVerifyUrl");
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "openVerifyUrl",
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "openVerifyUrl");
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "openVerifyUrl",
String.valueOf(!bozza));
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
}
}
} catch (PortalException e) {
_log.error(e, e);
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- actionResponse.setRenderParameter("mvcPath", "/html/fascicolofe/edit_collaudo.jsp");
- actionResponse.setRenderParameter("collaudoId", String.valueOf(collaudoId));
+ PortalUtil.copyRequestParameters(request, response);
+ response.setRenderParameter("mvcPath", "/html/fascicolofe/edit_collaudo.jsp");
+ response.setRenderParameter("collaudoId", String.valueOf(collaudoId));
throw e;
} catch (Exception e) {
_log.error(e, e);
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- actionResponse.setRenderParameter("mvcPath", "/html/fascicolofe/edit_collaudo.jsp");
- actionResponse.setRenderParameter("collaudoId", String.valueOf(collaudoId));
+ PortalUtil.copyRequestParameters(request, response);
+ response.setRenderParameter("mvcPath", "/html/fascicolofe/edit_collaudo.jsp");
+ response.setRenderParameter("collaudoId", String.valueOf(collaudoId));
throw new PortalException(e);
}
}
- private void asseveraDomanda(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException,
- NestableException {
+ private void asseveraDomanda(ActionRequest request, ActionResponse response) throws IOException, NestableException {
try {
String dichiarazioni = StringPool.BLANK;
- if (ParamUtil.getBoolean(actionRequest, "asPresenti", false)) {
+ if (ParamUtil.getBoolean(request, "asPresenti", false)) {
Map parametri = new HashMap<>();
- parametri.put("coniugio", ParamUtil.getBoolean(actionRequest, "asConiugio", false));
- parametri.put("relazioni", ParamUtil.getString(actionRequest, "asRelazioni", StringPool.BLANK));
+ parametri.put("coniugio", ParamUtil.getBoolean(request, "asConiugio", false));
+ parametri.put("relazioni", ParamUtil.getString(request, "asRelazioni", StringPool.BLANK));
JSONSerializer serializer = JSONFactoryUtil.createJSONSerializer();
dichiarazioni = serializer.serializeDeep(parametri);
}
_log.info("Dichiarazioni=" + dichiarazioni);
- ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(),
- actionRequest);
- long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), request);
+ long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
if (AsseverazioniUtil.hasAsseverazioneAttiva(serviceContext.getUserId(), dettPratica.getIntPraticaId())) {
User user = UserLocalServiceUtil.getUser(serviceContext.getUserId());
@@ -830,12 +855,11 @@ public class FascicoloFePortlet extends MVCPortlet {
}
}
- private void concludiDelegaDomanda(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ private void concludiDelegaDomanda(ActionRequest request, ActionResponse response) throws Exception {
try {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(),
- actionRequest);
- long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), request);
+ long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
if (DelegheUtil.hasDelegaCompilazioneDomanda(serviceContext.getUserId(), dettPraticaId)
|| DelegheUtil.hasDelegaCompilazioneSezioneGeologica(serviceContext.getUserId(), dettPraticaId)
@@ -844,11 +868,11 @@ public class FascicoloFePortlet extends MVCPortlet {
List deleghe = DelegaServiceUtil.findByIntPratica_CodiceFiscale_InEsito(
dettPratica.getIntPraticaId(), user.getScreenName(),
new String[] { DelegheUtil.STATO_ASSEGNATA }, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
- saveDatiDettPratica(dettPraticaId, actionRequest, actionResponse);
+ saveDatiDettPratica(dettPraticaId, request, response);
Map parametri = new HashMap<>();
- if (ParamUtil.getBoolean(actionRequest, "dgPresenti", false)) {
- parametri.put("coniugio", ParamUtil.getBoolean(actionRequest, "dgConiugio", false));
- parametri.put("relazioni", ParamUtil.getString(actionRequest, "dgRelazioni", StringPool.BLANK));
+ if (ParamUtil.getBoolean(request, "dgPresenti", false)) {
+ parametri.put("coniugio", ParamUtil.getBoolean(request, "dgConiugio", false));
+ parametri.put("relazioni", ParamUtil.getString(request, "dgRelazioni", StringPool.BLANK));
}
JSONSerializer serializer = JSONFactoryUtil.createJSONSerializer();
String dichiarazioni = serializer.serializeDeep(parametri);
@@ -871,271 +895,260 @@ public class FascicoloFePortlet extends MVCPortlet {
}
}
- private void saveDatiDettPratica(long dettPraticaId, ActionRequest actionRequest, ActionResponse actionResponse)
+ private void saveDatiDettPratica(long dettPraticaId, ActionRequest request, ActionResponse response)
throws Exception {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), actionRequest);
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), request);
DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
- boolean bozza = ParamUtil.getBoolean(actionRequest, "bozza", true);
- String cmd = ParamUtil.getString(actionRequest, Constants.CMD);
- long integrazione = ParamUtil.getLong(actionRequest, "integrazione");
- boolean disabledSubmit = ParamUtil.getBoolean(actionRequest, "disabledSubmit", true);
- boolean geoDisabledSubmit = ParamUtil.getBoolean(actionRequest, "geoDisabledSubmit", true);
- String protocollo = ParamUtil.getString(actionRequest, "protocollo");
- String tipoIntegrazione = ParamUtil.getString(actionRequest, "tipoIntegrazione");
- boolean completa = ParamUtil.getBoolean(actionRequest, "completa");
- boolean gestita = ParamUtil.getBoolean(actionRequest, "gestita");
- int statusTask = ParamUtil.getInteger(actionRequest, "statusTask");
- long soggettoSostituitoId = ParamUtil.getLong(actionRequest, "soggettoSostituitoId");
- long varianteNumero = ParamUtil.getLong(actionRequest, "varianteNumero");
- boolean operaConforme = ParamUtil.getBoolean(actionRequest, "operaConforme");
+ boolean bozza = ParamUtil.getBoolean(request, "bozza", true);
+ String cmd = ParamUtil.getString(request, Constants.CMD);
+ long integrazione = ParamUtil.getLong(request, "integrazione");
+ boolean disabledSubmit = ParamUtil.getBoolean(request, "disabledSubmit", true);
+ boolean geoDisabledSubmit = ParamUtil.getBoolean(request, "geoDisabledSubmit", true);
+ String protocollo = ParamUtil.getString(request, "protocollo");
+ String tipoIntegrazione = ParamUtil.getString(request, "tipoIntegrazione");
+ boolean completa = ParamUtil.getBoolean(request, "completa");
+ boolean gestita = ParamUtil.getBoolean(request, "gestita");
+ int statusTask = ParamUtil.getInteger(request, "statusTask");
+ long soggettoSostituitoId = ParamUtil.getLong(request, "soggettoSostituitoId");
+ long varianteNumero = ParamUtil.getLong(request, "varianteNumero");
+ boolean operaConforme = ParamUtil.getBoolean(request, "operaConforme");
User user = UserLocalServiceUtil.getUser(serviceContext.getUserId());
String codiceFiscaleDelegatoCommittente = user.getScreenName();
- boolean isCodiceFiscaleDelegatoFineLavoriAuthorized = ParamUtil.getBoolean(actionRequest,
+ boolean isCodiceFiscaleDelegatoFineLavoriAuthorized = ParamUtil.getBoolean(request,
"codiceFiscaleDelegatoFineLavoriEnabled");
String codiceFiscaleDelegatoFineLavori = isCodiceFiscaleDelegatoFineLavoriAuthorized ? ParamUtil.getString(
- actionRequest, "codiceFiscaleDelegatoFineLavori") : StringPool.BLANK;
- boolean isCodiceFiscaleDelegatoCollaudoAuthorized = ParamUtil.getBoolean(actionRequest,
+ request, "codiceFiscaleDelegatoFineLavori") : StringPool.BLANK;
+ boolean isCodiceFiscaleDelegatoCollaudoAuthorized = ParamUtil.getBoolean(request,
"codiceFiscaleDelegatoCollaudoEnabled");
- String codiceFiscaleDelegatoCollaudo = isCodiceFiscaleDelegatoCollaudoAuthorized ? ParamUtil.getString(
- actionRequest, "codiceFiscaleDelegatoCollaudo") : StringPool.BLANK;
- long pagamentoId = ParamUtil.getLong(actionRequest, "pagamentoId");
- Date dataEffettuazione = ParamUtil.getDate(actionRequest, "dataEffettuazione",
- DateFormatFactoryUtil.getDate(actionRequest.getLocale()));
- String note = ParamUtil.getString(actionRequest, "note");
- String noteUfficio = ParamUtil.getString(actionRequest, "noteUfficio");
+ String codiceFiscaleDelegatoCollaudo = isCodiceFiscaleDelegatoCollaudoAuthorized ? ParamUtil.getString(request,
+ "codiceFiscaleDelegatoCollaudo") : StringPool.BLANK;
+ long pagamentoId = ParamUtil.getLong(request, "pagamentoId");
+ Date dataEffettuazione = ParamUtil.getDate(request, "dataEffettuazione",
+ DateFormatFactoryUtil.getDate(request.getLocale()));
+ String note = ParamUtil.getString(request, "note");
+ String noteUfficio = ParamUtil.getString(request, "noteUfficio");
// PAGAMENTI
- String codicePagamento = ParamUtil.getString(actionRequest, "codicePagamento");
- String causalePagamento = ParamUtil.getString(actionRequest, "causalePagamento");
- String mezzoPagamento = ParamUtil.getString(actionRequest, "mezzoPagamento");
- String importoBolli = ParamUtil.getString(actionRequest, "importoBolli");
- String importoSpeseIstruttoria = ParamUtil.getString(actionRequest, "importoSpeseIstruttoria");
- Double pagSoggettiAdAutorizzazione = ParamUtil.getDouble(actionRequest, "pagSoggettiAdAutorizzazione");
- Double pagInterventiRestauroManufatti = ParamUtil.getDouble(actionRequest, "pagInterventiRestauroManufatti");
- Double pagAltriCasiCulturali = ParamUtil.getDouble(actionRequest, "pagAltriCasiCulturali");
- Double pagLottizzazioni = ParamUtil.getDouble(actionRequest, "pagLottizzazioni");
- Double pagGrandiStrutture = ParamUtil.getDouble(actionRequest, "pagGrandiStrutture");
- Double pagCondotte = ParamUtil.getDouble(actionRequest, "pagCondotte");
- Double pagPalificazioni = ParamUtil.getDouble(actionRequest, "pagPalificazioni");
- Double pagImpiantiEolici = ParamUtil.getDouble(actionRequest, "pagImpiantiEolici");
- Double pagNuoveRealizzazioni = ParamUtil.getDouble(actionRequest, "pagNuoveRealizzazioni");
- Double pagImmobiliPreesistenti = ParamUtil.getDouble(actionRequest, "pagImmobiliPreesistenti");
- Double pagManifestiPubblicitari = ParamUtil.getDouble(actionRequest, "pagManifestiPubblicitari");
- Double pagPareriDiMassima = ParamUtil.getDouble(actionRequest, "pagPareriDiMassima");
- Double pagAltriCasiPaesaggistici = ParamUtil.getDouble(actionRequest, "pagAltriCasiPaesaggistici");
- Double pagVariantiPareriResi = ParamUtil.getDouble(actionRequest, "pagVariantiPareriResi");
- Double pagRilascioAttestazioni = ParamUtil.getDouble(actionRequest, "pagRilascioAttestazioni");
- Double pagConsultazioniArchivio = ParamUtil.getDouble(actionRequest, "pagConsultazioniArchivio");
+ String codicePagamento = ParamUtil.getString(request, "codicePagamento");
+ String causalePagamento = ParamUtil.getString(request, "causalePagamento");
+ String mezzoPagamento = ParamUtil.getString(request, "mezzoPagamento");
+ String importoBolli = ParamUtil.getString(request, "importoBolli");
+ String importoSpeseIstruttoria = ParamUtil.getString(request, "importoSpeseIstruttoria");
+ Double pagSoggettiAdAutorizzazione = ParamUtil.getDouble(request, "pagSoggettiAdAutorizzazione");
+ Double pagInterventiRestauroManufatti = ParamUtil.getDouble(request, "pagInterventiRestauroManufatti");
+ Double pagAltriCasiCulturali = ParamUtil.getDouble(request, "pagAltriCasiCulturali");
+ Double pagLottizzazioni = ParamUtil.getDouble(request, "pagLottizzazioni");
+ Double pagGrandiStrutture = ParamUtil.getDouble(request, "pagGrandiStrutture");
+ Double pagCondotte = ParamUtil.getDouble(request, "pagCondotte");
+ Double pagPalificazioni = ParamUtil.getDouble(request, "pagPalificazioni");
+ Double pagImpiantiEolici = ParamUtil.getDouble(request, "pagImpiantiEolici");
+ Double pagNuoveRealizzazioni = ParamUtil.getDouble(request, "pagNuoveRealizzazioni");
+ Double pagImmobiliPreesistenti = ParamUtil.getDouble(request, "pagImmobiliPreesistenti");
+ Double pagManifestiPubblicitari = ParamUtil.getDouble(request, "pagManifestiPubblicitari");
+ Double pagPareriDiMassima = ParamUtil.getDouble(request, "pagPareriDiMassima");
+ Double pagAltriCasiPaesaggistici = ParamUtil.getDouble(request, "pagAltriCasiPaesaggistici");
+ Double pagVariantiPareriResi = ParamUtil.getDouble(request, "pagVariantiPareriResi");
+ Double pagRilascioAttestazioni = ParamUtil.getDouble(request, "pagRilascioAttestazioni");
+ Double pagConsultazioniArchivio = ParamUtil.getDouble(request, "pagConsultazioniArchivio");
// SEZIONE DETTAGLI PRINCIPALI
- String livelloDiTutela = ParamUtil.getString(actionRequest, "livelloDiTutela");
- String paesaggioLocale = ParamUtil.getString(actionRequest, "paesaggioLocale");
- String vincoli = ParamUtil.getString(actionRequest, "vincoli");
- String destinazioneAltroIntervento = ParamUtil.getString(actionRequest, "destinazioneAltroIntervento");
- boolean tcCostruzioniEsistenti = ParamUtil.getBoolean(actionRequest, "tcCostruzioniEsistenti");
- boolean tcManutOrdStraord = ParamUtil.getBoolean(actionRequest, "tcManutOrdStraord");
- boolean tcAltriInterventi = ParamUtil.getBoolean(actionRequest, "tcAltriInterventi");
- String tcAltriInterventiDesc = ParamUtil.getString(actionRequest, "tcAltriInterventiDesc");
- boolean collaudoStatico = ParamUtil.getBoolean(actionRequest, "collaudoStatico");
- boolean noCollaudo = ParamUtil.getBoolean(actionRequest, "noCollaudo");
- String destinazione = ParamUtil.getString(actionRequest, "destinazione");
- String ag = ParamUtil.getString(actionRequest, "ag");
- String descLongIntervento = ParamUtil.getString(actionRequest, "descLongIntervento");
- String via = ParamUtil.getString(actionRequest, "via");
- String localita = ParamUtil.getString(actionRequest, "localita");
- String estremiCatastali = ParamUtil.getString(actionRequest, "estremiCatastali");
- String estremiPratCom = ParamUtil.getString(actionRequest, "estremiPratCom");
- boolean lavoriPubblici = ParamUtil.getBoolean(actionRequest, "lavoriPubblici");
- int lavoriPubbliciPercentuale = ParamUtil.getInteger(actionRequest, "lavoriPubbliciPercentuale");
- String dcFoglio = ParamUtil.getString(actionRequest, "dcFoglio");
- String dcAllegato = ParamUtil.getString(actionRequest, "dcAllegato");
- String particella1 = ParamUtil.getString(actionRequest, "particella1", StringPool.BLANK).replaceAll(
+ String livelloDiTutela = ParamUtil.getString(request, "livelloDiTutela");
+ String paesaggioLocale = ParamUtil.getString(request, "paesaggioLocale");
+ String vincoli = ParamUtil.getString(request, "vincoli");
+ String destinazioneAltroIntervento = ParamUtil.getString(request, "destinazioneAltroIntervento");
+ boolean tcCostruzioniEsistenti = ParamUtil.getBoolean(request, "tcCostruzioniEsistenti");
+ boolean tcManutOrdStraord = ParamUtil.getBoolean(request, "tcManutOrdStraord");
+ boolean tcAltriInterventi = ParamUtil.getBoolean(request, "tcAltriInterventi");
+ String tcAltriInterventiDesc = ParamUtil.getString(request, "tcAltriInterventiDesc");
+ boolean collaudoStatico = ParamUtil.getBoolean(request, "collaudoStatico");
+ boolean noCollaudo = ParamUtil.getBoolean(request, "noCollaudo");
+ String destinazione = ParamUtil.getString(request, "destinazione");
+ String ag = ParamUtil.getString(request, "ag");
+ String descLongIntervento = ParamUtil.getString(request, "descLongIntervento");
+ String via = ParamUtil.getString(request, "via");
+ String localita = ParamUtil.getString(request, "localita");
+ String estremiCatastali = ParamUtil.getString(request, "estremiCatastali");
+ String estremiPratCom = ParamUtil.getString(request, "estremiPratCom");
+ boolean lavoriPubblici = ParamUtil.getBoolean(request, "lavoriPubblici");
+ int lavoriPubbliciPercentuale = ParamUtil.getInteger(request, "lavoriPubbliciPercentuale");
+ String dcFoglio = ParamUtil.getString(request, "dcFoglio");
+ String dcAllegato = ParamUtil.getString(request, "dcAllegato");
+ String particella1 = ParamUtil.getString(request, "particella1", StringPool.BLANK).replaceAll(
Pattern.quote(StringPool.PIPE), StringPool.SPACE);
- String particella2 = ParamUtil.getString(actionRequest, "particella2", StringPool.BLANK).replaceAll(
+ String particella2 = ParamUtil.getString(request, "particella2", StringPool.BLANK).replaceAll(
Pattern.quote(StringPool.PIPE), StringPool.SPACE);
- String particella3 = ParamUtil.getString(actionRequest, "particella3", StringPool.BLANK).replaceAll(
+ String particella3 = ParamUtil.getString(request, "particella3", StringPool.BLANK).replaceAll(
Pattern.quote(StringPool.PIPE), StringPool.SPACE);
- String particella4 = ParamUtil.getString(actionRequest, "particella4", StringPool.BLANK).replaceAll(
+ String particella4 = ParamUtil.getString(request, "particella4", StringPool.BLANK).replaceAll(
Pattern.quote(StringPool.PIPE), StringPool.SPACE);
String dcParticelle = particella1 + StringPool.PIPE + particella2 + StringPool.PIPE + particella3
+ StringPool.PIPE + particella4;
- String latitudine = ParamUtil.getString(actionRequest, "lat", StringPool.BLANK).replaceAll(
+ String latitudine = ParamUtil.getString(request, "lat", StringPool.BLANK).replaceAll(
Pattern.quote(StringPool.PIPE), StringPool.SPACE);
- String longitudine = ParamUtil.getString(actionRequest, "long", StringPool.BLANK).replaceAll(
- Pattern.quote(StringPool.PIPE), StringPool.SPACE);
- String zoom = ParamUtil.getString(actionRequest, "zoom", StringPool.BLANK).replaceAll(
+ String longitudine = ParamUtil.getString(request, "long", StringPool.BLANK).replaceAll(
Pattern.quote(StringPool.PIPE), StringPool.SPACE);
+ String zoom = ParamUtil.getString(request, "zoom", StringPool.BLANK).replaceAll(Pattern.quote(StringPool.PIPE),
+ StringPool.SPACE);
String localizzazioneGeografica = latitudine + StringPool.PIPE + longitudine + StringPool.PIPE + zoom;
- boolean tcNuovaCostruzione = ParamUtil.getBoolean(actionRequest, "tcNuovaCostruzione");
- boolean tcAdeguamentoSismico = ParamUtil.getBoolean(actionRequest, "tcAdeguamentoSismico");
- boolean tcMiglioramentoSismico = ParamUtil.getBoolean(actionRequest, "tcMiglioramentoSismico");
- boolean tcRiparazioneInterventoLocale = ParamUtil.getBoolean(actionRequest, "tcRiparazioneInterventoLocale");
- boolean tcInCA = ParamUtil.getBoolean(actionRequest, "tcInCA");
- boolean tcInOpera = ParamUtil.getBoolean(actionRequest, "tcInOpera");
- boolean tcPrefabbricato = ParamUtil.getBoolean(actionRequest, "tcPrefabbricato");
- boolean tcInAcciaio = ParamUtil.getBoolean(actionRequest, "tcInAcciaio");
- boolean tcMista = ParamUtil.getBoolean(actionRequest, "tcMista");
- boolean tcInMuratura = ParamUtil.getBoolean(actionRequest, "tcInMuratura");
- boolean tcInMuraturaOrdinaria = ParamUtil.getBoolean(actionRequest, "tcInMuraturaOrdinaria");
- boolean tcInMuraturaArmata = ParamUtil.getBoolean(actionRequest, "tcInMuraturaArmata");
- boolean tcInMuraturaMista = ParamUtil.getBoolean(actionRequest, "tcInMuraturaMista");
- boolean tcInLegno = ParamUtil.getBoolean(actionRequest, "tcInLegno");
- boolean tcAltro = ParamUtil.getBoolean(actionRequest, "tcAltro");
- String tcAltroDescrizione = ParamUtil.getString(actionRequest, "tcAltroDescrizione");
- boolean tcConDispositivi = ParamUtil.getBoolean(actionRequest, "tcConDispositivi");
- boolean tcNuovaCostruzionePertinenza = ParamUtil.getBoolean(actionRequest, "tcNuovaCostruzionePertinenza");
- boolean tcInterventoOpereEscavazione = ParamUtil.getBoolean(actionRequest, "tcInterventoOpereEscavazione");
- boolean tcViarch = ParamUtil.getBoolean(actionRequest, "tcViarch");
- boolean tcOperaA25 = ParamUtil.getBoolean(actionRequest, "tcOperaA25");
- boolean tcNoOpereEscavazione = ParamUtil.getBoolean(actionRequest, "tcNoOpereEscavazione");
+ boolean tcNuovaCostruzione = ParamUtil.getBoolean(request, "tcNuovaCostruzione");
+ boolean tcAdeguamentoSismico = ParamUtil.getBoolean(request, "tcAdeguamentoSismico");
+ boolean tcMiglioramentoSismico = ParamUtil.getBoolean(request, "tcMiglioramentoSismico");
+ boolean tcRiparazioneInterventoLocale = ParamUtil.getBoolean(request, "tcRiparazioneInterventoLocale");
+ boolean tcInCA = ParamUtil.getBoolean(request, "tcInCA");
+ boolean tcInOpera = ParamUtil.getBoolean(request, "tcInOpera");
+ boolean tcPrefabbricato = ParamUtil.getBoolean(request, "tcPrefabbricato");
+ boolean tcInAcciaio = ParamUtil.getBoolean(request, "tcInAcciaio");
+ boolean tcMista = ParamUtil.getBoolean(request, "tcMista");
+ boolean tcInMuratura = ParamUtil.getBoolean(request, "tcInMuratura");
+ boolean tcInMuraturaOrdinaria = ParamUtil.getBoolean(request, "tcInMuraturaOrdinaria");
+ boolean tcInMuraturaArmata = ParamUtil.getBoolean(request, "tcInMuraturaArmata");
+ boolean tcInMuraturaMista = ParamUtil.getBoolean(request, "tcInMuraturaMista");
+ boolean tcInLegno = ParamUtil.getBoolean(request, "tcInLegno");
+ boolean tcAltro = ParamUtil.getBoolean(request, "tcAltro");
+ String tcAltroDescrizione = ParamUtil.getString(request, "tcAltroDescrizione");
+ boolean tcConDispositivi = ParamUtil.getBoolean(request, "tcConDispositivi");
+ boolean tcNuovaCostruzionePertinenza = ParamUtil.getBoolean(request, "tcNuovaCostruzionePertinenza");
+ boolean tcInterventoOpereEscavazione = ParamUtil.getBoolean(request, "tcInterventoOpereEscavazione");
+ boolean tcViarch = ParamUtil.getBoolean(request, "tcViarch");
+ boolean tcOperaA25 = ParamUtil.getBoolean(request, "tcOperaA25");
+ boolean tcNoOpereEscavazione = ParamUtil.getBoolean(request, "tcNoOpereEscavazione");
// Descrizione edificio
- String dePiani = ParamUtil.getString(actionRequest, "dePiani");
- String deAltezza = ParamUtil.getString(actionRequest, "deAltezza");
- String deInterrati = ParamUtil.getString(actionRequest, "deInterrati");
- String deSuperficie = ParamUtil.getString(actionRequest, "deSuperficie");
- String deCostruzione = ParamUtil.getString(actionRequest, "deCostruzione");
- String deRistrutturazione = ParamUtil.getString(actionRequest, "deRistrutturazione");
- String deUso = ParamUtil.getString(actionRequest, "deUso");
- String dePrivata = ParamUtil.getString(actionRequest, "dePrivata");
- String dePubblica = ParamUtil.getString(actionRequest, "dePubblica");
- String deUtilizzazione = ParamUtil.getString(actionRequest, "deUtilizzazione");
- String dePosizioneEdificio = ParamUtil.getString(actionRequest, "dePosizioneEdificio");
- boolean deInfStradalePonte = ParamUtil.getBoolean(actionRequest, "deInfStradalePonte");
- boolean deInfStradaleStrada = ParamUtil.getBoolean(actionRequest, "deInfStradaleStrada");
- boolean deInfStradaleAltro = ParamUtil.getBoolean(actionRequest, "deInfStradaleAltro");
- boolean deInfIdraulicaLong = ParamUtil.getBoolean(actionRequest, "deInfIdraulicaLong");
- boolean deInfIdraulicaTrasv = ParamUtil.getBoolean(actionRequest, "deInfIdraulicaTrasv");
- boolean deInfIdraulicaAltro = ParamUtil.getBoolean(actionRequest, "deInfIdraulicaAltro");
- boolean deInfOperaAccStradale = ParamUtil.getBoolean(actionRequest, "deInfOperaAccStradale");
- boolean deInfOperaAccIdraulica = ParamUtil.getBoolean(actionRequest, "deInfOperaAccIdraulica");
- boolean deInfOperaAccAltro = ParamUtil.getBoolean(actionRequest, "deInfOperaAccAltro");
- boolean deInfAltraInfrastruttura = ParamUtil.getBoolean(actionRequest, "deInfAltraInfrastruttura");
- boolean deInfAltro = ParamUtil.getBoolean(actionRequest, "deInfAltro");
- String deInfAltroDesc = ParamUtil.getString(actionRequest, "deInfAltroDesc");
- boolean dccStruttureEleMuraturePietrame = ParamUtil
- .getBoolean(actionRequest, "dccStruttureEleMuraturePietrame");
- boolean dccStruttureEleMuratureLaterizio = ParamUtil.getBoolean(actionRequest,
- "dccStruttureEleMuratureLaterizio");
- boolean dccStruttureEleMuratureMisto = ParamUtil.getBoolean(actionRequest, "dccStruttureEleMuratureMisto");
- boolean dccStruttureEleMuratureStoriche = ParamUtil
- .getBoolean(actionRequest, "dccStruttureEleMuratureStoriche");
- boolean dccStruttureEleMistoCA = ParamUtil.getBoolean(actionRequest, "dccStruttureEleMistoCA");
- boolean dccStruttureEleMistoAcciaio = ParamUtil.getBoolean(actionRequest, "dccStruttureEleMistoAcciaio");
- boolean dccStruttureEleMistoMuratura = ParamUtil.getBoolean(actionRequest, "dccStruttureEleMistoMuratura");
- boolean dccStruttureEleMistoLegno = ParamUtil.getBoolean(actionRequest, "dccStruttureEleMistoLegno");
- boolean dccStruttureElePrefabbricato = ParamUtil.getBoolean(actionRequest, "dccStruttureElePrefabbricato");
- boolean dccStruttureEleAltro = ParamUtil.getBoolean(actionRequest, "dccStruttureEleAltro");
- String dccStruttureEleAltroDescrizione = ParamUtil.getString(actionRequest, "dccStruttureEleAltroDescrizione");
- boolean dccOrizzontamentiCAAcciaio = ParamUtil.getBoolean(actionRequest, "dccOrizzontamentiCAAcciaio");
- boolean dccOrizzontamentiLegno = ParamUtil.getBoolean(actionRequest, "dccOrizzontamentiLegno");
- boolean dccOrizzontamentiLegnoCA = ParamUtil.getBoolean(actionRequest, "dccOrizzontamentiLegnoCA");
- boolean dccOrizzontamentiLamieraGrecata = ParamUtil
- .getBoolean(actionRequest, "dccOrizzontamentiLamieraGrecata");
- boolean dccOrizzontamentiVolte = ParamUtil.getBoolean(actionRequest, "dccOrizzontamentiVolte");
- boolean dccOrizzontamentiAltro = ParamUtil.getBoolean(actionRequest, "dccOrizzontamentiAltro");
- String dccOrizzontamentiAltroDescrizione = ParamUtil.getString(actionRequest,
- "dccOrizzontamentiAltroDescrizione");
- boolean dccCoperturaCAAcciaio = ParamUtil.getBoolean(actionRequest, "dccCoperturaCAAcciaio");
- boolean dccCoperturaLegno = ParamUtil.getBoolean(actionRequest, "dccCoperturaLegno");
- boolean dccCoperturaLegnoCA = ParamUtil.getBoolean(actionRequest, "dccCoperturaLegnoCA");
- boolean dccCoperturaLamieraGrecata = ParamUtil.getBoolean(actionRequest, "dccCoperturaLamieraGrecata");
- boolean dccCoperturaPannelli = ParamUtil.getBoolean(actionRequest, "dccCoperturaPannelli");
- boolean dccCoperturaPVCTelonati = ParamUtil.getBoolean(actionRequest, "dccCoperturaPVCTelonati");
- boolean dccCoperturaLeggere = ParamUtil.getBoolean(actionRequest, "dccCoperturaLeggere");
- boolean dccCoperturaAltro = ParamUtil.getBoolean(actionRequest, "dccCoperturaAltro");
- String dccCoperturaAltroDesrizione = ParamUtil.getString(actionRequest, "dccCoperturaAltroDesrizione");
- boolean dccElemNonStrutLaterizio = ParamUtil.getBoolean(actionRequest, "dccElemNonStrutLaterizio");
- boolean dccElemNonStrutCartongesso = ParamUtil.getBoolean(actionRequest, "dccElemNonStrutCartongesso");
- boolean dccElemNonStrutCalcestruzzo = ParamUtil.getBoolean(actionRequest, "dccElemNonStrutCalcestruzzo");
- boolean dccElemNonStrutLegno = ParamUtil.getBoolean(actionRequest, "dccElemNonStrutLegno");
- boolean dccElemNonStrutAltro = ParamUtil.getBoolean(actionRequest, "dccElemNonStrutAltro");
- String dccElemNonStrutAltroDescrizione = ParamUtil.getString(actionRequest, "dccElemNonStrutAltroDescrizione");
- boolean dccOpereDiRinforzoInsCatene = ParamUtil.getBoolean(actionRequest, "dccOpereDiRinforzoInsCatene");
- boolean dccOpereDiRinforzoInsCordoli = ParamUtil.getBoolean(actionRequest, "dccOpereDiRinforzoInsCordoli");
- boolean dccOpereDiRinforzoIniArmate = ParamUtil.getBoolean(actionRequest, "dccOpereDiRinforzoIniArmate");
- boolean dccOpereDiRinforzoPlaccaggi = ParamUtil.getBoolean(actionRequest, "dccOpereDiRinforzoPlaccaggi");
- boolean dccOpereDiRinforzoIrrSolai = ParamUtil.getBoolean(actionRequest, "dccOpereDiRinforzoIrrSolai");
- boolean dccOpereDiRinforzoRinforziFRP = ParamUtil.getBoolean(actionRequest, "dccOpereDiRinforzoRinforziFRP");
- boolean dccOpereDiRinforzoTelaiECerchiature = ParamUtil.getBoolean(actionRequest,
+ String dePiani = ParamUtil.getString(request, "dePiani");
+ String deAltezza = ParamUtil.getString(request, "deAltezza");
+ String deInterrati = ParamUtil.getString(request, "deInterrati");
+ String deSuperficie = ParamUtil.getString(request, "deSuperficie");
+ String deCostruzione = ParamUtil.getString(request, "deCostruzione");
+ String deRistrutturazione = ParamUtil.getString(request, "deRistrutturazione");
+ String deUso = ParamUtil.getString(request, "deUso");
+ String dePrivata = ParamUtil.getString(request, "dePrivata");
+ String dePubblica = ParamUtil.getString(request, "dePubblica");
+ String deUtilizzazione = ParamUtil.getString(request, "deUtilizzazione");
+ String dePosizioneEdificio = ParamUtil.getString(request, "dePosizioneEdificio");
+ boolean deInfStradalePonte = ParamUtil.getBoolean(request, "deInfStradalePonte");
+ boolean deInfStradaleStrada = ParamUtil.getBoolean(request, "deInfStradaleStrada");
+ boolean deInfStradaleAltro = ParamUtil.getBoolean(request, "deInfStradaleAltro");
+ boolean deInfIdraulicaLong = ParamUtil.getBoolean(request, "deInfIdraulicaLong");
+ boolean deInfIdraulicaTrasv = ParamUtil.getBoolean(request, "deInfIdraulicaTrasv");
+ boolean deInfIdraulicaAltro = ParamUtil.getBoolean(request, "deInfIdraulicaAltro");
+ boolean deInfOperaAccStradale = ParamUtil.getBoolean(request, "deInfOperaAccStradale");
+ boolean deInfOperaAccIdraulica = ParamUtil.getBoolean(request, "deInfOperaAccIdraulica");
+ boolean deInfOperaAccAltro = ParamUtil.getBoolean(request, "deInfOperaAccAltro");
+ boolean deInfAltraInfrastruttura = ParamUtil.getBoolean(request, "deInfAltraInfrastruttura");
+ boolean deInfAltro = ParamUtil.getBoolean(request, "deInfAltro");
+ String deInfAltroDesc = ParamUtil.getString(request, "deInfAltroDesc");
+ boolean dccStruttureEleMuraturePietrame = ParamUtil.getBoolean(request, "dccStruttureEleMuraturePietrame");
+ boolean dccStruttureEleMuratureLaterizio = ParamUtil.getBoolean(request, "dccStruttureEleMuratureLaterizio");
+ boolean dccStruttureEleMuratureMisto = ParamUtil.getBoolean(request, "dccStruttureEleMuratureMisto");
+ boolean dccStruttureEleMuratureStoriche = ParamUtil.getBoolean(request, "dccStruttureEleMuratureStoriche");
+ boolean dccStruttureEleMistoCA = ParamUtil.getBoolean(request, "dccStruttureEleMistoCA");
+ boolean dccStruttureEleMistoAcciaio = ParamUtil.getBoolean(request, "dccStruttureEleMistoAcciaio");
+ boolean dccStruttureEleMistoMuratura = ParamUtil.getBoolean(request, "dccStruttureEleMistoMuratura");
+ boolean dccStruttureEleMistoLegno = ParamUtil.getBoolean(request, "dccStruttureEleMistoLegno");
+ boolean dccStruttureElePrefabbricato = ParamUtil.getBoolean(request, "dccStruttureElePrefabbricato");
+ boolean dccStruttureEleAltro = ParamUtil.getBoolean(request, "dccStruttureEleAltro");
+ String dccStruttureEleAltroDescrizione = ParamUtil.getString(request, "dccStruttureEleAltroDescrizione");
+ boolean dccOrizzontamentiCAAcciaio = ParamUtil.getBoolean(request, "dccOrizzontamentiCAAcciaio");
+ boolean dccOrizzontamentiLegno = ParamUtil.getBoolean(request, "dccOrizzontamentiLegno");
+ boolean dccOrizzontamentiLegnoCA = ParamUtil.getBoolean(request, "dccOrizzontamentiLegnoCA");
+ boolean dccOrizzontamentiLamieraGrecata = ParamUtil.getBoolean(request, "dccOrizzontamentiLamieraGrecata");
+ boolean dccOrizzontamentiVolte = ParamUtil.getBoolean(request, "dccOrizzontamentiVolte");
+ boolean dccOrizzontamentiAltro = ParamUtil.getBoolean(request, "dccOrizzontamentiAltro");
+ String dccOrizzontamentiAltroDescrizione = ParamUtil.getString(request, "dccOrizzontamentiAltroDescrizione");
+ boolean dccCoperturaCAAcciaio = ParamUtil.getBoolean(request, "dccCoperturaCAAcciaio");
+ boolean dccCoperturaLegno = ParamUtil.getBoolean(request, "dccCoperturaLegno");
+ boolean dccCoperturaLegnoCA = ParamUtil.getBoolean(request, "dccCoperturaLegnoCA");
+ boolean dccCoperturaLamieraGrecata = ParamUtil.getBoolean(request, "dccCoperturaLamieraGrecata");
+ boolean dccCoperturaPannelli = ParamUtil.getBoolean(request, "dccCoperturaPannelli");
+ boolean dccCoperturaPVCTelonati = ParamUtil.getBoolean(request, "dccCoperturaPVCTelonati");
+ boolean dccCoperturaLeggere = ParamUtil.getBoolean(request, "dccCoperturaLeggere");
+ boolean dccCoperturaAltro = ParamUtil.getBoolean(request, "dccCoperturaAltro");
+ String dccCoperturaAltroDesrizione = ParamUtil.getString(request, "dccCoperturaAltroDesrizione");
+ boolean dccElemNonStrutLaterizio = ParamUtil.getBoolean(request, "dccElemNonStrutLaterizio");
+ boolean dccElemNonStrutCartongesso = ParamUtil.getBoolean(request, "dccElemNonStrutCartongesso");
+ boolean dccElemNonStrutCalcestruzzo = ParamUtil.getBoolean(request, "dccElemNonStrutCalcestruzzo");
+ boolean dccElemNonStrutLegno = ParamUtil.getBoolean(request, "dccElemNonStrutLegno");
+ boolean dccElemNonStrutAltro = ParamUtil.getBoolean(request, "dccElemNonStrutAltro");
+ String dccElemNonStrutAltroDescrizione = ParamUtil.getString(request, "dccElemNonStrutAltroDescrizione");
+ boolean dccOpereDiRinforzoInsCatene = ParamUtil.getBoolean(request, "dccOpereDiRinforzoInsCatene");
+ boolean dccOpereDiRinforzoInsCordoli = ParamUtil.getBoolean(request, "dccOpereDiRinforzoInsCordoli");
+ boolean dccOpereDiRinforzoIniArmate = ParamUtil.getBoolean(request, "dccOpereDiRinforzoIniArmate");
+ boolean dccOpereDiRinforzoPlaccaggi = ParamUtil.getBoolean(request, "dccOpereDiRinforzoPlaccaggi");
+ boolean dccOpereDiRinforzoIrrSolai = ParamUtil.getBoolean(request, "dccOpereDiRinforzoIrrSolai");
+ boolean dccOpereDiRinforzoRinforziFRP = ParamUtil.getBoolean(request, "dccOpereDiRinforzoRinforziFRP");
+ boolean dccOpereDiRinforzoTelaiECerchiature = ParamUtil.getBoolean(request,
"dccOpereDiRinforzoTelaiECerchiature");
- boolean dccOpereDiRinforzoInsRompitratta = ParamUtil.getBoolean(actionRequest,
- "dccOpereDiRinforzoInsRompitratta");
- boolean dccOpereDiRinforzoAltro = ParamUtil.getBoolean(actionRequest, "dccOpereDiRinforzoAltro");
- String dccOpereDiRinforzoAltroDescrizione = ParamUtil.getString(actionRequest,
- "dccOpereDiRinforzoAltroDescrizione");
+ boolean dccOpereDiRinforzoInsRompitratta = ParamUtil.getBoolean(request, "dccOpereDiRinforzoInsRompitratta");
+ boolean dccOpereDiRinforzoAltro = ParamUtil.getBoolean(request, "dccOpereDiRinforzoAltro");
+ String dccOpereDiRinforzoAltroDescrizione = ParamUtil.getString(request, "dccOpereDiRinforzoAltroDescrizione");
// DATI geologici
- String geoClasseIndagine = getNotNullString(actionRequest, "geoClasseIndagine",
- dettPratica.getGeoClasseIndagine());
- String geoCategoriaSottosuolo = getNotNullString(actionRequest, "geoCategoriaSottosuolo",
+ String geoClasseIndagine = getNotNullString(request, "geoClasseIndagine", dettPratica.getGeoClasseIndagine());
+ String geoCategoriaSottosuolo = getNotNullString(request, "geoCategoriaSottosuolo",
dettPratica.getGeoCategoriaSottosuolo());
- String geoCategoriaTopografica = getNotNullString(actionRequest, "geoCategoriaTopografica",
+ String geoCategoriaTopografica = getNotNullString(request, "geoCategoriaTopografica",
dettPratica.getGeoCategoriaTopografica());
- String geoConsolidamento = getNotNullString(actionRequest, "geoConsolidamento",
- dettPratica.getGeoConsolidamento());
- String geoPericolositaGeologica = getNotNullString(actionRequest, "geoPericolositaGeologica",
+ String geoConsolidamento = getNotNullString(request, "geoConsolidamento", dettPratica.getGeoConsolidamento());
+ String geoPericolositaGeologica = getNotNullString(request, "geoPericolositaGeologica",
dettPratica.getGeoPericolositaGeologica());
- String geoRischioGeomorfologicoPai = getNotNullString(actionRequest, "geoRischioGeomorfologicoPai",
+ String geoRischioGeomorfologicoPai = getNotNullString(request, "geoRischioGeomorfologicoPai",
dettPratica.getGeoRischioGeomorfologicoPai());
- String geoPericolositaIdraulicaPai = getNotNullString(actionRequest, "geoPericolositaIdraulicaPai",
+ String geoPericolositaIdraulicaPai = getNotNullString(request, "geoPericolositaIdraulicaPai",
dettPratica.getGeoPericolositaIdraulicaPai());
- String geoRischioIdraulicoPai = getNotNullString(actionRequest, "geoRischioIdraulicoPai",
+ String geoRischioIdraulicoPai = getNotNullString(request, "geoRischioIdraulicoPai",
dettPratica.getGeoRischioIdraulicoPai());
- String geoPericolositaSismica = getNotNullString(actionRequest, "geoPericolositaSismica",
+ String geoPericolositaSismica = getNotNullString(request, "geoPericolositaSismica",
dettPratica.getGeoPericolositaSismica());
- String geoPericolositaIdraulica = getNotNullString(actionRequest, "geoPericolositaIdraulica",
+ String geoPericolositaIdraulica = getNotNullString(request, "geoPericolositaIdraulica",
dettPratica.getGeoPericolositaIdraulica());
- String geoPericolositaGeomorfica = getNotNullString(actionRequest, "geoPericolositaGeomorfica",
+ String geoPericolositaGeomorfica = getNotNullString(request, "geoPericolositaGeomorfica",
dettPratica.getGeoPericolositaGeomorfica());
- String geoFattibilitaGeologica = getNotNullString(actionRequest, "geoFattibilitaGeologica",
+ String geoFattibilitaGeologica = getNotNullString(request, "geoFattibilitaGeologica",
dettPratica.getGeoFattibilitaGeologica());
- String geoFattibilitaSismica = getNotNullString(actionRequest, "geoFattibilitaSismica",
+ String geoFattibilitaSismica = getNotNullString(request, "geoFattibilitaSismica",
dettPratica.getGeoFattibilitaSismica());
- String geoFattibilitaIdraulica = getNotNullString(actionRequest, "geoFattibilitaIdraulica",
+ String geoFattibilitaIdraulica = getNotNullString(request, "geoFattibilitaIdraulica",
dettPratica.getGeoFattibilitaIdraulica());
- String geoOperaRilevante = getNotNullString(actionRequest, "geoOperaRilevante",
- dettPratica.getGeoOperaRilevante());
- String geoOpereDiSostegno = getNotNullString(actionRequest, "geoOpereDiSostegno",
- dettPratica.getGeoOpereDiSostegno());
- String geoOpereInSotterranea = getNotNullString(actionRequest, "geoOpereInSotterranea",
+ String geoOperaRilevante = getNotNullString(request, "geoOperaRilevante", dettPratica.getGeoOperaRilevante());
+ String geoOpereDiSostegno = getNotNullString(request, "geoOpereDiSostegno", dettPratica.getGeoOpereDiSostegno());
+ String geoOpereInSotterranea = getNotNullString(request, "geoOpereInSotterranea",
dettPratica.getGeoOpereInSotterranea());
- String geoPresenzaPrescrizioni = getNotNullString(actionRequest, "geoPresenzaPrescrizioni",
+ String geoPresenzaPrescrizioni = getNotNullString(request, "geoPresenzaPrescrizioni",
dettPratica.getGeoPresenzaPrescrizioni());
- String geoNotePrescrizioni = getNotNullString(actionRequest, "geoNotePrescrizioni",
+ String geoNotePrescrizioni = getNotNullString(request, "geoNotePrescrizioni",
dettPratica.getGeoNotePrescrizioni());
- String geoNoteIndagini = getNotNullString(actionRequest, "geoNoteIndagini", dettPratica.getGeoNoteIndagini());
- String geoEvidenzeGeomorfiche = getNotNullString(actionRequest, "geoEvidenzeGeomorfiche",
+ String geoNoteIndagini = getNotNullString(request, "geoNoteIndagini", dettPratica.getGeoNoteIndagini());
+ String geoEvidenzeGeomorfiche = getNotNullString(request, "geoEvidenzeGeomorfiche",
dettPratica.getGeoEvidenzeGeomorfiche());
- String geoEvidenzeGeologiche = getNotNullString(actionRequest, "geoEvidenzeGeologiche",
+ String geoEvidenzeGeologiche = getNotNullString(request, "geoEvidenzeGeologiche",
dettPratica.getGeoEvidenzeGeologiche());
- Date geoDtRelazione = getNotNullDate(actionRequest, "geoDtRelazione", dettPratica.getGeoDtRelazione());
+ Date geoDtRelazione = getNotNullDate(request, "geoDtRelazione", dettPratica.getGeoDtRelazione());
// normative
- boolean normLavoriInProprio = ParamUtil.getBoolean(actionRequest, "normLavoriInProprio");
- boolean normEsenteBollo = ParamUtil.getBoolean(actionRequest, "normEsenteBollo");
- boolean normEsenteSpese = ParamUtil.getBoolean(actionRequest, "normEsenteSpese");
- boolean normDpr01Dep = ParamUtil.getBoolean(actionRequest, "normDpr01Dep");
- boolean normDpr02Dep = ParamUtil.getBoolean(actionRequest, "normDpr02Dep");
- boolean normDpr01Aut = ParamUtil.getBoolean(actionRequest, "normDpr01Aut");
- boolean normDpr02Aut = ParamUtil.getBoolean(actionRequest, "normDpr02Aut");
- boolean normDm2018 = ParamUtil.getBoolean(actionRequest, "normDm2018");
- boolean normAnr = ParamUtil.getBoolean(actionRequest, "normAnr");
- boolean normArt3com3 = ParamUtil.getBoolean(actionRequest, "normArt3com3");
- boolean normArt3com4 = ParamUtil.getBoolean(actionRequest, "normArt3com4");
- boolean suap = ParamUtil.getBoolean(actionRequest, "suap");
- boolean normSismaBonus = ParamUtil.getBoolean(actionRequest, "normSismaBonus");
- boolean intervFinPub = ParamUtil.getBoolean(actionRequest, "intervFinPub");
- String intervFinPubDesc = ParamUtil.getString(actionRequest, "intervFinPubDesc");
- boolean intervInAreaDiInteresse = ParamUtil.getBoolean(actionRequest, "intervInAreaDiInteresse");
- boolean intervNonModificante = ParamUtil.getBoolean(actionRequest, "intervNonModificante");
- boolean intervNonAssoggettabile = ParamUtil.getBoolean(actionRequest, "intervNonAssoggettabile");
- boolean sanatoriaEdilizia47 = ParamUtil.getBoolean(actionRequest, "sanatoriaEdilizia47");
- boolean sanatoriaEdilizia724 = ParamUtil.getBoolean(actionRequest, "sanatoriaEdilizia724");
- boolean sanatoriaEdilizia326 = ParamUtil.getBoolean(actionRequest, "sanatoriaEdilizia326");
- String interventoVoceP7 = ParamUtil.getString(actionRequest, "interventoVoceP7");
- boolean normLavoriNoDirettore = ParamUtil.getBoolean(actionRequest, "normLavoriNoDirettore");
- boolean nominaImpresa = ParamUtil.getBoolean(actionRequest, "nominaImpresa");
- boolean nominaDirettoreLavori = ParamUtil.getBoolean(actionRequest, "nominaDirettoreLavori");
- boolean nominaCollaudatore = ParamUtil.getBoolean(actionRequest, "nominaCollaudatore");
-
- long userId = PortalUtil.getUserId(actionRequest);
+ boolean normLavoriInProprio = ParamUtil.getBoolean(request, "normLavoriInProprio");
+ boolean normEsenteBollo = ParamUtil.getBoolean(request, "normEsenteBollo");
+ boolean normEsenteSpese = ParamUtil.getBoolean(request, "normEsenteSpese");
+ boolean normDpr01Dep = ParamUtil.getBoolean(request, "normDpr01Dep");
+ boolean normDpr02Dep = ParamUtil.getBoolean(request, "normDpr02Dep");
+ boolean normDpr01Aut = ParamUtil.getBoolean(request, "normDpr01Aut");
+ boolean normDpr02Aut = ParamUtil.getBoolean(request, "normDpr02Aut");
+ boolean normDm2018 = ParamUtil.getBoolean(request, "normDm2018");
+ boolean normAnr = ParamUtil.getBoolean(request, "normAnr");
+ boolean normArt3com3 = ParamUtil.getBoolean(request, "normArt3com3");
+ boolean normArt3com4 = ParamUtil.getBoolean(request, "normArt3com4");
+ boolean suap = ParamUtil.getBoolean(request, "suap");
+ boolean normSismaBonus = ParamUtil.getBoolean(request, "normSismaBonus");
+ boolean intervFinPub = ParamUtil.getBoolean(request, "intervFinPub");
+ String intervFinPubDesc = ParamUtil.getString(request, "intervFinPubDesc");
+ boolean intervInAreaDiInteresse = ParamUtil.getBoolean(request, "intervInAreaDiInteresse");
+ boolean intervNonModificante = ParamUtil.getBoolean(request, "intervNonModificante");
+ boolean intervNonAssoggettabile = ParamUtil.getBoolean(request, "intervNonAssoggettabile");
+ boolean sanatoriaEdilizia47 = ParamUtil.getBoolean(request, "sanatoriaEdilizia47");
+ boolean sanatoriaEdilizia724 = ParamUtil.getBoolean(request, "sanatoriaEdilizia724");
+ boolean sanatoriaEdilizia326 = ParamUtil.getBoolean(request, "sanatoriaEdilizia326");
+ String interventoVoceP7 = ParamUtil.getString(request, "interventoVoceP7");
+ boolean normLavoriNoDirettore = ParamUtil.getBoolean(request, "normLavoriNoDirettore");
+ boolean nominaImpresa = ParamUtil.getBoolean(request, "nominaImpresa");
+ boolean nominaDirettoreLavori = ParamUtil.getBoolean(request, "nominaDirettoreLavori");
+ boolean nominaCollaudatore = ParamUtil.getBoolean(request, "nominaCollaudatore");
+
+ long userId = PortalUtil.getUserId(request);
try {
DettPraticaServiceUtil.updateDettPratica(userId, dettPratica.getDettPraticaId(),
dettPratica.getIntPraticaId(), integrazione, protocollo, tipoIntegrazione, completa, gestita,
@@ -1186,324 +1199,309 @@ public class FascicoloFePortlet extends MVCPortlet {
normLavoriNoDirettore, pagSoggettiAdAutorizzazione, interventoVoceP7, nominaImpresa,
nominaDirettoreLavori, nominaCollaudatore, tcNoOpereEscavazione);
- String redirect = ParamUtil.getString(actionRequest, "redirect");
+ String redirect = ParamUtil.getString(request, "redirect");
if (Validator.isNull(redirect)) {
- String successURL = ParamUtil.getString(actionRequest, "successURL");
+ String successURL = ParamUtil.getString(request, "successURL");
if (Validator.isNotNull(successURL)) {
- successURL = HttpUtil.removeParameter(successURL, actionResponse.getNamespace() + "openVerifyUrl");
- successURL = HttpUtil.removeParameter(successURL, actionResponse.getNamespace() + "verifyArea");
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "openVerifyUrl",
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "openVerifyUrl");
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "verifyArea");
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "openVerifyUrl",
String.valueOf(!bozza));
- String verifyArea = ParamUtil.getString(actionRequest, "verifyArea", StringPool.BLANK);
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "verifyArea",
+ String verifyArea = ParamUtil.getString(request, "verifyArea", StringPool.BLANK);
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "verifyArea",
String.valueOf(verifyArea));
- String fragmentURL = ParamUtil.getString(actionRequest, "current_tab");
+ String fragmentURL = ParamUtil.getString(request, "current_tab");
if (Validator.isNotNull(fragmentURL)) {
- successURL = HttpUtil
- .removeParameter(successURL, actionResponse.getNamespace() + "current_tab");
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "current_tab",
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "current_tab");
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "current_tab",
fragmentURL);
- successURL = HttpUtil.removeParameter(successURL, actionResponse.getNamespace() + "historyKey");
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "historyKey",
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "historyKey");
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "historyKey",
"_1_WAR_portosfeportlet_tab=" + fragmentURL);
- if (successURL.contains(StringPool.POUND)) {
- }
+ if (successURL.contains(StringPool.POUND)) {}
successURL += "#_1_WAR_portosfeportlet_tab=" + fragmentURL;
}
- successURL = HttpUtil.removeParameter(successURL, actionResponse.getNamespace() + "saveAndVerify");
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "saveAndVerify");
if ("saveAndVerify".equalsIgnoreCase(cmd))
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "saveAndVerify",
- true);
- actionResponse.sendRedirect(successURL);
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "saveAndVerify", true);
+ response.sendRedirect(successURL);
} else {
- actionResponse.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
- actionResponse.setRenderParameter("backURL", ParamUtil.getString(actionRequest, "backURL"));
- actionResponse.setRenderParameter("dettPraticaId", String.valueOf(dettPratica.getDettPraticaId()));
- actionResponse.setRenderParameter("intPraticaId", String.valueOf(dettPratica.getIntPraticaId()));
- actionResponse.setRenderParameter("openVerifyUrl", String.valueOf(!bozza));
+ response.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
+ response.setRenderParameter("backURL", ParamUtil.getString(request, "backURL"));
+ response.setRenderParameter("dettPraticaId", String.valueOf(dettPratica.getDettPraticaId()));
+ response.setRenderParameter("intPraticaId", String.valueOf(dettPratica.getIntPraticaId()));
+ response.setRenderParameter("openVerifyUrl", String.valueOf(!bozza));
}
}
} catch (PortalException e) {
_log.error(e, e);
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- actionResponse.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
+ PortalUtil.copyRequestParameters(request, response);
+ response.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
throw e;
} catch (Exception e) {
_log.error(e, e);
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- actionResponse.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
+ PortalUtil.copyRequestParameters(request, response);
+ response.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
throw new PortalException(e);
}
}
- private String getNotNullString(ActionRequest actionRequest, String param, String currentValue) {
+ private String getNotNullString(ActionRequest request, String param, String currentValue) {
- String value = ParamUtil.getString(actionRequest, param);
+ String value = ParamUtil.getString(request, param);
return Validator.isNull(value) ? currentValue : value;
}
- private Date getNotNullDate(ActionRequest actionRequest, String param, Date currentValue) {
+ private Date getNotNullDate(ActionRequest request, String param, Date currentValue) {
- Date value = ParamUtil.getDate(actionRequest, param, DateFormatFactoryUtil.getDate(actionRequest.getLocale()));
+ Date value = ParamUtil.getDate(request, param, DateFormatFactoryUtil.getDate(request.getLocale()));
return Validator.isNull(value) ? currentValue : value;
}
- private void saveDatiTipoPratica(long dettPraticaId, ActionRequest actionRequest, ActionResponse actionResponse)
+ private void saveDatiTipoPratica(long dettPraticaId, ActionRequest request, ActionResponse response)
throws Exception {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), actionRequest);
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), request);
DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
- boolean bozza = ParamUtil.getBoolean(actionRequest, "bozza", true);
- boolean disabledSubmit = ParamUtil.getBoolean(actionRequest, "disabledSubmit", true);
- boolean geoDisabledSubmit = ParamUtil.getBoolean(actionRequest, "geoDisabledSubmit", true);
- String protocollo = ParamUtil.getString(actionRequest, "protocollo");
- String tipoIntegrazione = ParamUtil.getString(actionRequest, "tipoIntegrazione");
+ boolean bozza = ParamUtil.getBoolean(request, "bozza", true);
+ boolean disabledSubmit = ParamUtil.getBoolean(request, "disabledSubmit", true);
+ boolean geoDisabledSubmit = ParamUtil.getBoolean(request, "geoDisabledSubmit", true);
+ String protocollo = ParamUtil.getString(request, "protocollo");
+ String tipoIntegrazione = ParamUtil.getString(request, "tipoIntegrazione");
User user = UserLocalServiceUtil.getUser(serviceContext.getUserId());
String codiceFiscaleDelegatoCommittente = user.getScreenName();
- boolean isCodiceFiscaleDelegatoFineLavoriAuthorized = ParamUtil.getBoolean(actionRequest,
+ boolean isCodiceFiscaleDelegatoFineLavoriAuthorized = ParamUtil.getBoolean(request,
"codiceFiscaleDelegatoFineLavoriEnabled");
String codiceFiscaleDelegatoFineLavori = isCodiceFiscaleDelegatoFineLavoriAuthorized ? ParamUtil.getString(
- actionRequest, "codiceFiscaleDelegatoFineLavori") : StringPool.BLANK;
- boolean isCodiceFiscaleDelegatoCollaudoAuthorized = ParamUtil.getBoolean(actionRequest,
+ request, "codiceFiscaleDelegatoFineLavori") : StringPool.BLANK;
+ boolean isCodiceFiscaleDelegatoCollaudoAuthorized = ParamUtil.getBoolean(request,
"codiceFiscaleDelegatoCollaudoEnabled");
- String codiceFiscaleDelegatoCollaudo = isCodiceFiscaleDelegatoCollaudoAuthorized ? ParamUtil.getString(
- actionRequest, "codiceFiscaleDelegatoCollaudo") : StringPool.BLANK;
- long pagamentoId = ParamUtil.getLong(actionRequest, "pagamentoId");
- Date dataEffettuazione = ParamUtil.getDate(actionRequest, "dataEffettuazione",
- DateFormatFactoryUtil.getDate(actionRequest.getLocale()));
- String note = ParamUtil.getString(actionRequest, "note");
- String noteUfficio = ParamUtil.getString(actionRequest, "noteUfficio");
+ String codiceFiscaleDelegatoCollaudo = isCodiceFiscaleDelegatoCollaudoAuthorized ? ParamUtil.getString(request,
+ "codiceFiscaleDelegatoCollaudo") : StringPool.BLANK;
+ long pagamentoId = ParamUtil.getLong(request, "pagamentoId");
+ Date dataEffettuazione = ParamUtil.getDate(request, "dataEffettuazione",
+ DateFormatFactoryUtil.getDate(request.getLocale()));
+ String note = ParamUtil.getString(request, "note");
+ String noteUfficio = ParamUtil.getString(request, "noteUfficio");
// PAGAMENTI
- String codicePagamento = ParamUtil.getString(actionRequest, "codicePagamento");
- String causalePagamento = ParamUtil.getString(actionRequest, "causalePagamento");
- String mezzoPagamento = ParamUtil.getString(actionRequest, "mezzoPagamento");
- String importoBolli = ParamUtil.getString(actionRequest, "importoBolli");
- String importoSpeseIstruttoria = ParamUtil.getString(actionRequest, "importoSpeseIstruttoria");
- Double pagSoggettiAdAutorizzazione = ParamUtil.getDouble(actionRequest, "pagSoggettiAdAutorizzazione");
- Double pagInterventiRestauroManufatti = ParamUtil.getDouble(actionRequest, "pagInterventiRestauroManufatti");
- Double pagAltriCasiCulturali = ParamUtil.getDouble(actionRequest, "pagAltriCasiCulturali");
- Double pagLottizzazioni = ParamUtil.getDouble(actionRequest, "pagLottizzazioni");
- Double pagGrandiStrutture = ParamUtil.getDouble(actionRequest, "pagGrandiStrutture");
- Double pagCondotte = ParamUtil.getDouble(actionRequest, "pagCondotte");
- Double pagPalificazioni = ParamUtil.getDouble(actionRequest, "pagPalificazioni");
- Double pagImpiantiEolici = ParamUtil.getDouble(actionRequest, "pagImpiantiEolici");
- Double pagNuoveRealizzazioni = ParamUtil.getDouble(actionRequest, "pagNuoveRealizzazioni");
- Double pagImmobiliPreesistenti = ParamUtil.getDouble(actionRequest, "pagImmobiliPreesistenti");
- Double pagManifestiPubblicitari = ParamUtil.getDouble(actionRequest, "pagManifestiPubblicitari");
- Double pagPareriDiMassima = ParamUtil.getDouble(actionRequest, "pagPareriDiMassima");
- Double pagAltriCasiPaesaggistici = ParamUtil.getDouble(actionRequest, "pagAltriCasiPaesaggistici");
- Double pagVariantiPareriResi = ParamUtil.getDouble(actionRequest, "pagVariantiPareriResi");
- Double pagRilascioAttestazioni = ParamUtil.getDouble(actionRequest, "pagRilascioAttestazioni");
- Double pagConsultazioniArchivio = ParamUtil.getDouble(actionRequest, "pagConsultazioniArchivio");
+ String codicePagamento = ParamUtil.getString(request, "codicePagamento");
+ String causalePagamento = ParamUtil.getString(request, "causalePagamento");
+ String mezzoPagamento = ParamUtil.getString(request, "mezzoPagamento");
+ String importoBolli = ParamUtil.getString(request, "importoBolli");
+ String importoSpeseIstruttoria = ParamUtil.getString(request, "importoSpeseIstruttoria");
+ Double pagSoggettiAdAutorizzazione = ParamUtil.getDouble(request, "pagSoggettiAdAutorizzazione");
+ Double pagInterventiRestauroManufatti = ParamUtil.getDouble(request, "pagInterventiRestauroManufatti");
+ Double pagAltriCasiCulturali = ParamUtil.getDouble(request, "pagAltriCasiCulturali");
+ Double pagLottizzazioni = ParamUtil.getDouble(request, "pagLottizzazioni");
+ Double pagGrandiStrutture = ParamUtil.getDouble(request, "pagGrandiStrutture");
+ Double pagCondotte = ParamUtil.getDouble(request, "pagCondotte");
+ Double pagPalificazioni = ParamUtil.getDouble(request, "pagPalificazioni");
+ Double pagImpiantiEolici = ParamUtil.getDouble(request, "pagImpiantiEolici");
+ Double pagNuoveRealizzazioni = ParamUtil.getDouble(request, "pagNuoveRealizzazioni");
+ Double pagImmobiliPreesistenti = ParamUtil.getDouble(request, "pagImmobiliPreesistenti");
+ Double pagManifestiPubblicitari = ParamUtil.getDouble(request, "pagManifestiPubblicitari");
+ Double pagPareriDiMassima = ParamUtil.getDouble(request, "pagPareriDiMassima");
+ Double pagAltriCasiPaesaggistici = ParamUtil.getDouble(request, "pagAltriCasiPaesaggistici");
+ Double pagVariantiPareriResi = ParamUtil.getDouble(request, "pagVariantiPareriResi");
+ Double pagRilascioAttestazioni = ParamUtil.getDouble(request, "pagRilascioAttestazioni");
+ Double pagConsultazioniArchivio = ParamUtil.getDouble(request, "pagConsultazioniArchivio");
// SEZIONE DETTAGLI PRINCIPALI
DettPratica dettCheck = DettPraticaLocalServiceUtil.fetchDettPratica(dettPraticaId);
boolean disabledCollaudoStatico = false;
if (dettCheck != null) {
disabledCollaudoStatico = SoggettiUtil.isCommittenteAndDitta(dettCheck.getIntPraticaId());
}
- boolean collaudoStatico = ParamUtil.getBoolean(actionRequest, "collaudoStatico");
+ boolean collaudoStatico = ParamUtil.getBoolean(request, "collaudoStatico");
if (disabledCollaudoStatico) {
collaudoStatico = dettCheck.getCollaudoStatico();
}
- boolean noCollaudo = ParamUtil.getBoolean(actionRequest, "noCollaudo");
- String destinazione = ParamUtil.getString(actionRequest, "destinazione");
- String ag = ParamUtil.getString(actionRequest, "ag");
- String descLongIntervento = ParamUtil.getString(actionRequest, "descLongIntervento");
- String estremiCatastali = ParamUtil.getString(actionRequest, "estremiCatastali");
- String estremiPratCom = ParamUtil.getString(actionRequest, "estremiPratCom");
- boolean lavoriPubblici = ParamUtil.getBoolean(actionRequest, "lavoriPubblici");
- int lavoriPubbliciPercentuale = ParamUtil.getInteger(actionRequest, "lavoriPubbliciPercentuale");
- String dcFoglio = ParamUtil.getString(actionRequest, "dcFoglio");
- String dcAllegato = ParamUtil.getString(actionRequest, "dcAllegato");
- String particella1 = ParamUtil.getString(actionRequest, "particella1", StringPool.BLANK).replaceAll(
+ boolean noCollaudo = ParamUtil.getBoolean(request, "noCollaudo");
+ String destinazione = ParamUtil.getString(request, "destinazione");
+ String ag = ParamUtil.getString(request, "ag");
+ String descLongIntervento = ParamUtil.getString(request, "descLongIntervento");
+ String estremiCatastali = ParamUtil.getString(request, "estremiCatastali");
+ String estremiPratCom = ParamUtil.getString(request, "estremiPratCom");
+ boolean lavoriPubblici = ParamUtil.getBoolean(request, "lavoriPubblici");
+ int lavoriPubbliciPercentuale = ParamUtil.getInteger(request, "lavoriPubbliciPercentuale");
+ String dcFoglio = ParamUtil.getString(request, "dcFoglio");
+ String dcAllegato = ParamUtil.getString(request, "dcAllegato");
+ String particella1 = ParamUtil.getString(request, "particella1", StringPool.BLANK).replaceAll(
Pattern.quote(StringPool.PIPE), StringPool.SPACE);
- String particella2 = ParamUtil.getString(actionRequest, "particella2", StringPool.BLANK).replaceAll(
+ String particella2 = ParamUtil.getString(request, "particella2", StringPool.BLANK).replaceAll(
Pattern.quote(StringPool.PIPE), StringPool.SPACE);
- String particella3 = ParamUtil.getString(actionRequest, "particella3", StringPool.BLANK).replaceAll(
+ String particella3 = ParamUtil.getString(request, "particella3", StringPool.BLANK).replaceAll(
Pattern.quote(StringPool.PIPE), StringPool.SPACE);
- String particella4 = ParamUtil.getString(actionRequest, "particella4", StringPool.BLANK).replaceAll(
+ String particella4 = ParamUtil.getString(request, "particella4", StringPool.BLANK).replaceAll(
Pattern.quote(StringPool.PIPE), StringPool.SPACE);
String dcParticelle = particella1 + StringPool.PIPE + particella2 + StringPool.PIPE + particella3
+ StringPool.PIPE + particella4;
- boolean tcNuovaCostruzione = ParamUtil.getBoolean(actionRequest, "tcNuovaCostruzione");
- boolean tcAdeguamentoSismico = ParamUtil.getBoolean(actionRequest, "tcAdeguamentoSismico");
- boolean tcMiglioramentoSismico = ParamUtil.getBoolean(actionRequest, "tcMiglioramentoSismico");
- boolean tcRiparazioneInterventoLocale = ParamUtil.getBoolean(actionRequest, "tcRiparazioneInterventoLocale");
- boolean tcInCA = ParamUtil.getBoolean(actionRequest, "tcInCA");
- boolean tcInOpera = ParamUtil.getBoolean(actionRequest, "tcInOpera");
- boolean tcPrefabbricato = ParamUtil.getBoolean(actionRequest, "tcPrefabbricato");
- boolean tcInAcciaio = ParamUtil.getBoolean(actionRequest, "tcInAcciaio");
- boolean tcMista = ParamUtil.getBoolean(actionRequest, "tcMista");
- boolean tcInMuratura = ParamUtil.getBoolean(actionRequest, "tcInMuratura");
- boolean tcInMuraturaOrdinaria = ParamUtil.getBoolean(actionRequest, "tcInMuraturaOrdinaria");
- boolean tcInMuraturaArmata = ParamUtil.getBoolean(actionRequest, "tcInMuraturaArmata");
- boolean tcInMuraturaMista = ParamUtil.getBoolean(actionRequest, "tcInMuraturaMista");
- boolean tcInLegno = ParamUtil.getBoolean(actionRequest, "tcInLegno");
- boolean tcAltro = ParamUtil.getBoolean(actionRequest, "tcAltro");
- String tcAltroDescrizione = ParamUtil.getString(actionRequest, "tcAltroDescrizione");
- boolean tcConDispositivi = ParamUtil.getBoolean(actionRequest, "tcConDispositivi");
+ boolean tcNuovaCostruzione = ParamUtil.getBoolean(request, "tcNuovaCostruzione");
+ boolean tcAdeguamentoSismico = ParamUtil.getBoolean(request, "tcAdeguamentoSismico");
+ boolean tcMiglioramentoSismico = ParamUtil.getBoolean(request, "tcMiglioramentoSismico");
+ boolean tcRiparazioneInterventoLocale = ParamUtil.getBoolean(request, "tcRiparazioneInterventoLocale");
+ boolean tcInCA = ParamUtil.getBoolean(request, "tcInCA");
+ boolean tcInOpera = ParamUtil.getBoolean(request, "tcInOpera");
+ boolean tcPrefabbricato = ParamUtil.getBoolean(request, "tcPrefabbricato");
+ boolean tcInAcciaio = ParamUtil.getBoolean(request, "tcInAcciaio");
+ boolean tcMista = ParamUtil.getBoolean(request, "tcMista");
+ boolean tcInMuratura = ParamUtil.getBoolean(request, "tcInMuratura");
+ boolean tcInMuraturaOrdinaria = ParamUtil.getBoolean(request, "tcInMuraturaOrdinaria");
+ boolean tcInMuraturaArmata = ParamUtil.getBoolean(request, "tcInMuraturaArmata");
+ boolean tcInMuraturaMista = ParamUtil.getBoolean(request, "tcInMuraturaMista");
+ boolean tcInLegno = ParamUtil.getBoolean(request, "tcInLegno");
+ boolean tcAltro = ParamUtil.getBoolean(request, "tcAltro");
+ String tcAltroDescrizione = ParamUtil.getString(request, "tcAltroDescrizione");
+ boolean tcConDispositivi = ParamUtil.getBoolean(request, "tcConDispositivi");
// Descrizione edificio
- String dePiani = ParamUtil.getString(actionRequest, "dePiani");
- String deAltezza = ParamUtil.getString(actionRequest, "deAltezza");
- String deInterrati = ParamUtil.getString(actionRequest, "deInterrati");
- String deSuperficie = ParamUtil.getString(actionRequest, "deSuperficie");
- String deCostruzione = ParamUtil.getString(actionRequest, "deCostruzione");
- String deRistrutturazione = ParamUtil.getString(actionRequest, "deRistrutturazione");
- String deUso = ParamUtil.getString(actionRequest, "deUso");
- String dePrivata = ParamUtil.getString(actionRequest, "dePrivata");
- String dePubblica = ParamUtil.getString(actionRequest, "dePubblica");
- String deUtilizzazione = ParamUtil.getString(actionRequest, "deUtilizzazione");
- String dePosizioneEdificio = ParamUtil.getString(actionRequest, "dePosizioneEdificio");
- boolean deInfStradalePonte = ParamUtil.getBoolean(actionRequest, "deInfStradalePonte");
- boolean deInfStradaleStrada = ParamUtil.getBoolean(actionRequest, "deInfStradaleStrada");
- boolean deInfStradaleAltro = ParamUtil.getBoolean(actionRequest, "deInfStradaleAltro");
- boolean deInfIdraulicaLong = ParamUtil.getBoolean(actionRequest, "deInfIdraulicaLong");
- boolean deInfIdraulicaTrasv = ParamUtil.getBoolean(actionRequest, "deInfIdraulicaTrasv");
- boolean deInfIdraulicaAltro = ParamUtil.getBoolean(actionRequest, "deInfIdraulicaAltro");
- boolean deInfOperaAccStradale = ParamUtil.getBoolean(actionRequest, "deInfOperaAccStradale");
- boolean deInfOperaAccIdraulica = ParamUtil.getBoolean(actionRequest, "deInfOperaAccIdraulica");
- boolean deInfOperaAccAltro = ParamUtil.getBoolean(actionRequest, "deInfOperaAccAltro");
- boolean deInfAltraInfrastruttura = ParamUtil.getBoolean(actionRequest, "deInfAltraInfrastruttura");
- boolean deInfAltro = ParamUtil.getBoolean(actionRequest, "deInfAltro");
- String deInfAltroDesc = ParamUtil.getString(actionRequest, "deInfAltroDesc");
- boolean dccStruttureEleMuraturePietrame = ParamUtil
- .getBoolean(actionRequest, "dccStruttureEleMuraturePietrame");
- boolean dccStruttureEleMuratureLaterizio = ParamUtil.getBoolean(actionRequest,
- "dccStruttureEleMuratureLaterizio");
- boolean dccStruttureEleMuratureMisto = ParamUtil.getBoolean(actionRequest, "dccStruttureEleMuratureMisto");
- boolean dccStruttureEleMuratureStoriche = ParamUtil
- .getBoolean(actionRequest, "dccStruttureEleMuratureStoriche");
- boolean dccStruttureEleMistoCA = ParamUtil.getBoolean(actionRequest, "dccStruttureEleMistoCA");
- boolean dccStruttureEleMistoAcciaio = ParamUtil.getBoolean(actionRequest, "dccStruttureEleMistoAcciaio");
- boolean dccStruttureEleMistoMuratura = ParamUtil.getBoolean(actionRequest, "dccStruttureEleMistoMuratura");
- boolean dccStruttureEleMistoLegno = ParamUtil.getBoolean(actionRequest, "dccStruttureEleMistoLegno");
- boolean dccStruttureElePrefabbricato = ParamUtil.getBoolean(actionRequest, "dccStruttureElePrefabbricato");
- boolean dccStruttureEleAltro = ParamUtil.getBoolean(actionRequest, "dccStruttureEleAltro");
- String dccStruttureEleAltroDescrizione = ParamUtil.getString(actionRequest, "dccStruttureEleAltroDescrizione");
- boolean dccOrizzontamentiCAAcciaio = ParamUtil.getBoolean(actionRequest, "dccOrizzontamentiCAAcciaio");
- boolean dccOrizzontamentiLegno = ParamUtil.getBoolean(actionRequest, "dccOrizzontamentiLegno");
- boolean dccOrizzontamentiLegnoCA = ParamUtil.getBoolean(actionRequest, "dccOrizzontamentiLegnoCA");
- boolean dccOrizzontamentiLamieraGrecata = ParamUtil
- .getBoolean(actionRequest, "dccOrizzontamentiLamieraGrecata");
- boolean dccOrizzontamentiVolte = ParamUtil.getBoolean(actionRequest, "dccOrizzontamentiVolte");
- boolean dccOrizzontamentiAltro = ParamUtil.getBoolean(actionRequest, "dccOrizzontamentiAltro");
- String dccOrizzontamentiAltroDescrizione = ParamUtil.getString(actionRequest,
- "dccOrizzontamentiAltroDescrizione");
- boolean dccCoperturaCAAcciaio = ParamUtil.getBoolean(actionRequest, "dccCoperturaCAAcciaio");
- boolean dccCoperturaLegno = ParamUtil.getBoolean(actionRequest, "dccCoperturaLegno");
- boolean dccCoperturaLegnoCA = ParamUtil.getBoolean(actionRequest, "dccCoperturaLegnoCA");
- boolean dccCoperturaLamieraGrecata = ParamUtil.getBoolean(actionRequest, "dccCoperturaLamieraGrecata");
- boolean dccCoperturaPannelli = ParamUtil.getBoolean(actionRequest, "dccCoperturaPannelli");
- boolean dccCoperturaPVCTelonati = ParamUtil.getBoolean(actionRequest, "dccCoperturaPVCTelonati");
- boolean dccCoperturaLeggere = ParamUtil.getBoolean(actionRequest, "dccCoperturaLeggere");
- boolean dccCoperturaAltro = ParamUtil.getBoolean(actionRequest, "dccCoperturaAltro");
- String dccCoperturaAltroDesrizione = ParamUtil.getString(actionRequest, "dccCoperturaAltroDesrizione");
- boolean dccElemNonStrutLaterizio = ParamUtil.getBoolean(actionRequest, "dccElemNonStrutLaterizio");
- boolean dccElemNonStrutCartongesso = ParamUtil.getBoolean(actionRequest, "dccElemNonStrutCartongesso");
- boolean dccElemNonStrutCalcestruzzo = ParamUtil.getBoolean(actionRequest, "dccElemNonStrutCalcestruzzo");
- boolean dccElemNonStrutLegno = ParamUtil.getBoolean(actionRequest, "dccElemNonStrutLegno");
- boolean dccElemNonStrutAltro = ParamUtil.getBoolean(actionRequest, "dccElemNonStrutAltro");
- String dccElemNonStrutAltroDescrizione = ParamUtil.getString(actionRequest, "dccElemNonStrutAltroDescrizione");
- boolean dccOpereDiRinforzoInsCatene = ParamUtil.getBoolean(actionRequest, "dccOpereDiRinforzoInsCatene");
- boolean dccOpereDiRinforzoInsCordoli = ParamUtil.getBoolean(actionRequest, "dccOpereDiRinforzoInsCordoli");
- boolean dccOpereDiRinforzoIniArmate = ParamUtil.getBoolean(actionRequest, "dccOpereDiRinforzoIniArmate");
- boolean dccOpereDiRinforzoPlaccaggi = ParamUtil.getBoolean(actionRequest, "dccOpereDiRinforzoPlaccaggi");
- boolean dccOpereDiRinforzoIrrSolai = ParamUtil.getBoolean(actionRequest, "dccOpereDiRinforzoIrrSolai");
- boolean dccOpereDiRinforzoRinforziFRP = ParamUtil.getBoolean(actionRequest, "dccOpereDiRinforzoRinforziFRP");
- boolean dccOpereDiRinforzoTelaiECerchiature = ParamUtil.getBoolean(actionRequest,
+ String dePiani = ParamUtil.getString(request, "dePiani");
+ String deAltezza = ParamUtil.getString(request, "deAltezza");
+ String deInterrati = ParamUtil.getString(request, "deInterrati");
+ String deSuperficie = ParamUtil.getString(request, "deSuperficie");
+ String deCostruzione = ParamUtil.getString(request, "deCostruzione");
+ String deRistrutturazione = ParamUtil.getString(request, "deRistrutturazione");
+ String deUso = ParamUtil.getString(request, "deUso");
+ String dePrivata = ParamUtil.getString(request, "dePrivata");
+ String dePubblica = ParamUtil.getString(request, "dePubblica");
+ String deUtilizzazione = ParamUtil.getString(request, "deUtilizzazione");
+ String dePosizioneEdificio = ParamUtil.getString(request, "dePosizioneEdificio");
+ boolean deInfStradalePonte = ParamUtil.getBoolean(request, "deInfStradalePonte");
+ boolean deInfStradaleStrada = ParamUtil.getBoolean(request, "deInfStradaleStrada");
+ boolean deInfStradaleAltro = ParamUtil.getBoolean(request, "deInfStradaleAltro");
+ boolean deInfIdraulicaLong = ParamUtil.getBoolean(request, "deInfIdraulicaLong");
+ boolean deInfIdraulicaTrasv = ParamUtil.getBoolean(request, "deInfIdraulicaTrasv");
+ boolean deInfIdraulicaAltro = ParamUtil.getBoolean(request, "deInfIdraulicaAltro");
+ boolean deInfOperaAccStradale = ParamUtil.getBoolean(request, "deInfOperaAccStradale");
+ boolean deInfOperaAccIdraulica = ParamUtil.getBoolean(request, "deInfOperaAccIdraulica");
+ boolean deInfOperaAccAltro = ParamUtil.getBoolean(request, "deInfOperaAccAltro");
+ boolean deInfAltraInfrastruttura = ParamUtil.getBoolean(request, "deInfAltraInfrastruttura");
+ boolean deInfAltro = ParamUtil.getBoolean(request, "deInfAltro");
+ String deInfAltroDesc = ParamUtil.getString(request, "deInfAltroDesc");
+ boolean dccStruttureEleMuraturePietrame = ParamUtil.getBoolean(request, "dccStruttureEleMuraturePietrame");
+ boolean dccStruttureEleMuratureLaterizio = ParamUtil.getBoolean(request, "dccStruttureEleMuratureLaterizio");
+ boolean dccStruttureEleMuratureMisto = ParamUtil.getBoolean(request, "dccStruttureEleMuratureMisto");
+ boolean dccStruttureEleMuratureStoriche = ParamUtil.getBoolean(request, "dccStruttureEleMuratureStoriche");
+ boolean dccStruttureEleMistoCA = ParamUtil.getBoolean(request, "dccStruttureEleMistoCA");
+ boolean dccStruttureEleMistoAcciaio = ParamUtil.getBoolean(request, "dccStruttureEleMistoAcciaio");
+ boolean dccStruttureEleMistoMuratura = ParamUtil.getBoolean(request, "dccStruttureEleMistoMuratura");
+ boolean dccStruttureEleMistoLegno = ParamUtil.getBoolean(request, "dccStruttureEleMistoLegno");
+ boolean dccStruttureElePrefabbricato = ParamUtil.getBoolean(request, "dccStruttureElePrefabbricato");
+ boolean dccStruttureEleAltro = ParamUtil.getBoolean(request, "dccStruttureEleAltro");
+ String dccStruttureEleAltroDescrizione = ParamUtil.getString(request, "dccStruttureEleAltroDescrizione");
+ boolean dccOrizzontamentiCAAcciaio = ParamUtil.getBoolean(request, "dccOrizzontamentiCAAcciaio");
+ boolean dccOrizzontamentiLegno = ParamUtil.getBoolean(request, "dccOrizzontamentiLegno");
+ boolean dccOrizzontamentiLegnoCA = ParamUtil.getBoolean(request, "dccOrizzontamentiLegnoCA");
+ boolean dccOrizzontamentiLamieraGrecata = ParamUtil.getBoolean(request, "dccOrizzontamentiLamieraGrecata");
+ boolean dccOrizzontamentiVolte = ParamUtil.getBoolean(request, "dccOrizzontamentiVolte");
+ boolean dccOrizzontamentiAltro = ParamUtil.getBoolean(request, "dccOrizzontamentiAltro");
+ String dccOrizzontamentiAltroDescrizione = ParamUtil.getString(request, "dccOrizzontamentiAltroDescrizione");
+ boolean dccCoperturaCAAcciaio = ParamUtil.getBoolean(request, "dccCoperturaCAAcciaio");
+ boolean dccCoperturaLegno = ParamUtil.getBoolean(request, "dccCoperturaLegno");
+ boolean dccCoperturaLegnoCA = ParamUtil.getBoolean(request, "dccCoperturaLegnoCA");
+ boolean dccCoperturaLamieraGrecata = ParamUtil.getBoolean(request, "dccCoperturaLamieraGrecata");
+ boolean dccCoperturaPannelli = ParamUtil.getBoolean(request, "dccCoperturaPannelli");
+ boolean dccCoperturaPVCTelonati = ParamUtil.getBoolean(request, "dccCoperturaPVCTelonati");
+ boolean dccCoperturaLeggere = ParamUtil.getBoolean(request, "dccCoperturaLeggere");
+ boolean dccCoperturaAltro = ParamUtil.getBoolean(request, "dccCoperturaAltro");
+ String dccCoperturaAltroDesrizione = ParamUtil.getString(request, "dccCoperturaAltroDesrizione");
+ boolean dccElemNonStrutLaterizio = ParamUtil.getBoolean(request, "dccElemNonStrutLaterizio");
+ boolean dccElemNonStrutCartongesso = ParamUtil.getBoolean(request, "dccElemNonStrutCartongesso");
+ boolean dccElemNonStrutCalcestruzzo = ParamUtil.getBoolean(request, "dccElemNonStrutCalcestruzzo");
+ boolean dccElemNonStrutLegno = ParamUtil.getBoolean(request, "dccElemNonStrutLegno");
+ boolean dccElemNonStrutAltro = ParamUtil.getBoolean(request, "dccElemNonStrutAltro");
+ String dccElemNonStrutAltroDescrizione = ParamUtil.getString(request, "dccElemNonStrutAltroDescrizione");
+ boolean dccOpereDiRinforzoInsCatene = ParamUtil.getBoolean(request, "dccOpereDiRinforzoInsCatene");
+ boolean dccOpereDiRinforzoInsCordoli = ParamUtil.getBoolean(request, "dccOpereDiRinforzoInsCordoli");
+ boolean dccOpereDiRinforzoIniArmate = ParamUtil.getBoolean(request, "dccOpereDiRinforzoIniArmate");
+ boolean dccOpereDiRinforzoPlaccaggi = ParamUtil.getBoolean(request, "dccOpereDiRinforzoPlaccaggi");
+ boolean dccOpereDiRinforzoIrrSolai = ParamUtil.getBoolean(request, "dccOpereDiRinforzoIrrSolai");
+ boolean dccOpereDiRinforzoRinforziFRP = ParamUtil.getBoolean(request, "dccOpereDiRinforzoRinforziFRP");
+ boolean dccOpereDiRinforzoTelaiECerchiature = ParamUtil.getBoolean(request,
"dccOpereDiRinforzoTelaiECerchiature");
- boolean dccOpereDiRinforzoInsRompitratta = ParamUtil.getBoolean(actionRequest,
- "dccOpereDiRinforzoInsRompitratta");
- boolean dccOpereDiRinforzoAltro = ParamUtil.getBoolean(actionRequest, "dccOpereDiRinforzoAltro");
- String dccOpereDiRinforzoAltroDescrizione = ParamUtil.getString(actionRequest,
- "dccOpereDiRinforzoAltroDescrizione");
+ boolean dccOpereDiRinforzoInsRompitratta = ParamUtil.getBoolean(request, "dccOpereDiRinforzoInsRompitratta");
+ boolean dccOpereDiRinforzoAltro = ParamUtil.getBoolean(request, "dccOpereDiRinforzoAltro");
+ String dccOpereDiRinforzoAltroDescrizione = ParamUtil.getString(request, "dccOpereDiRinforzoAltroDescrizione");
// DATI geologici
- String geoClasseIndagine = getNotNullString(actionRequest, "geoClasseIndagine",
- dettPratica.getGeoClasseIndagine());
- String geoCategoriaSottosuolo = getNotNullString(actionRequest, "geoCategoriaSottosuolo",
+ String geoClasseIndagine = getNotNullString(request, "geoClasseIndagine", dettPratica.getGeoClasseIndagine());
+ String geoCategoriaSottosuolo = getNotNullString(request, "geoCategoriaSottosuolo",
dettPratica.getGeoCategoriaSottosuolo());
- String geoCategoriaTopografica = getNotNullString(actionRequest, "geoCategoriaTopografica",
+ String geoCategoriaTopografica = getNotNullString(request, "geoCategoriaTopografica",
dettPratica.getGeoCategoriaTopografica());
- String geoConsolidamento = getNotNullString(actionRequest, "geoConsolidamento",
- dettPratica.getGeoConsolidamento());
- String geoPericolositaGeologica = getNotNullString(actionRequest, "geoPericolositaGeologica",
+ String geoConsolidamento = getNotNullString(request, "geoConsolidamento", dettPratica.getGeoConsolidamento());
+ String geoPericolositaGeologica = getNotNullString(request, "geoPericolositaGeologica",
dettPratica.getGeoPericolositaGeologica());
- String geoRischioGeomorfologicoPai = getNotNullString(actionRequest, "geoRischioGeomorfologicoPai",
+ String geoRischioGeomorfologicoPai = getNotNullString(request, "geoRischioGeomorfologicoPai",
dettPratica.getGeoRischioGeomorfologicoPai());
- String geoPericolositaIdraulicaPai = getNotNullString(actionRequest, "geoPericolositaIdraulicaPai",
+ String geoPericolositaIdraulicaPai = getNotNullString(request, "geoPericolositaIdraulicaPai",
dettPratica.getGeoPericolositaIdraulicaPai());
- String geoRischioIdraulicoPai = getNotNullString(actionRequest, "geoRischioIdraulicoPai",
+ String geoRischioIdraulicoPai = getNotNullString(request, "geoRischioIdraulicoPai",
dettPratica.getGeoRischioIdraulicoPai());
- String geoPericolositaSismica = getNotNullString(actionRequest, "geoPericolositaSismica",
+ String geoPericolositaSismica = getNotNullString(request, "geoPericolositaSismica",
dettPratica.getGeoPericolositaSismica());
- String geoPericolositaIdraulica = getNotNullString(actionRequest, "geoPericolositaIdraulica",
+ String geoPericolositaIdraulica = getNotNullString(request, "geoPericolositaIdraulica",
dettPratica.getGeoPericolositaIdraulica());
- String geoPericolositaGeomorfica = getNotNullString(actionRequest, "geoPericolositaGeomorfica",
+ String geoPericolositaGeomorfica = getNotNullString(request, "geoPericolositaGeomorfica",
dettPratica.getGeoPericolositaGeomorfica());
- String geoFattibilitaGeologica = getNotNullString(actionRequest, "geoFattibilitaGeologica",
+ String geoFattibilitaGeologica = getNotNullString(request, "geoFattibilitaGeologica",
dettPratica.getGeoFattibilitaGeologica());
- String geoFattibilitaSismica = getNotNullString(actionRequest, "geoFattibilitaSismica",
+ String geoFattibilitaSismica = getNotNullString(request, "geoFattibilitaSismica",
dettPratica.getGeoFattibilitaSismica());
- String geoFattibilitaIdraulica = getNotNullString(actionRequest, "geoFattibilitaIdraulica",
+ String geoFattibilitaIdraulica = getNotNullString(request, "geoFattibilitaIdraulica",
dettPratica.getGeoFattibilitaIdraulica());
- String geoOperaRilevante = getNotNullString(actionRequest, "geoOperaRilevante",
- dettPratica.getGeoOperaRilevante());
- String geoOpereDiSostegno = getNotNullString(actionRequest, "geoOpereDiSostegno",
- dettPratica.getGeoOpereDiSostegno());
- String geoOpereInSotterranea = getNotNullString(actionRequest, "geoOpereInSotterranea",
+ String geoOperaRilevante = getNotNullString(request, "geoOperaRilevante", dettPratica.getGeoOperaRilevante());
+ String geoOpereDiSostegno = getNotNullString(request, "geoOpereDiSostegno", dettPratica.getGeoOpereDiSostegno());
+ String geoOpereInSotterranea = getNotNullString(request, "geoOpereInSotterranea",
dettPratica.getGeoOpereInSotterranea());
- String geoPresenzaPrescrizioni = getNotNullString(actionRequest, "geoPresenzaPrescrizioni",
+ String geoPresenzaPrescrizioni = getNotNullString(request, "geoPresenzaPrescrizioni",
dettPratica.getGeoPresenzaPrescrizioni());
- String geoNotePrescrizioni = getNotNullString(actionRequest, "geoNotePrescrizioni",
+ String geoNotePrescrizioni = getNotNullString(request, "geoNotePrescrizioni",
dettPratica.getGeoNotePrescrizioni());
- String geoNoteIndagini = getNotNullString(actionRequest, "geoNoteIndagini", dettPratica.getGeoNoteIndagini());
- String geoEvidenzeGeomorfiche = getNotNullString(actionRequest, "geoEvidenzeGeomorfiche",
+ String geoNoteIndagini = getNotNullString(request, "geoNoteIndagini", dettPratica.getGeoNoteIndagini());
+ String geoEvidenzeGeomorfiche = getNotNullString(request, "geoEvidenzeGeomorfiche",
dettPratica.getGeoEvidenzeGeomorfiche());
- String geoEvidenzeGeologiche = getNotNullString(actionRequest, "geoEvidenzeGeologiche",
+ String geoEvidenzeGeologiche = getNotNullString(request, "geoEvidenzeGeologiche",
dettPratica.getGeoEvidenzeGeologiche());
- Date geoDtRelazione = getNotNullDate(actionRequest, "geoDtRelazione", dettPratica.getGeoDtRelazione());
+ Date geoDtRelazione = getNotNullDate(request, "geoDtRelazione", dettPratica.getGeoDtRelazione());
// normative
- boolean normLavoriInProprio = ParamUtil.getBoolean(actionRequest, "normLavoriInProprio");
- boolean normEsenteBollo = ParamUtil.getBoolean(actionRequest, "normEsenteBollo");
- boolean normEsenteSpese = ParamUtil.getBoolean(actionRequest, "normEsenteSpese");
- boolean normDpr01Dep = ParamUtil.getBoolean(actionRequest, "normDpr01Dep");
- boolean normDpr02Dep = ParamUtil.getBoolean(actionRequest, "normDpr02Dep");
- boolean normDpr01Aut = ParamUtil.getBoolean(actionRequest, "normDpr01Aut");
- boolean normDpr02Aut = ParamUtil.getBoolean(actionRequest, "normDpr02Aut");
- boolean normDm2018 = ParamUtil.getBoolean(actionRequest, "normDm2018");
- boolean normAnr = ParamUtil.getBoolean(actionRequest, "normAnr");
- boolean normArt3com3 = ParamUtil.getBoolean(actionRequest, "normArt3com3");
- boolean normArt3com4 = ParamUtil.getBoolean(actionRequest, "normArt3com4");
- boolean suap = ParamUtil.getBoolean(actionRequest, "suap");
- boolean normSismaBonus = ParamUtil.getBoolean(actionRequest, "normSismaBonus");
- boolean intervFinPub = ParamUtil.getBoolean(actionRequest, "intervFinPub");
- String intervFinPubDesc = intervFinPub ? ParamUtil.getString(actionRequest, "intervFinPubDesc")
- : StringPool.BLANK;
- boolean intervInAreaDiInteresse = ParamUtil.getBoolean(actionRequest, "intervInAreaDiInteresse");
- boolean intervNonModificante = ParamUtil.getBoolean(actionRequest, "intervNonModificante");
- boolean intervNonAssoggettabile = ParamUtil.getBoolean(actionRequest, "intervNonAssoggettabile");
- long userId = PortalUtil.getUserId(actionRequest);
- String livelloDiTutela = ParamUtil.getString(actionRequest, "livelloDiTutela");
- String paesaggioLocale = ParamUtil.getString(actionRequest, "paesaggioLocale");
- String vincoli = ParamUtil.getString(actionRequest, "vincoli");
- String destinazioneAltroIntervento = ParamUtil.getString(actionRequest, "destinazioneAltroIntervento");
- boolean tcCostruzioniEsistenti = ParamUtil.getBoolean(actionRequest, "tcCostruzioniEsistenti");
- boolean tcManutOrdStraord = ParamUtil.getBoolean(actionRequest, "tcManutOrdStraord");
- boolean tcAltriInterventi = ParamUtil.getBoolean(actionRequest, "tcAltriInterventi");
- String tcAltriInterventiDesc = ParamUtil.getString(actionRequest, "tcAltriInterventiDesc");
- boolean tcNuovaCostruzionePertinenza = ParamUtil.getBoolean(actionRequest, "tcNuovaCostruzionePertinenza");
- boolean tcInterventoOpereEscavazione = ParamUtil.getBoolean(actionRequest, "tcInterventoOpereEscavazione");
- boolean tcViarch = ParamUtil.getBoolean(actionRequest, "tcViarch");
- boolean tcOperaA25 = ParamUtil.getBoolean(actionRequest, "tcOperaA25");
- boolean tcNoOpereEscavazione = ParamUtil.getBoolean(actionRequest, "tcNoOpereEscavazione");
- boolean sanatoriaEdilizia47 = ParamUtil.getBoolean(actionRequest, "sanatoriaEdilizia47");
- boolean sanatoriaEdilizia724 = ParamUtil.getBoolean(actionRequest, "sanatoriaEdilizia724");
- boolean sanatoriaEdilizia326 = ParamUtil.getBoolean(actionRequest, "sanatoriaEdilizia326");
- String interventoVoceP7 = ParamUtil.getString(actionRequest, "interventoVoceP7");
- boolean normLavoriNoDirettore = ParamUtil.getBoolean(actionRequest, "normLavoriNoDirettore");
- boolean nominaImpresa = ParamUtil.getBoolean(actionRequest, "nominaImpresa");
- boolean nominaDirettoreLavori = ParamUtil.getBoolean(actionRequest, "nominaDirettoreLavori");
- boolean nominaCollaudatore = ParamUtil.getBoolean(actionRequest, "nominaCollaudatore");
+ boolean normLavoriInProprio = ParamUtil.getBoolean(request, "normLavoriInProprio");
+ boolean normEsenteBollo = ParamUtil.getBoolean(request, "normEsenteBollo");
+ boolean normEsenteSpese = ParamUtil.getBoolean(request, "normEsenteSpese");
+ boolean normDpr01Dep = ParamUtil.getBoolean(request, "normDpr01Dep");
+ boolean normDpr02Dep = ParamUtil.getBoolean(request, "normDpr02Dep");
+ boolean normDpr01Aut = ParamUtil.getBoolean(request, "normDpr01Aut");
+ boolean normDpr02Aut = ParamUtil.getBoolean(request, "normDpr02Aut");
+ boolean normDm2018 = ParamUtil.getBoolean(request, "normDm2018");
+ boolean normAnr = ParamUtil.getBoolean(request, "normAnr");
+ boolean normArt3com3 = ParamUtil.getBoolean(request, "normArt3com3");
+ boolean normArt3com4 = ParamUtil.getBoolean(request, "normArt3com4");
+ boolean suap = ParamUtil.getBoolean(request, "suap");
+ boolean normSismaBonus = ParamUtil.getBoolean(request, "normSismaBonus");
+ boolean intervFinPub = ParamUtil.getBoolean(request, "intervFinPub");
+ String intervFinPubDesc = intervFinPub ? ParamUtil.getString(request, "intervFinPubDesc") : StringPool.BLANK;
+ boolean intervInAreaDiInteresse = ParamUtil.getBoolean(request, "intervInAreaDiInteresse");
+ boolean intervNonModificante = ParamUtil.getBoolean(request, "intervNonModificante");
+ boolean intervNonAssoggettabile = ParamUtil.getBoolean(request, "intervNonAssoggettabile");
+ long userId = PortalUtil.getUserId(request);
+ String livelloDiTutela = ParamUtil.getString(request, "livelloDiTutela");
+ String paesaggioLocale = ParamUtil.getString(request, "paesaggioLocale");
+ String vincoli = ParamUtil.getString(request, "vincoli");
+ String destinazioneAltroIntervento = ParamUtil.getString(request, "destinazioneAltroIntervento");
+ boolean tcCostruzioniEsistenti = ParamUtil.getBoolean(request, "tcCostruzioniEsistenti");
+ boolean tcManutOrdStraord = ParamUtil.getBoolean(request, "tcManutOrdStraord");
+ boolean tcAltriInterventi = ParamUtil.getBoolean(request, "tcAltriInterventi");
+ String tcAltriInterventiDesc = ParamUtil.getString(request, "tcAltriInterventiDesc");
+ boolean tcNuovaCostruzionePertinenza = ParamUtil.getBoolean(request, "tcNuovaCostruzionePertinenza");
+ boolean tcInterventoOpereEscavazione = ParamUtil.getBoolean(request, "tcInterventoOpereEscavazione");
+ boolean tcViarch = ParamUtil.getBoolean(request, "tcViarch");
+ boolean tcOperaA25 = ParamUtil.getBoolean(request, "tcOperaA25");
+ boolean tcNoOpereEscavazione = ParamUtil.getBoolean(request, "tcNoOpereEscavazione");
+ boolean sanatoriaEdilizia47 = ParamUtil.getBoolean(request, "sanatoriaEdilizia47");
+ boolean sanatoriaEdilizia724 = ParamUtil.getBoolean(request, "sanatoriaEdilizia724");
+ boolean sanatoriaEdilizia326 = ParamUtil.getBoolean(request, "sanatoriaEdilizia326");
+ String interventoVoceP7 = ParamUtil.getString(request, "interventoVoceP7");
+ boolean normLavoriNoDirettore = ParamUtil.getBoolean(request, "normLavoriNoDirettore");
+ boolean nominaImpresa = ParamUtil.getBoolean(request, "nominaImpresa");
+ boolean nominaDirettoreLavori = ParamUtil.getBoolean(request, "nominaDirettoreLavori");
+ boolean nominaCollaudatore = ParamUtil.getBoolean(request, "nominaCollaudatore");
try {
DettPraticaServiceUtil.updateDettPratica(userId, dettPratica.getDettPraticaId(),
dettPratica.getIntPraticaId(), dettPratica.getIntegrazione(), protocollo, tipoIntegrazione,
@@ -1556,118 +1554,117 @@ public class FascicoloFePortlet extends MVCPortlet {
normLavoriNoDirettore, pagSoggettiAdAutorizzazione, interventoVoceP7, nominaImpresa,
nominaDirettoreLavori, nominaCollaudatore, tcNoOpereEscavazione);
- String redirect = ParamUtil.getString(actionRequest, "redirect");
+ String redirect = ParamUtil.getString(request, "redirect");
if (Validator.isNull(redirect)) {
- String successURL = ParamUtil.getString(actionRequest, "successURL");
- successURL = HttpUtil.removeParameter(successURL, actionResponse.getNamespace() + "isNewVariante");
+ String successURL = ParamUtil.getString(request, "successURL");
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "isNewVariante");
if (Validator.isNotNull(successURL)) {
- successURL = HttpUtil.removeParameter(successURL, actionResponse.getNamespace() + "openVerifyUrl");
- successURL = HttpUtil.removeParameter(successURL, actionResponse.getNamespace() + "verifyArea");
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "openVerifyUrl",
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "openVerifyUrl");
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "verifyArea");
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "openVerifyUrl",
String.valueOf(!bozza));
- String verifyArea = ParamUtil.getString(actionRequest, "verifyArea", StringPool.BLANK);
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "verifyArea",
+ String verifyArea = ParamUtil.getString(request, "verifyArea", StringPool.BLANK);
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "verifyArea",
String.valueOf(verifyArea));
- String fragmentURL = ParamUtil.getString(actionRequest, "current_tab");
+ String fragmentURL = ParamUtil.getString(request, "current_tab");
if (Validator.isNotNull(fragmentURL)) {
- successURL = HttpUtil
- .removeParameter(successURL, actionResponse.getNamespace() + "current_tab");
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "current_tab",
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "current_tab");
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "current_tab",
fragmentURL);
- successURL = HttpUtil.removeParameter(successURL, actionResponse.getNamespace() + "historyKey");
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "historyKey",
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "historyKey");
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "historyKey",
"_1_WAR_portosfeportlet_tab=" + fragmentURL);
if (successURL.contains(StringPool.POUND)) {
successURL = successURL.substring(0, successURL.lastIndexOf(StringPool.POUND));
}
successURL += "#_1_WAR_portosfeportlet_tab=" + fragmentURL;
}
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
} else {
- actionResponse.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
- actionResponse.setRenderParameter("backURL", ParamUtil.getString(actionRequest, "backURL"));
- actionResponse.setRenderParameter("dettPraticaId", String.valueOf(dettPratica.getDettPraticaId()));
- actionResponse.setRenderParameter("intPraticaId", String.valueOf(dettPratica.getIntPraticaId()));
- actionResponse.setRenderParameter("openVerifyUrl", String.valueOf(!bozza));
+ response.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
+ response.setRenderParameter("backURL", ParamUtil.getString(request, "backURL"));
+ response.setRenderParameter("dettPraticaId", String.valueOf(dettPratica.getDettPraticaId()));
+ response.setRenderParameter("intPraticaId", String.valueOf(dettPratica.getIntPraticaId()));
+ response.setRenderParameter("openVerifyUrl", String.valueOf(!bozza));
}
}
} catch (PortalException e) {
_log.error(e, e);
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- actionResponse.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
+ PortalUtil.copyRequestParameters(request, response);
+ response.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
throw e;
} catch (Exception e) {
_log.error(e, e);
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- actionResponse.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
+ PortalUtil.copyRequestParameters(request, response);
+ response.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
throw new PortalException(e);
}
}
- private void saveVariazioneSoggetti(long dettPraticaId, ActionRequest actionRequest, ActionResponse actionResponse)
+ private void saveVariazioneSoggetti(long dettPraticaId, ActionRequest request, ActionResponse response)
throws Exception {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), actionRequest);
- boolean bozza = ParamUtil.getBoolean(actionRequest, "bozza", true);
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(DettPratica.class.getName(), request);
+ boolean bozza = ParamUtil.getBoolean(request, "bozza", true);
User user = UserLocalServiceUtil.getUser(serviceContext.getUserId());
String codiceFiscaleDelegatoCommittente = user.getScreenName();
- boolean isCodiceFiscaleDelegatoFineLavoriAuthorized = ParamUtil.getBoolean(actionRequest,
+ boolean isCodiceFiscaleDelegatoFineLavoriAuthorized = ParamUtil.getBoolean(request,
"codiceFiscaleDelegatoFineLavoriEnabled");
String codiceFiscaleDelegatoFineLavori = isCodiceFiscaleDelegatoFineLavoriAuthorized ? ParamUtil.getString(
- actionRequest, "codiceFiscaleDelegatoFineLavori") : StringPool.BLANK;
- boolean isCodiceFiscaleDelegatoCollaudoAuthorized = ParamUtil.getBoolean(actionRequest,
+ request, "codiceFiscaleDelegatoFineLavori") : StringPool.BLANK;
+ boolean isCodiceFiscaleDelegatoCollaudoAuthorized = ParamUtil.getBoolean(request,
"codiceFiscaleDelegatoCollaudoEnabled");
- String codiceFiscaleDelegatoCollaudo = isCodiceFiscaleDelegatoCollaudoAuthorized ? ParamUtil.getString(
- actionRequest, "codiceFiscaleDelegatoCollaudo") : StringPool.BLANK;
- long userId = PortalUtil.getUserId(actionRequest);
+ String codiceFiscaleDelegatoCollaudo = isCodiceFiscaleDelegatoCollaudoAuthorized ? ParamUtil.getString(request,
+ "codiceFiscaleDelegatoCollaudo") : StringPool.BLANK;
+ long userId = PortalUtil.getUserId(request);
try {
DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
DettPraticaServiceUtil.updateDettPraticaSoggetti(userId, dettPratica.getDettPraticaId(),
dettPratica.getIntPraticaId(), codiceFiscaleDelegatoCommittente, codiceFiscaleDelegatoFineLavori,
codiceFiscaleDelegatoCollaudo, serviceContext);
- String redirect = ParamUtil.getString(actionRequest, "redirect");
+ String redirect = ParamUtil.getString(request, "redirect");
if (Validator.isNull(redirect)) {
- String successURL = ParamUtil.getString(actionRequest, "successURL");
+ String successURL = ParamUtil.getString(request, "successURL");
if (Validator.isNotNull(successURL)) {
- successURL = HttpUtil.removeParameter(successURL, actionResponse.getNamespace() + "openVerifyUrl");
- successURL = HttpUtil.removeParameter(successURL, actionResponse.getNamespace() + "verifyArea");
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "openVerifyUrl",
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "openVerifyUrl");
+ successURL = HttpUtil.removeParameter(successURL, response.getNamespace() + "verifyArea");
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "openVerifyUrl",
String.valueOf(!bozza));
- String verifyArea = ParamUtil.getString(actionRequest, "verifyArea", StringPool.BLANK);
- successURL = HttpUtil.addParameter(successURL, actionResponse.getNamespace() + "verifyArea",
+ String verifyArea = ParamUtil.getString(request, "verifyArea", StringPool.BLANK);
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "verifyArea",
String.valueOf(verifyArea));
String fragmentURL = "_1_WAR_portosfeportlet_page_soggetti";
if (successURL.contains(StringPool.POUND)) {
successURL = successURL.substring(0, successURL.lastIndexOf(StringPool.POUND));
}
successURL += "#_1_WAR_portosfeportlet_tab=" + fragmentURL;
- actionResponse.sendRedirect(successURL);
+ response.sendRedirect(successURL);
} else {
- actionResponse.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
- actionResponse.setRenderParameter("backURL", ParamUtil.getString(actionRequest, "backURL"));
- actionResponse.setRenderParameter("dettPraticaId", String.valueOf(dettPratica.getDettPraticaId()));
- actionResponse.setRenderParameter("intPraticaId", String.valueOf(dettPratica.getIntPraticaId()));
- actionResponse.setRenderParameter("openVerifyUrl", String.valueOf(!bozza));
+ response.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
+ response.setRenderParameter("backURL", ParamUtil.getString(request, "backURL"));
+ response.setRenderParameter("dettPraticaId", String.valueOf(dettPratica.getDettPraticaId()));
+ response.setRenderParameter("intPraticaId", String.valueOf(dettPratica.getIntPraticaId()));
+ response.setRenderParameter("openVerifyUrl", String.valueOf(!bozza));
}
}
} catch (PortalException e) {
_log.error(e, e);
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- actionResponse.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
+ PortalUtil.copyRequestParameters(request, response);
+ response.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
throw e;
} catch (Exception e) {
_log.error(e, e);
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- actionResponse.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
+ PortalUtil.copyRequestParameters(request, response);
+ response.setRenderParameter("mvcPath", "/html/fascicolofe/edit_fascicolo.jsp");
throw new PortalException(e);
}
}
- public void deleteFascicolo(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
+ public void deleteFascicolo(ActionRequest request, ActionResponse response) throws Exception {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
try {
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
IntPraticaServiceUtil.deleteIntPratica(intPraticaId, serviceContext.getUserId());
} catch (PortalException | SystemException e) {
_log.error(e, e);
@@ -1675,48 +1672,48 @@ public class FascicoloFePortlet extends MVCPortlet {
}
}
- public void richiediAsseverazioni(ActionRequest actionRequest, ActionResponse actionResponse)
- throws PortalException, SystemException {
+ public void richiediAsseverazioni(ActionRequest request, ActionResponse response) throws PortalException,
+ SystemException {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
if (ValidazionePraticaUtil.asseverazioniIsEnable(dettPraticaId)) {
AsseverazioneServiceUtil.richiediAsseverazioni(dettPraticaId, serviceContext);
} else {
- SessionErrors.add(actionRequest, "asseverazioni-non-richiedibili");
+ SessionErrors.add(request, "asseverazioni-non-richiedibili");
}
}
- public void annullaAsseverazione(ActionRequest actionRequest, ActionResponse actionResponse)
- throws PortalException, SystemException {
+ public void annullaAsseverazione(ActionRequest request, ActionResponse response) throws PortalException,
+ SystemException {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long asseverazioneId = ParamUtil.getLong(actionRequest, "asseverazioneId");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long asseverazioneId = ParamUtil.getLong(request, "asseverazioneId");
Asseverazione asseverazione = AsseverazioneLocalServiceUtil.getAsseverazione(asseverazioneId);
if (AsseverazioniUtil.hasGestisciFileAsseverazione(serviceContext.getUserId(), asseverazioneId)) {
AsseverazioneServiceUtil.resetAsseverazione(asseverazione.getDettPraticaId(), asseverazioneId);
} else {
- SessionErrors.add(actionRequest, "asseverazioni-non-richiedibili");
+ SessionErrors.add(request, "asseverazioni-non-richiedibili");
}
}
- public void rimuoviFileAsseverazione(ActionRequest actionRequest, ActionResponse actionResponse)
- throws PortalException, SystemException {
+ public void rimuoviFileAsseverazione(ActionRequest request, ActionResponse response) throws PortalException,
+ SystemException {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long asseverazioneId = ParamUtil.getLong(actionRequest, "asseverazioneId");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long asseverazioneId = ParamUtil.getLong(request, "asseverazioneId");
if (AsseverazioniUtil.hasGestisciFileAsseverazione(serviceContext.getUserId(), asseverazioneId)) {
AsseverazioneServiceUtil.rimuoviFileAsseverazione(asseverazioneId);
} else {
- SessionErrors.add(actionRequest, "asseverazioni-non-richiedibili");
+ SessionErrors.add(request, "asseverazioni-non-richiedibili");
}
}
- public void allegatoFileAnnullamento(ActionRequest actionRequest, ActionResponse actionResponse)
- throws PortalException, SystemException {
+ public void allegatoFileAnnullamento(ActionRequest request, ActionResponse response) throws PortalException,
+ SystemException {
try {
- UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest);
+ UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(request);
ServiceContext serviceContext = ServiceContextFactory.getInstance(uploadRequest);
long intPraticaId = ParamUtil.getLong(uploadRequest, "intPraticaId");
String sourceFileName = uploadRequest.getFileName("abortFile");
@@ -1726,17 +1723,17 @@ public class FascicoloFePortlet extends MVCPortlet {
// validazione: solo alcune estensioni
String ext = FileUtil.getExtension(sourceFileName);
if (!ext.equalsIgnoreCase("p7m") && !ext.equalsIgnoreCase("pdf")) {
- SessionErrors.add(actionRequest, "error.geniocivilefe.annullamento.allegato.ext.valid");
+ SessionErrors.add(request, "error.geniocivilefe.annullamento.allegato.ext.valid");
}
// lunghezza fissata a 200
if (sourceFileName.length() > 200) {
- SessionErrors.add(actionRequest, "error.geniocivilefe.annullamento.allegato.length.valid");
+ SessionErrors.add(request, "error.geniocivilefe.annullamento.allegato.length.valid");
}
} else {
- SessionErrors.add(actionRequest, "error.geniocivilefe.annullamento.allegato.is.request");
+ SessionErrors.add(request, "error.geniocivilefe.annullamento.allegato.is.request");
}
- if (!SessionErrors.isEmpty(actionRequest)) {
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ if (!SessionErrors.isEmpty(request)) {
+ PortalUtil.copyRequestParameters(request, response);
} else {
byte[] content = FileUtil.getBytes(file);
List soggettiValidi = SoggettoServiceUtil.getValidByIntPratica(intPraticaId);
@@ -1746,7 +1743,7 @@ public class FascicoloFePortlet extends MVCPortlet {
codiciFiscaliValidi.add(soggetto.getCodiceFiscale());
}
}
- User user = PortalUtil.getUser(actionRequest);
+ User user = PortalUtil.getUser(request);
String jsonFirmatari = StringPool.BLANK;
FirmeBean firmeBean = new FirmeBean();
if (applicaFirma) {
@@ -1760,45 +1757,45 @@ public class FascicoloFePortlet extends MVCPortlet {
IntPraticaLocalServiceUtil.allegaFileAnnullamento(intPraticaId, content, sourceFileName,
jsonFirmatari, serviceContext);
} else {
- SessionErrors.add(actionRequest, "error.annullamento.add.file.non.firmato");
- String redirectURL = ParamUtil.getString(actionRequest, "errorUrl");
- actionResponse.sendRedirect(redirectURL);
+ SessionErrors.add(request, "error.annullamento.add.file.non.firmato");
+ String redirectURL = ParamUtil.getString(request, "errorUrl");
+ response.sendRedirect(redirectURL);
}
}
} catch (Exception e) {
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ PortalUtil.copyRequestParameters(request, response);
_log.error("Error", e);
throw new SystemException(e);
}
}
- public void generaFirmaAnnullamento(ActionRequest actionRequest, ActionResponse actionResponse)
- throws PortalException, SystemException {
+ public void generaFirmaAnnullamento(ActionRequest request, ActionResponse response) throws PortalException,
+ SystemException {
try {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
- boolean isSigned = ParamUtil.getBoolean(actionRequest, "appSign");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
+ boolean isSigned = ParamUtil.getBoolean(request, "appSign");
if (isSigned) {
IntPraticaLocalServiceUtil.generateFileAnnullamento(intPraticaId, serviceContext);
} else {
- SessionErrors.add(actionRequest, "error.annullamento.add.file.non.firmato");
- String redirectURL = ParamUtil.getString(actionRequest, "errorUrl");
- actionResponse.sendRedirect(redirectURL);
+ SessionErrors.add(request, "error.annullamento.add.file.non.firmato");
+ String redirectURL = ParamUtil.getString(request, "errorUrl");
+ response.sendRedirect(redirectURL);
}
} catch (Exception e) {
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ PortalUtil.copyRequestParameters(request, response);
_log.error("Error", e);
throw new SystemException(e);
}
}
- public void allegatoFileAsseverazione(ActionRequest actionRequest, ActionResponse actionResponse)
- throws PortalException, SystemException {
+ public void allegatoFileAsseverazione(ActionRequest request, ActionResponse response) throws PortalException,
+ SystemException {
String dettagliFirme = StringPool.BLANK;
try {
- UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest);
+ UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(request);
ServiceContext serviceContext = ServiceContextFactory.getInstance(uploadRequest);
long asseverazioneId = ParamUtil.getLong(uploadRequest, "asseverazioneId");
String sourceFileName = uploadRequest.getFileName("docFile");
@@ -1808,20 +1805,20 @@ public class FascicoloFePortlet extends MVCPortlet {
// validazione: solo alcune estensioni
String ext = FileUtil.getExtension(sourceFileName);
if (!ext.equalsIgnoreCase("p7m") && !ext.equalsIgnoreCase("pdf")) {
- SessionErrors.add(actionRequest, "error.geniocivilefe.asseverazione.allegato.ext.valid");
+ SessionErrors.add(request, "error.geniocivilefe.asseverazione.allegato.ext.valid");
}
// lunghezza fissata a 200
if (sourceFileName.length() > 200) {
- SessionErrors.add(actionRequest, "error.geniocivilefe.asseverazione.allegato.length.valid");
+ SessionErrors.add(request, "error.geniocivilefe.asseverazione.allegato.length.valid");
}
} else {
- SessionErrors.add(actionRequest, "error.geniocivilefe.asseverazione.allegato.is.request");
+ SessionErrors.add(request, "error.geniocivilefe.asseverazione.allegato.is.request");
}
} else {
- SessionErrors.add(actionRequest, "error.geniocivilefe.asseverazione.non.richiedibile");
+ SessionErrors.add(request, "error.geniocivilefe.asseverazione.non.richiedibile");
}
Asseverazione asseverazione = AsseverazioneLocalServiceUtil.getAsseverazione(asseverazioneId);
- if (SessionErrors.isEmpty(actionRequest)) {
+ if (SessionErrors.isEmpty(request)) {
byte[] content = FileUtil.getBytes(file);
boolean isSignedByTitolare = ValidazionePraticaUtil.isAsseverazioneSignedByOwner(sourceFileName,
content, serviceContext.getCompanyId(), asseverazione.getCodiceFiscale(), StringPool.BLANK);
@@ -1829,7 +1826,7 @@ public class FascicoloFePortlet extends MVCPortlet {
AsseverazioneServiceUtil.allegaFileAsseverazione(asseverazioneId, content, sourceFileName,
serviceContext);
} else {
- SessionErrors.add(actionRequest, "error.geniocivilefe.asseverazione.allegato.firma.valid");
+ SessionErrors.add(request, "error.geniocivilefe.asseverazione.allegato.firma.valid");
// Impostazione parametri di rendering per messaggio di errore.
List firmatari = ValidazionePraticaUtil.gatherSignatures(sourceFileName, content,
serviceContext.getCompanyId(), StringPool.BLANK);
@@ -1838,95 +1835,93 @@ public class FascicoloFePortlet extends MVCPortlet {
+ firme + StringPool.CLOSE_BRACKET;
}
}
- if (!SessionErrors.isEmpty(actionRequest)) {
- String redirectURL = ParamUtil.getString(actionRequest, "errorUrl");
- redirectURL = HttpUtil.addParameter(redirectURL, actionResponse.getNamespace() + "dettPraticaId",
+ if (!SessionErrors.isEmpty(request)) {
+ String redirectURL = ParamUtil.getString(request, "errorUrl");
+ redirectURL = HttpUtil.addParameter(redirectURL, response.getNamespace() + "dettPraticaId",
String.valueOf(asseverazione.getDettPraticaId()));
- actionResponse.sendRedirect(redirectURL);
+ response.sendRedirect(redirectURL);
}
} catch (Exception e) {
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ PortalUtil.copyRequestParameters(request, response);
_log.error("Error", e);
throw new SystemException(e);
}
- actionResponse.setRenderParameter("dettagliFirme", dettagliFirme);
+ response.setRenderParameter("dettagliFirme", dettagliFirme);
}
- public void deleteFileAnnullamento(ActionRequest actionRequest, ActionResponse actionResponse)
- throws PortalException, SystemException {
+ public void deleteFileAnnullamento(ActionRequest request, ActionResponse response) throws PortalException,
+ SystemException {
- long fileAnnulamentoId = ParamUtil.getLong(actionRequest, "docPraticaAnnullamentoId");
+ long fileAnnulamentoId = ParamUtil.getLong(request, "docPraticaAnnullamentoId");
if (Validator.isNotNull(fileAnnulamentoId)) {
IntPraticaLocalServiceUtil.deleteFileAnnullamento(fileAnnulamentoId);
}
}
- public void confermaAsseverazione(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException,
+ public void confermaAsseverazione(ActionRequest request, ActionResponse response) throws IOException,
PortalException, SystemException {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long asseverazioneId = ParamUtil.getLong(actionRequest, "asseverazioneId");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long asseverazioneId = ParamUtil.getLong(request, "asseverazioneId");
if (AsseverazioniUtil.hasCambioStatoAsseverazione(serviceContext.getUserId(), asseverazioneId)) {
AsseverazioneServiceUtil.cambioStatoAsseverazioni(asseverazioneId, AsseverazioniUtil.STATO_ESEGUITA);
} else {
- SessionErrors.add(actionRequest, "asseverazioni-non-richiedibili");
+ SessionErrors.add(request, "asseverazioni-non-richiedibili");
}
}
- public void annullaAsseverazioni(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException,
+ public void annullaAsseverazioni(ActionRequest request, ActionResponse response) throws IOException,
PortalException, SystemException {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
if (AsseverazioniUtil.hasAnnullaAsseverazioni(serviceContext.getUserId(), dettPraticaId)) {
AsseverazioneServiceUtil.annullaAsseverazioni(dettPraticaId);
} else {
- SessionErrors.add(actionRequest, "asseverazioni-non-annullabili");
+ SessionErrors.add(request, "asseverazioni-non-annullabili");
}
}
- public void updateFormPagamento(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException,
+ public void updateFormPagamento(ActionRequest request, ActionResponse response) throws PortalException,
SystemException {
- long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
- boolean normEsenteBollo = ParamUtil.getBoolean(actionRequest, "normEsenteBollo");
- boolean normEsenteSpese = ParamUtil.getBoolean(actionRequest, "normEsenteSpese");
+ long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
+ boolean normEsenteBollo = ParamUtil.getBoolean(request, "normEsenteBollo");
+ boolean normEsenteSpese = ParamUtil.getBoolean(request, "normEsenteSpese");
if (Validator.isNotNull(dettPraticaId)) {
DettPraticaServiceUtil.updateCheckPagamenti(dettPraticaId, normEsenteSpese, normEsenteBollo);
}
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ PortalUtil.copyRequestParameters(request, response);
}
- public void pagaInvia(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException,
- SystemException {
+ public void pagaInvia(ActionRequest request, ActionResponse response) throws PortalException, SystemException {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
- long fineLavoriId = ParamUtil.getLong(actionRequest, "fineLavoriId");
- long collaudoId = ParamUtil.getLong(actionRequest, "collaudoId");
- String codiceFiscaleCommittente = ParamUtil.getString(actionRequest, "codiceFiscaleCommittente");
- String url = ParamUtil.getString(actionRequest, "url");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
+ long fineLavoriId = ParamUtil.getLong(request, "fineLavoriId");
+ long collaudoId = ParamUtil.getLong(request, "collaudoId");
+ String codiceFiscaleCommittente = ParamUtil.getString(request, "codiceFiscaleCommittente");
+ String url = ParamUtil.getString(request, "url");
if (Validator.isNotNull(dettPraticaId)) {
if (ValidazionePraticaUtil.pagamentoIsEnable(dettPraticaId)
&& DelegheUtil.canDoPayment(serviceContext.getUserId(), dettPraticaId)) {
- Double pagSoggettiAdAutorizzazione = ParamUtil.getDouble(actionRequest, "pagSoggettiAdAutorizzazione");
- Double pagInterventiRestauroManufatti = ParamUtil.getDouble(actionRequest,
- "pagInterventiRestauroManufatti");
- Double pagAltriCasiCulturali = ParamUtil.getDouble(actionRequest, "pagAltriCasiCulturali");
- Double pagLottizzazioni = ParamUtil.getDouble(actionRequest, "pagLottizzazioni");
- Double pagGrandiStrutture = ParamUtil.getDouble(actionRequest, "pagGrandiStrutture");
- Double pagCondotte = ParamUtil.getDouble(actionRequest, "pagCondotte");
- Double pagPalificazioni = ParamUtil.getDouble(actionRequest, "pagPalificazioni");
- Double pagImpiantiEolici = ParamUtil.getDouble(actionRequest, "pagImpiantiEolici");
- Double pagNuoveRealizzazioni = ParamUtil.getDouble(actionRequest, "pagNuoveRealizzazioni");
- Double pagImmobiliPreesistenti = ParamUtil.getDouble(actionRequest, "pagImmobiliPreesistenti");
- Double pagManifestiPubblicitari = ParamUtil.getDouble(actionRequest, "pagManifestiPubblicitari");
- Double pagPareriDiMassima = ParamUtil.getDouble(actionRequest, "pagPareriDiMassima");
- Double pagAltriCasiPaesaggistici = ParamUtil.getDouble(actionRequest, "pagAltriCasiPaesaggistici");
- Double pagVariantiPareriResi = ParamUtil.getDouble(actionRequest, "pagVariantiPareriResi");
- Double pagRilascioAttestazioni = ParamUtil.getDouble(actionRequest, "pagRilascioAttestazioni");
- Double pagConsultazioniArchivio = ParamUtil.getDouble(actionRequest, "pagConsultazioniArchivio");
- String importoSpeseIstruttoria = ParamUtil.getString(actionRequest, "importoSpeseIstruttoria");
+ Double pagSoggettiAdAutorizzazione = ParamUtil.getDouble(request, "pagSoggettiAdAutorizzazione");
+ Double pagInterventiRestauroManufatti = ParamUtil.getDouble(request, "pagInterventiRestauroManufatti");
+ Double pagAltriCasiCulturali = ParamUtil.getDouble(request, "pagAltriCasiCulturali");
+ Double pagLottizzazioni = ParamUtil.getDouble(request, "pagLottizzazioni");
+ Double pagGrandiStrutture = ParamUtil.getDouble(request, "pagGrandiStrutture");
+ Double pagCondotte = ParamUtil.getDouble(request, "pagCondotte");
+ Double pagPalificazioni = ParamUtil.getDouble(request, "pagPalificazioni");
+ Double pagImpiantiEolici = ParamUtil.getDouble(request, "pagImpiantiEolici");
+ Double pagNuoveRealizzazioni = ParamUtil.getDouble(request, "pagNuoveRealizzazioni");
+ Double pagImmobiliPreesistenti = ParamUtil.getDouble(request, "pagImmobiliPreesistenti");
+ Double pagManifestiPubblicitari = ParamUtil.getDouble(request, "pagManifestiPubblicitari");
+ Double pagPareriDiMassima = ParamUtil.getDouble(request, "pagPareriDiMassima");
+ Double pagAltriCasiPaesaggistici = ParamUtil.getDouble(request, "pagAltriCasiPaesaggistici");
+ Double pagVariantiPareriResi = ParamUtil.getDouble(request, "pagVariantiPareriResi");
+ Double pagRilascioAttestazioni = ParamUtil.getDouble(request, "pagRilascioAttestazioni");
+ Double pagConsultazioniArchivio = ParamUtil.getDouble(request, "pagConsultazioniArchivio");
+ String importoSpeseIstruttoria = ParamUtil.getString(request, "importoSpeseIstruttoria");
// ADT: BUG FE ID=30 - CALCOLO IMPORTO
// controllo non effettuato se spese esente
boolean esenteSpeseIstruttoria = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId)
@@ -1971,34 +1966,33 @@ public class FascicoloFePortlet extends MVCPortlet {
throw new PortalException("You have not permission to create the payment for Collaudo " + collaudoId);
}
} else {
- SessionErrors.add(actionRequest, "pagamento-non-possibile");
+ SessionErrors.add(request, "pagamento-non-possibile");
}
}
- public void sostituisciPagamento(ActionRequest actionRequest, ActionResponse actionResponse)
- throws PortalException, SystemException {
+ public void sostituisciPagamento(ActionRequest request, ActionResponse response) throws PortalException,
+ SystemException {
try {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long pagamentoId = ParamUtil.getLong(actionRequest, "pagamentoId");
- String mezzo = ParamUtil.getString(actionRequest, "mezzo");
- String codiceFiscaleCommittente = ParamUtil.getString(actionRequest, "codiceFiscaleCommittente");
- String url = ParamUtil.getString(actionRequest, "url");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long pagamentoId = ParamUtil.getLong(request, "pagamentoId");
+ String mezzo = ParamUtil.getString(request, "mezzo");
+ String codiceFiscaleCommittente = ParamUtil.getString(request, "codiceFiscaleCommittente");
+ String url = ParamUtil.getString(request, "url");
PagamentoServiceUtil
.sostituisciPagamento(pagamentoId, codiceFiscaleCommittente, mezzo, url, serviceContext);
} catch (Exception e) {
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ PortalUtil.copyRequestParameters(request, response);
_log.error(e, e);
throw new SystemException(e);
}
}
- public void invioMailDelega(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException,
- SystemException {
+ public void invioMailDelega(ActionRequest request, ActionResponse response) throws PortalException, SystemException {
try {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long delegaId = ParamUtil.getLong(actionRequest, "delegaId");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long delegaId = ParamUtil.getLong(request, "delegaId");
Delega delega = DelegaLocalServiceUtil.getDelega(delegaId);
List soggetti = SoggettoLocalServiceUtil.getValidTmpByIntPratica_CodiceFiscale(
delega.getIntPraticaId(), delega.getCodiceFiscale(), 0L);
@@ -2028,30 +2022,30 @@ public class FascicoloFePortlet extends MVCPortlet {
}
}
- public void salvaStampaPratica(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException,
+ public void salvaStampaPratica(ActionRequest request, ActionResponse response) throws PortalException,
SystemException {
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
- ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
+ ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
long fileEntryId = IntPraticaLocalServiceUtil.generateReportPratica(intPratica, serviceContext.getUserId());
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(fileEntryId);
try {
- actionResponse.sendRedirect(DLUtil.getPreviewURL(fileEntry, fileEntry.getFileVersion(), themeDisplay,
+ response.sendRedirect(DLUtil.getPreviewURL(fileEntry, fileEntry.getFileVersion(), themeDisplay,
"&download=true"));
} catch (IOException e) {
- SessionErrors.add(actionRequest, "error-download-pdf-domanda");
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ SessionErrors.add(request, "error-download-pdf-domanda");
+ PortalUtil.copyRequestParameters(request, response);
}
}
- public void invioMailAsseverazione(ActionRequest actionRequest, ActionResponse actionResponse)
- throws PortalException, SystemException {
+ public void invioMailAsseverazione(ActionRequest request, ActionResponse response) throws PortalException,
+ SystemException {
try {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long asseverazioneId = ParamUtil.getLong(actionRequest, "asseverazioneId");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long asseverazioneId = ParamUtil.getLong(request, "asseverazioneId");
Asseverazione asseverazione = AsseverazioneLocalServiceUtil.getAsseverazione(asseverazioneId);
Soggetto soggetto = SoggettoLocalServiceUtil.getValidTmpByIntPratica_CodiceFiscale(
asseverazione.getIntPraticaId(), asseverazione.getCodiceFiscale(), 0L).get(0);
@@ -2087,11 +2081,11 @@ public class FascicoloFePortlet extends MVCPortlet {
}
}
- public void allegatoFilePagamento(ActionRequest actionRequest, ActionResponse actionResponse)
- throws PortalException, SystemException {
+ public void allegatoFilePagamento(ActionRequest request, ActionResponse response) throws PortalException,
+ SystemException {
try {
- UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest);
+ UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(request);
ServiceContext serviceContext = ServiceContextFactory.getInstance(uploadRequest);
long pagamentoId = ParamUtil.getLong(uploadRequest, "pagamentoId");
String sourceFileName = uploadRequest.getFileName("docFile");
@@ -2100,36 +2094,36 @@ public class FascicoloFePortlet extends MVCPortlet {
// validazione: solo alcune estensioni
String ext = FileUtil.getExtension(sourceFileName);
if (!ext.equalsIgnoreCase("p7m") && !ext.equalsIgnoreCase("pdf")) {
- SessionErrors.add(actionRequest, "error.geniocivilefe.pagamento.allegato.ext.valid");
+ SessionErrors.add(request, "error.geniocivilefe.pagamento.allegato.ext.valid");
}
// lunghezza fissata a 200
if (sourceFileName.length() > 200) {
- SessionErrors.add(actionRequest, "error.geniocivilefe.pagamento.allegato.length.valid");
+ SessionErrors.add(request, "error.geniocivilefe.pagamento.allegato.length.valid");
}
} else {
- SessionErrors.add(actionRequest, "error.geniocivilefe.pagamento.allegato.is.request");
+ SessionErrors.add(request, "error.geniocivilefe.pagamento.allegato.is.request");
}
- if (!SessionErrors.isEmpty(actionRequest)) {
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ if (!SessionErrors.isEmpty(request)) {
+ PortalUtil.copyRequestParameters(request, response);
} else {
- String numeroBollettino = ParamUtil.getString(actionRequest, "numeroBollettino");
+ String numeroBollettino = ParamUtil.getString(request, "numeroBollettino");
byte[] content = FileUtil.getBytes(file);
PagamentoServiceUtil.updatePagamentoManuale(pagamentoId, numeroBollettino, content, sourceFileName,
serviceContext);
}
} catch (Exception e) {
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ PortalUtil.copyRequestParameters(request, response);
_log.error("Error", e);
throw new SystemException(e);
}
}
- public void completeDomandaEsente(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException,
+ public void completeDomandaEsente(ActionRequest request, ActionResponse response) throws IOException,
PortalException, SystemException {
- long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
- long fineLavoriId = ParamUtil.getLong(actionRequest, "fineLavoriId");
- long collaudoId = ParamUtil.getLong(actionRequest, "collaudoId");
+ long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
+ long fineLavoriId = ParamUtil.getLong(request, "fineLavoriId");
+ long collaudoId = ParamUtil.getLong(request, "collaudoId");
if (Validator.isNotNull(dettPraticaId)) {
DettPraticaServiceUtil.updateEsito(dettPraticaId, WorkflowConstants.STATUS_APPROVED);
} else if (Validator.isNotNull(fineLavoriId)) {
@@ -2137,72 +2131,72 @@ public class FascicoloFePortlet extends MVCPortlet {
} else if (Validator.isNotNull(collaudoId)) {
CollaudoServiceUtil.updateEsito(collaudoId, WorkflowConstants.STATUS_APPROVED);
} else {
- SessionErrors.add(actionRequest, "completamento-integrazione-non-possibile");
+ SessionErrors.add(request, "completamento-integrazione-non-possibile");
}
}
- public void completeIntegrazione(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException,
+ public void completeIntegrazione(ActionRequest request, ActionResponse response) throws IOException,
PortalException, SystemException {
- long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
+ long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
if (Validator.isNotNull(dettPraticaId)) {
DettPraticaServiceUtil.updateEsitoIntegrazione(dettPraticaId, WorkflowConstants.STATUS_APPROVED);
} else {
- SessionErrors.add(actionRequest, "completamento-integrazione-non-possibile");
+ SessionErrors.add(request, "completamento-integrazione-non-possibile");
}
}
- public void completeCambioSoggetti(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException,
+ public void completeCambioSoggetti(ActionRequest request, ActionResponse response) throws IOException,
PortalException, SystemException {
- long dettPraticaId = ParamUtil.getLong(actionRequest, "dettPraticaId");
+ long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
if (Validator.isNotNull(dettPraticaId)) {
DettPraticaServiceUtil.updateEsito(dettPraticaId, WorkflowConstants.STATUS_APPROVED);
} else {
- SessionErrors.add(actionRequest, "completamento-cambio-soggetti-non-possibile");
+ SessionErrors.add(request, "completamento-cambio-soggetti-non-possibile");
}
}
- public void completeAnnullamento(ActionRequest actionRequest, ActionResponse actionResponse)
- throws PortalException, SystemException {
+ public void completeAnnullamento(ActionRequest request, ActionResponse response) throws PortalException,
+ SystemException {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
long userId = serviceContext.getUserId();
- boolean confimCheck = ParamUtil.getBoolean(actionRequest, "confirmCheck");
+ boolean confimCheck = ParamUtil.getBoolean(request, "confirmCheck");
if (confimCheck) {
if (Validator.isNotNull(intPraticaId)) {
IntPraticaServiceUtil.completeAnnullamento(intPraticaId, userId);
} else {
- SessionErrors.add(actionRequest, "completamento-annullamento-fascicolo-non-possibile");
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ SessionErrors.add(request, "completamento-annullamento-fascicolo-non-possibile");
+ PortalUtil.copyRequestParameters(request, response);
}
} else {
- SessionErrors.add(actionRequest, "annullamento-fascicolo-not-checked");
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ SessionErrors.add(request, "annullamento-fascicolo-not-checked");
+ PortalUtil.copyRequestParameters(request, response);
}
}
- public void cloneFascicolo(ActionRequest actionRequest, ActionResponse actionResponse) {
+ public void cloneFascicolo(ActionRequest request, ActionResponse response) {
try {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- long intPraticaId = ParamUtil.getLong(actionRequest, "intPraticaId");
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
IntPraticaLocalServiceUtil.cloneIntPratica(intPraticaId, serviceContext);
} catch (Exception e) {
- SessionErrors.add(actionRequest, "clone-fascicolo-not-possible");
+ SessionErrors.add(request, "clone-fascicolo-not-possible");
}
}
- public void rigeneraPagamento(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException,
+ public void rigeneraPagamento(ActionRequest request, ActionResponse response) throws PortalException,
SystemException, InterruptedException {
- ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
+ ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
serviceContext.setCompanyId(themeDisplay.getCompanyId());
- HttpServletRequest request = PortalUtil.getHttpServletRequest(actionRequest);
- String url = PortalUtil.getCurrentCompleteURL(request);
- long pagamentoId = ParamUtil.getLong(actionRequest, "pagamentoId", 0L);
+ HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(request);
+ String url = PortalUtil.getCurrentCompleteURL(httpRequest);
+ long pagamentoId = ParamUtil.getLong(request, "pagamentoId", 0L);
if (pagamentoId != 0L) {
PagamentoLocalServiceUtil.annullaPagamento(pagamentoId);
Thread.sleep(2000);
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/SoggettiPraticaPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/SoggettiPraticaPortlet.java
index 3788d60a..fc661904 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/SoggettiPraticaPortlet.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/SoggettiPraticaPortlet.java
@@ -322,68 +322,86 @@ public class SoggettiPraticaPortlet extends MVCPortlet {
}
@Override
- public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException,
- PortletException {
+ public void serveResource(ResourceRequest request, ResourceResponse response) throws IOException, PortletException {
- String id = resourceRequest.getResourceID();
try {
- ServiceContext serviceContext = ServiceContextFactory.getInstance(resourceRequest);
- if ("compilaSoggetti".equals(id)) {
- long userId = ParamUtil.getLong(resourceRequest, "userId", 0L);
- String codiceFiscale = ParamUtil.getString(resourceRequest, "codiceFiscale");
- String tipologiaSoggetto = ParamUtil.getString(resourceRequest, "tipologiaSoggetto");
- JSONArray jsonSoggetti = JSONFactoryUtil.createJSONArray();
- if (Validator.isNotNull(userId) && Validator.isNotNull(codiceFiscale)
- && Validator.isNotNull(tipologiaSoggetto)) {
- OrderByComparator orderByComparator = OrderByComparatorFactoryUtil.create("portos_bo_soggetto",
- "createDate", false);
- List soggetti = SoggettoLocalServiceUtil.findByUserId_CodiceFiscale_TipologiaSoggetto(
- userId, codiceFiscale, tipologiaSoggetto, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
- orderByComparator);
- if (soggetti.isEmpty()) {
- soggetti = SoggettoLocalServiceUtil.findByUserId_CodiceFiscale(userId, codiceFiscale,
- QueryUtil.ALL_POS, QueryUtil.ALL_POS, orderByComparator);
- }
- for (Soggetto soggetto : soggetti) {
- JSONSerializer jsonSerializer = JSONFactoryUtil.createJSONSerializer();
- jsonSerializer.exclude("class");
- String serialized = jsonSerializer.serialize(SoggettoSoap.toSoapModel(soggetto));
- jsonSoggetti.put(serialized);
- }
- }
- writeJSON(resourceRequest, resourceResponse, jsonSoggetti);
- } else if ("province".equals(id)) {
- JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
- List province = ProvinciaLocalServiceUtil.findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS,
- OrderByComparatorFactoryUtil.create("portos_bo_Provincia", "provincia", true));
- for (Provincia provincia : province) {
- JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
- jsonObject.put("provinciaId", provincia.getCodiceProvincia());
- jsonObject.put("descLong", provincia.getSigla() + "- " + provincia.getProvincia());
- jsonArray.put(jsonObject);
- }
- writeJSON(resourceRequest, resourceResponse, jsonArray);
- } else if ("comuni".equals(id)) {
- String codiceProvincia = ParamUtil.getString(resourceRequest, "provinciaId");
- JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
- if (Validator.isNotNull(codiceProvincia) && Validator.isNotNull(codiceProvincia)) {
- List comuni = ComuneLocalServiceUtil.findByCompanyIdCodiceProvincia(
- serviceContext.getCompanyId(), codiceProvincia, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
- OrderByComparatorFactoryUtil.create("portos_bo_Comune", "denominazione", true));
- for (Comune comune : comuni) {
- JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
- jsonObject.put("comuneId", comune.getComuneId());
- jsonObject.put("descLong", comune.getDenominazione());
- jsonArray.put(jsonObject);
- }
- }
- writeJSON(resourceRequest, resourceResponse, jsonArray);
- } else {
- super.serveResource(resourceRequest, resourceResponse);
+ switch (request.getResourceID()) {
+ case "compilaSoggetti":
+ resourceCompilaSoggetti(request, response);
+ break;
+ case "comuni":
+ resourceComuni(request, response);
+ break;
+ case "province":
+ resourceProvince(request, response);
+ break;
+ default:
+ super.serveResource(request, response);
}
} catch (Exception e) {
_log.error(e, e);
throw new IOException(e);
}
}
+
+ private void resourceCompilaSoggetti(ResourceRequest request, ResourceResponse response) throws IOException,
+ SystemException {
+
+ long userId = ParamUtil.getLong(request, "userId", 0L);
+ String codiceFiscale = ParamUtil.getString(request, "codiceFiscale");
+ String tipologiaSoggetto = ParamUtil.getString(request, "tipologiaSoggetto");
+ JSONArray result = JSONFactoryUtil.createJSONArray();
+ if (Validator.isNotNull(userId) && Validator.isNotNull(codiceFiscale) && Validator.isNotNull(tipologiaSoggetto)) {
+ OrderByComparator orderByComparator = OrderByComparatorFactoryUtil.create("portos_bo_soggetto",
+ "createDate", false);
+ List soggetti = SoggettoLocalServiceUtil.findByUserId_CodiceFiscale_TipologiaSoggetto(userId,
+ codiceFiscale, tipologiaSoggetto, QueryUtil.ALL_POS, QueryUtil.ALL_POS, orderByComparator);
+ if (soggetti.isEmpty()) {
+ soggetti = SoggettoLocalServiceUtil.findByUserId_CodiceFiscale(userId, codiceFiscale,
+ QueryUtil.ALL_POS, QueryUtil.ALL_POS, orderByComparator);
+ }
+ for (Soggetto soggetto : soggetti) {
+ JSONSerializer jsonSerializer = JSONFactoryUtil.createJSONSerializer();
+ jsonSerializer.exclude("class");
+ String serialized = jsonSerializer.serialize(SoggettoSoap.toSoapModel(soggetto));
+ result.put(serialized);
+ }
+ }
+ writeJSON(request, response, result);
+ }
+
+ private void resourceComuni(ResourceRequest request, ResourceResponse response) throws IOException,
+ PortalException, SystemException {
+
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
+ String codiceProvincia = ParamUtil.getString(request, "provinciaId");
+ JSONArray result = JSONFactoryUtil.createJSONArray();
+ if (Validator.isNotNull(codiceProvincia) && Validator.isNotNull(codiceProvincia)) {
+ List comuni = ComuneLocalServiceUtil.findByCompanyIdCodiceProvincia(serviceContext.getCompanyId(),
+ codiceProvincia, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
+ OrderByComparatorFactoryUtil.create("portos_bo_Comune", "denominazione", true));
+ for (Comune comune : comuni) {
+ JSONObject jso = JSONFactoryUtil.createJSONObject();
+ jso.put("comuneId", comune.getComuneId());
+ jso.put("descLong", comune.getDenominazione());
+ result.put(jso);
+ }
+ }
+ writeJSON(request, response, result);
+ }
+
+ private void resourceProvince(ResourceRequest request, ResourceResponse response) throws IOException,
+ SystemException {
+
+ JSONArray result = JSONFactoryUtil.createJSONArray();
+ List province = ProvinciaLocalServiceUtil.findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS,
+ OrderByComparatorFactoryUtil.create("portos_bo_Provincia", "provincia", true));
+ for (Provincia provincia : province) {
+ JSONObject jso = JSONFactoryUtil.createJSONObject();
+ jso.put("provinciaId", provincia.getCodiceProvincia());
+ jso.put("descLong", provincia.getSigla() + "- " + provincia.getProvincia());
+ result.put(jso);
+ }
+ writeJSON(request, response, result);
+ }
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/advanced_search.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/advanced_search.jsp
index 6ac9ebed..bf0d9034 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/advanced_search.jsp
+++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/advanced_search.jsp
@@ -14,59 +14,26 @@