Sfoglia il codice sorgente

Patch di sicurezza

master
Salvatore La Manna 4 anni fa
parent
commit
9ef193533e
  1. BIN
      liferay-plugins-sdk-6.2/dependencies/net.sourceforge.pmd/lib/commons-io.jar
  2. BIN
      liferay-plugins-sdk-6.2/hooks/lr-arpa-al-hook/docroot/WEB-INF/lib/commons-collections.jar
  3. BIN
      liferay-plugins-sdk-6.2/hooks/lr-arpa-al-hook/docroot/WEB-INF/lib/util-java.jar
  4. BIN
      liferay-plugins-sdk-6.2/hooks/lr-arpa-al-hook/docroot/WEB-INF/lib/util-taglib.jar
  5. BIN
      liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/lib/util-java.jar
  6. BIN
      liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/lib/util-taglib.jar
  7. BIN
      liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/commons-codec.jar
  8. BIN
      liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/commons-logging.jar
  9. BIN
      liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/flexjson.jar
  10. BIN
      liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/jstl-api.jar
  11. BIN
      liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/jstl-impl.jar
  12. BIN
      liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/log4j.jar
  13. BIN
      liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/util-bridges.jar
  14. BIN
      liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/util-java.jar
  15. BIN
      liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/util-taglib.jar
  16. 4
      liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/src/service.properties
  17. BIN
      liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/lib/util-java.jar
  18. BIN
      liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/lib/util-taglib.jar
  19. 1
      liferay-plugins-sdk-6.2/portlets/portos-autodestroy-portlet/docroot/WEB-INF/.gitignore
  20. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java
  21. 519
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java
  22. 5
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceUtil.java
  23. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java
  24. 177
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/PuliziaDatabase.java
  25. 11
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/PortosAdministrationPortlet.java
  26. 549
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java
  27. 152
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java
  28. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  29. 9
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp
  30. BIN
      liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/lib/util-java.jar
  31. BIN
      liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/lib/util-taglib.jar
  32. BIN
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/util-java.jar
  33. BIN
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/util-taglib.jar
  34. BIN
      liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/commons-codec.jar
  35. BIN
      liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/util-java.jar
  36. BIN
      liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/util-taglib.jar
  37. BIN
      liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/lib/util-java.jar
  38. BIN
      liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/lib/util-taglib.jar
  39. BIN
      liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/WEB-INF/lib/util-java.jar
  40. BIN
      liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/WEB-INF/lib/util-taglib.jar
  41. BIN
      liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/lib/util-java.jar
  42. BIN
      liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/lib/util-taglib.jar
  43. BIN
      liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/lib/commons-codec.jar
  44. BIN
      liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/docroot/WEB-INF/lib/util-java.jar
  45. BIN
      liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/docroot/WEB-INF/lib/util-taglib.jar
  46. 3
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/META-INF/MANIFEST.MF
  47. BIN
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/WEB-INF/lib/util-java.jar
  48. BIN
      liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/WEB-INF/lib/util-taglib.jar
  49. BIN
      liferay-plugins-sdk-6.2/themes/portos-public-theme/docroot/WEB-INF/lib/util-java.jar
  50. BIN
      liferay-plugins-sdk-6.2/themes/portos-public-theme/docroot/WEB-INF/lib/util-taglib.jar
  51. BIN
      liferay-plugins-sdk-6.2/themes/portos-public-theme/docroot/images/logo-rs-testo.png
  52. BIN
      liferay-plugins-sdk-6.2/themes/portos-public-theme/docroot/images/logo-rs.png
  53. BIN
      liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-java.jar
  54. BIN
      liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-taglib.jar
  55. BIN
      liferay-plugins-sdk-6.2/webs/resources-importer-web/docroot/WEB-INF/lib/util-java.jar
  56. BIN
      liferay-plugins-sdk-6.2/webs/resources-importer-web/docroot/WEB-INF/lib/util-taglib.jar
  57. BIN
      portos-camel-document-processor/.gradle/2.13/taskArtifacts/cache.properties.lock
  58. BIN
      portos-camel-document-processor/.gradle/2.13/taskArtifacts/fileHashes.bin
  59. BIN
      portos-camel-document-processor/.gradle/2.13/taskArtifacts/fileSnapshots.bin
  60. BIN
      portos-camel-document-processor/.gradle/2.13/taskArtifacts/taskArtifacts.bin

