Sfoglia il codice sorgente

Cambio branch

master
Salvatore La Manna 4 anni fa
parent
commit
d843831516
  1. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml
  2. 317
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java
  3. 9
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/ControlloPraticaModelListener.java
  4. 36
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/DettPraticaModelListener.java
  5. 29
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/DocPraticaModelListener.java
  6. 24
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/IntPraticaModelListener.java
  7. 136
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoInstanceModelListener.java
  8. 183
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoLogModelListener.java
  9. 152
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoTaskInstanceTokenModelListener.java
  10. 29
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/SoggettoModelListener.java
  11. 14
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/SismicaAdministrationPortlet.java
  12. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java
  13. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java
  14. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  15. 66
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp
  16. 37
      liferay-plugins-sdk-6.2/portlets/portos-importazione-portlet/bin/.project

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml

@ -406,7 +406,7 @@
<portlet-name>portos-administration</portlet-name> <portlet-name>portos-administration</portlet-name>
<display-name>Amministrazione Sismica</display-name> <display-name>Amministrazione Sismica</display-name>
<portlet-class> <portlet-class>
it.tref.liferay.portos.bo.portlet.PortosAdministrationPortlet it.tref.liferay.portos.bo.portlet.SismicaAdministrationPortlet
</portlet-class> </portlet-class>
<init-param> <init-param>
<name>view-template</name> <name>view-template</name>

317
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java

