diff --git a/liferay-plugins-sdk-6.2/dist/tref-mapit-shared-6.2.0.1.jar b/liferay-plugins-sdk-6.2/dist/tref-mapit-shared-6.2.0.1.jar deleted file mode 100644 index 39c715bb..00000000 Binary files a/liferay-plugins-sdk-6.2/dist/tref-mapit-shared-6.2.0.1.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java index d17b6452..450c50e5 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java @@ -1,7 +1,7 @@ /** * * @author Salvatore La Manna, Manifattura Web Group per Regione Siciliana - * + * */ package it.mwg.sismica.bo.util; @@ -15,6 +15,7 @@ import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DocAggiuntiva; import it.tref.liferay.portos.bo.model.DocPratica; import it.tref.liferay.portos.bo.model.FineLavori; +import it.tref.liferay.portos.bo.model.HistoryWorkflowAction; import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.ParereGeologo; @@ -33,6 +34,7 @@ import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DocAggiuntivaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.FineLavoriLocalServiceUtil; +import it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalServiceUtil; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil; import it.tref.liferay.portos.bo.service.ParereGeologoLocalServiceUtil; @@ -45,7 +47,6 @@ import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; import it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil; import it.tref.liferay.portos.bo.util.AvvisoUtil; import it.tref.liferay.portos.bo.util.Constants; -import it.tref.liferay.portos.bo.util.WorkflowUtil; import it.tref.liferay.portos.mailmanager.model.Email; import it.tref.liferay.portos.mailmanager.model.EmailAttachment; import it.tref.liferay.portos.mailmanager.model.EmailConstants; @@ -79,11 +80,7 @@ import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.workflow.WorkflowInstance; import com.liferay.portal.kernel.workflow.WorkflowInstanceManagerUtil; import com.liferay.portal.kernel.workflow.WorkflowLog; -import com.liferay.portal.kernel.workflow.WorkflowLogManager; import com.liferay.portal.kernel.workflow.WorkflowLogManagerUtil; -import com.liferay.portal.kernel.workflow.WorkflowTask; -import com.liferay.portal.kernel.workflow.WorkflowTaskManager; -import com.liferay.portal.kernel.workflow.WorkflowTaskManagerUtil; import com.liferay.portal.model.Company; import com.liferay.portal.model.Contact; import com.liferay.portal.model.EmailAddress; @@ -116,8 +113,6 @@ import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.SystemEventLocalServiceUtil; import com.liferay.portal.service.UserLocalServiceUtil; import com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil; -import com.liferay.portal.workflow.kaleo.model.KaleoInstance; -import com.liferay.portal.workflow.kaleo.service.KaleoInstanceLocalServiceUtil; import com.liferay.portlet.asset.model.AssetEntry; import com.liferay.portlet.asset.model.AssetTag; import com.liferay.portlet.asset.model.AssetVocabulary; @@ -150,7 +145,9 @@ import com.liferay.portlet.messageboards.model.MBThread; import com.liferay.portlet.messageboards.service.MBDiscussionLocalServiceUtil; import com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil; import com.liferay.portlet.messageboards.service.MBThreadLocalServiceUtil; +import com.liferay.portlet.ratings.model.RatingsEntry; import com.liferay.portlet.ratings.model.RatingsStats; +import com.liferay.portlet.ratings.service.RatingsEntryLocalServiceUtil; import com.liferay.portlet.ratings.service.RatingsStatsLocalServiceUtil; import com.liferay.portlet.wiki.model.WikiNode; import com.liferay.portlet.wiki.service.WikiNodeLocalServiceUtil; @@ -235,8 +232,10 @@ public class ManutenzioneDatabase { .getWorkflowInstanceLink(companyId, groupId, ControlloPratica.class.getName(), controllo.getPrimaryKey()); long workflowInstanceId = workflowInstancelink.getWorkflowInstanceId(); - WorkflowInstance workflowInstance = WorkflowInstanceManagerUtil - .getWorkflowInstance(controllo.getCompanyId(), workflowInstanceId); + // WorkflowInstance workflowInstance = + // WorkflowInstanceManagerUtil + // .getWorkflowInstance(controllo.getCompanyId(), + // workflowInstanceId); List types = new ArrayList<>(); types.add(WorkflowLog.TASK_ASSIGN); logs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(companyId, @@ -299,11 +298,13 @@ public class ManutenzioneDatabase { esitoLog(esito, svuotaEmailAttachment()); esitoLog(esito, svuotaFineLavori()); esitoLog(esito, svuotaGroup(companyId)); + esitoLog(esito, svuotaHistoryWorkflowAction()); esitoLog(esito, svuotaMBDiscussion(companyId)); esitoLog(esito, svuotaMBMessage(companyId)); esitoLog(esito, svuotaMBThread()); esitoLog(esito, svuotaPagamento(companyId)); esitoLog(esito, svuotaParereGeologo()); + esitoLog(esito, svuotaRatingsEntry()); esitoLog(esito, svuotaRatingsStats(companyId)); esitoLog(esito, svuotaResourcePermission(companyId)); esitoLog(esito, svuotaSoggetto()); @@ -311,6 +312,7 @@ public class ManutenzioneDatabase { esitoLog(esito, svuotaSyncDLObject()); esitoLog(esito, svuotaSystemEvent(companyId)); esitoLog(esito, svuotaTempistica()); + esitoLog(esito, svuotaWorkflowInstance()); return esito; } @@ -417,7 +419,8 @@ public class ManutenzioneDatabase { int rimossi = 0; fileEntries = DLAppServiceUtil.getFileEntries(repositoryId, folderId, start, start + SLICE); for (FileEntry fileEntry : fileEntries) { - String[] parti = StringUtil.split(fileEntry.getTitle(), '_'); + String[] parti = StringUtil.split(fileEntry.getTitle() + .replaceAll("\\.p7m$", StringPool.BLANK), '_'); String strId1 = parti[0]; String tipo = StringPool.BLANK; String strId2 = StringPool.BLANK; @@ -430,6 +433,11 @@ public class ManutenzioneDatabase { tipo = parti[1] + StringPool.UNDERLINE + parti[2]; strId2 = parti[3]; break; + case 5: + if (parti[4].equals("protocollato")) { + tipo = parti[1] + StringPool.UNDERLINE + parti[2]; + strId2 = parti[3]; + } } if ((strId1.length() == 10) && (strId2.length() > 0) && SismicaUtil.isLong(strId1) && SismicaUtil.isLong(strId2)) { @@ -442,7 +450,11 @@ public class ManutenzioneDatabase { rimossi++; } break; + case "AI_B": case "CO_B": + case "IN_B": + case "IN_F": + case "MA_F": if (!avvisiFileEntries.contains(fileEntry.getFileEntryId())) { DLAppLocalServiceUtil.deleteFileEntry(fileEntry.getFileEntryId()); cancellati++; @@ -781,6 +793,26 @@ public class ManutenzioneDatabase { return "Cancellati " + cancellati + " Group"; } + private static String svuotaHistoryWorkflowAction() throws SystemException { + int start = 0; + int cancellati = 0; + List actions = null; + do { + int rimossi = 0; + actions = HistoryWorkflowActionLocalServiceUtil.getHistoryWorkflowActions(start, start + SLICE); + for (HistoryWorkflowAction action : actions) { + if (!esiste(INTPRATICA_CLASS_NAME, action.getIntPraticaId()) + || !esiste(DETTPRATICA_CLASS_NAME, action.getDettPraticaId())) { + HistoryWorkflowActionLocalServiceUtil.deleteHistoryWorkflowAction(action); + cancellati++; + rimossi++; + } + } + start += SLICE - rimossi; + } while (actions.size() > 0); + return "Cancellati " + cancellati + " HistoryWorkflowAction"; + } + private static String svuotaMBDiscussion(long companyId) throws SystemException { int start = 0; int cancellati = 0; @@ -885,6 +917,25 @@ public class ManutenzioneDatabase { return "Cancellati " + cancellati + " ParereGeologo"; } + private static String svuotaRatingsEntry() throws SystemException { + int start = 0; + int cancellati = 0; + List entries = null; + do { + int rimossi = 0; + entries = RatingsEntryLocalServiceUtil.getRatingsEntries(start, start + SLICE); + for (RatingsEntry entry : entries) { + if (!esiste(entry.getClassName(), entry.getClassPK())) { + RatingsEntryLocalServiceUtil.deleteRatingsEntry(entry); + cancellati++; + rimossi++; + } + } + start += SLICE - rimossi; + } while (entries.size() > 0); + return "Cancellati " + cancellati + " RatingsEntry"; + } + private static String svuotaRatingsStats(long companyId) throws SystemException { int start = 0; int cancellati = 0; @@ -1075,6 +1126,37 @@ public class ManutenzioneDatabase { return "Cancellati " + cancellati + " User"; } + private static String svuotaWorkflowInstance() throws SystemException, PortalException { + int start = 0; + int cancellati = 0; + List links = null; + do { + int rimossi = 0; + links = WorkflowInstanceLinkLocalServiceUtil.getWorkflowInstanceLinks(start, start + SLICE); + for (WorkflowInstanceLink link : links) { + if (!esiste(link.getClassName(), link.getClassPK())) { + _log.info("Manca " + link.getClassName() + " " + link.getClassPK()); + WorkflowInstance instance = null; + try { + instance = WorkflowInstanceManagerUtil.getWorkflowInstance(link.getCompanyId(), + link.getWorkflowInstanceId()); + } catch (PortalException e) { + } + if (Validator.isNull(instance)) { + WorkflowInstanceLinkLocalServiceUtil.deleteWorkflowInstanceLink(link); + } else { + WorkflowInstanceManagerUtil.deleteWorkflowInstance(link.getCompanyId(), + instance.getWorkflowInstanceId()); + } + cancellati++; + rimossi++; + } + } + start += SLICE - rimossi; + } while (links.size() > 0); + return "Cancellati " + cancellati + " WorkflowInstance"; + } + private static boolean esiste(String className, long classPK) throws SystemException { return esiste(className, classPK, 0); } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerGeneraDocumento.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerGeneraDocumento.java index f884a7fa..c59999af 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerGeneraDocumento.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerGeneraDocumento.java @@ -49,6 +49,7 @@ public class SchedulerGeneraDocumento implements MessageListener { private static final int SIZE = 10; + @Override public void receive(Message message) throws MessageListenerException { if (lock.tryLock()) { @@ -181,9 +182,6 @@ public class SchedulerGeneraDocumento implements MessageListener { _log.info("generaDocumento: generateReport: " + fileEntryIdTemplate); ReportResultDto result = ReportUtil.generateReport(companyId, userId, reportDto, bean); idFileEntry = result.getFileEntryIds()[0]; - // idFileEntry = (Long) - // MessageBusUtil.sendSynchronousMessage(ReportDestinationNames.SYNC, - // messageReport, 1); if (Validator.isNotNull(idFileEntry)) { if (avviso.getTipoAvviso().equalsIgnoreCase(AvvisoUtil.TIPO_AVVISO_DIRETTO)) { 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 542ebcfc..296ca100 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=2900 - build.date=1614856738177 + build.number=2901 + build.date=1614956751482 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/.settings/org.eclipse.wst.common.component b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/.settings/org.eclipse.wst.common.component index 26b0e067..e1d846ac 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/.settings/org.eclipse.wst.common.component +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/.settings/org.eclipse.wst.common.component @@ -2,10 +2,10 @@ - + uses - + uses diff --git a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/service.properties index 445d75cb..5bfaad89 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-report-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_rep - build.number=26 - build.date=1611761568046 + build.number=27 + build.date=1614958757312 build.auto.upgrade=true ##