BIN
liferay-plugins-sdk-6.2/dependencies/net.sourceforge.pmd/lib/commons-io.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/hooks/lr-arpa-al-hook/docroot/WEB-INF/lib/commons-collections.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/hooks/lr-arpa-al-hook/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/hooks/lr-arpa-al-hook/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/hooks/portos-p7m-preview-hook/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/commons-codec.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/commons-logging.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/flexjson.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/jstl-api.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/jstl-impl.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/log4j.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/util-bridges.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

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

@ -13,8 +13,8 @@
##
build.namespace=portos_atti
build.number=23
build.date=1569596597937
build.number=24
build.date=1598539119654
build.auto.upgrade=true
##

BIN
liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

1
liferay-plugins-sdk-6.2/portlets/portos-autodestroy-portlet/docroot/WEB-INF/.gitignore vendored

@ -0,0 +1 @@
/classes/

3
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java

@ -355,9 +355,6 @@ public interface IntPraticaLocalService extends BaseLocalService,
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException;
public java.util.List<java.lang.String> svuotaDatabase(
com.liferay.portal.service.ServiceContext serviceContext);
public void clearDb() throws java.lang.Exception;
public it.tref.liferay.portos.bo.model.IntPratica deleteIntPratica(

519
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java

File diff soppresso perché troppo grande Load Diff

5
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceUtil.java

@ -392,11 +392,6 @@ public class IntPraticaLocalServiceUtil {
esitoControllo, dtPratica, oldIntPraticaId, serviceContext);
}
public static java.util.List<java.lang.String> svuotaDatabase(
com.liferay.portal.service.ServiceContext serviceContext) {
return getService().svuotaDatabase(serviceContext);
}
public static void clearDb() throws java.lang.Exception {
getService().clearDb();
}

6
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java