@ -8,6 +8,7 @@ package it.mwg.sismica.bo.util;
import it.tref.liferay.portos.bo.model.AllegatoManuale; import it.tref.liferay.portos.bo.model.AllegatoManuale;
import it.tref.liferay.portos.bo.model.Asseverazione; import it.tref.liferay.portos.bo.model.Asseverazione;
import it.tref.liferay.portos.bo.model.Avviso; import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.model.Collaudo;
import it.tref.liferay.portos.bo.model.ControlloPratica; import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.DocAggiuntiva; import it.tref.liferay.portos.bo.model.DocAggiuntiva;
@ -16,9 +17,11 @@ import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.model.ParereGeologo; import it.tref.liferay.portos.bo.model.ParereGeologo;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.model.impl.CollaudoImpl;
import it.tref.liferay.portos.bo.service.AllegatoManualeLocalServiceUtil; import it.tref.liferay.portos.bo.service.AllegatoManualeLocalServiceUtil;
import it.tref.liferay.portos.bo.service.AsseverazioneLocalServiceUtil; import it.tref.liferay.portos.bo.service.AsseverazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil; import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.CollaudoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil; import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
@ -47,6 +50,9 @@ import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.TreeMap; import java.util.TreeMap;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import com.liferay.counter.service.CounterLocalServiceUtil; import com.liferay.counter.service.CounterLocalServiceUtil;
import com.liferay.portal.NoSuchResourcePermissionException; import com.liferay.portal.NoSuchResourcePermissionException;
import com.liferay.portal.kernel.dao.orm.QueryUtil; import com.liferay.portal.kernel.dao.orm.QueryUtil;
@ -57,11 +63,14 @@ import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.repository.model.FileEntry; import com.liferay.portal.kernel.repository.model.FileEntry;
import com.liferay.portal.kernel.repository.model.Folder; import com.liferay.portal.kernel.repository.model.Folder;
import com.liferay.portal.kernel.servlet.SessionErrors;
import com.liferay.portal.kernel.util.GetterUtil; import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.LocaleUtil; import com.liferay.portal.kernel.util.LocaleUtil;
import com.liferay.portal.kernel.util.OrderByComparatorFactoryUtil; import com.liferay.portal.kernel.util.OrderByComparatorFactoryUtil;
import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.util.WebKeys;
import com.liferay.portal.kernel.workflow.WorkflowException; import com.liferay.portal.kernel.workflow.WorkflowException;
import com.liferay.portal.kernel.workflow.WorkflowHandlerRegistryUtil; import com.liferay.portal.kernel.workflow.WorkflowHandlerRegistryUtil;
import com.liferay.portal.kernel.workflow.WorkflowInstance; import com.liferay.portal.kernel.workflow.WorkflowInstance;
@ -83,6 +92,7 @@ import com.liferay.portal.service.ResourcePermissionLocalServiceUtil;
import com.liferay.portal.service.RoleLocalServiceUtil; import com.liferay.portal.service.RoleLocalServiceUtil;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil; import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.theme.ThemeDisplay;
import com.liferay.portal.workflow.kaleo.model.KaleoInstanceToken; import com.liferay.portal.workflow.kaleo.model.KaleoInstanceToken;
import com.liferay.portal.workflow.kaleo.model.KaleoTaskAssignmentInstance; import com.liferay.portal.workflow.kaleo.model.KaleoTaskAssignmentInstance;
import com.liferay.portal.workflow.kaleo.model.KaleoTaskInstanceToken; import com.liferay.portal.workflow.kaleo.model.KaleoTaskInstanceToken;
@ -91,6 +101,8 @@ import com.liferay.portal.workflow.kaleo.service.KaleoTaskAssignmentInstanceLoca
import com.liferay.portal.workflow.kaleo.service.KaleoTaskInstanceTokenLocalServiceUtil; import com.liferay.portal.workflow.kaleo.service.KaleoTaskInstanceTokenLocalServiceUtil;
import com.liferay.portlet.documentlibrary.model.DLFileEntry; import com.liferay.portlet.documentlibrary.model.DLFileEntry;
import com.liferay.portlet.documentlibrary.model.DLFolder; import com.liferay.portlet.documentlibrary.model.DLFolder;
import com.liferay.portlet.documentlibrary.service.DLAppHelperLocalServiceUtil;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
import com.liferay.portlet.documentlibrary.service.DLAppServiceUtil; import com.liferay.portlet.documentlibrary.service.DLAppServiceUtil;
import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil; import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil;
@ -225,6 +237,81 @@ public class SismicaUtil {
return esito; return esito;
} }
public static void sostituisciDL(ActionRequest actionRequest, ActionResponse actionResponse) {
}
public static void inviaAvviso(ActionRequest actionRequest, ActionResponse actionResponse)
throws SystemException {
List<String> esito = new ArrayList<>();
ThemeDisplay td = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
long companyId = td.getCompanyId();
String tipoAvviso = ParamUtil.getString(actionRequest, "tipoAvviso");
actionResponse.setRenderParameter("tipoAvviso", tipoAvviso);
if (Validator.isNull(tipoAvviso)) {
SessionErrors.add(actionRequest, "invia-avviso-tipo-obbligatorio");
}
String numeroProgetto = ParamUtil.getString(actionRequest, "numeroProgetto");
actionResponse.setRenderParameter("numeroProgetto", numeroProgetto);
if (Validator.isNull(numeroProgetto)) {
SessionErrors.add(actionRequest, "invia-avviso-progetto-obbligatorio");
}
IntPratica intPratica = IntPraticaLocalServiceUtil.findByNumeroProgetto(numeroProgetto);
if (Validator.isNull(intPratica)) {
SessionErrors.add(actionRequest, "invia-avviso-progetto-inesistente");
return;
}
long intPraticaId = intPratica.getIntPraticaId();
List<ControlloPratica> controlli = ControlloPraticaLocalServiceUtil.findByIntPratica(intPraticaId);
long controlloPraticaId = 0;
for (ControlloPratica controllo : controlli) {
controlloPraticaId = controllo.getControlloPraticaId();
}
String tipoDocumento = null;
String className = null;
long classPk = 0;
switch (tipoAvviso) {
case StatoPraticaConstants.COLLAUDO:
List<Collaudo> collaudi = CollaudoLocalServiceUtil.findByIntPraticaId_Completata(intPraticaId,
true, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
OrderByComparatorFactoryUtil.create(CollaudoImpl.TABLE_NAME, "dtProtocollo", true));
Collaudo collaudo = null;
for (Collaudo el : collaudi) {
if (Validator.isNotNull(el.getDtProtocollo())) {
collaudo = el;
}
}
if (Validator.isNull(collaudo)) {
SessionErrors.add(actionRequest, "invia-avviso-collaudo-non-trovato");
return;
}
tipoDocumento = StatoPraticaConstants.VIDIMATA;
className = Collaudo.class.getName();
classPk = collaudo.getPrimaryKey();
controlloPraticaId = 0;
break;
default:
SessionErrors.add(actionRequest, "operazione-non-supportata");
return;
}
String templateName = AvvisoUtil.getAllTipoDocumentoFileTemplateProps().get(tipoAvviso);
long template = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, templateName);
esito.add("template = " + templateName);
try {
AvvisoLocalServiceUtil.addAvviso(intPraticaId, StringPool.BLANK, new Date(),
AvvisoUtil.TIPO_AVVISO_DIRETTO, tipoDocumento, template, classPk, className,
controlloPraticaId, getServiceContextbyIntPratica(intPratica));
} catch (PortalException e) {
SessionErrors.add(actionRequest, "errore-generico");
esito.add("Errore durante la generazione dell'avviso: " + e.getMessage());
}
actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()]));
}
public static List<String> riparaWorkflow(long companyId, long userId) { public static List<String> riparaWorkflow(long companyId, long userId) {
List<String> esito = new ArrayList<>(); List<String> esito = new ArrayList<>();
esito.addAll(riparaConformita(companyId)); esito.addAll(riparaConformita(companyId));
@ -411,39 +498,25 @@ public class SismicaUtil {
esito.add("Errore caricamento intPratiche: " + e.getMessage()); esito.add("Errore caricamento intPratiche: " + e.getMessage());
} }
start += SLICE; start += SLICE;
List<Avviso> avvisi = null;
for (IntPratica pratica : pratiche) { for (IntPratica pratica : pratiche) {
List<Avviso> avvisi = null;
List<Avviso> totali = null;
String stato = pratica.getStatoPratica(); String stato = pratica.getStatoPratica();
// Avvisi conformi
try {
avvisi = AvvisoLocalServiceUtil.findByIntPraticaId_tipoDocumento(
pratica.getIntPraticaId(), StatoPraticaConstants.CONFORME);
} catch (SystemException e) {
avvisi = new ArrayList<>();
}
// Tutti gli avvisi
try {
totali = AvvisoLocalServiceUtil.findByIntPratica(pratica.getIntPraticaId(),
QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
} catch (SystemException e) {
totali = new ArrayList<>();
}
if (Validator.isNotNull(stato) && Validator.isNotNull(pratica.getTipoProcedura()) if (Validator.isNotNull(stato) && Validator.isNotNull(pratica.getTipoProcedura())
&& pratica.getTipoPratica().equalsIgnoreCase(Constants.TIPO_PRATICA_DEPOSITO)) { && pratica.getTipoPratica().equalsIgnoreCase(Constants.TIPO_PRATICA_DEPOSITO)) {
// Dettaglio pratica
DettPratica dettPratica = null;
try { try {
dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(pratica avvisi = AvvisoLocalServiceUtil.findByIntPraticaId_tipoDocumento(
.getIntPraticaId()); pratica.getIntPraticaId(), StatoPraticaConstants.CONFORME);
} catch (SystemException e) { } catch (SystemException e) {
esito.add("Errore caricamento avvisi: " + e.getMessage());
} }
List<Avviso> totali = null;
if (Validator.isNotNull(dettPratica)) { try {
// Controllo pratica totali = AvvisoLocalServiceUtil.findByIntPratica(pratica.getIntPraticaId(),
QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
} catch (SystemException e) {
totali = new ArrayList<>();
}
if ((avvisi.size() == 0) && stato.equalsIgnoreCase(StatoPraticaConstants.VIDIMATA)) {
List<ControlloPratica> controlli = null; List<ControlloPratica> controlli = null;
try { try {
controlli = ControlloPraticaLocalServiceUtil.findByIntPratica(pratica controlli = ControlloPraticaLocalServiceUtil.findByIntPratica(pratica
@ -451,71 +524,68 @@ public class SismicaUtil {
} catch (SystemException e) { } catch (SystemException e) {
controlli = new ArrayList<>(); controlli = new ArrayList<>();
} }
ControlloPratica controllo = null; if (pratica.getStatoPratica().equals(StatoPraticaConstants.VIDIMATA)
if (controlli.size() > 0) { && (controlli.size() == 0)) {
controllo = controlli.get(controlli.size() - 1); esito.add("Progetto: " + pratica.getNumeroProgetto() + " ("
} + pratica.getIntPraticaId() + "), procedura="
+ pratica.getTipoProcedura() + ", avvisi=" + totali.size() + ", stato="
boolean totaliOk = (totali.size() == 0) + pratica.getStatoPratica() + ", controlli=" + controlli.size());
|| ((totali.size() == 1) && totali.get(0).getTipoDocumento()
.equalsIgnoreCase(StatoPraticaConstants.VIDIMATA)); DettPratica dettPratica;
if ((avvisi.size() == 0 && stato.equalsIgnoreCase(StatoPraticaConstants.VIDIMATA)) try {
|| (totaliOk && stato.equalsIgnoreCase(StatoPraticaConstants.CONFORME))) { dettPratica = DettPraticaLocalServiceUtil
.getLastCompletedByIntPratica(pratica.getIntPraticaId());
} catch (SystemException e) {
dettPratica = null;
}
ServiceContext serviceContext = new ServiceContext(); if (Validator.isNotNull(dettPratica)) {
serviceContext.setCompanyId(dettPratica.getCompanyId()); ServiceContext serviceContext = new ServiceContext();
serviceContext.setScopeGroupId(dettPratica.getGroupId()); serviceContext.setCompanyId(dettPratica.getCompanyId());
serviceContext.setUserId(dettPratica.getUserId()); serviceContext.setScopeGroupId(dettPratica.getGroupId());
serviceContext.setUserId(dettPratica.getUserId());
if (Validator.isNull(controllo)) { ControlloPratica controllo;
try { try {
controllo = ControlloPraticaLocalServiceUtil.addControlloPratica( controllo = ControlloPraticaLocalServiceUtil.addControlloPratica(
dettPratica.getGroupId(), dettPratica.getUserId(), dettPratica.getGroupId(), dettPratica.getUserId(),
pratica.getIntPraticaId(), dettPratica.getDettPraticaId(), false, pratica.getIntPraticaId(), dettPratica.getDettPraticaId(), false,
serviceContext); serviceContext);
} catch (PortalException | SystemException e) { } catch (PortalException | SystemException e) {
controllo = null;
} }
} if (Validator.isNotNull(controllo)) {
if (Validator.isNotNull(controllo)) { controllo.setStatus(WorkflowConstants.STATUS_APPROVED);
controllo.setStatus(WorkflowConstants.STATUS_APPROVED); try {
try { ControlloPraticaLocalServiceUtil.updateControlloPratica(controllo);
ControlloPraticaLocalServiceUtil.updateControlloPratica(controllo); } catch (SystemException e) {
} catch (SystemException e) { }
}
long fileEntryIdTemplate;
try {
fileEntryIdTemplate = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(
companyId, "conf.geniocivile.avviso.template.id.deposito.B2");
} catch (SystemException e) {
fileEntryIdTemplate = 0;
}
_log.info("Pratica " long fileEntryIdTemplate;
+ pratica.getNumeroProgetto()
+ ", totali.size() = "
+ totali.size()
+ (totali.size() > 0 ? ", totali(0) = "
+ totali.get(0).getTipoDocumento() : "")
+ ", avvisi.size() = " + avvisi.size() + ", stato = " + stato
+ ", controllo = " + controllo.getPrimaryKey()
+ ", fileEntryIdTemplate = " + fileEntryIdTemplate);
if (Validator.isNotNull(fileEntryIdTemplate)) {
try { try {
if (!pratica.getTipoProcedura().equalsIgnoreCase( fileEntryIdTemplate = ConfigurazioneLocalServiceUtil
Constants.PROCEDURA_C)) { .findByC_ChiaveLong(companyId,
AvvisoLocalServiceUtil.addAvviso(pratica.getIntPraticaId(), "conf.geniocivile.avviso.template.id.deposito.B2");
"Attestazione di deposito progetto", new Date(), } catch (SystemException e) {
AvvisoUtil.TIPO_AVVISO_DIRETTO, fileEntryIdTemplate = 0;
StatoPraticaConstants.CONFORME, fileEntryIdTemplate, }
dettPratica.getDettPraticaId(),
DettPratica.class.getName(), if (Validator.isNotNull(fileEntryIdTemplate)) {
controllo.getControlloPraticaId(), serviceContext); try {
if (!pratica.getTipoProcedura().equalsIgnoreCase(
Constants.PROCEDURA_C)) {
AvvisoLocalServiceUtil.addAvviso(pratica.getIntPraticaId(),
"Attestazione di deposito progetto", new Date(),
AvvisoUtil.TIPO_AVVISO_DIRETTO,
StatoPraticaConstants.CONFORME, fileEntryIdTemplate,
dettPratica.getDettPraticaId(),
DettPratica.class.getName(),
controllo.getControlloPraticaId(), serviceContext);
}
pratica.setStatoPratica(StatoPraticaConstants.CONFORME);
IntPraticaLocalServiceUtil.updateIntPratica(pratica);
} catch (PortalException | SystemException e) {
} }
pratica.setStatoPratica(StatoPraticaConstants.CONFORME);
IntPraticaLocalServiceUtil.updateIntPratica(pratica);
} catch (PortalException | SystemException e) {
} }
} }
} }
@ -1066,6 +1136,7 @@ public class SismicaUtil {
int inizio = 0; int inizio = 0;
int totali = 0; int totali = 0;
int corretti = 0;
List<AllegatoManuale> documenti = null; List<AllegatoManuale> documenti = null;
String tipoDocumento = null; String tipoDocumento = null;
do { do {
@ -1086,11 +1157,11 @@ public class SismicaUtil {
try { try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId()); fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId());
} catch (Exception e) { } catch (Exception e) {
_log.info(e.getClass() + ": " + e.getMessage()); // _log.info(e.getClass() + ": " + e.getMessage());
} }
esito.addAll(riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry,
"Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() "Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId()
+ "), " + tipoDocumento + " " + documento.getPrimaryKey())); + "), " + tipoDocumento + " " + documento.getPrimaryKey());
} }
} }
inizio += SLICE; inizio += SLICE;
@ -1099,6 +1170,7 @@ public class SismicaUtil {
_log.info(totali + " " + tipoDocumento); _log.info(totali + " " + tipoDocumento);
} }
} while (documenti.size() > 0); } while (documenti.size() > 0);
_log.info("Corretti " + corretti + " " + tipoDocumento);
return esito; return esito;
} }
@ -1108,6 +1180,7 @@ public class SismicaUtil {
int inizio = 0; int inizio = 0;
int totali = 0; int totali = 0;
int corretti = 0;
List<Asseverazione> documenti = null; List<Asseverazione> documenti = null;
String tipoDocumento = null; String tipoDocumento = null;
do { do {
@ -1128,11 +1201,11 @@ public class SismicaUtil {
try { try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId()); fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId());
} catch (Exception e) { } catch (Exception e) {
_log.info(e.getClass() + ": " + e.getMessage()); // _log.info(e.getClass() + ": " + e.getMessage());
} }
esito.addAll(riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry,
"Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() "Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId()
+ "), " + tipoDocumento + " " + documento.getPrimaryKey())); + "), " + tipoDocumento + " " + documento.getPrimaryKey());
} }
} }
inizio += SLICE; inizio += SLICE;
@ -1141,6 +1214,7 @@ public class SismicaUtil {
_log.info(totali + " " + tipoDocumento); _log.info(totali + " " + tipoDocumento);
} }
} while (documenti.size() > 0); } while (documenti.size() > 0);
_log.info("Corretti " + corretti + " " + tipoDocumento);
return esito; return esito;
} }
@ -1149,6 +1223,7 @@ public class SismicaUtil {
int inizio = 0; int inizio = 0;
int totali = 0; int totali = 0;
int corretti = 0;
List<Avviso> documenti = null; List<Avviso> documenti = null;
String tipoDocumento = null; String tipoDocumento = null;
do { do {
@ -1169,11 +1244,11 @@ public class SismicaUtil {
try { try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryIdBase()); fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryIdBase());
} catch (Exception e) { } catch (Exception e) {
_log.info(e.getClass() + ": " + e.getMessage()); // _log.info(e.getClass() + ": " + e.getMessage());
} }
esito.addAll(riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry,
"Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() "Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId()
+ "), " + tipoDocumento + " " + documento.getPrimaryKey())); + "), " + tipoDocumento + " " + documento.getPrimaryKey());
} }
if (Validator.isNotNull(pratica) && (documento.getFileEntryIdInvio() != 0)) { if (Validator.isNotNull(pratica) && (documento.getFileEntryIdInvio() != 0)) {
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica
@ -1182,11 +1257,11 @@ public class SismicaUtil {
try { try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryIdInvio()); fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryIdInvio());
} catch (Exception e) { } catch (Exception e) {
_log.info(e.getClass() + ": " + e.getMessage()); // _log.info(e.getClass() + ": " + e.getMessage());
} }
esito.addAll(riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry,
"Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() "Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId()
+ "), " + tipoDocumento + " " + documento.getPrimaryKey())); + "), " + tipoDocumento + " " + documento.getPrimaryKey());
} }
if (Validator.isNotNull(pratica) && (documento.getFileEntryIdProtocollo() != 0)) { if (Validator.isNotNull(pratica) && (documento.getFileEntryIdProtocollo() != 0)) {
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica
@ -1195,11 +1270,11 @@ public class SismicaUtil {
try { try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryIdProtocollo()); fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryIdProtocollo());
} catch (Exception e) { } catch (Exception e) {
_log.info(e.getClass() + ": " + e.getMessage()); // _log.info(e.getClass() + ": " + e.getMessage());
} }
esito.addAll(riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry,
"Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() "Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId()
+ "), " + tipoDocumento + " " + documento.getPrimaryKey())); + "), " + tipoDocumento + " " + documento.getPrimaryKey());
} }
} }
inizio += SLICE; inizio += SLICE;
@ -1208,6 +1283,7 @@ public class SismicaUtil {
_log.info(totali + " " + tipoDocumento); _log.info(totali + " " + tipoDocumento);
} }
} while (documenti.size() > 0); } while (documenti.size() > 0);
_log.info("Corretti " + corretti + " " + tipoDocumento);
return esito; return esito;
} }
@ -1217,6 +1293,7 @@ public class SismicaUtil {
int inizio = 0; int inizio = 0;
int totali = 0; int totali = 0;
int corretti = 0;
List<DocAggiuntiva> documenti = null; List<DocAggiuntiva> documenti = null;
String tipoDocumento = null; String tipoDocumento = null;
do { do {
@ -1237,11 +1314,11 @@ public class SismicaUtil {
try { try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId()); fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId());
} catch (Exception e) { } catch (Exception e) {
_log.info(e.getClass() + ": " + e.getMessage()); // _log.info(e.getClass() + ": " + e.getMessage());
} }
esito.addAll(riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry,
"Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() "Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId()
+ "), " + tipoDocumento + " " + documento.getPrimaryKey())); + "), " + tipoDocumento + " " + documento.getPrimaryKey());
} }
} }
inizio += SLICE; inizio += SLICE;
@ -1250,6 +1327,7 @@ public class SismicaUtil {
_log.info(totali + " " + tipoDocumento); _log.info(totali + " " + tipoDocumento);
} }
} while (documenti.size() > 0); } while (documenti.size() > 0);
_log.info("Corretti " + corretti + " " + tipoDocumento);
return esito; return esito;
} }
@ -1259,6 +1337,7 @@ public class SismicaUtil {
int inizio = 0; int inizio = 0;
int totali = 0; int totali = 0;
int corretti = 0;
List<DocPratica> documenti = null; List<DocPratica> documenti = null;
String tipoDocumento = null; String tipoDocumento = null;
do { do {
@ -1279,11 +1358,11 @@ public class SismicaUtil {
try { try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getDlFileEntryId()); fileEntry = DLAppServiceUtil.getFileEntry(documento.getDlFileEntryId());
} catch (Exception e) { } catch (Exception e) {
_log.info(e.getClass() + ": " + e.getMessage()); // _log.info(e.getClass() + ": " + e.getMessage());
} }
esito.addAll(riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry,
"Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() "Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId()
+ "), " + tipoDocumento + " " + documento.getPrimaryKey())); + "), " + tipoDocumento + " " + documento.getPrimaryKey());
} }
} }
inizio += SLICE; inizio += SLICE;
@ -1292,6 +1371,7 @@ public class SismicaUtil {
_log.info(totali + " " + tipoDocumento); _log.info(totali + " " + tipoDocumento);
} }
} while (documenti.size() > 0); } while (documenti.size() > 0);
_log.info("Corretti " + corretti + " " + tipoDocumento);
return esito; return esito;
} }
@ -1301,6 +1381,7 @@ public class SismicaUtil {
int inizio = 0; int inizio = 0;
int totali = 0; int totali = 0;
int corretti = 0;
List<Pagamento> documenti = null; List<Pagamento> documenti = null;
String tipoDocumento = null; String tipoDocumento = null;
do { do {
@ -1321,11 +1402,11 @@ public class SismicaUtil {
try { try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId()); fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId());
} catch (Exception e) { } catch (Exception e) {
_log.info(e.getClass() + ": " + e.getMessage()); // _log.info(e.getClass() + ": " + e.getMessage());
} }
esito.addAll(riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry,
"Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() "Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId()
+ "), " + tipoDocumento + " " + documento.getPrimaryKey())); + "), " + tipoDocumento + " " + documento.getPrimaryKey());
} }
} }
inizio += SLICE; inizio += SLICE;
@ -1334,6 +1415,7 @@ public class SismicaUtil {
_log.info(totali + " " + tipoDocumento); _log.info(totali + " " + tipoDocumento);
} }
} while (documenti.size() > 0); } while (documenti.size() > 0);
_log.info("Corretti " + corretti + " " + tipoDocumento);
return esito; return esito;
} }
@ -1343,6 +1425,7 @@ public class SismicaUtil {
int inizio = 0; int inizio = 0;
int totali = 0; int totali = 0;
int corretti = 0;
List<ParereGeologo> documenti = null; List<ParereGeologo> documenti = null;
String tipoDocumento = null; String tipoDocumento = null;
do { do {
@ -1363,11 +1446,11 @@ public class SismicaUtil {
try { try {
fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId()); fileEntry = DLAppServiceUtil.getFileEntry(documento.getFileEntryId());
} catch (Exception e) { } catch (Exception e) {
_log.info(e.getClass() + ": " + e.getMessage()); // _log.info(e.getClass() + ": " + e.getMessage());
} }
esito.addAll(riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry, corretti += riparaPermessiFileEntry(companyId, territorio.getGroupId(), fileEntry,
"Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId() "Pratica " + pratica.getNumeroProgetto() + " (" + pratica.getIntPraticaId()
+ "), " + tipoDocumento + " " + documento.getPrimaryKey())); + "), " + tipoDocumento + " " + documento.getPrimaryKey());
} }
} }
inizio += SLICE; inizio += SLICE;
@ -1376,12 +1459,13 @@ public class SismicaUtil {
_log.info(totali + " " + tipoDocumento); _log.info(totali + " " + tipoDocumento);
} }
} while (documenti.size() > 0); } while (documenti.size() > 0);
_log.info("Corretti " + corretti + " " + tipoDocumento);
return esito; return esito;
} }
private static List<String> riparaPermessiFileEntry(long companyId, long groupId, FileEntry fileEntry, private static int riparaPermessiFileEntry(long companyId, long groupId, FileEntry fileEntry,
String datiDocumento) throws PortalException, SystemException { String datiDocumento) throws PortalException, SystemException {
List<String> esito = new ArrayList<>(); int corretti = 0;
if (Validator.isNotNull(fileEntry)) { if (Validator.isNotNull(fileEntry)) {
PermissionChecker pc = orgPc.get(groupId); PermissionChecker pc = orgPc.get(groupId);
if (!fileEntry.containsPermission(pc, ActionKeys.VIEW)) { if (!fileEntry.containsPermission(pc, ActionKeys.VIEW)) {
@ -1429,9 +1513,10 @@ public class SismicaUtil {
} }
folder = folder.getParentFolder(); folder = folder.getParentFolder();
} }
corretti = 1;
} }
} }
return esito; return corretti;
} }
public static List<String> generaDocumenti2(long companyId) throws SystemException, PortalException { public static List<String> generaDocumenti2(long companyId) throws SystemException, PortalException {
@ -1530,7 +1615,7 @@ public class SismicaUtil {
private static void inviaConformita(DettPratica dettPratica, ControlloPratica controllo, long template) private static void inviaConformita(DettPratica dettPratica, ControlloPratica controllo, long template)
throws PortalException, SystemException { throws PortalException, SystemException {
ServiceContext serviceContext = getServiceContext(dettPratica); ServiceContext serviceContext = getServiceContextbyDettPratica(dettPratica);
AvvisoLocalServiceUtil.addAvviso(dettPratica.getIntPraticaId(), "Avviso di Conformità", new Date(), AvvisoLocalServiceUtil.addAvviso(dettPratica.getIntPraticaId(), "Avviso di Conformità", new Date(),
AvvisoUtil.TIPO_AVVISO_DIRETTO, StatoPraticaConstants.CONFORME, template, AvvisoUtil.TIPO_AVVISO_DIRETTO, StatoPraticaConstants.CONFORME, template,
dettPratica.getDettPraticaId(), DettPratica.class.getName(), dettPratica.getDettPraticaId(), DettPratica.class.getName(),
@ -1539,7 +1624,7 @@ public class SismicaUtil {
private static void inviaVidimazione(DettPratica dettPratica, ControlloPratica controllo, long template) private static void inviaVidimazione(DettPratica dettPratica, ControlloPratica controllo, long template)
throws PortalException, SystemException { throws PortalException, SystemException {
ServiceContext serviceContext = getServiceContext(dettPratica); ServiceContext serviceContext = getServiceContextbyDettPratica(dettPratica);
AvvisoLocalServiceUtil.addAvviso(dettPratica.getIntPraticaId(), "Avviso di Vidimazione", new Date(), AvvisoLocalServiceUtil.addAvviso(dettPratica.getIntPraticaId(), "Avviso di Vidimazione", new Date(),
AvvisoUtil.TIPO_AVVISO_DIRETTO, StatoPraticaConstants.VIDIMATA, template, AvvisoUtil.TIPO_AVVISO_DIRETTO, StatoPraticaConstants.VIDIMATA, template,
dettPratica.getDettPraticaId(), DettPratica.class.getName(), dettPratica.getDettPraticaId(), DettPratica.class.getName(),
@ -1563,7 +1648,15 @@ public class SismicaUtil {
return result; return result;
} }
private static ServiceContext getServiceContext(DettPratica dettPratica) { private static ServiceContext getServiceContextbyIntPratica(IntPratica intPratica) {
ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(intPratica.getCompanyId());
serviceContext.setScopeGroupId(intPratica.getGroupId());
serviceContext.setUserId(intPratica.getUserId());
return serviceContext;
}
private static ServiceContext getServiceContextbyDettPratica(DettPratica dettPratica) {
ServiceContext serviceContext = new ServiceContext(); ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(dettPratica.getCompanyId()); serviceContext.setCompanyId(dettPratica.getCompanyId());
serviceContext.setScopeGroupId(dettPratica.getGroupId()); serviceContext.setScopeGroupId(dettPratica.getGroupId());

9
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/ControlloPraticaModelListener.java

@ -16,8 +16,7 @@ public class ControlloPraticaModelListener extends BaseModelListener<ControlloPr
private static final Log _log = LogFactoryUtil.getLog(ControlloPraticaModelListener.class); private static final Log _log = LogFactoryUtil.getLog(ControlloPraticaModelListener.class);
@Override @Override
public void onAfterUpdate(ControlloPratica model) public void onAfterUpdate(ControlloPratica model) throws ModelListenerException {
throws ModelListenerException {
try { try {
@ -27,11 +26,11 @@ public class ControlloPraticaModelListener extends BaseModelListener<ControlloPr
intIndexer.delete(model.getCompanyId(), model.getUuid()); intIndexer.delete(model.getCompanyId(), model.getUuid());
intIndexer.reindex(IntPratica.class.getName(), model.getIntPraticaId()); intIndexer.reindex(IntPratica.class.getName(), model.getIntPraticaId());
controlloIndexer.delete(model.getCompanyId(),model.getUuid()); controlloIndexer.delete(model.getCompanyId(), model.getUuid());
controlloIndexer.reindex(ControlloPratica.class.getName(),model.getControlloPraticaId()); controlloIndexer.reindex(ControlloPratica.class.getName(), model.getControlloPraticaId());
} catch (SearchException e) { } catch (SearchException e) {
_log.error(e,e); _log.error(e, e);
} }
super.onAfterUpdate(model); super.onAfterUpdate(model);

36
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/DettPraticaModelListener.java

@ -19,28 +19,30 @@ import com.liferay.portal.model.BaseModelListener;
public class DettPraticaModelListener extends BaseModelListener<DettPratica> { public class DettPraticaModelListener extends BaseModelListener<DettPratica> {
private static final Log _log = LogFactoryUtil.getLog(DettPraticaModelListener.class); private static final Log _log = LogFactoryUtil.getLog(DettPraticaModelListener.class);
@Override @Override
public void onAfterUpdate(DettPratica model) throws ModelListenerException { public void onAfterUpdate(DettPratica model) throws ModelListenerException {
try { try {
Indexer indexer = IndexerRegistryUtil.getIndexer(IntPratica.class); Indexer indexer = IndexerRegistryUtil.getIndexer(IntPratica.class);
indexer.reindex(IntPratica.class.getName(), model.getIntPraticaId()); indexer.reindex(IntPratica.class.getName(), model.getIntPraticaId());
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("DettPraticaModelListener - Chiamato Reindex IntPraticaId : " + model.getIntPraticaId()); _log.debug("DettPraticaModelListener - Chiamato Reindex IntPraticaId : "
} + model.getIntPraticaId());
}
if (model.getStatus() == WorkflowConstants.STATUS_APPROVED) { if (model.getStatus() == WorkflowConstants.STATUS_APPROVED) {
IntPratica intPratica = IntPraticaLocalServiceUtil.updateModifiedDate(model.getIntPraticaId(), new Date()); IntPratica intPratica = IntPraticaLocalServiceUtil.updateModifiedDate(
} model.getIntPraticaId(), new Date());
}
} catch (SearchException | NoSuchIntPraticaException | SystemException e) { } catch (SearchException | NoSuchIntPraticaException | SystemException e) {
_log.error(e, e); _log.error(e, e);
} }
super.onAfterUpdate(model); super.onAfterUpdate(model);
} }
} }

29
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/DocPraticaModelListener.java

@ -13,23 +13,24 @@ import com.liferay.portal.model.BaseModelListener;
public class DocPraticaModelListener extends BaseModelListener<DocPratica> { public class DocPraticaModelListener extends BaseModelListener<DocPratica> {
private static final Log _log = LogFactoryUtil.getLog(DocPraticaModelListener.class); private static final Log _log = LogFactoryUtil.getLog(DocPraticaModelListener.class);
@Override @Override
public void onAfterUpdate(DocPratica model) throws ModelListenerException { public void onAfterUpdate(DocPratica model) throws ModelListenerException {
try { try {
Indexer indexer = IndexerRegistryUtil.getIndexer(IntPratica.class); Indexer indexer = IndexerRegistryUtil.getIndexer(IntPratica.class);
indexer.reindex(IntPratica.class.getName(), model.getIntPraticaId()); indexer.reindex(IntPratica.class.getName(), model.getIntPraticaId());
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("DettPraticaModelListener - Chiamato Reindex IntPraticaId : " + model.getIntPraticaId()); _log.debug("DettPraticaModelListener - Chiamato Reindex IntPraticaId : "
} + model.getIntPraticaId());
} catch (SearchException e) { }
_log.error(e, e); } catch (SearchException e) {
} _log.error(e, e);
}
super.onAfterUpdate(model); super.onAfterUpdate(model);
} }
} }

24
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/IntPraticaModelListener.java

@ -35,26 +35,26 @@ public class IntPraticaModelListener extends BaseModelListener<IntPratica> {
intIndexer.reindex(IntPratica.class.getName(), model.getIntPraticaId()); intIndexer.reindex(IntPratica.class.getName(), model.getIntPraticaId());
DynamicQuery queryCP = DynamicQueryFactoryUtil.forClass(ControlloPratica.class); DynamicQuery queryCP = DynamicQueryFactoryUtil.forClass(ControlloPratica.class);
queryCP.add(RestrictionsFactoryUtil.eq("intPraticaId", model.getIntPraticaId())); queryCP.add(RestrictionsFactoryUtil.eq("intPraticaId", model.getIntPraticaId()));
List<ControlloPratica> appList = List<ControlloPratica> appList = ControlloPraticaLocalServiceUtil.dynamicQuery(queryCP,
ControlloPraticaLocalServiceUtil.dynamicQuery(queryCP, QueryUtil.ALL_POS, QueryUtil.ALL_POS); QueryUtil.ALL_POS, QueryUtil.ALL_POS);
if (appList != null && !appList.isEmpty()) { if (appList != null && !appList.isEmpty()) {
for (ControlloPratica controlloPratica : appList) { for (ControlloPratica controlloPratica : appList) {
controlloIndexer.delete(model.getCompanyId(),controlloPratica.getUuid()); controlloIndexer.delete(model.getCompanyId(), controlloPratica.getUuid());
controlloIndexer.reindex(ControlloPratica.class.getName(),controlloPratica.getControlloPraticaId()); controlloIndexer.reindex(ControlloPratica.class.getName(),
} controlloPratica.getControlloPraticaId());
} }
}
} catch (SearchException e) { } catch (SearchException e) {
_log.error(e,e); _log.error(e, e);
} catch (SystemException e) { } catch (SystemException e) {
_log.error(e,e); _log.error(e, e);
} }
super.onAfterUpdate(model); super.onAfterUpdate(model);
} }
} }

136
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoInstanceModelListener.java

@ -13,102 +13,104 @@ import com.liferay.portal.workflow.kaleo.model.KaleoInstance;
public class KaleoInstanceModelListener extends BaseModelListener<KaleoInstance> { public class KaleoInstanceModelListener extends BaseModelListener<KaleoInstance> {
private static final Log _log = LogFactoryUtil.getLog(KaleoInstanceModelListener.class); private static final Log _log = LogFactoryUtil.getLog(KaleoInstanceModelListener.class);
@Override @Override
public void onAfterUpdate(KaleoInstance model) throws ModelListenerException { public void onAfterUpdate(KaleoInstance model) throws ModelListenerException {
try { try {
if (model.getClassName().equals(ControlloPratica.class.getName())) { if (model.getClassName().equals(ControlloPratica.class.getName())) {
Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class);
indexer.reindex(ControlloPratica.class.getName(), model.getClassPK()); indexer.reindex(ControlloPratica.class.getName(), model.getClassPK());
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("KaleoInstanceModelListener - Chiamato Reindex ControlloPraticaId : " + model.getClassPK()); _log.debug("KaleoInstanceModelListener - Chiamato Reindex ControlloPraticaId : "
} + model.getClassPK());
} }
}
} catch (SearchException e) { } catch (SearchException e) {
_log.error(e, e); _log.error(e, e);
} }
super.onAfterUpdate(model); super.onAfterUpdate(model);
} }
@Override @Override
public void onAfterAddAssociation(Object classPK, String associationClassName, Object associationClassPK) public void onAfterAddAssociation(Object classPK, String associationClassName, Object associationClassPK)
throws ModelListenerException { throws ModelListenerException {
super.onAfterAddAssociation(classPK, associationClassName, associationClassPK); super.onAfterAddAssociation(classPK, associationClassName, associationClassPK);
} }
@Override @Override
public void onAfterCreate(KaleoInstance model) throws ModelListenerException { public void onAfterCreate(KaleoInstance model) throws ModelListenerException {
super.onAfterCreate(model); super.onAfterCreate(model);
} }
@Override @Override
public void onAfterRemove(KaleoInstance model) throws ModelListenerException { public void onAfterRemove(KaleoInstance model) throws ModelListenerException {
try { try {
if (model.getClassName().equals(ControlloPratica.class.getName())) { if (model.getClassName().equals(ControlloPratica.class.getName())) {
Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class);
indexer.reindex(ControlloPratica.class.getName(), model.getClassPK()); indexer.reindex(ControlloPratica.class.getName(), model.getClassPK());
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("KaleoInstanceModelListener - Chiamato Reindex ControlloPraticaId : " + model.getClassPK()); _log.debug("KaleoInstanceModelListener - Chiamato Reindex ControlloPraticaId : "
} + model.getClassPK());
} }
}
} catch (SearchException e) { } catch (SearchException e) {
_log.error(e, e); _log.error(e, e);
} }
super.onAfterRemove(model); super.onAfterRemove(model);
} }
@Override @Override
public void onAfterRemoveAssociation(Object classPK, String associationClassName, Object associationClassPK) public void onAfterRemoveAssociation(Object classPK, String associationClassName,
throws ModelListenerException { Object associationClassPK) throws ModelListenerException {
super.onAfterRemoveAssociation(classPK, associationClassName, associationClassPK); super.onAfterRemoveAssociation(classPK, associationClassName, associationClassPK);
} }
@Override @Override
public void onBeforeAddAssociation(Object classPK, String associationClassName, Object associationClassPK) public void onBeforeAddAssociation(Object classPK, String associationClassName, Object associationClassPK)
throws ModelListenerException { throws ModelListenerException {
super.onBeforeAddAssociation(classPK, associationClassName, associationClassPK); super.onBeforeAddAssociation(classPK, associationClassName, associationClassPK);
} }
@Override @Override
public void onBeforeCreate(KaleoInstance model) throws ModelListenerException { public void onBeforeCreate(KaleoInstance model) throws ModelListenerException {
super.onBeforeCreate(model); super.onBeforeCreate(model);
} }
@Override @Override
public void onBeforeRemove(KaleoInstance model) throws ModelListenerException { public void onBeforeRemove(KaleoInstance model) throws ModelListenerException {
super.onBeforeRemove(model); super.onBeforeRemove(model);
} }
@Override @Override
public void onBeforeRemoveAssociation(Object classPK, String associationClassName, Object associationClassPK) public void onBeforeRemoveAssociation(Object classPK, String associationClassName,
throws ModelListenerException { Object associationClassPK) throws ModelListenerException {
super.onBeforeRemoveAssociation(classPK, associationClassName, associationClassPK); super.onBeforeRemoveAssociation(classPK, associationClassName, associationClassPK);
} }
@Override @Override
public void onBeforeUpdate(KaleoInstance model) throws ModelListenerException { public void onBeforeUpdate(KaleoInstance model) throws ModelListenerException {
super.onBeforeUpdate(model); super.onBeforeUpdate(model);
} }
} }

