Salvatore La Manna 4 anni fa
parent
commit
ab4336dcaf
  1. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/.classpath
  2. BIN
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/httpclient.jar
  3. BIN
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/util-java.jar
  4. 311
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/PuliziaDatabase.java
  5. 535
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SvuotaDatabase.java
  6. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/PortosAdministrationPortlet.java
  7. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java
  8. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java
  9. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java
  10. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java
  11. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java
  12. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java
  13. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java
  14. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java
  15. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java
  16. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java
  17. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java
  18. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java
  19. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java
  20. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java
  21. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IUVPersistenceImpl.java
  22. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/InfoFascicoloPersistenceImpl.java
  23. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java
  24. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java
  25. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java
  26. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java
  27. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java
  28. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SorteggioPersistenceImpl.java
  29. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java
  30. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java
  31. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java
  32. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/UtentePortosPersistenceImpl.java
  33. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  34. 21
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/.settings/org.eclipse.wst.common.component

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/.classpath

@ -15,6 +15,6 @@
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?project=portos-bo-portlet&amp;ivyXmlPath=ivy.xml&amp;confs=*"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_80"/>
<classpathentry kind="output" path="docroot/WEB-INF/classes"/>
</classpath>

BIN
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/httpclient.jar

File binario non mostrato.

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

File binario non mostrato.

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