@ -417,12 +417,6 @@ public class IntPraticaLocalServiceWrapper implements IntPraticaLocalService,
oldIntPraticaId, serviceContext);
}
@Override
public java.util.List<java.lang.String> svuotaDatabase(
com.liferay.portal.service.ServiceContext serviceContext) {
return _intPraticaLocalService.svuotaDatabase(serviceContext);
}
@Override
public void clearDb() throws java.lang.Exception {
_intPraticaLocalService.clearDb();

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

@ -1,19 +1,14 @@
/**
*
* @author Salvatore La Manna, Manifattura Web Group per Regione Siciliana
*
*/
package it.mwg.sismica.bo.util;
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.model.Sorteggio;
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.SorteggioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
import it.tref.liferay.portos.bo.util.WorkflowConstants;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
@ -21,108 +16,100 @@ import com.liferay.portal.kernel.exception.PortalException;
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.StringUtil;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portlet.documentlibrary.model.DLFolder;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil;
import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil;
public class PuliziaDatabase {
private static final Log _log = LogFactoryUtil.getLog(PuliziaDatabase.class);
private static final int SLICE = 1000;
private static final int SLICE = 100;
public static List<String> riparaSorteggio(long companyId) {
List<String> esito = new ArrayList<String>();
List<IntPratica> intPratiche = null;
int index = 0;
do {
try {
intPratiche = IntPraticaLocalServiceUtil.getIntPraticas(index, index + SLICE);
} catch (SystemException e) {
_log.info("Errore caricamento intPratiche", e);
}
for (IntPratica intPratica : intPratiche) {
esito.addAll(riparaSorteggioPratica(intPratica));
}
index += SLICE;
} while (intPratiche.size() > 0);
public static List<String> pulisci(ServiceContext serviceContext) {
List<String> esito = new ArrayList<>();
esito.addAll(eliminaDettPraticheOrfane());
esito.addAll(puliziaDocumentLibrary());
return esito;
}
private static List<String> riparaSorteggioPratica(IntPratica intPratica) {
List<String> esito = new ArrayList<String>();
long intPraticaId = intPratica.getIntPraticaId();
if (intPratica.getDtSorteggio() != null) {
try {
List<ControlloPratica> controlliPratica = ControlloPraticaLocalServiceUtil
.findByIntPratica(intPraticaId);
if (0 == controlliPratica.size()) {
SimpleDateFormat sdtf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
esito.add("intPraticaId=" + intPraticaId + " sorteggiata il "
+ sdtf.format(intPratica.getDtSorteggio()) + " non ha controlloPratica");
esito.addAll(riparaControlloPratica(intPratica));
private static List<String>
private static List<String> eliminaDettPraticheOrfane() {
List<String> esito = new ArrayList<>();
int cancellati = 0;
int start = 0;
int totali = 0;
List<DettPratica> dettPratiche;
try {
do {
dettPratiche = DettPraticaLocalServiceUtil.getDettPraticas(start, start + SLICE);
int rimossi = 0;
totali += dettPratiche.size();
for (DettPratica dettPratica : dettPratiche) {
try {
IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
} catch (PortalException e) {
_log.info("Cancello DettPratica orfana " + dettPratica.getDettPraticaId());
cancellati++;
rimossi++;
DettPraticaLocalServiceUtil.deleteDettPratica(dettPratica);
}
}
} catch (SystemException e) {
esito.add("Errore durante la ricerca di ControlloPratica per intPraticaId=" + intPraticaId);
}
start += dettPratiche.size() - rimossi;
} while (dettPratiche.size() > 0);
} catch (PortalException | SystemException e) {
esitoLog(esito, e.getMessage());
}
esitoLog(esito, "Analizzate " + totali + " DettPratica, cancellate " + cancellati);
return esito;
}
private static List<String> riparaControlloPratica(IntPratica intPratica) {
List<String> esito = new ArrayList<String>();
Sorteggio sorteggio = null;
try {
sorteggio = SorteggioLocalServiceUtil.findByIntPratica(intPratica.getIntPraticaId());
} catch (SystemException e) {
esito.add("&gt; errore durante la ricerca del sorteggio");
}
long intPraticaId = intPratica.getIntPraticaId();
long companyId = intPratica.getCompanyId();
DettPratica dettPratica = null;
Territorio territorio = null;
long defaultUserId;
private static List<String> puliziaDocumentLibrary() {
List<String> esito = new ArrayList<>();
try {
dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica
.getIntPraticaId());
territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
defaultUserId = UserLocalServiceUtil.getDefaultUserId(companyId);
} catch (PortalException | SystemException e1) {
esito.add("&gt; errore durante il recupero di DettPratica, Territorio e defaultUserId");
return esito;
}
ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(companyId);
serviceContext.setScopeGroupId(territorio.getGroupId());
serviceContext.setUserId(defaultUserId);
long dettPraticaId = dettPratica.getDettPraticaId();
try {
if (sorteggio == null) {
esito.add("&gt; non è stata sorteggiata per il controllo, aggiungo controllo fittizio");
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.addControlloPratica(
dettPratica.getGroupId(), dettPratica.getUserId(), intPraticaId, dettPraticaId,
false, serviceContext);
controlloPratica.setStatus(WorkflowConstants.STATUS_APPROVED);
IntPraticaLocalServiceUtil.updateStatoPratica(intPraticaId, dettPraticaId,
StatoPraticaConstants.CONFORME);
} else {
esito.add("&gt; è stata sorteggiata per il controllo, aggiungo controllo");
ControlloPraticaLocalServiceUtil.addControlloPratica(intPratica.getGroupId(),
intPratica.getUserId(), intPratica.getIntPraticaId(), dettPraticaId, true,
serviceContext);
IntPraticaLocalServiceUtil.updateStatoPratica(intPraticaId, dettPraticaId,
StatoPraticaConstants.SOTTOPOSTA_A_PARERE);
}
int cancellati = 0;
int start = 0;
int totali = 0;
List<DLFolder> folders;
do {
folders = DLFolderLocalServiceUtil.getDLFolders(start, start + SLICE);
int rimossi = 0;
totali += folders.size();
for (DLFolder folder : folders) {
DLFolder parent = folder.getParentFolder();
if (Validator.isNotNull(parent)) {
switch (parent.getName()) {
case "Allegati":
long[] ids = StringUtil.split(folder.getName(), "_", 0L);
if ((ids.length == 2) && (ids[0] == ids[1])) {
try {
DettPraticaLocalServiceUtil.getDettPratica(ids[0]);
} catch (PortalException e) {
_log.info("Cancello la cartella " + folder.getName());
cancellati++;
rimossi++;
DLAppLocalServiceUtil.deleteFolder(folder.getFolderId());
}
}
break;
}
}
}
start += folders.size() - rimossi;
} while (folders.size() > 0);
esitoLog(esito, "Analizzate " + totali + " cartelle, cancellate " + cancellati);
} catch (PortalException | SystemException e) {
esito.add("&gt; errore durante la creazione del controllo");
esitoLog(esito, "Errore durante l'elaborazione. " + e.getMessage());
}
return esito;
}
private static void esitoLog(List<String> esito, String msg) {
_log.info(msg);
esito.add(msg);
}
}

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

@ -15,7 +15,6 @@ import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.SorteggioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
@ -60,12 +59,6 @@ public class PortosAdministrationPortlet extends MVCPortlet {
actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()]));
}
public void riparaSorteggi(ActionRequest actionRequest, ActionResponse actionResponse) {
ThemeDisplay td = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
List<String> esito = PuliziaDatabase.riparaSorteggio(td.getCompanyId());
actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()]));
}
public void inviaComunicazione(ActionRequest actionRequest, ActionResponse actionResponse) {
ThemeDisplay td = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
List<String> esito = new ArrayList<>();
@ -115,10 +108,10 @@ public class PortosAdministrationPortlet extends MVCPortlet {
actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()]));
}
public void testInterno(ActionRequest actionRequest, ActionResponse actionResponse)
public void manutenzioneDatabase(ActionRequest actionRequest, ActionResponse actionResponse)
throws PortalException, SystemException {
ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
List<String> esito = IntPraticaLocalServiceUtil.svuotaDatabase(serviceContext);
List<String> esito = PuliziaDatabase.pulisci(serviceContext);
actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()]));
}