183
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoLogModelListener.java

@ -17,128 +17,127 @@ import com.liferay.portal.workflow.kaleo.service.KaleoInstanceTokenLocalServiceU
public class KaleoLogModelListener extends BaseModelListener<KaleoLog> { public class KaleoLogModelListener extends BaseModelListener<KaleoLog> {
private static final Log _log = LogFactoryUtil.getLog(KaleoLogModelListener.class); private static final Log _log = LogFactoryUtil.getLog(KaleoLogModelListener.class);
@Override @Override
public void onAfterCreate(KaleoLog model) throws ModelListenerException { public void onAfterCreate(KaleoLog model) throws ModelListenerException {
try { try {
long kaleoInstanceTokenId = model.getKaleoInstanceTokenId(); long kaleoInstanceTokenId = model.getKaleoInstanceTokenId();
KaleoInstanceToken instanceToken = KaleoInstanceToken instanceToken = KaleoInstanceTokenLocalServiceUtil
KaleoInstanceTokenLocalServiceUtil.fetchKaleoInstanceToken(kaleoInstanceTokenId); .fetchKaleoInstanceToken(kaleoInstanceTokenId);
if (Validator.isNotNull(instanceToken)) { if (Validator.isNotNull(instanceToken)) {
if (instanceToken.getClassName().equals(ControlloPratica.class.getName())) { if (instanceToken.getClassName().equals(ControlloPratica.class.getName())) {
Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class);
indexer.reindex(ControlloPratica.class.getName(), instanceToken.getClassPK()); indexer.reindex(ControlloPratica.class.getName(), instanceToken.getClassPK());
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("KaleoLogModelListener - Chiamato Reindex ControlloPraticaId : " + instanceToken.getClassPK()); _log.debug("KaleoLogModelListener - Chiamato Reindex ControlloPraticaId : "
} + instanceToken.getClassPK());
} }
} }
}
} catch (SearchException e) {
_log.error(e, e);
} catch (SystemException e) {
_log.error(e, e);
}
} catch (SearchException e) { super.onAfterUpdate(model);
_log.error(e, e); }
} catch (SystemException e) {
_log.error(e, e);
}
super.onAfterUpdate(model); @Override
} public void onAfterAddAssociation(Object classPK, String associationClassName, Object associationClassPK)
throws ModelListenerException {
@Override // TODO Auto-generated method stub
public void onAfterAddAssociation(Object classPK, String associationClassName, Object associationClassPK) super.onAfterAddAssociation(classPK, associationClassName, associationClassPK);
throws ModelListenerException { }
// TODO Auto-generated method stub @Override
super.onAfterAddAssociation(classPK, associationClassName, associationClassPK); public void onAfterRemove(KaleoLog model) throws ModelListenerException {
}
@Override try {
public void onAfterRemove(KaleoLog model) throws ModelListenerException {
try { long kaleoInstanceTokenId = model.getKaleoInstanceTokenId();
KaleoInstanceToken instanceToken = KaleoInstanceTokenLocalServiceUtil
.fetchKaleoInstanceToken(kaleoInstanceTokenId);
long kaleoInstanceTokenId = model.getKaleoInstanceTokenId(); if (Validator.isNotNull(instanceToken)) {
KaleoInstanceToken instanceToken = if (instanceToken.getClassName().equals(ControlloPratica.class.getName())) {
KaleoInstanceTokenLocalServiceUtil.fetchKaleoInstanceToken(kaleoInstanceTokenId);
if (Validator.isNotNull(instanceToken)) { Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class);
if (instanceToken.getClassName().equals(ControlloPratica.class.getName())) { indexer.reindex(ControlloPratica.class.getName(), instanceToken.getClassPK());
Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); if (_log.isDebugEnabled()) {
indexer.reindex(ControlloPratica.class.getName(), instanceToken.getClassPK()); _log.debug("KaleoLogModelListener - Chiamato Reindex ControlloPraticaId : "
+ instanceToken.getClassPK());
}
}
}
if (_log.isDebugEnabled()) { } catch (SearchException e) {
_log.debug("KaleoLogModelListener - Chiamato Reindex ControlloPraticaId : " + instanceToken.getClassPK()); _log.error(e, e);
} } catch (SystemException e) {
} _log.error(e, e);
} }
super.onAfterRemove(model);
}
} catch (SearchException e) { @Override
_log.error(e, e); public void onAfterRemoveAssociation(Object classPK, String associationClassName,
} catch (SystemException e) { Object associationClassPK) throws ModelListenerException {
_log.error(e, e);
}
// TODO Auto-generated method stub
super.onAfterRemoveAssociation(classPK, associationClassName, associationClassPK);
}
super.onAfterRemove(model); @Override
} public void onAfterUpdate(KaleoLog model) throws ModelListenerException {
@Override // TODO Auto-generated method stub
public void onAfterRemoveAssociation(Object classPK, String associationClassName, Object associationClassPK) super.onAfterUpdate(model);
throws ModelListenerException { }
// TODO Auto-generated method stub @Override
super.onAfterRemoveAssociation(classPK, associationClassName, associationClassPK); public void onBeforeAddAssociation(Object classPK, String associationClassName, Object associationClassPK)
} throws ModelListenerException {
@Override // TODO Auto-generated method stub
public void onAfterUpdate(KaleoLog model) throws ModelListenerException { super.onBeforeAddAssociation(classPK, associationClassName, associationClassPK);
}
// TODO Auto-generated method stub @Override
super.onAfterUpdate(model); public void onBeforeCreate(KaleoLog model) throws ModelListenerException {
}
@Override // TODO Auto-generated method stub
public void onBeforeAddAssociation(Object classPK, String associationClassName, Object associationClassPK) super.onBeforeCreate(model);
throws ModelListenerException { }
// TODO Auto-generated method stub @Override
super.onBeforeAddAssociation(classPK, associationClassName, associationClassPK); public void onBeforeRemove(KaleoLog model) throws ModelListenerException {
}
@Override // TODO Auto-generated method stub
public void onBeforeCreate(KaleoLog model) throws ModelListenerException { super.onBeforeRemove(model);
}
// TODO Auto-generated method stub @Override
super.onBeforeCreate(model); public void onBeforeRemoveAssociation(Object classPK, String associationClassName,
} Object associationClassPK) throws ModelListenerException {
@Override // TODO Auto-generated method stub
public void onBeforeRemove(KaleoLog model) throws ModelListenerException { super.onBeforeRemoveAssociation(classPK, associationClassName, associationClassPK);
}
// TODO Auto-generated method stub @Override
super.onBeforeRemove(model); public void onBeforeUpdate(KaleoLog model) throws ModelListenerException {
}
@Override // TODO Auto-generated method stub
public void onBeforeRemoveAssociation(Object classPK, String associationClassName, Object associationClassPK) super.onBeforeUpdate(model);
throws ModelListenerException { }
// TODO Auto-generated method stub
super.onBeforeRemoveAssociation(classPK, associationClassName, associationClassPK);
}
@Override
public void onBeforeUpdate(KaleoLog model) throws ModelListenerException {
// TODO Auto-generated method stub
super.onBeforeUpdate(model);
}
} }