@ -1,311 +0,0 @@
/**
*
* @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.service.DettPraticaLocalServiceUtil;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
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.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.servlet.DirectServletRegistryUtil;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.Group;
import com.liferay.portal.model.Organization;
import com.liferay.portal.model.User;
import com.liferay.portal.service.ClassNameLocalServiceUtil;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.model.DLFileEntry;
import com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata;
import com.liferay.portlet.documentlibrary.model.DLFolder;
import com.liferay.portlet.documentlibrary.model.DLSyncConstants;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil;
import com.liferay.portlet.dynamicdatamapping.model.DDMContent;
import com.liferay.portlet.dynamicdatamapping.model.DDMStorageLink;
import com.liferay.portlet.messageboards.model.MBDiscussion;
public class PuliziaDatabase {
private static final Log _log = LogFactoryUtil.getLog(PuliziaDatabase.class);
private static final int SLICE = 1000;
public static List<String> pulisci(ServiceContext serviceContext) {
List<String> esito = new ArrayList<>();
esito.addAll(puliziaDocumentLibrary());
esito.addAll(svuotaDatabase(serviceContext));
try {
SingleVMPoolUtil.clear();
MultiVMPoolUtil.clear();
CacheRegistryUtil.clear();
DirectServletRegistryUtil.clearServlets();
} catch (IllegalStateException e) {
}
return esito;
}
private static List<String> svuotaDatabase(ServiceContext serviceContext) {
List<String> esito = new ArrayList<>();
int rows = 0;
try {
Connection connection = DataAccess.getUpgradeOptimizedConnection();
Statement s = connection.createStatement();
long controlloPraticaClassNameId = ClassNameLocalServiceUtil.getClassName(
ControlloPratica.class.getName()).getClassNameId();
long dettPraticaClassNameId = ClassNameLocalServiceUtil.getClassName(DettPratica.class.getName())
.getClassNameId();
long ddmContentClassNameId = ClassNameLocalServiceUtil.getClassName(DDMContent.class.getName())
.getClassNameId();
long dlFileEntryClassNameId = ClassNameLocalServiceUtil.getClassName(DLFileEntry.class.getName())
.getClassNameId();
long dlFileEntryMetadataClassNameId = ClassNameLocalServiceUtil.getClassName(
DLFileEntryMetadata.class.getName()).getClassNameId();
long dlFolderClassNameId = ClassNameLocalServiceUtil.getClassName(DLFolder.class.getName())
.getClassNameId();
long groupClassNameId = ClassNameLocalServiceUtil.getClassName(Group.class.getName())
.getClassNameId();
long mbDiscussionClassNameId = ClassNameLocalServiceUtil.getClassName(
MBDiscussion.class.getName()).getClassNameId();
long organizationClassNameId = ClassNameLocalServiceUtil.getClassName(
Organization.class.getName()).getClassNameId();
long userClassNameId = ClassNameLocalServiceUtil.getClassName(User.class.getName())
.getClassNameId();
rows = s.executeUpdate("DELETE FROM portos_bo_avviso WHERE avvisoid IN ("
+ "SELECT avvisoid FROM portos_bo_avviso a LEFT JOIN portos_bo_dettpratica d "
+ "ON a.classpk=d.dettpraticaid WHERE classname='" + DettPratica.class.getName()
+ "' AND d.dettpraticaid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da portos_bo_avviso");
rows = s.executeUpdate("DELETE FROM group_ WHERE groupid IN (SELECT groupid FROM group_ "
+ "LEFT JOIN user_ ON group_.classpk=user_.userid WHERE classnameid=" + userClassNameId
+ " AND user_.userid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da group_");
rows = s.executeUpdate("DELETE FROM contact_ WHERE contactid IN ("
+ "SELECT c.contactid FROM contact_ c LEFT JOIN user_ u "
+ "ON c.contactid=u.contactid WHERE u.userid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da contact_");
rows = s.executeUpdate("DELETE FROM usergroup WHERE usergroupid IN ("
+ "SELECT usergroupid FROM usergroup g LEFT JOIN user_ u ON g.userid=u.userid "
+ "WHERE u.userid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da usergroup");
rows = s.executeUpdate("DELETE FROM usergrouprole WHERE userid IN ("
+ "SELECT DISTINCT x.userid FROM usergrouprole x "
+ "LEFT JOIN user_ u ON x.userid=u.userid " + "WHERE u.userid IS NULL) OR groupid IN ("
+ "SELECT DISTINCT x.groupid FROM usergrouprole x "
+ "LEFT JOIN group_ g ON x.groupid=g.groupid "
+ "WHERE g.groupid IS NULL) OR roleid IN ("
+ "SELECT DISTINCT x.roleid FROM usergrouprole x "
+ "LEFT JOIN role_ r ON x.roleid=r.roleid " + "WHERE r.roleid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da usergrouprole");
rows = s.executeUpdate("DELETE FROM ddmcontent WHERE contentid IN ("
+ "SELECT contentid FROM ddmcontent LEFT JOIN dlfileentrymetadata "
+ "ON ddmcontent.contentid=dlfileentrymetadata.ddmstorageid WHERE name='"
+ DDMStorageLink.class.getName()
+ "' AND dlfileentrymetadata.fileentrymetadataid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da ddmcontent");
rows = s.executeUpdate("DELETE FROM assetentry WHERE entryid IN ("
+ "SELECT entryid FROM assetentry a LEFT JOIN dlfileentry b "
+ "ON a.classpk=b.fileentryid WHERE a.classnameid=" + dlFileEntryClassNameId
+ " AND b.fileentryid IS NULL)");
rows += s.executeUpdate("DELETE FROM assetentry WHERE entryid IN ("
+ "SELECT entryid FROM assetentry a LEFT JOIN dlfolder b ON a.classpk=b.folderid "
+ "WHERE a.classnameid=" + dlFolderClassNameId + " AND b.folderid IS NULL)");
rows += s.executeUpdate("DELETE FROM assetentry WHERE entryid IN ("
+ "SELECT entryid FROM assetentry a LEFT JOIN group_ b ON a.classpk=b.groupid "
+ "WHERE a.classnameid=" + groupClassNameId + " AND b.groupid IS NULL)");
rows += s.executeUpdate("DELETE FROM assetentry WHERE entryid IN ("
+ "SELECT entryid FROM assetentry a LEFT JOIN mbdiscussion b "
+ "ON a.classpk=b.discussionid WHERE a.classnameid=" + mbDiscussionClassNameId
+ " AND b.discussionid IS NULL)");
rows += s.executeUpdate("DELETE FROM assetentry WHERE entryid IN ("
+ "SELECT entryid FROM assetentry a LEFT JOIN organization_ b "
+ "ON a.classpk=b.organizationid WHERE a.classnameid=" + organizationClassNameId
+ " AND b.organizationid IS NULL)");
rows += s.executeUpdate("DELETE FROM assetentry WHERE entryid IN ("
+ "SELECT entryid FROM assetentry a LEFT JOIN portos_bo_controllopratica b "
+ "ON a.classpk=b.controllopraticaid WHERE a.classnameid=" + controlloPraticaClassNameId
+ " AND b.controllopraticaid IS NULL)");
rows += s.executeUpdate("DELETE FROM assetentry WHERE entryid IN ("
+ "SELECT entryid FROM assetentry a LEFT JOIN portos_bo_dettpratica b "
+ "ON a.classpk=b.dettpraticaid WHERE a.classnameid=" + dettPraticaClassNameId
+ " AND b.dettpraticaid IS NULL)");
rows += s.executeUpdate("DELETE FROM assetentry WHERE entryid IN ("
+ "SELECT entryid FROM assetentry a LEFT JOIN user_ b ON a.classpk=b.userid "
+ "WHERE a.classnameid=" + userClassNameId + " AND b.userid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da assetentry");
rows = s.executeUpdate("DELETE FROM resourcepermission WHERE resourcepermissionid IN ("
+ "SELECT resourcepermissionid FROM resourcepermission a LEFT JOIN dlfileentry b "
+ "ON a.primkey=b.fileentryid::TEXT WHERE a.name='" + DLFileEntry.class.getName()
+ "' AND b.fileentryid IS NULL)");
rows += s.executeUpdate("DELETE FROM resourcepermission WHERE resourcepermissionid IN ("
+ "SELECT resourcepermissionid FROM resourcepermission a LEFT JOIN dlfolder b "
+ "ON a.primkey=b.folderid::TEXT WHERE a.name='" + DLFolder.class.getName()
+ "' AND b.folderid IS NULL)");
rows += s.executeUpdate("DELETE FROM resourcepermission WHERE resourcepermissionid IN ("
+ "SELECT resourcepermissionid FROM resourcepermission a "
+ "LEFT JOIN portos_bo_controllopratica b "
+ "ON a.primkey=b.controllopraticaid::TEXT WHERE a.name='"
+ ControlloPratica.class.getName() + "' AND b.controllopraticaid IS NULL)");
rows += s.executeUpdate("DELETE FROM resourcepermission WHERE resourcepermissionid IN ("
+ "SELECT resourcepermissionid FROM resourcepermission a LEFT JOIN user_ b "
+ "ON a.primkey=b.userid::TEXT WHERE a.name='" + User.class.getName()
+ "' AND b.userid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da resourcepermission");
rows = s.executeUpdate("DELETE FROM syncdlobject WHERE syncdlobjectid IN ("
+ "SELECT syncdlobjectid FROM syncdlobject LEFT JOIN dlfileentry "
+ "ON syncdlobject.typepk=dlfileentry.fileentryid WHERE type_='"
+ DLSyncConstants.TYPE_FILE + "' AND dlfileentry.fileentryid IS NULL)");
rows += s.executeUpdate("DELETE FROM syncdlobject WHERE syncdlobjectid IN ("
+ "SELECT syncdlobjectid FROM syncdlobject LEFT JOIN dlfolder "
+ "ON syncdlobject.typepk=dlfolder.folderid WHERE type_='" + DLSyncConstants.TYPE_FOLDER
+ "' AND dlfolder.folderid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da syncdlobject");
rows = s.executeUpdate("DELETE FROM ratingsstats WHERE statsid IN ("
+ "SELECT statsid FROM ratingsstats a LEFT JOIN dlfileentry b "
+ "ON a.classpk=b.fileentryid WHERE a.classnameid=" + dlFileEntryClassNameId
+ " AND b.fileentryid IS NULL)");
rows += s.executeUpdate("DELETE FROM ratingsstats WHERE statsid IN ("
+ "SELECT statsid FROM ratingsstats a LEFT JOIN dlfolder b "
+ "ON a.classpk=b.folderid WHERE a.classnameid=" + dlFolderClassNameId
+ " AND b.folderid IS NULL)");
rows += s.executeUpdate("DELETE FROM ratingsstats WHERE statsid IN ("
+ "SELECT statsid FROM ratingsstats a LEFT JOIN portos_bo_controllopratica b "
+ "ON a.classpk=b.controllopraticaid WHERE a.classnameid=" + controlloPraticaClassNameId
+ " AND b.controllopraticaid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da ratingsstats");
rows = s.executeUpdate("DELETE FROM mbmessage WHERE messageid IN ("
+ "SELECT messageid FROM mbmessage a LEFT JOIN dlfileentry b "
+ "ON a.classpk=b.fileentryid WHERE a.classnameid=" + dlFileEntryClassNameId
+ " AND b.fileentryid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da mbmessage");
rows = s.executeUpdate("DELETE FROM mbdiscussion WHERE discussionid IN ("
+ "SELECT discussionid FROM mbdiscussion a LEFT JOIN dlfileentry b "
+ "ON a.classpk=b.fileentryid WHERE a.classnameid=" + dlFileEntryClassNameId
+ " AND b.fileentryid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da mbdiscussion");
rows = s.executeUpdate("DELETE FROM mbthread WHERE threadid IN ("
+ "SELECT DISTINCT mbthread.threadid FROM mbthread LEFT JOIN mbmessage "
+ "ON mbthread.threadid=mbmessage.threadid WHERE mbmessage.messageid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da mbthread");
rows = s.executeUpdate("DELETE FROM dlfileentrymetadata WHERE fileentrymetadataid IN ("
+ "SELECT fileentrymetadataid FROM dlfileentrymetadata a LEFT JOIN dlfileentry b "
+ "ON a.fileentryid=b.fileentryid WHERE b.fileentryid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da dlfileentrymetadata");
rows = s.executeUpdate("DELETE FROM ddmstructurelink WHERE structurelinkid IN ("
+ "SELECT structurelinkid FROM ddmstructurelink a LEFT JOIN dlfileentrymetadata b "
+ "ON a.classpk=b.fileentrymetadataid WHERE a.classnameid="
+ dlFileEntryMetadataClassNameId + " AND b.fileentrymetadataid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da ddmstructurelink");
rows = s.executeUpdate("DELETE FROM ddmstoragelink WHERE storagelinkid IN ("
+ "SELECT storagelinkid FROM ddmstoragelink a LEFT JOIN ddmcontent b "
+ "ON a.classpk=b.contentid WHERE a.classnameid=" + ddmContentClassNameId
+ " AND b.contentid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da ddmstoragelink");
rows = s.executeUpdate("DELETE FROM socialactivity WHERE activityid IN ("
+ "SELECT activityid FROM socialactivity a LEFT JOIN dlfileentry b "
+ "ON a.classpk=b.fileentryid WHERE a.classnameid=" + dlFileEntryClassNameId
+ " AND b.fileentryid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da socialactivity");
rows = s.executeUpdate("DELETE FROM systemevent WHERE systemeventid IN ("
+ "SELECT systemeventid FROM systemevent a LEFT JOIN dlfileentry b "
+ "ON a.classpk=b.fileentryid WHERE a.classnameid=" + dlFileEntryClassNameId
+ " AND b.fileentryid IS NULL)");
rows += s.executeUpdate("DELETE FROM systemevent WHERE systemeventid IN ("
+ "SELECT systemeventid FROM systemevent a LEFT JOIN dlfolder b "
+ "ON a.classpk=b.folderid WHERE a.classnameid=" + dlFolderClassNameId
+ " AND b.folderid IS NULL)");
rows += s.executeUpdate("DELETE FROM systemevent WHERE systemeventid IN ("
+ "SELECT systemeventid FROM systemevent a LEFT JOIN portos_bo_controllopratica b "
+ "ON a.classpk=b.controllopraticaid WHERE a.classnameid=" + controlloPraticaClassNameId
+ " AND b.controllopraticaid IS NULL)");
rows += s.executeUpdate("DELETE FROM systemevent WHERE systemeventid IN ("
+ "SELECT systemeventid FROM systemevent a LEFT JOIN portos_bo_dettpratica b "
+ "ON a.classpk=b.dettpraticaid WHERE a.classnameid=" + dettPraticaClassNameId
+ " AND b.dettpraticaid IS NULL)");
esitoLog(esito, "Cancellate " + rows + " righe da systemevent");
} catch (SQLException | SystemException e) {
esitoLog(esito, "Interrotto per errore: " + e.getMessage());
}
return esito;
}
private static List<String> puliziaDocumentLibrary() {
List<String> esito = new ArrayList<>();
try {
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) {
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);
}
}

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

@ -0,0 +1,535 @@
/**
*
* @author Salvatore La Manna, Manifattura Web Group per Regione Siciliana
*
*/
package it.mwg.sismica.bo.util;
import it.tref.liferay.portos.bo.model.AllegatoManuale;
import it.tref.liferay.portos.bo.model.Asseverazione;
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.Delega;
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.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.model.Tempistica;
import it.tref.liferay.portos.bo.service.AllegatoManualeLocalServiceUtil;
import it.tref.liferay.portos.bo.service.AsseverazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.CollaudoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DelegaLocalServiceUtil;
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.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TempisticaLocalServiceUtil;
import it.tref.liferay.portos.mailmanager.model.Email;
import it.tref.liferay.portos.mailmanager.model.EmailAttachment;
import it.tref.liferay.portos.mailmanager.service.EmailAttachmentLocalServiceUtil;
import it.tref.liferay.portos.mailmanager.service.EmailLocalServiceUtil;
import java.util.ArrayList;
import java.util.List;
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.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.servlet.DirectServletRegistryUtil;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.Company;
import com.liferay.portal.model.Contact;
import com.liferay.portal.model.Group;
import com.liferay.portal.model.LayoutPrototype;
import com.liferay.portal.model.LayoutSetPrototype;
import com.liferay.portal.model.Organization;
import com.liferay.portal.model.User;
import com.liferay.portal.model.UserPersonalSite;
import com.liferay.portal.service.ClassNameLocalServiceUtil;
import com.liferay.portal.service.CompanyLocalServiceUtil;
import com.liferay.portal.service.ContactLocalServiceUtil;
import com.liferay.portal.service.GroupLocalServiceUtil;
import com.liferay.portal.service.LayoutPrototypeLocalServiceUtil;
import com.liferay.portal.service.LayoutSetPrototypeLocalServiceUtil;
import com.liferay.portal.service.OrganizationLocalServiceUtil;
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.DLFolderLocalServiceUtil;
public class SvuotaDatabase {
private static final Log _log = LogFactoryUtil.getLog(SvuotaDatabase.class);
private static final int SLICE = 1000;
public static List<String> pulisci(ServiceContext serviceContext) throws SystemException, PortalException {
List<String> esito = new ArrayList<>();
esito.addAll(puliziaDocumentLibrary());
esito.addAll(svuotaDatabase(serviceContext));
try {
SingleVMPoolUtil.clear();
MultiVMPoolUtil.clear();
CacheRegistryUtil.clear();
DirectServletRegistryUtil.clearServlets();
} catch (IllegalStateException e) {
}
return esito;
}
private static List<String> svuotaDatabase(ServiceContext serviceContext) throws SystemException,
PortalException {
List<String> esito = new ArrayList<>();
esitoLog(esito, "Cancellati " + svuotaAllegatoManuale() + " AllegatoManuale");
esitoLog(esito, "Cancellati " + svuotaAsseverazione() + " Asseverazione");
esitoLog(esito, "Cancellati " + svuotaAvviso() + " Avviso");
esitoLog(esito, "Cancellati " + svuotaCollaudo() + " Collaudo");
esitoLog(esito, "Cancellati " + svuotaContact() + " Contacts");
esitoLog(esito, "Cancellati " + svuotaControlloPratica() + " ControlloPratica");
esitoLog(esito, "Cancellati " + svuotaDelega() + " Delega");
esitoLog(esito, "Cancellati " + svuotaDettPratica() + " DettPratica");
esitoLog(esito, "Cancellati " + svuotaDocAggiuntiva() + " DocAggiuntiva");
esitoLog(esito, "Cancellati " + svuotaDocPratica() + " DocPratica");
esitoLog(esito, "Cancellati " + svuotaEmail() + " Email");
esitoLog(esito, "Cancellati " + svuotaEmailAttachment() + " EmailAttachment");
esitoLog(esito, "Cancellati " + svuotaFineLavori() + " FineLavori");
esitoLog(esito, "Cancellati " + svuotaGroup() + " Group");
esitoLog(esito, "Cancellati " + svuotaPagamento() + " Pagamento");
esitoLog(esito, "Cancellati " + svuotaTempistica() + " Tempistica");
return esito;
}
private static List<String> puliziaDocumentLibrary() {
List<String> esito = new ArrayList<>();
try {
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) {
esitoLog(esito, "Errore durante l'elaborazione. " + e.getMessage());
}
return esito;
}
private static int svuotaAllegatoManuale() throws SystemException {
int start = 0;
int cancellati = 0;
List<AllegatoManuale> allegatiManuali = null;
do {
int rimossi = 0;
allegatiManuali = AllegatoManualeLocalServiceUtil.getAllegatoManuales(start, start + SLICE);
for (AllegatoManuale allegatoManuale : allegatiManuali) {
if (!esiste(IntPratica.class.getName(), allegatoManuale.getIntPraticaId())
|| !esiste(DettPratica.class.getName(), allegatoManuale.getDettPraticaId())
|| !esiste(Avviso.class.getName(), allegatoManuale.getAvvisoId())) {
deleteFileEntry(allegatoManuale.getFileEntryId());
AllegatoManualeLocalServiceUtil.deleteAllegatoManuale(allegatoManuale);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (allegatiManuali.size() > 0);
return cancellati;
}
private static int svuotaAsseverazione() throws SystemException {
int start = 0;
int cancellati = 0;
List<Asseverazione> asseverazioni = null;
do {
int rimossi = 0;
asseverazioni = AsseverazioneLocalServiceUtil.getAsseveraziones(start, start + SLICE);
for (Asseverazione asseverazione : asseverazioni) {
if (!esiste(IntPratica.class.getName(), asseverazione.getIntPraticaId())
|| !esiste(DettPratica.class.getName(), asseverazione.getDettPraticaId())
|| !esiste(Soggetto.class.getName(), asseverazione.getSoggettoId())) {
deleteFileEntry(asseverazione.getFileEntryId());
AsseverazioneLocalServiceUtil.deleteAsseverazione(asseverazione);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (asseverazioni.size() > 0);
return cancellati;
}
private static int svuotaAvviso() throws SystemException {
int start = 0;
int cancellati = 0;
List<Avviso> avvisi = null;
do {
avvisi = AvvisoLocalServiceUtil.getAvvisos(start, start + SLICE);
int rimossi = 0;
for (Avviso avviso : avvisi) {
if (!esiste(avviso.getClassName(), avviso.getClassPk())
|| !esiste(IntPratica.class.getName(), avviso.getIntPraticaId())) {
deleteFileEntry(avviso.getFileEntryIdBase());
deleteFileEntry(avviso.getFileEntryIdInvio());
deleteFileEntry(avviso.getFileEntryIdProtocollo());
AvvisoLocalServiceUtil.deleteAvviso(avviso);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (avvisi.size() > 0);
return cancellati;
}
private static int svuotaCollaudo() throws SystemException, PortalException {
int start = 0;
int cancellati = 0;
List<Collaudo> collaudi = null;
do {
collaudi = CollaudoLocalServiceUtil.getCollaudos(start, start + SLICE);
int rimossi = 0;
for (Collaudo collaudo : collaudi) {
if (!esiste(IntPratica.class.getName(), collaudo.getIntPraticaId())) {
CollaudoLocalServiceUtil.deleteCollaudo(collaudo);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (collaudi.size() > 0);
return cancellati;
}
private static int svuotaControlloPratica() throws SystemException, PortalException {
int start = 0;
int cancellati = 0;
List<ControlloPratica> controlliPratiche = null;
do {
controlliPratiche = ControlloPraticaLocalServiceUtil.getControlloPraticas(start, start + SLICE);
int rimossi = 0;
for (ControlloPratica controlloPratica : controlliPratiche) {
if (!esiste(IntPratica.class.getName(), controlloPratica.getIntPraticaId())
|| !esiste(DettPratica.class.getName(), controlloPratica.getDettPraticaId())) {
ControlloPraticaLocalServiceUtil.deleteControlloPratica(controlloPratica);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (controlliPratiche.size() > 0);
return cancellati;
}
private static int svuotaDelega() throws SystemException, PortalException {
int start = 0;
int cancellati = 0;
List<Delega> deleghe = null;
do {
deleghe = DelegaLocalServiceUtil.getDelegas(start, start + SLICE);
int rimossi = 0;
for (Delega delega : deleghe) {
if (!esiste(IntPratica.class.getName(), delega.getIntPraticaId())
|| !esiste(DettPratica.class.getName(), delega.getDettPraticaId())) {
DelegaLocalServiceUtil.deleteDelega(delega);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (deleghe.size() > 0);
return cancellati;
}
private static int svuotaContact() throws SystemException, PortalException {
int start = 0;
int cancellati = 0;
List<Contact> contacts = null;
do {
contacts = ContactLocalServiceUtil.getContacts(start, start + SLICE);
int rimossi = 0;
for (Contact contact : contacts) {
if (!esiste(contact.getClassName(), contact.getClassPK())) {
ContactLocalServiceUtil.deleteContact(contact);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (contacts.size() > 0);
return cancellati;
}
private static int svuotaDettPratica() throws SystemException, PortalException {
int start = 0;
int cancellati = 0;
List<DettPratica> dettPratiche = null;
do {
dettPratiche = DettPraticaLocalServiceUtil.getDettPraticas(start, start + SLICE);
int rimossi = 0;
for (DettPratica dettPratica : dettPratiche) {
if (!esiste(IntPratica.class.getName(), dettPratica.getIntPraticaId())) {
DettPraticaLocalServiceUtil.deleteDettPratica(dettPratica);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (dettPratiche.size() > 0);
return cancellati;
}
private static int svuotaDocAggiuntiva() throws SystemException, PortalException {
int start = 0;
int cancellati = 0;
List<DocAggiuntiva> docAggiuntive = null;
do {
docAggiuntive = DocAggiuntivaLocalServiceUtil.getDocAggiuntivas(start, start + SLICE);
int rimossi = 0;
for (DocAggiuntiva docAggiuntiva : docAggiuntive) {
if (!esiste(IntPratica.class.getName(), docAggiuntiva.getIntPraticaId())
|| !esiste(DettPratica.class.getName(), docAggiuntiva.getDettPraticaId())) {
deleteFileEntry(docAggiuntiva.getFileEntryId());
DocAggiuntivaLocalServiceUtil.deleteDocAggiuntiva(docAggiuntiva);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (docAggiuntive.size() > 0);
return cancellati;
}
private static int svuotaDocPratica() throws SystemException, PortalException {
int start = 0;
int cancellati = 0;
List<DocPratica> docPratiche = null;
do {
docPratiche = DocPraticaLocalServiceUtil.getDocPraticas(start, start + SLICE);
int rimossi = 0;
for (DocPratica docPratica : docPratiche) {
if (!esiste(IntPratica.class.getName(), docPratica.getIntPraticaId())) {
deleteFileEntry(docPratica.getDlFileEntryId());
DocPraticaLocalServiceUtil.deleteDocPratica(docPratica);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (docPratiche.size() > 0);
return cancellati;
}
private static int svuotaEmail() throws SystemException, PortalException {
int start = 0;
int cancellati = 0;
List<Email> emails = null;
do {
emails = EmailLocalServiceUtil.getEmails(start, start + SLICE);
int rimossi = 0;
for (Email email : emails) {
if (!esiste(email.getClassName(), email.getClassPK())) {
EmailLocalServiceUtil.deleteEmail(email);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (emails.size() > 0);
return cancellati;
}
private static int svuotaEmailAttachment() throws SystemException, PortalException {
int start = 0;
int cancellati = 0;
List<EmailAttachment> emailAttachments = null;
do {
emailAttachments = EmailAttachmentLocalServiceUtil.getEmailAttachments(start, start + SLICE);
int rimossi = 0;
for (EmailAttachment emailAttachment : emailAttachments) {
if (!esiste(Email.class.getName(), emailAttachment.getEmailId())) {
deleteFileEntry(emailAttachment.getFileEntryId());
EmailAttachmentLocalServiceUtil.deleteEmailAttachment(emailAttachment);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (emailAttachments.size() > 0);
return cancellati;
}
private static int svuotaFineLavori() throws SystemException, PortalException {
int start = 0;
int cancellati = 0;
List<FineLavori> finiLavori = null;
do {
finiLavori = FineLavoriLocalServiceUtil.getFineLavoris(start, start + SLICE);
int rimossi = 0;
for (FineLavori fineLavori : finiLavori) {
if (!esiste(IntPratica.class.getName(), fineLavori.getIntPraticaId())) {
FineLavoriLocalServiceUtil.deleteFineLavori(fineLavori);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (finiLavori.size() > 0);
return cancellati;
}
private static int svuotaGroup() throws SystemException, PortalException {
int start = 0;
int cancellati = 0;
List<Group> groups = null;
do {
groups = GroupLocalServiceUtil.getGroups(start, start + SLICE);
int rimossi = 0;
for (Group group : groups) {
if (!esiste(group.getClassName(), group.getClassPK())) {
GroupLocalServiceUtil.deleteGroup(group);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (groups.size() > 0);
return cancellati;
}
private static int svuotaPagamento() throws SystemException, PortalException {
int start = 0;
int cancellati = 0;
List<Pagamento> pagamenti = null;
do {
pagamenti = PagamentoLocalServiceUtil.getPagamentos(start, start + SLICE);
int rimossi = 0;
for (Pagamento pagamento : pagamenti) {
if (!esiste(pagamento.getClassName(), pagamento.getClassPk())
|| !esiste(IntPratica.class.getName(), pagamento.getIntPraticaId())) {
deleteFileEntry(pagamento.getFileEntryId());
PagamentoLocalServiceUtil.deletePagamento(pagamento);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (pagamenti.size() > 0);
return cancellati;
}
private static int svuotaTempistica() throws SystemException, PortalException {
int start = 0;
int cancellati = 0;
List<Tempistica> tempistiche = null;
do {
tempistiche = TempisticaLocalServiceUtil.getTempisticas(start, start + SLICE);
int rimossi = 0;
for (Tempistica tempistica : tempistiche) {
if (!esiste(IntPratica.class.getName(), tempistica.getIntPraticaId())
|| !esiste(DettPratica.class.getName(), tempistica.getDettPraticaId())) {
TempisticaLocalServiceUtil.deleteTempistica(tempistica);
rimossi++;
cancellati++;
}
}
start += SLICE - rimossi;
} while (tempistiche.size() > 0);
return cancellati;
}
private static boolean esiste(long classNameId, long classPK) throws PortalException, SystemException {
return esiste(ClassNameLocalServiceUtil.getClassName(classNameId).getClassName(), classPK);
}
private static boolean esiste(String className, long classPK) throws SystemException {
try {
if (className.equalsIgnoreCase(Asseverazione.class.getName())) {
AsseverazioneLocalServiceUtil.getAsseverazione(classPK);
} else if (className.equalsIgnoreCase(Avviso.class.getName())) {
AvvisoLocalServiceUtil.getAvviso(classPK);
} else if (className.equalsIgnoreCase(Company.class.getName())) {
CompanyLocalServiceUtil.getCompany(classPK);
} else if (className.equalsIgnoreCase(Delega.class.getName())) {
DelegaLocalServiceUtil.getDelega(classPK);
} else if (className.equalsIgnoreCase(DettPratica.class.getName())) {
DettPraticaLocalServiceUtil.getDettPratica(classPK);
} else if (className.equalsIgnoreCase(Email.class.getName())) {
EmailLocalServiceUtil.getEmail(classPK);
} else if (className.equalsIgnoreCase(Group.class.getName())) {
GroupLocalServiceUtil.getGroup(classPK);
} else if (className.equalsIgnoreCase(IntPratica.class.getName())) {
IntPraticaLocalServiceUtil.getIntPratica(classPK);
} else if (className.equalsIgnoreCase(LayoutPrototype.class.getName())) {
LayoutPrototypeLocalServiceUtil.getLayoutPrototype(classPK);
} else if (className.equalsIgnoreCase(LayoutSetPrototype.class.getName())) {
LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototype(classPK);
} else if (className.equalsIgnoreCase(Organization.class.getName())) {
OrganizationLocalServiceUtil.getOrganization(classPK);
} else if (className.equalsIgnoreCase(Soggetto.class.getName())) {
SoggettoLocalServiceUtil.getSoggetto(classPK);
} else if (className.equalsIgnoreCase(User.class.getName())) {
UserLocalServiceUtil.getUser(classPK);
} else if (className.equalsIgnoreCase(UserPersonalSite.class.getName())) {
// Nop
} else {
_log.info("Classe non supportata: " + className);
}
} catch (PortalException e) {
return false;
}
return true;
}
private static void deleteFileEntry(long fileEntryId) throws SystemException {
try {
DLAppLocalServiceUtil.deleteFileEntry(fileEntryId);
} catch (PortalException e) {
}
}
private static void esitoLog(List<String> esito, String msg) {
_log.info(msg);
esito.add(msg);
}
}

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

@ -1,6 +1,6 @@
package it.tref.liferay.portos.bo.portlet;
import it.mwg.sismica.bo.util.PuliziaDatabase;
import it.mwg.sismica.bo.util.SvuotaDatabase;
import it.mwg.sismica.bo.util.SismicaUtil;
import it.mwg.sismica.bo.util.SorteggioPraticaUtil;
import it.tref.liferay.portos.bo.model.ControlloPratica;
@ -100,7 +100,7 @@ public class PortosAdministrationPortlet extends MVCPortlet {
public void svuotaDatabase(ActionRequest actionRequest, ActionResponse actionResponse)
throws PortalException, SystemException {
ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
List<String> esito = PuliziaDatabase.pulisci(serviceContext);
List<String> esito = SvuotaDatabase.pulisci(serviceContext);
actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()]));
}

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchAllegatoManualeException;
import it.tref.liferay.portos.bo.model.AllegatoManuale;
import it.tref.liferay.portos.bo.model.impl.AllegatoManualeImpl;
import it.tref.liferay.portos.bo.model.impl.AllegatoManualeModelImpl;
import it.tref.liferay.portos.bo.service.persistence.AllegatoManualePersistence;
import java.io.Serializable;

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

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchAsseverazioneException;
import it.tref.liferay.portos.bo.model.Asseverazione;
import it.tref.liferay.portos.bo.model.impl.AsseverazioneImpl;
import it.tref.liferay.portos.bo.model.impl.AsseverazioneModelImpl;
import it.tref.liferay.portos.bo.service.persistence.AsseverazionePersistence;
import java.io.Serializable;

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

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchAvvisoException;
import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.model.impl.AvvisoImpl;
import it.tref.liferay.portos.bo.model.impl.AvvisoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.AvvisoPersistence;
import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchCollaudoException;
import it.tref.liferay.portos.bo.model.Collaudo;
import it.tref.liferay.portos.bo.model.impl.CollaudoImpl;
import it.tref.liferay.portos.bo.model.impl.CollaudoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.CollaudoPersistence;
import java.io.Serializable;

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

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchComuneException;
import it.tref.liferay.portos.bo.model.Comune;
import it.tref.liferay.portos.bo.model.impl.ComuneImpl;
import it.tref.liferay.portos.bo.model.impl.ComuneModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ComunePersistence;
import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchComunicazioneException;
import it.tref.liferay.portos.bo.model.Comunicazione;
import it.tref.liferay.portos.bo.model.impl.ComunicazioneImpl;
import it.tref.liferay.portos.bo.model.impl.ComunicazioneModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ComunicazionePersistence;
import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchConfigurazioneException;
import it.tref.liferay.portos.bo.model.Configurazione;
import it.tref.liferay.portos.bo.model.impl.ConfigurazioneImpl;
import it.tref.liferay.portos.bo.model.impl.ConfigurazioneModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ConfigurazionePersistence;
import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchControlloPraticaException;
import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.model.impl.ControlloPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.ControlloPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ControlloPraticaPersistence;
import java.io.Serializable;

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

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchDelegaException;
import it.tref.liferay.portos.bo.model.Delega;
import it.tref.liferay.portos.bo.model.impl.DelegaImpl;
import it.tref.liferay.portos.bo.model.impl.DelegaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.DelegaPersistence;
import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchDettPraticaException;
import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.impl.DettPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.DettPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.DettPraticaPersistence;
import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchDocAggiuntivaException;
import it.tref.liferay.portos.bo.model.DocAggiuntiva;
import it.tref.liferay.portos.bo.model.impl.DocAggiuntivaImpl;
import it.tref.liferay.portos.bo.model.impl.DocAggiuntivaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.DocAggiuntivaPersistence;
import java.io.Serializable;

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

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchDocPraticaException;
import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.impl.DocPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.DocPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.DocPraticaPersistence;
import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchFineLavoriException;
import it.tref.liferay.portos.bo.model.FineLavori;
import it.tref.liferay.portos.bo.model.impl.FineLavoriImpl;
import it.tref.liferay.portos.bo.model.impl.FineLavoriModelImpl;
import it.tref.liferay.portos.bo.service.persistence.FineLavoriPersistence;
import java.io.Serializable;

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

@ -42,6 +42,7 @@ import it.tref.liferay.portos.bo.NoSuchHistoryWorkflowActionException;
import it.tref.liferay.portos.bo.model.HistoryWorkflowAction;
import it.tref.liferay.portos.bo.model.impl.HistoryWorkflowActionImpl;
import it.tref.liferay.portos.bo.model.impl.HistoryWorkflowActionModelImpl;
import it.tref.liferay.portos.bo.service.persistence.HistoryWorkflowActionPersistence;
import java.io.Serializable;

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

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchIUVException;
import it.tref.liferay.portos.bo.model.IUV;
import it.tref.liferay.portos.bo.model.impl.IUVImpl;
import it.tref.liferay.portos.bo.model.impl.IUVModelImpl;
import it.tref.liferay.portos.bo.service.persistence.IUVPersistence;
import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchInfoFascicoloException;
import it.tref.liferay.portos.bo.model.InfoFascicolo;
import it.tref.liferay.portos.bo.model.impl.InfoFascicoloImpl;
import it.tref.liferay.portos.bo.model.impl.InfoFascicoloModelImpl;
import it.tref.liferay.portos.bo.service.persistence.InfoFascicoloPersistence;
import java.io.Serializable;

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

@ -48,6 +48,7 @@ import it.tref.liferay.portos.bo.NoSuchIntPraticaException;
import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.impl.IntPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.IntPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.IntPraticaPersistence;
import java.io.Serializable;

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

@ -46,6 +46,7 @@ import it.tref.liferay.portos.bo.NoSuchPagamentoException;
import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.model.impl.PagamentoImpl;
import it.tref.liferay.portos.bo.model.impl.PagamentoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.PagamentoPersistence;
import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchParereGeologoException;
import it.tref.liferay.portos.bo.model.ParereGeologo;
import it.tref.liferay.portos.bo.model.impl.ParereGeologoImpl;
import it.tref.liferay.portos.bo.model.impl.ParereGeologoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ParereGeologoPersistence;
import java.io.Serializable;

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

@ -43,6 +43,7 @@ import it.tref.liferay.portos.bo.NoSuchProvinciaException;
import it.tref.liferay.portos.bo.model.Provincia;
import it.tref.liferay.portos.bo.model.impl.ProvinciaImpl;
import it.tref.liferay.portos.bo.model.impl.ProvinciaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.ProvinciaPersistence;
import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchSoggettoException;
import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.model.impl.SoggettoImpl;
import it.tref.liferay.portos.bo.model.impl.SoggettoModelImpl;
import it.tref.liferay.portos.bo.service.persistence.SoggettoPersistence;
import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchSorteggioException;
import it.tref.liferay.portos.bo.model.Sorteggio;
import it.tref.liferay.portos.bo.model.impl.SorteggioImpl;
import it.tref.liferay.portos.bo.model.impl.SorteggioModelImpl;
import it.tref.liferay.portos.bo.service.persistence.SorteggioPersistence;
import java.io.Serializable;

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

@ -42,6 +42,7 @@ import it.tref.liferay.portos.bo.NoSuchStoricoSoggettoPraticaException;
import it.tref.liferay.portos.bo.model.StoricoSoggettoPratica;
import it.tref.liferay.portos.bo.model.impl.StoricoSoggettoPraticaImpl;
import it.tref.liferay.portos.bo.model.impl.StoricoSoggettoPraticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.StoricoSoggettoPraticaPersistence;
import java.io.Serializable;

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

@ -45,6 +45,7 @@ import it.tref.liferay.portos.bo.NoSuchTempisticaException;
import it.tref.liferay.portos.bo.model.Tempistica;
import it.tref.liferay.portos.bo.model.impl.TempisticaImpl;
import it.tref.liferay.portos.bo.model.impl.TempisticaModelImpl;
import it.tref.liferay.portos.bo.service.persistence.TempisticaPersistence;
import java.io.Serializable;

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

@ -44,6 +44,7 @@ import it.tref.liferay.portos.bo.NoSuchTerritorioException;
import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.model.impl.TerritorioImpl;
import it.tref.liferay.portos.bo.model.impl.TerritorioModelImpl;
import it.tref.liferay.portos.bo.service.persistence.TerritorioPersistence;
import java.io.Serializable;

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

@ -43,6 +43,7 @@ import it.tref.liferay.portos.bo.NoSuchUtentePortosException;
import it.tref.liferay.portos.bo.model.UtentePortos;
import it.tref.liferay.portos.bo.model.impl.UtentePortosImpl;
import it.tref.liferay.portos.bo.model.impl.UtentePortosModelImpl;
import it.tref.liferay.portos.bo.service.persistence.UtentePortosPersistence;
import java.io.Serializable;

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=2699
build.date=1603794307107
build.number=2700
build.date=1603980802483
build.auto.upgrade=true
##

21
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/.settings/org.eclipse.wst.common.component

@ -2,33 +2,12 @@
<wb-module deploy-name="portos-fe-portlet">
<wb-resource deploy-path="/" source-path="/docroot" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/docroot/WEB-INF/src"/>
<dependent-module archiveName="portos-bo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="hms-taglib-hook-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/hms-taglib-hook/docroot/WEB-INF/lib/hms-taglib-hook-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="portos-bo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="portos-bo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="portos-bo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="portos-bo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="portos-bo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="portos-bo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="portos-bo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="portos-fe-portlet"/>
<property name="java-output-path" value="/portos-fe-portlet/docroot/WEB-INF/classes"/>
</wb-module>

Caricamento…
Annulla
Salva