549
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java

File diff soppresso perché troppo grande Load Diff

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

@ -26,7 +26,6 @@ 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;
@ -60,8 +59,6 @@ import it.tref.liferay.portos.bo.util.PraticaUtil;
import it.tref.liferay.portos.bo.util.WorkflowConstants;
import it.tref.liferay.portos.bo.util.WorkflowUtil;
import it.tref.liferay.portos.kaleo.service.FormLogLocalServiceUtil;
import it.tref.liferay.portos.mailmanager.model.Email;
import it.tref.liferay.portos.mailmanager.model.EmailAttachment;
import it.tref.liferay.portos.report.shared.constants.ReportConstants;
import it.tref.liferay.portos.report.shared.dto.ReportDto;
import it.tref.liferay.portos.report.shared.dto.ReportResultDto;
@ -69,8 +66,6 @@ import it.tref.liferay.portos.report.shared.util.ReportUtil;
import java.io.IOException;
import java.io.Serializable;
import java.sql.Connection;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
@ -79,15 +74,9 @@ import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang.StringUtils;
import com.liferay.portal.kernel.cache.CacheRegistryUtil;
import com.liferay.portal.kernel.cache.MultiVMPoolUtil;
import com.liferay.portal.kernel.cache.SingleVMPoolUtil;
import com.liferay.portal.kernel.dao.jdbc.DataAccess;
import com.liferay.portal.kernel.dao.orm.Disjunction;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
@ -108,7 +97,6 @@ import com.liferay.portal.kernel.repository.model.FileEntry;
import com.liferay.portal.kernel.repository.model.Folder;
import com.liferay.portal.kernel.search.Indexer;
import com.liferay.portal.kernel.search.IndexerRegistryUtil;
import com.liferay.portal.kernel.servlet.DirectServletRegistryUtil;
import com.liferay.portal.kernel.util.FastDateFormatFactoryUtil;
import com.liferay.portal.kernel.util.LocaleUtil;
import com.liferay.portal.kernel.util.MimeTypesUtil;
@ -130,12 +118,6 @@ import com.liferay.portal.workflow.kaleo.model.KaleoLog;
import com.liferay.portal.workflow.kaleo.model.KaleoTaskAssignmentInstance;
import com.liferay.portal.workflow.kaleo.model.KaleoTaskInstanceToken;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
import com.liferay.portlet.documentlibrary.model.DLFileEntry;
import com.liferay.portlet.documentlibrary.model.DLFolder;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil;
import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil;
import com.liferay.portlet.social.model.SocialActivity;
/**
* The implementation of the int pratica local service.
@ -340,140 +322,6 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return intPratica;
}
public List<String> svuotaDatabase(ServiceContext serviceContext) {
List<String> esito = new ArrayList<String>();
try {
Connection connection = DataAccess.getUpgradeOptimizedConnection();
Statement statement = connection.createStatement();
Map<String, Class<?>> svuotare = new HashMap<String, Class<?>>() {
private static final long serialVersionUID = 1;
{
put("kaleoinstance", KaleoInstance.class);
put("kaleoinstancetoken", KaleoInstanceToken.class);
put("kaleolog", KaleoLog.class);
put("kaleotaskassignmentinstance", KaleoTaskAssignmentInstance.class);
put("kaleotaskinstancetoken", KaleoTaskInstanceToken.class);
put("portos_bo_allegatomanuale", AllegatoManuale.class);
put("portos_bo_asseverazione", Asseverazione.class);
put("portos_bo_avviso", Avviso.class);
put("portos_bo_collaudo", Collaudo.class);
put("portos_bo_controllopratica", ControlloPratica.class);
put("portos_bo_delega", Delega.class);
put("portos_bo_dettpratica", DettPratica.class);
put("portos_bo_docaggiuntiva", DocAggiuntiva.class);
put("portos_bo_docpratica", DocPratica.class);
put("portos_bo_finelavori", FineLavori.class);
put("portos_bo_historyworkflowaction", HistoryWorkflowAction.class);
put("portos_bo_intpratica", IntPratica.class);
put("portos_bo_pagamento", Pagamento.class);
put("portos_bo_pareregeo", ParereGeologo.class);
put("portos_bo_soggetto", Soggetto.class);
put("portos_bo_sorteggio", Sorteggio.class);
put("portos_bo_tempistica", Tempistica.class);
put("portos_mail_email", Email.class);
put("portos_mail_emailattachment", EmailAttachment.class);
put("socialactivity", SocialActivity.class);
put("workflowinstancelink", WorkflowInstanceLink.class);
}
};
for (Entry<String, Class<?>> entry : svuotare.entrySet()) {
String table = entry.getKey();
String className = entry.getValue().getName();
statement.execute("TRUNCATE TABLE " + table);
esitoLog(esito, "Tabella " + table + " svuotata");
counterLocalService.increment(className);
counterLocalService.reset(className);
esitoLog(esito, "Contatore di " + className + " azzerato");
}
configurazioneLocalService.storeConfig(Constants.NUMERO_PROGETTO_KEY_DB, "1", serviceContext);
// Reset di tutte le cache
SingleVMPoolUtil.clear();
MultiVMPoolUtil.clear();
CacheRegistryUtil.clear();
DirectServletRegistryUtil.clearServlets();
// Pulizia Document Library
int start = 0;
int totali = 0;
List<String> folderDaSvuotare = new ArrayList<String>() {
private static final long serialVersionUID = 1;
{
add("Allegati");
add("Avvisi");
add("MailManager_EmailAttachments");
add("Report_Sorteggio");
add("Report_Sorteggio_BO");
}
};
List<DLFileEntry> fileEntries;
do {
fileEntries = DLFileEntryLocalServiceUtil.getFileEntries(start, start + 1);
totali++;
for (DLFileEntry fileEntry : fileEntries) {
DLFolder folder = fileEntry.getFolder();
DLFolder parent = folder;
if (Validator.isNotNull(folder)) {
while (Validator.isNotNull(parent.getParentFolderId())) {
folder = parent;
parent = parent.getParentFolder();
}
if (folderDaSvuotare.contains(parent.getName())) {
if (0 == folder.getParentFolderId()) {
_log.info("Cancello il file " + fileEntry.getName());
DLAppLocalServiceUtil.deleteFileEntry(fileEntry.getFileEntryId());
} else {
_log.info("Cancello la cartella " + folder.getName());
DLAppLocalServiceUtil.deleteFolder(folder.getFolderId());
}
start--;
} else {
_log.info("Mantengo il file " + fileEntry.getTitle());
}
} else {
_log.info("Il file " + fileEntry.getName() + " non appartiene a nessuna cartella");
}
}
start++;
} while (fileEntries.size() > 0);
final int SLICE = 100;
int cancellati = start = totali = 0;
List<DLFolder> folders;
do {
folders = DLFolderLocalServiceUtil.getDLFolders(start, start + SLICE);
int rimossi = 0;
totali += folders.size();
for (DLFolder folder : folders) {
int nFiles = DLFileEntryLocalServiceUtil.getFileEntriesCount(folder.getGroupId(),
folder.getFolderId());
if ((0 == nFiles) && (0 != folder.getParentFolderId())) {
DLAppLocalServiceUtil.deleteFolder(folder.getFolderId());
cancellati++;
rimossi++;
}
}
start += folders.size() - rimossi;
_log.info("Analizzate " + totali + " cartelle, cancellate " + cancellati);
} while (folders.size() > 0);
esitoLog(esito, "Analizzate " + totali + " cartelle, cancellate " + cancellati);
} catch (Exception e) {
esitoLog(esito, "Errore: " + e.getMessage());
}
_log.info("Elaborazione terminata correttamente");
return esito;
}
private void esitoLog(List<String> esito, String msg) {
esito.add(msg);
_log.info(msg);
}
public void clearDb() throws Exception {
User user = PermissionThreadLocal.getPermissionChecker().getUser();

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.number=2397
build.date=1598348447039
build.number=2398
build.date=1598538079195
build.auto.upgrade=true
##

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

@ -88,15 +88,14 @@ String dataProssimoSorteggio =
</div>
</div>
<liferay-portlet:actionURL name="testInterno" var="testInternoURL" />
<liferay-portlet:actionURL name="riparaSorteggi" var="riparaSorteggiURL" />
<liferay-portlet:actionURL name="manutenzioneDatabase" var="manutenzioneDatabaseURL" />
<liferay-portlet:actionURL name="inviaComunicazione" var="inviaComunicazioneURL" />
<div class="row-fluid" style="margin-top: 10px;">
<div class="span6">
<div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Test interno</div>
<aui:form action="<%=testInternoURL%>" method="post" name="fmTestInterno">
<div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Manutenzione Database</div>
<aui:form action="<%=manutenzioneDatabaseURL%>" method="post" name="fmDB">
<div>
<aui:button cssClass="btn-danger" type="submit" value="Test interno" />
<aui:button cssClass="btn-danger" type="submit" value="Manutenzione Database" />
</div>
</aui:form>
</div>

BIN
liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/commons-codec.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-log-portlet/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-maintenance-portlet/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-notification-portlet/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-report-engine-portlet/docroot/WEB-INF/lib/commons-codec.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

3
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/META-INF/MANIFEST.MF

@ -1,3 +0,0 @@
Manifest-Version: 1.0
Class-Path:

BIN
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/themes/portos-private-theme/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/themes/portos-public-theme/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/themes/portos-public-theme/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/themes/portos-public-theme/docroot/images/logo-rs-testo.png

File binario non mostrato.

Prima

Larghezza:  |  Altezza:  |  Dimensione: 8.9 KiB

BIN
liferay-plugins-sdk-6.2/themes/portos-public-theme/docroot/images/logo-rs.png

File binario non mostrato.

Prima

Larghezza:  |  Altezza:  |  Dimensione: 4.1 KiB

BIN
liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/webs/resources-importer-web/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/webs/resources-importer-web/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

BIN
portos-camel-document-processor/.gradle/2.13/taskArtifacts/cache.properties.lock

File binario non mostrato.

BIN
portos-camel-document-processor/.gradle/2.13/taskArtifacts/fileHashes.bin

File binario non mostrato.

BIN
portos-camel-document-processor/.gradle/2.13/taskArtifacts/fileSnapshots.bin

File binario non mostrato.

BIN
portos-camel-document-processor/.gradle/2.13/taskArtifacts/taskArtifacts.bin

File binario non mostrato.
Caricamento…
Annulla
Salva