152
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoTaskInstanceTokenModelListener.java

@ -13,110 +13,112 @@ import com.liferay.portal.workflow.kaleo.model.KaleoTaskInstanceToken;
public class KaleoTaskInstanceTokenModelListener extends BaseModelListener<KaleoTaskInstanceToken> { public class KaleoTaskInstanceTokenModelListener extends BaseModelListener<KaleoTaskInstanceToken> {
private static final Log _log = LogFactoryUtil.getLog(KaleoTaskInstanceTokenModelListener.class); private static final Log _log = LogFactoryUtil.getLog(KaleoTaskInstanceTokenModelListener.class);
@Override @Override
public void onAfterUpdate(KaleoTaskInstanceToken model) throws ModelListenerException { public void onAfterUpdate(KaleoTaskInstanceToken model) throws ModelListenerException {
try { try {
if (model.getClassName().equals(ControlloPratica.class.getName())) { if (model.getClassName().equals(ControlloPratica.class.getName())) {
Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class);
indexer.reindex(ControlloPratica.class.getName(), model.getClassPK()); indexer.reindex(ControlloPratica.class.getName(), model.getClassPK());
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("KaleoTaskInstanceToken - Chiamato Reindex ControlloPraticaId : " + model.getClassPK()); _log.debug("KaleoTaskInstanceToken - Chiamato Reindex ControlloPraticaId : "
} + model.getClassPK());
} }
}
} catch (SearchException e) { } catch (SearchException e) {
_log.error(e, e); _log.error(e, e);
} }
super.onAfterUpdate(model); super.onAfterUpdate(model);
} }
@Override @Override
public void onAfterAddAssociation(Object classPK, String associationClassName, Object associationClassPK) public void onAfterAddAssociation(Object classPK, String associationClassName, Object associationClassPK)
throws ModelListenerException { throws ModelListenerException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
super.onAfterAddAssociation(classPK, associationClassName, associationClassPK); super.onAfterAddAssociation(classPK, associationClassName, associationClassPK);
} }
@Override @Override
public void onAfterCreate(KaleoTaskInstanceToken model) throws ModelListenerException { public void onAfterCreate(KaleoTaskInstanceToken model) throws ModelListenerException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
super.onAfterCreate(model); super.onAfterCreate(model);
} }
@Override @Override
public void onAfterRemove(KaleoTaskInstanceToken model) throws ModelListenerException { public void onAfterRemove(KaleoTaskInstanceToken model) throws ModelListenerException {
try { try {
if (model.getClassName().equals(ControlloPratica.class.getName())) { if (model.getClassName().equals(ControlloPratica.class.getName())) {
Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class); Indexer indexer = IndexerRegistryUtil.getIndexer(ControlloPratica.class);
indexer.reindex(ControlloPratica.class.getName(), model.getClassPK()); indexer.reindex(ControlloPratica.class.getName(), model.getClassPK());
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("KaleoTaskInstanceToken - Chiamato Reindex ControlloPraticaId : " + model.getClassPK()); _log.debug("KaleoTaskInstanceToken - Chiamato Reindex ControlloPraticaId : "
} + model.getClassPK());
} }
}
} catch (SearchException e) { } catch (SearchException e) {
_log.error(e, e); _log.error(e, e);
} }
super.onAfterRemove(model); super.onAfterRemove(model);
} }
@Override @Override
public void onAfterRemoveAssociation(Object classPK, String associationClassName, Object associationClassPK) public void onAfterRemoveAssociation(Object classPK, String associationClassName,
throws ModelListenerException { Object associationClassPK) throws ModelListenerException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
super.onAfterRemoveAssociation(classPK, associationClassName, associationClassPK); super.onAfterRemoveAssociation(classPK, associationClassName, associationClassPK);
} }
@Override @Override
public void onBeforeAddAssociation(Object classPK, String associationClassName, Object associationClassPK) public void onBeforeAddAssociation(Object classPK, String associationClassName, Object associationClassPK)
throws ModelListenerException { throws ModelListenerException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
super.onBeforeAddAssociation(classPK, associationClassName, associationClassPK); super.onBeforeAddAssociation(classPK, associationClassName, associationClassPK);
} }
@Override @Override
public void onBeforeCreate(KaleoTaskInstanceToken model) throws ModelListenerException { public void onBeforeCreate(KaleoTaskInstanceToken model) throws ModelListenerException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
super.onBeforeCreate(model); super.onBeforeCreate(model);
} }
@Override @Override
public void onBeforeRemove(KaleoTaskInstanceToken model) throws ModelListenerException { public void onBeforeRemove(KaleoTaskInstanceToken model) throws ModelListenerException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
super.onBeforeRemove(model); super.onBeforeRemove(model);
} }
@Override @Override
public void onBeforeRemoveAssociation(Object classPK, String associationClassName, Object associationClassPK) public void onBeforeRemoveAssociation(Object classPK, String associationClassName,
throws ModelListenerException { Object associationClassPK) throws ModelListenerException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
super.onBeforeRemoveAssociation(classPK, associationClassName, associationClassPK); super.onBeforeRemoveAssociation(classPK, associationClassName, associationClassPK);
} }
@Override @Override
public void onBeforeUpdate(KaleoTaskInstanceToken model) throws ModelListenerException { public void onBeforeUpdate(KaleoTaskInstanceToken model) throws ModelListenerException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
super.onBeforeUpdate(model); super.onBeforeUpdate(model);
} }
} }

29
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/SoggettoModelListener.java

@ -13,23 +13,24 @@ import com.liferay.portal.model.BaseModelListener;
public class SoggettoModelListener extends BaseModelListener<Soggetto> { public class SoggettoModelListener extends BaseModelListener<Soggetto> {
private static final Log _log = LogFactoryUtil.getLog(SoggettoModelListener.class); private static final Log _log = LogFactoryUtil.getLog(SoggettoModelListener.class);
@Override @Override
public void onAfterUpdate(Soggetto model) throws ModelListenerException { public void onAfterUpdate(Soggetto model) throws ModelListenerException {
try { try {
Indexer indexer = IndexerRegistryUtil.getIndexer(IntPratica.class); Indexer indexer = IndexerRegistryUtil.getIndexer(IntPratica.class);
indexer.reindex(IntPratica.class.getName(), model.getIntPraticaId()); indexer.reindex(IntPratica.class.getName(), model.getIntPraticaId());
if (_log.isDebugEnabled()) { if (_log.isDebugEnabled()) {
_log.debug("DettPraticaModelListener - Chiamato Reindex IntPraticaId : " + model.getIntPraticaId()); _log.debug("DettPraticaModelListener - Chiamato Reindex IntPraticaId : "
} + model.getIntPraticaId());
} catch (SearchException e) { }
_log.error(e, e); } catch (SearchException e) {
} _log.error(e, e);
}
super.onAfterUpdate(model); super.onAfterUpdate(model);
} }
} }

14
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/PortosAdministrationPortlet.java → liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/SismicaAdministrationPortlet.java

@ -38,11 +38,11 @@ import com.liferay.portal.theme.ThemeDisplay;
import com.liferay.util.bridges.mvc.MVCPortlet; import com.liferay.util.bridges.mvc.MVCPortlet;
/** /**
* Portlet implementation class PortosAdministrationPortlet * Portlet implementation class SismicaAdministrationPortlet
*/ */
public class PortosAdministrationPortlet extends MVCPortlet { public class SismicaAdministrationPortlet extends MVCPortlet {
private static final Log _log = LogFactoryUtil.getLog(PortosAdministrationPortlet.class); private static final Log _log = LogFactoryUtil.getLog(SismicaAdministrationPortlet.class);
public void mostraConfigurazione(ActionRequest actionRequest, ActionResponse actionResponse) public void mostraConfigurazione(ActionRequest actionRequest, ActionResponse actionResponse)
throws SystemException { throws SystemException {
@ -71,6 +71,10 @@ public class PortosAdministrationPortlet extends MVCPortlet {
actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()])); actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()]));
} }
public void sostituisciDL(ActionRequest actionRequest, ActionResponse actionResponse) {
SismicaUtil.sostituisciDL(actionRequest, actionResponse);
}
public void resetFirme(ActionRequest actionRequest, ActionResponse actionResponse) { public void resetFirme(ActionRequest actionRequest, ActionResponse actionResponse) {
ThemeDisplay td = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY); ThemeDisplay td = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
String numeroProgetto = ParamUtil.getString(actionRequest, "numeroProgetto"); String numeroProgetto = ParamUtil.getString(actionRequest, "numeroProgetto");
@ -128,6 +132,10 @@ public class PortosAdministrationPortlet extends MVCPortlet {
actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()])); actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()]));
} }
public void inviaAvviso(ActionRequest actionRequest, ActionResponse actionResponse) throws SystemException {
SismicaUtil.inviaAvviso(actionRequest, actionResponse);
}
public void salvaDataProssimoSorteggio(ActionRequest actionRequest, ActionResponse actionResponse) public void salvaDataProssimoSorteggio(ActionRequest actionRequest, ActionResponse actionResponse)
throws PortalException, SystemException { throws PortalException, SystemException {

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java

@ -120,8 +120,6 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
String propertiesTemplate = null; String propertiesTemplate = null;
String tipoProcedura = intPratica.getTipoProcedura(); String tipoProcedura = intPratica.getTipoProcedura();
switch (statoPratica) { switch (statoPratica) {
// case StatoPraticaConstants.INTEGRAZIONE:
// break;
case StatoPraticaConstants.SOTTOPOSTA_A_PARERE: case StatoPraticaConstants.SOTTOPOSTA_A_PARERE:
if (Validator.isNull(tipoProcedura) || tipoProcedura.equalsIgnoreCase(Constants.PROCEDURA_A)) { if (Validator.isNull(tipoProcedura) || tipoProcedura.equalsIgnoreCase(Constants.PROCEDURA_A)) {
propertiesTemplate = AvvisoUtil.getAllTipoDocumentoFileTemplateProps().get(statoPratica); propertiesTemplate = AvvisoUtil.getAllTipoDocumentoFileTemplateProps().get(statoPratica);

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java

@ -201,7 +201,6 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
* *
* @author Manifattura Web Group per Regione Siciliana. * @author Manifattura Web Group per Regione Siciliana.
*/ */
@SuppressWarnings("unchecked")
public Map<String, List<IntPratica>> findSorteggiabili(long companyId, Date dtSorteggio) public Map<String, List<IntPratica>> findSorteggiabili(long companyId, Date dtSorteggio)
throws SystemException, PortalException { throws SystemException, PortalException {
HashMap<String, List<IntPratica>> ret = new HashMap<>(); HashMap<String, List<IntPratica>> ret = new HashMap<>();

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=portos_bo build.namespace=portos_bo
build.number=2458 build.number=2459
build.date=1601547633470 build.date=1602068010186
build.auto.upgrade=true build.auto.upgrade=true
## ##

66
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp

@ -1,3 +1,4 @@
<%@page import="it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="org.apache.commons.lang.time.DateUtils"%> <%@page import="org.apache.commons.lang.time.DateUtils"%>
<%@page import="java.util.Calendar"%> <%@page import="java.util.Calendar"%>
@ -7,15 +8,22 @@
<%@ include file="/html/sismica_administration/init.jsp"%> <%@ include file="/html/sismica_administration/init.jsp"%>
<% <%
SimpleDateFormat simpleDateTimeFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); SimpleDateFormat simpleDateTimeFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
String dataUltimoSorteggioString = String dataUltimoSorteggioString =
ConfigurazioneLocalServiceUtil.findByC_ChiaveString(themeDisplay.getCompanyId(), ConfigurazioneConstants.DATE_ULTIMO_SORTEGGIO); ConfigurazioneLocalServiceUtil.findByC_ChiaveString(themeDisplay.getCompanyId(), ConfigurazioneConstants.DATE_ULTIMO_SORTEGGIO);
String dataProssimoSorteggio = String dataProssimoSorteggio =
ConfigurazioneServiceUtil.findByC_ChiaveString(company.getCompanyId(), "conf.geniocivile.sorteggio.data.prossimo.sorteggio"); ConfigurazioneServiceUtil.findByC_ChiaveString(company.getCompanyId(), "conf.geniocivile.sorteggio.data.prossimo.sorteggio");
%> %>
<hr style="margin: 0" /> <liferay-ui:error key="operazione-non-supportata" message="Operazione non supportata" />
<liferay-ui:error key="invia-avviso-tipo-obbligatorio" message="Nessun tipo di avviso selezionato" />
<liferay-ui:error key="invia-avviso-progetto-obbligatorio"
message="Non è stato indicato nessun numero di progetto" />
<liferay-ui:error key="invia-avviso-progetto-inesistente" message="Progetto non trovato" />
<liferay-ui:error key="invia-avviso-collaudo-non-trovato"
message="Non è stato trovato alcun collaudo completo e protocollato per il progetto selezionato" />
<hr style="margin: 0" />
<liferay-portlet:actionURL name="reIndexFasciolo" var="reIndexFascioloURL" /> <liferay-portlet:actionURL name="reIndexFasciolo" var="reIndexFascioloURL" />
<liferay-portlet:actionURL name="reIndexFascicoli" var="reIndexFascicoliURL" /> <liferay-portlet:actionURL name="reIndexFascicoli" var="reIndexFascicoliURL" />
<liferay-portlet:actionURL name="salvaDataProssimoSorteggio" var="salvaDataProssimoSorteggioURL" /> <liferay-portlet:actionURL name="salvaDataProssimoSorteggio" var="salvaDataProssimoSorteggioURL" />
@ -108,10 +116,11 @@ String dataProssimoSorteggio =
</div> </div>
<liferay-portlet:actionURL name="resetFirme" var="resetFirmeURL" /> <liferay-portlet:actionURL name="resetFirme" var="resetFirmeURL" />
<liferay-portlet:actionURL name="inviaAvviso" var="inviaAvvisoURL" />
<div class="row-fluid" style="margin-top: 10px"> <div class="row-fluid" style="margin-top: 10px">
<div class="span6"> <div class="span6">
<div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Form per reimpostare <div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Form per reimpostare i documenti
i documenti alla firma</div> alla firma</div>
<aui:form action="<%=resetFirmeURL%>" method="post" name="fmResetFirme"> <aui:form action="<%=resetFirmeURL%>" method="post" name="fmResetFirme">
<div> <div>
<aui:input name="numeroProgetto" label="Numero progetto"> <aui:input name="numeroProgetto" label="Numero progetto">
@ -121,8 +130,55 @@ String dataProssimoSorteggio =
</div> </div>
</aui:form> </aui:form>
</div> </div>
<%
String tipoAvviso = ParamUtil.getString(renderRequest, "tipoAvviso", "");
String numeroProgetto = ParamUtil.getString(renderRequest, "numeroProgetto", "");
%>
<div class="span6">
<div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Invia avviso</div>
<aui:form action="<%=inviaAvvisoURL%>" method="post" name="fmResetFirme">
<div>
<aui:select name="tipoAvviso">
<aui:option label="Seleziona tipo avviso" value=""></aui:option>
<aui:option label="Vidimazione collaudo"
selected="<%=tipoAvviso.equals(StatoPraticaConstants.COLLAUDO)%>"
value="<%=StatoPraticaConstants.COLLAUDO%>"></aui:option>
</aui:select>
</div>
<div>
<aui:input name="numeroProgetto" label="Numero progetto" value="<%=numeroProgetto%>">
<aui:validator name="number" />
</aui:input>
<aui:button type="submit" value="Invia avviso" />
</div>
</aui:form>
</div>
</div> </div>
<%
String oggetto = ParamUtil.getString(renderRequest, "tipoAvviso", "");
%>
<liferay-portlet:actionURL name="sostituisciDL" var="sostituisciDLURL" />
<div class="row-fluid" style="margin-top: 10px">
<div class="span6">
<div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Form per sostituire file in
Document Library</div>
<aui:form action="<%=sostituisciDLURL%>" method="post" enctype="multipart/form-data" name="fmSostituisciDL">
<div>
<aui:select name="className">
<aui:option label="Seleziona tipo di oggetto" value=""></aui:option>
<aui:option label="DocPratica (allegati)" selected="<%=oggetto.equals(DocPratica.class.getName())%>"
value="<%=DocPratica.class.getName()%>"></aui:option>
</aui:select>
<aui:input type="file" name="file" label="File" />
<aui:input name="classPK" label="Id oggetto">
<aui:validator name="number" />
</aui:input>
<aui:button type="submit" value="Sostituisci file in DL" />
</div>
</aui:form>
</div>
</div>
<% <%
String[] esito = renderRequest.getParameterValues("esito"); String[] esito = renderRequest.getParameterValues("esito");
%> %>
@ -149,4 +205,6 @@ String dataProssimoSorteggio =
} }
}); });
}); });
</aui:script> </aui:script>

37
liferay-plugins-sdk-6.2/portlets/portos-importazione-portlet/bin/.project

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>portos-importazione-portlet</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>org.apache.ivyde.eclipse.ivynature</nature>
</natures>
</projectDescription>
Caricamento…
Annulla
Salva