> deserializer = JSONFactoryUtil.createJSONDeserializer();
String dichiarazioni = getDichiarazioni();
if (Validator.isNull(dichiarazioni)) {
dichiarazioni = "{}";
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DocAggiuntivaImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DocAggiuntivaImpl.java
index 2c9b03ca..b83a46ab 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DocAggiuntivaImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DocAggiuntivaImpl.java
@@ -21,35 +21,38 @@ import com.liferay.portlet.documentlibrary.model.DLFileEntry;
import com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil;
/**
- * The extended model implementation for the DocAggiuntiva service. Represents a row in the
- * "portos_bo_DocAggiuntiva" database table, with each column mapped to a property of this
- * class.
+ * The extended model implementation for the DocAggiuntiva service. Represents a
+ * row in the "portos_bo_DocAggiuntiva" database table, with each
+ * column mapped to a property of this class.
*
*
- * Helper methods and all application logic should be put in this class. Whenever methods are added,
- * rerun ServiceBuilder to copy their definitions into the
- * {@link it.tref.liferay.portos.bo.model.DocAggiuntiva} interface.
+ * Helper methods and all application logic should be put in this class.
+ * Whenever methods are added, rerun ServiceBuilder to copy their definitions
+ * into the {@link it.tref.liferay.portos.bo.model.DocAggiuntiva} interface.
*
*
* @author Davide Barbagallo, 3F Consulting
*/
+@SuppressWarnings("serial")
public class DocAggiuntivaImpl extends DocAggiuntivaBaseImpl {
- /*
- * NOTE FOR DEVELOPERS:
- *
- * Never reference this class directly. All methods that expect a doc aggiuntiva model instance
- * should use the {@link it.tref.liferay.portos.bo.model.DocAggiuntiva} interface instead.
- */
- public DocAggiuntivaImpl() {}
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never reference this class directly. All methods that expect a doc
+ * aggiuntiva model instance should use the {@link
+ * it.tref.liferay.portos.bo.model.DocAggiuntiva} interface instead.
+ */
+ public DocAggiuntivaImpl() {
+ }
- public String getFileName() throws PortalException, SystemException {
+ public String getFileName() throws PortalException, SystemException {
- if (getFileEntryId() == 0L && getOldFileEntryId() != 0L) {
- FilesImporter.handleFileImportDocAggiuntiva(this);
- return StringPool.BLANK;
- }
+ if (getFileEntryId() == 0L && getOldFileEntryId() != 0L) {
+ FilesImporter.handleFileImportDocAggiuntiva(this);
+ return StringPool.BLANK;
+ }
- DLFileEntry file = DLFileEntryServiceUtil.getFileEntry(getFileEntryId());
- return file.getDescription();
- }
+ DLFileEntry file = DLFileEntryServiceUtil.getFileEntry(getFileEntryId());
+ return file.getDescription();
+ }
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DocPraticaImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DocPraticaImpl.java
index 8ca8e2d2..3e91e3ea 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DocPraticaImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DocPraticaImpl.java
@@ -23,42 +23,45 @@ import com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil;
import com.liferay.portlet.documentlibrary.util.DLUtil;
/**
- * The extended model implementation for the DocPratica service. Represents a row in the
- * "portos_bo_DocPratica" database table, with each column mapped to a property of this
- * class.
+ * The extended model implementation for the DocPratica service. Represents a
+ * row in the "portos_bo_DocPratica" database table, with each column
+ * mapped to a property of this class.
*
*
- * Helper methods and all application logic should be put in this class. Whenever methods are added,
- * rerun ServiceBuilder to copy their definitions into the
- * {@link it.tref.liferay.portos.bo.model.DocPratica} interface.
+ * Helper methods and all application logic should be put in this class.
+ * Whenever methods are added, rerun ServiceBuilder to copy their definitions
+ * into the {@link it.tref.liferay.portos.bo.model.DocPratica} interface.
*
*
* @author Davide Barbagallo, 3F Consulting
*/
+@SuppressWarnings("serial")
public class DocPraticaImpl extends DocPraticaBaseImpl {
- /*
- * NOTE FOR DEVELOPERS:
- *
- * Never reference this class directly. All methods that expect a doc pratica model instance
- * should use the {@link it.tref.liferay.portos.bo.model.DocPratica} interface instead.
- */
- public DocPraticaImpl() {}
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never reference this class directly. All methods that expect a doc
+ * pratica model instance should use the {@link
+ * it.tref.liferay.portos.bo.model.DocPratica} interface instead.
+ */
+ public DocPraticaImpl() {
+ }
- @Override
- public String getFileName() throws PortalException, SystemException {
- if (Validator.isNull(getDlFileEntryId())) {
- return "Da importare";
- }
- DLFileEntry file = DLFileEntryServiceUtil.getFileEntry(getDlFileEntryId());
- return file.getTitle();
- }
+ @Override
+ public String getFileName() throws PortalException, SystemException {
+ if (Validator.isNull(getDlFileEntryId())) {
+ return "Da importare";
+ }
+ DLFileEntry file = DLFileEntryServiceUtil.getFileEntry(getDlFileEntryId());
+ return file.getTitle();
+ }
- public String getDownloadUrl(ThemeDisplay themeDisplay) throws PortalException, SystemException {
- if (Validator.isNull(getDlFileEntryId())) {
- return "Da importare";
- }
- FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(getDlFileEntryId());
- return DLUtil.getPreviewURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, "&download=true");
- }
+ public String getDownloadUrl(ThemeDisplay themeDisplay) throws PortalException, SystemException {
+ if (Validator.isNull(getDlFileEntryId())) {
+ return "Da importare";
+ }
+ FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(getDlFileEntryId());
+ return DLUtil.getPreviewURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, "&download=true");
+ }
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/HistoryWorkflowActionImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/HistoryWorkflowActionImpl.java
index 6e20f5fd..8be9b6f7 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/HistoryWorkflowActionImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/HistoryWorkflowActionImpl.java
@@ -15,19 +15,27 @@
package it.tref.liferay.portos.bo.model.impl;
/**
- * The extended model implementation for the HistoryWorkflowAction service. Represents a row in the "portos_bo_HistoryWorkflowAction" database table, with each column mapped to a property of this class.
+ * The extended model implementation for the HistoryWorkflowAction service.
+ * Represents a row in the "portos_bo_HistoryWorkflowAction" database
+ * table, with each column mapped to a property of this class.
*
*
- * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.bo.model.HistoryWorkflowAction} interface.
+ * Helper methods and all application logic should be put in this class.
+ * Whenever methods are added, rerun ServiceBuilder to copy their definitions
+ * into the {@link it.tref.liferay.portos.bo.model.HistoryWorkflowAction}
+ * interface.
*
*
* @author Davide Barbagallo, 3F Consulting
*/
+@SuppressWarnings("serial")
public class HistoryWorkflowActionImpl extends HistoryWorkflowActionBaseImpl {
/*
* NOTE FOR DEVELOPERS:
- *
- * Never reference this class directly. All methods that expect a history workflow action model instance should use the {@link it.tref.liferay.portos.bo.model.HistoryWorkflowAction} interface instead.
+ *
+ * Never reference this class directly. All methods that expect a history
+ * workflow action model instance should use the {@link
+ * it.tref.liferay.portos.bo.model.HistoryWorkflowAction} interface instead.
*/
public HistoryWorkflowActionImpl() {
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IUVImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IUVImpl.java
index 83cf2955..161e1e10 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IUVImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IUVImpl.java
@@ -15,19 +15,26 @@
package it.tref.liferay.portos.bo.model.impl;
/**
- * The extended model implementation for the IUV service. Represents a row in the "portos_bo_IUV" database table, with each column mapped to a property of this class.
+ * The extended model implementation for the IUV service. Represents a row in
+ * the "portos_bo_IUV" database table, with each column mapped to a
+ * property of this class.
*
*
- * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.bo.model.IUV} interface.
+ * Helper methods and all application logic should be put in this class.
+ * Whenever methods are added, rerun ServiceBuilder to copy their definitions
+ * into the {@link it.tref.liferay.portos.bo.model.IUV} interface.
*
*
* @author Davide Barbagallo, 3F Consulting
*/
+@SuppressWarnings("serial")
public class IUVImpl extends IUVBaseImpl {
/*
* NOTE FOR DEVELOPERS:
- *
- * Never reference this class directly. All methods that expect a i u v model instance should use the {@link it.tref.liferay.portos.bo.model.IUV} interface instead.
+ *
+ * Never reference this class directly. All methods that expect a i u v
+ * model instance should use the {@link it.tref.liferay.portos.bo.model.IUV}
+ * interface instead.
*/
public IUVImpl() {
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/InfoFascicoloImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/InfoFascicoloImpl.java
index 4ba57ab2..f924c80d 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/InfoFascicoloImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/InfoFascicoloImpl.java
@@ -15,19 +15,26 @@
package it.tref.liferay.portos.bo.model.impl;
/**
- * The extended model implementation for the InfoFascicolo service. Represents a row in the "portos_bo_InfoFascicolo" database table, with each column mapped to a property of this class.
+ * The extended model implementation for the InfoFascicolo service. Represents a
+ * row in the "portos_bo_InfoFascicolo" database table, with each
+ * column mapped to a property of this class.
*
*
- * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.bo.model.InfoFascicolo} interface.
+ * Helper methods and all application logic should be put in this class.
+ * Whenever methods are added, rerun ServiceBuilder to copy their definitions
+ * into the {@link it.tref.liferay.portos.bo.model.InfoFascicolo} interface.
*
*
* @author Davide Barbagallo, 3F Consulting
*/
+@SuppressWarnings("serial")
public class InfoFascicoloImpl extends InfoFascicoloBaseImpl {
/*
* NOTE FOR DEVELOPERS:
- *
- * Never reference this class directly. All methods that expect a info fascicolo model instance should use the {@link it.tref.liferay.portos.bo.model.InfoFascicolo} interface instead.
+ *
+ * Never reference this class directly. All methods that expect a info
+ * fascicolo model instance should use the {@link
+ * it.tref.liferay.portos.bo.model.InfoFascicolo} interface instead.
*/
public InfoFascicoloImpl() {
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/ProvinciaImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/ProvinciaImpl.java
index 7a5224a4..da2f7ada 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/ProvinciaImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/ProvinciaImpl.java
@@ -15,19 +15,26 @@
package it.tref.liferay.portos.bo.model.impl;
/**
- * The extended model implementation for the Provincia service. Represents a row in the "portos_provincia" database table, with each column mapped to a property of this class.
+ * The extended model implementation for the Provincia service. Represents a row
+ * in the "portos_provincia" database table, with each column mapped
+ * to a property of this class.
*
*
- * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.bo.model.Provincia} interface.
+ * Helper methods and all application logic should be put in this class.
+ * Whenever methods are added, rerun ServiceBuilder to copy their definitions
+ * into the {@link it.tref.liferay.portos.bo.model.Provincia} interface.
*
*
* @author Davide Barbagallo, 3F Consulting
*/
+@SuppressWarnings("serial")
public class ProvinciaImpl extends ProvinciaBaseImpl {
/*
* NOTE FOR DEVELOPERS:
- *
- * Never reference this class directly. All methods that expect a provincia model instance should use the {@link it.tref.liferay.portos.bo.model.Provincia} interface instead.
+ *
+ * Never reference this class directly. All methods that expect a provincia
+ * model instance should use the {@link
+ * it.tref.liferay.portos.bo.model.Provincia} interface instead.
*/
public ProvinciaImpl() {
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/SoggettoImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/SoggettoImpl.java
index 3ef47a8b..44f2b5f0 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/SoggettoImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/SoggettoImpl.java
@@ -18,23 +18,24 @@ import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
/**
- * The extended model implementation for the Soggetto service. Represents a row in the
- * "portos_bo_Soggetto" database table, with each column mapped to a property of this
- * class.
+ * The extended model implementation for the Soggetto service. Represents a row
+ * in the "portos_bo_Soggetto" database table, with each column mapped
+ * to a property of this class.
*
*
- * Helper methods and all application logic should be put in this class. Whenever methods are added,
- * rerun ServiceBuilder to copy their definitions into the
- * {@link it.tref.liferay.portos.bo.model.Soggetto} interface.
+ * Helper methods and all application logic should be put in this class.
+ * Whenever methods are added, rerun ServiceBuilder to copy their definitions
+ * into the {@link it.tref.liferay.portos.bo.model.Soggetto} interface.
*
*
* @author Davide Barbagallo, 3F Consulting
*/
+@SuppressWarnings("serial")
public class SoggettoImpl extends SoggettoBaseImpl {
/*
- * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a soggetto
- * model instance should use the {@link it.tref.liferay.portos.bo.model.Soggetto} interface
- * instead.
+ * NOTE FOR DEVELOPERS: Never reference this class directly. All methods
+ * that expect a soggetto model instance should use the {@link
+ * it.tref.liferay.portos.bo.model.Soggetto} interface instead.
*/
public SoggettoImpl() {
@@ -44,7 +45,6 @@ public class SoggettoImpl extends SoggettoBaseImpl {
String tipologia = LanguageUtil.get(LocaleUtil.ITALIAN, "gc-soggetto-" + getTipologiaSoggetto());
-
String ambito = StringPool.BLANK;
if (Validator.isNotNull(getAmbitoProfessione())) {
ambito = StringPool.SPACE + StringPool.DASH + StringPool.SPACE;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/SorteggioImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/SorteggioImpl.java
index 1acb4a96..c7806456 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/SorteggioImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/SorteggioImpl.java
@@ -15,32 +15,34 @@ package it.tref.liferay.portos.bo.model.impl;
import com.liferay.portal.kernel.util.Validator;
/**
- * The extended model implementation for the Sorteggio service. Represents a row in the
- * "portos_bo_Sorteggio" database table, with each column mapped to a property of this
- * class.
+ * The extended model implementation for the Sorteggio service. Represents a row
+ * in the "portos_bo_Sorteggio" database table, with each column
+ * mapped to a property of this class.
*
*
- * Helper methods and all application logic should be put in this class. Whenever methods are added,
- * rerun ServiceBuilder to copy their definitions into the
- * {@link it.tref.liferay.portos.bo.model.Sorteggio} interface.
+ * Helper methods and all application logic should be put in this class.
+ * Whenever methods are added, rerun ServiceBuilder to copy their definitions
+ * into the {@link it.tref.liferay.portos.bo.model.Sorteggio} interface.
*
*
* @author Davide Barbagallo, 3F Consulting
*/
+@SuppressWarnings("serial")
public class SorteggioImpl extends SorteggioBaseImpl {
- /*
- * NOTE FOR DEVELOPERS:
- *
- * Never reference this class directly. All methods that expect a sorteggio model instance should
- * use the {@link it.tref.liferay.portos.bo.model.Sorteggio} interface instead.
- */
- public SorteggioImpl() {}
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never reference this class directly. All methods that expect a sorteggio
+ * model instance should use the {@link
+ * it.tref.liferay.portos.bo.model.Sorteggio} interface instead.
+ */
+ public SorteggioImpl() {
+ }
-
- public boolean mesePrecedenteToBoolean() {
- if (Validator.isNull(getMesePrecedente())) {
- return false;
- }
- return Boolean.parseBoolean(getMesePrecedente());
- }
+ public boolean mesePrecedenteToBoolean() {
+ if (Validator.isNull(getMesePrecedente())) {
+ return false;
+ }
+ return Boolean.parseBoolean(getMesePrecedente());
+ }
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/StoricoSoggettoPraticaImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/StoricoSoggettoPraticaImpl.java
index 69e14a68..e4cc48cf 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/StoricoSoggettoPraticaImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/StoricoSoggettoPraticaImpl.java
@@ -15,19 +15,28 @@
package it.tref.liferay.portos.bo.model.impl;
/**
- * The extended model implementation for the StoricoSoggettoPratica service. Represents a row in the "portos_bo_StoricoSoggettoPratica" database table, with each column mapped to a property of this class.
+ * The extended model implementation for the StoricoSoggettoPratica service.
+ * Represents a row in the "portos_bo_StoricoSoggettoPratica" database
+ * table, with each column mapped to a property of this class.
*
*
- * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.bo.model.StoricoSoggettoPratica} interface.
+ * Helper methods and all application logic should be put in this class.
+ * Whenever methods are added, rerun ServiceBuilder to copy their definitions
+ * into the {@link it.tref.liferay.portos.bo.model.StoricoSoggettoPratica}
+ * interface.
*
*
* @author Davide Barbagallo, 3F Consulting
*/
+@SuppressWarnings("serial")
public class StoricoSoggettoPraticaImpl extends StoricoSoggettoPraticaBaseImpl {
/*
* NOTE FOR DEVELOPERS:
- *
- * Never reference this class directly. All methods that expect a storico soggetto pratica model instance should use the {@link it.tref.liferay.portos.bo.model.StoricoSoggettoPratica} interface instead.
+ *
+ * Never reference this class directly. All methods that expect a storico
+ * soggetto pratica model instance should use the {@link
+ * it.tref.liferay.portos.bo.model.StoricoSoggettoPratica} interface
+ * instead.
*/
public StoricoSoggettoPraticaImpl() {
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/UtentePortosImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/UtentePortosImpl.java
index 24ddb0e4..b2732ecb 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/UtentePortosImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/UtentePortosImpl.java
@@ -15,19 +15,26 @@
package it.tref.liferay.portos.bo.model.impl;
/**
- * The extended model implementation for the UtentePortos service. Represents a row in the "portos_bo_UtentePortos" database table, with each column mapped to a property of this class.
+ * The extended model implementation for the UtentePortos service. Represents a
+ * row in the "portos_bo_UtentePortos" database table, with each
+ * column mapped to a property of this class.
*
*
- * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.bo.model.UtentePortos} interface.
+ * Helper methods and all application logic should be put in this class.
+ * Whenever methods are added, rerun ServiceBuilder to copy their definitions
+ * into the {@link it.tref.liferay.portos.bo.model.UtentePortos} interface.
*
*
* @author Davide Barbagallo, 3F Consulting
*/
+@SuppressWarnings("serial")
public class UtentePortosImpl extends UtentePortosBaseImpl {
/*
* NOTE FOR DEVELOPERS:
- *
- * Never reference this class directly. All methods that expect a utente portos model instance should use the {@link it.tref.liferay.portos.bo.model.UtentePortos} interface instead.
+ *
+ * Never reference this class directly. All methods that expect a utente
+ * portos model instance should use the {@link
+ * it.tref.liferay.portos.bo.model.UtentePortos} interface instead.
*/
public UtentePortosImpl() {
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/DettPraticaModelListener.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/DettPraticaModelListener.java
index 1de21dec..d62cb641 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/DettPraticaModelListener.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/DettPraticaModelListener.java
@@ -35,8 +35,7 @@ public class DettPraticaModelListener extends BaseModelListener {
}
if (model.getStatus() == WorkflowConstants.STATUS_APPROVED) {
- IntPratica intPratica = IntPraticaLocalServiceUtil.updateModifiedDate(
- model.getIntPraticaId(), new Date());
+ IntPraticaLocalServiceUtil.updateModifiedDate(model.getIntPraticaId(), new Date());
}
} catch (SearchException | NoSuchIntPraticaException | SystemException e) {
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoInstanceTokenModelListener.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoInstanceTokenModelListener.java
index 6510341e..e59a31b9 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoInstanceTokenModelListener.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/KaleoInstanceTokenModelListener.java
@@ -20,11 +20,8 @@ import com.liferay.portal.kernel.search.Indexer;
import com.liferay.portal.kernel.search.IndexerRegistryUtil;
import com.liferay.portal.kernel.search.SearchException;
import com.liferay.portal.model.BaseModelListener;
-import com.liferay.portal.service.ServiceContext;
-import com.liferay.portal.workflow.kaleo.model.KaleoInstance;
import com.liferay.portal.workflow.kaleo.model.KaleoInstanceToken;
import com.liferay.portal.workflow.kaleo.model.KaleoTaskInstanceToken;
-import com.liferay.portal.workflow.kaleo.service.KaleoInstanceLocalServiceUtil;
import com.liferay.portal.workflow.kaleo.service.KaleoTaskInstanceTokenLocalServiceUtil;
public class KaleoInstanceTokenModelListener extends BaseModelListener {
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AllegatiManualiPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AllegatiManualiPortlet.java
index 684c4020..16f6455e 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AllegatiManualiPortlet.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AllegatiManualiPortlet.java
@@ -44,116 +44,116 @@ import com.liferay.util.bridges.mvc.MVCPortlet;
public class AllegatiManualiPortlet extends MVCPortlet {
- private Log _log = LogFactoryUtil.getLog(AllegatiManualiPortlet.class);
-
- public void uploadAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException,
- SystemException {
- try {
- UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest);
- ServiceContext serviceContext = ServiceContextFactory.getInstance(uploadRequest);
- long intPraticaId = ParamUtil.getLong(uploadRequest, "intPraticaId");
- long dettPraticaId = ParamUtil.getLong(uploadRequest, "dettPraticaId");
- String descrizione = ParamUtil.getString(uploadRequest, "descrizione");
- String sourceFileName = uploadRequest.getFileName("docFile");
- File file = uploadRequest.getFile("docFile");
-
- if (Validator.isNotNull(sourceFileName) && file != null) {
- // lunghezza fissata a 200
- if (sourceFileName.length() > 200) {
- SessionErrors.add(actionRequest, "error.geniocivilefe.allegato.manuale.length.valid");
- }
- } else {
- SessionErrors.add(actionRequest, "error.geniocivilefe.allegato.manuale.is.request");
- }
-
- if (!SessionErrors.isEmpty(actionRequest)) {
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- } else {
- if (Validator.isNotNull(intPraticaId) && Validator.isNotNull(dettPraticaId)) {
- byte[] content = FileUtil.getBytes(file);
-
- AllegatoManuale allegatoManuale =
- AllegatoManualeLocalServiceUtil.addAllegatoManuale(serviceContext.getUserId(), intPraticaId,
- dettPraticaId, descrizione, content, sourceFileName, serviceContext);
- }
- }
-
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- } catch (Exception e) {
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- _log.error("Error", e);
- throw new SystemException(e);
- }
-
- }
-
- public void deleteAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
- long allegatoManualeId = ParamUtil.getLong(actionRequest, "allegatoManualeId");
- AllegatoManualeServiceUtil.deleteAllegatoManuale(allegatoManualeId);
- }
-
- @Override
- public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException,
- PortletException {
-
- String id = resourceRequest.getResourceID();
-
- try {
- if ("downloadAll".equals(id)) {
- long intPraticaId = ParamUtil.getLong(resourceRequest, "intPraticaId");
- List docs = AllegatoManualeServiceUtil.findByIntPratica(intPraticaId);
-
- ZipWriter zipWriter = ZipWriterFactoryUtil.getZipWriter();
-
- for (AllegatoManuale doc : docs) {
-
- InputStream inputStream = null;
- try {
- FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getFileEntryId());
- inputStream =
- DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(), fileEntry.getVersion(), false);
-
- String name = fileEntry.getTitle() + StringPool.PERIOD + fileEntry.getExtension();
- zipWriter.addEntry(name, inputStream);
- } finally {
- StreamUtil.cleanUp(inputStream);
- }
- }
-
- resourceResponse.reset();
-
- File file = zipWriter.getFile();
- byte[] data = Files.readAllBytes(file.toPath());
-
- resourceResponse.setContentType(ContentTypes.APPLICATION_ZIP);
- resourceResponse.addProperty(HttpHeaders.CACHE_CONTROL, "max-age=3600, must-revalidate");
- resourceResponse
- .addProperty(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + file.getName() + "\"");
- resourceResponse.setContentLength(data.length);
-
- resourceResponse.getPortletOutputStream().write(data);
- resourceResponse.getPortletOutputStream().flush();
- resourceResponse.getPortletOutputStream().close();
-
- } else if ("importFile".equals(id)) {
-
- long classPk = ParamUtil.getLong(resourceRequest, "classPk");
- String className = ParamUtil.getString(resourceRequest, "className");
-
- FilesImporter.importaFile(classPk, className);
-
- PortletResponseUtil
- .write(
- resourceResponse,
- "Completato
Refresh ");
-
- } else {
- super.serveResource(resourceRequest, resourceResponse);
- }
- } catch (PortalException | SystemException e) {
- _log.error(e, e);
- throw new IOException(e);
- }
- }
+ private Log _log = LogFactoryUtil.getLog(AllegatiManualiPortlet.class);
+
+ public void uploadAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse)
+ throws PortalException, SystemException {
+ try {
+ UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest);
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(uploadRequest);
+ long intPraticaId = ParamUtil.getLong(uploadRequest, "intPraticaId");
+ long dettPraticaId = ParamUtil.getLong(uploadRequest, "dettPraticaId");
+ String descrizione = ParamUtil.getString(uploadRequest, "descrizione");
+ String sourceFileName = uploadRequest.getFileName("docFile");
+ File file = uploadRequest.getFile("docFile");
+
+ if (Validator.isNotNull(sourceFileName) && file != null) {
+ // lunghezza fissata a 200
+ if (sourceFileName.length() > 200) {
+ SessionErrors.add(actionRequest, "error.geniocivilefe.allegato.manuale.length.valid");
+ }
+ } else {
+ SessionErrors.add(actionRequest, "error.geniocivilefe.allegato.manuale.is.request");
+ }
+
+ if (!SessionErrors.isEmpty(actionRequest)) {
+ PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ } else {
+ if (Validator.isNotNull(intPraticaId) && Validator.isNotNull(dettPraticaId)) {
+ byte[] content = FileUtil.getBytes(file);
+
+ AllegatoManualeLocalServiceUtil
+ .addAllegatoManuale(serviceContext.getUserId(), intPraticaId, dettPraticaId,
+ descrizione, content, sourceFileName, serviceContext);
+ }
+ }
+
+ PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ } catch (Exception e) {
+ PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ _log.error("Error", e);
+ throw new SystemException(e);
+ }
+
+ }
+
+ public void deleteAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse)
+ throws Exception {
+ long allegatoManualeId = ParamUtil.getLong(actionRequest, "allegatoManualeId");
+ AllegatoManualeServiceUtil.deleteAllegatoManuale(allegatoManualeId);
+ }
+
+ @Override
+ public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse)
+ throws IOException, PortletException {
+
+ String id = resourceRequest.getResourceID();
+
+ try {
+ if ("downloadAll".equals(id)) {
+ long intPraticaId = ParamUtil.getLong(resourceRequest, "intPraticaId");
+ List docs = AllegatoManualeServiceUtil.findByIntPratica(intPraticaId);
+
+ ZipWriter zipWriter = ZipWriterFactoryUtil.getZipWriter();
+
+ for (AllegatoManuale doc : docs) {
+
+ InputStream inputStream = null;
+ try {
+ FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getFileEntryId());
+ inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(),
+ fileEntry.getVersion(), false);
+
+ String name = fileEntry.getTitle() + StringPool.PERIOD + fileEntry.getExtension();
+ zipWriter.addEntry(name, inputStream);
+ } finally {
+ StreamUtil.cleanUp(inputStream);
+ }
+ }
+
+ resourceResponse.reset();
+
+ File file = zipWriter.getFile();
+ byte[] data = Files.readAllBytes(file.toPath());
+
+ resourceResponse.setContentType(ContentTypes.APPLICATION_ZIP);
+ resourceResponse.addProperty(HttpHeaders.CACHE_CONTROL, "max-age=3600, must-revalidate");
+ resourceResponse.addProperty(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\""
+ + file.getName() + "\"");
+ resourceResponse.setContentLength(data.length);
+
+ resourceResponse.getPortletOutputStream().write(data);
+ resourceResponse.getPortletOutputStream().flush();
+ resourceResponse.getPortletOutputStream().close();
+
+ } else if ("importFile".equals(id)) {
+
+ long classPk = ParamUtil.getLong(resourceRequest, "classPk");
+ String className = ParamUtil.getString(resourceRequest, "className");
+
+ FilesImporter.importaFile(classPk, className);
+
+ PortletResponseUtil
+ .write(resourceResponse,
+ "Completato
Refresh ");
+
+ } else {
+ super.serveResource(resourceRequest, resourceResponse);
+ }
+ } catch (PortalException | SystemException e) {
+ _log.error(e, e);
+ throw new IOException(e);
+ }
+ }
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AmministrazionePortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AmministrazionePortlet.java
index 09ea2604..28e42c74 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AmministrazionePortlet.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AmministrazionePortlet.java
@@ -16,8 +16,6 @@ import it.tref.liferay.portos.bo.util.WebKeys;
import java.io.File;
import java.io.FileReader;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Enumeration;
@@ -31,7 +29,6 @@ import org.apache.commons.lang.StringUtils;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
-import com.liferay.portal.kernel.language.LanguageUtil;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.upload.UploadPortletRequest;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/CarichiLavoroPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/CarichiLavoroPortlet.java
index 5f2ad1a6..a28e40d4 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/CarichiLavoroPortlet.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/CarichiLavoroPortlet.java
@@ -1,13 +1,6 @@
package it.tref.liferay.portos.bo.portlet;
-import com.liferay.portal.kernel.log.Log;
-import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.util.bridges.mvc.MVCPortlet;
-
public class CarichiLavoroPortlet extends MVCPortlet {
-
- private Log _log = LogFactoryUtil.getLog(CarichiLavoroPortlet.class);
-
-
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneFirmePortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneFirmePortlet.java
index 279d4a73..1606e4b8 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneFirmePortlet.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneFirmePortlet.java
@@ -13,12 +13,9 @@ import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.AvvisoServiceUtil;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.TempisticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.util.Constants;
import it.tref.liferay.portos.bo.util.GestioneFirmeUtil;
-import it.tref.liferay.portos.bo.util.TempisticaConstants;
-
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletException;
@@ -31,8 +28,6 @@ import com.liferay.portal.kernel.dao.orm.QueryUtil;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.language.LanguageUtil;
-import com.liferay.portal.kernel.log.Log;
-import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.servlet.ServletResponseUtil;
import com.liferay.portal.kernel.servlet.SessionErrors;
import com.liferay.portal.kernel.util.ArrayUtil;
@@ -61,358 +56,363 @@ import com.liferay.util.bridges.mvc.MVCPortlet;
*/
public class GestioneFirmePortlet extends MVCPortlet {
- private static final Log _log = LogFactoryUtil.getLog(GestioneFirmePortlet.class);
-
- public void assignaFirma(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException,
- SystemException {
-
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- User user = UserLocalServiceUtil.getUser(serviceContext.getUserId());
- long avvisoId = ParamUtil.getLong(actionRequest, "avvisoId");
-
- Avviso avviso = AvvisoLocalServiceUtil.getAvviso(avvisoId);
- if (GestioneFirmeUtil.userCanSignAvviso(user.getUserId(), avviso.getGroupId(), avviso.getAvvisoId())) {
- AvvisoServiceUtil.assegnaFirma(avviso.getAvvisoId(), user.getScreenName());
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- } else {
- SessionErrors.add(actionRequest, "non possibile asssegnazione firma");
- }
- }
-
- public void rilasciaFirma(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException,
- SystemException {
-
- ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
- User user = UserLocalServiceUtil.getUser(serviceContext.getUserId());
- long avvisoId = ParamUtil.getLong(actionRequest, "avvisoId");
- Avviso avviso = AvvisoLocalServiceUtil.getAvviso(avvisoId);
- AvvisoServiceUtil.rilasciaFirma(avviso.getAvvisoId(), user.getScreenName());
- PortalUtil.copyRequestParameters(actionRequest, actionResponse);
- }
-
- //ADT BUG-ID=16 Sezione Pratiche Assegnate / Export CSV delle firme
- @Override
- public void serveResource(ResourceRequest resourceRequest,
- ResourceResponse resourceResponse) throws IOException,
- PortletException {
-
- String resourceId = GetterUtil.getString(resourceRequest.getResourceID());
-
- if (resourceId.equals("exportCSV")) {
-
- ThemeDisplay themeDisplay = (ThemeDisplay) resourceRequest.getAttribute(WebKeys.THEME_DISPLAY);
-
- long companyId = themeDisplay.getCompanyId();
- Locale locale = themeDisplay.getLocale();
- User user = themeDisplay.getUser();
-
-
- String tabs1 = ParamUtil.getString(resourceRequest, "tabs1");
-
- try {
-
- String csv = null;
- String fileName = null;
-
- if("Tab_AvvisiDaFirmare".equals(tabs1)){
- fileName = "firmati";
- csv = exportToCSVAvvisiDaFirmare(companyId, user, locale);
- } else if("Tab_AvvisiAltri".equals(tabs1)){
- fileName = "assegnati_altri";
- csv = exportToCSVAvvisiAltri(companyId, user, locale);
- } else if("Tab_AvvisiFirme".equals(tabs1)){
- fileName = "da_firmare";
- csv = exportToCSVAvvisiFirme(companyId, user.getScreenName(), locale);
- }
-
- HttpServletRequest request = PortalUtil.getHttpServletRequest(resourceRequest);
- HttpServletResponse response = PortalUtil.getHttpServletResponse(resourceResponse);
-
- ServletResponseUtil.sendFile(request, response, "export_firme_" + fileName + ".csv",
- csv.getBytes(StringPool.UTF8), ContentTypes.TEXT_CSV_UTF8);
-
- } catch (Exception e) {
- throw new IOException(e);
- }
-
- }
-
-
- super.serveResource(resourceRequest, resourceResponse);
- }
-
- //ADT BUG-ID=16 Sezione Pratiche Assegnate / Export CSV delle firme
- private String exportToCSVAvvisiFirme(long companyId, String cf, Locale locale) throws Exception {
-
- Format dateFormat = FastDateFormatFactoryUtil.getDate(locale);
- Format dateTimeFormat = FastDateFormatFactoryUtil.getDateTime(locale);
-
- StringBuilder sb = new StringBuilder();
-
- List lista = AvvisoLocalServiceUtil.getAvvisiFirmatiByCF(companyId, cf, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
-
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.progetto")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.protocollo")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.descrizione")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "provincia")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.dataAvviso")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.tipoDocumento")));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(StringPool.NEW_LINE);
-
- for (Iterator iterator = lista.iterator(); iterator.hasNext();) {
- Avviso avviso = (Avviso) iterator.next();
-
- DettPratica dettPratica = DettPraticaLocalServiceUtil.fetchDettPratica(avviso.getClassPk());
- IntPratica intPratica = null;
- if(Validator.isNotNull(dettPratica)){
- intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
- } else {
- intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso.getIntPraticaId());
- }
- sb.append(CSVUtil.encode(intPratica.getNumeroProgetto()));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(Validator.isNotNull(dettPratica) ? dettPratica.getProtocollo() : StringPool.BLANK));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(avviso.getDescLong()));
- sb.append(StringPool.SEMICOLON);
-
- long territorioGroupId = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()).getGroupId();
- long organizationId = GroupLocalServiceUtil.getGroup(territorioGroupId).getOrganizationId();
- String genio = OrganizationLocalServiceUtil.getOrganization(organizationId).getName();
- sb.append(CSVUtil.encode(genio));
- sb.append(StringPool.SEMICOLON);
+ public void assignaFirma(ActionRequest actionRequest, ActionResponse actionResponse)
+ throws PortalException, SystemException {
-
- sb.append(CSVUtil.encode(dateFormat.format(avviso.getDtAvviso())));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, avviso.translateTipoDocumento())));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(StringPool.NEW_LINE);
- }
-
- return sb.toString();
- }
- //ADT BUG-ID=16 Sezione Pratiche Assegnate / Export CSV delle firme
- private String exportToCSVAvvisiAltri(long companyId, User user, Locale locale) throws Exception {
-
- Format dateFormat = FastDateFormatFactoryUtil.getDate(locale);
- Format dateTimeFormat = FastDateFormatFactoryUtil.getDateTime(locale);
-
- StringBuilder sb = new StringBuilder();
-
- long[] gruopIds = new long[0];
- List organizations = OrganizationLocalServiceUtil.getUserOrganizations(user.getUserId());
- for(Organization organization:organizations){
- if(UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), organization.getGroupId(), Constants.ROLE_NAME_FIRMA, true)){
- gruopIds = ArrayUtil.append(gruopIds, organization.getGroupId());
- }
- }
-
- List lista = AvvisoLocalServiceUtil.getAvvisiDaFirmarePrimaFirmaByNotCF(companyId, gruopIds, user.getScreenName(), QueryUtil.ALL_POS, QueryUtil.ALL_POS);
-
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.progetto")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.protocollo")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.descrizione")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "provincia")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.dataAvviso")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.tipoDocumento")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.firma")));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(StringPool.NEW_LINE);
-
- for (Iterator iterator = lista.iterator(); iterator.hasNext();) {
- Avviso avviso = (Avviso) iterator.next();
-
- DettPratica dettPratica = DettPraticaLocalServiceUtil.fetchDettPratica(avviso.getClassPk());
- IntPratica intPratica = null;
- if(Validator.isNotNull(dettPratica)){
- intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
- } else {
- intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso.getIntPraticaId());
- }
- sb.append(CSVUtil.encode(intPratica.getNumeroProgetto()));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(Validator.isNotNull(dettPratica) ? dettPratica.getProtocollo() : StringPool.BLANK));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(avviso.getDescLong()));
- sb.append(StringPool.SEMICOLON);
-
- long territorioGroupId = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()).getGroupId();
- long organizationId = GroupLocalServiceUtil.getGroup(territorioGroupId).getOrganizationId();
- String genio = OrganizationLocalServiceUtil.getOrganization(organizationId).getName();
- sb.append(CSVUtil.encode(genio));
- sb.append(StringPool.SEMICOLON);
-
-
- sb.append(CSVUtil.encode(dateFormat.format(avviso.getDtAvviso())));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, avviso.translateTipoDocumento())));
- sb.append(StringPool.SEMICOLON);
-
- String cf = avviso.getUserCodiceFiscalePrimaFirma();
- User userFirma = UserLocalServiceUtil.fetchUserByScreenName(companyId, cf);
- sb.append(CSVUtil.encode(Validator.isNotNull(userFirma) ? userFirma.getFullName() : cf));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(StringPool.NEW_LINE);
- }
-
- return sb.toString();
- }
-
- //ADT BUG-ID=16 Sezione Pratiche Assegnate / Export CSV delle firme
- private String exportToCSVAvvisiDaFirmare(long companyId, User user, Locale locale) throws Exception {
-
- Format dateFormat = FastDateFormatFactoryUtil.getDate(locale);
- Format dateTimeFormat = FastDateFormatFactoryUtil.getDateTime(locale);
-
- StringBuilder sb = new StringBuilder();
-
- List listaLeTueFirme = AvvisoLocalServiceUtil.getAvvisiDaFirmarePrimaFirmaByCF(companyId, user.getScreenName(), QueryUtil.ALL_POS, QueryUtil.ALL_POS);
-
- sb.append("LE TUE FIRME");
- sb.append(StringPool.NEW_LINE);
-
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.progetto")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.protocollo")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.descrizione")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "provincia")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.dataAvviso")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.tipoDocumento")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.firma")));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(StringPool.NEW_LINE);
-
- for (Iterator iterator = listaLeTueFirme.iterator(); iterator.hasNext();) {
- Avviso avviso = (Avviso) iterator.next();
-
- DettPratica dettPratica = DettPraticaLocalServiceUtil.fetchDettPratica(avviso.getClassPk());
- IntPratica intPratica = null;
- if(Validator.isNotNull(dettPratica)){
- intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
- } else {
- intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso.getIntPraticaId());
- }
- sb.append(CSVUtil.encode(intPratica.getNumeroProgetto()));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(Validator.isNotNull(dettPratica) ? dettPratica.getProtocollo() : StringPool.BLANK));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(avviso.getDescLong()));
- sb.append(StringPool.SEMICOLON);
-
- long territorioGroupId = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()).getGroupId();
- long organizationId = GroupLocalServiceUtil.getGroup(territorioGroupId).getOrganizationId();
- String genio = OrganizationLocalServiceUtil.getOrganization(organizationId).getName();
- sb.append(CSVUtil.encode(genio));
- sb.append(StringPool.SEMICOLON);
-
-
- sb.append(CSVUtil.encode(dateFormat.format(avviso.getDtAvviso())));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, avviso.translateTipoDocumento())));
- sb.append(StringPool.SEMICOLON);
-
- String cf = avviso.getUserCodiceFiscalePrimaFirma();
- User userFirma = UserLocalServiceUtil.fetchUserByScreenName(companyId, cf);
- sb.append(CSVUtil.encode(Validator.isNotNull(userFirma) ? userFirma.getFullName() : cf));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(StringPool.NEW_LINE);
- }
-
- sb.append(StringPool.NEW_LINE);
- sb.append(StringPool.NEW_LINE);
-
-
- long[] gruopIds = new long[0];
- List organizations = OrganizationLocalServiceUtil.getUserOrganizations(user.getUserId());
- for(Organization organization:organizations){
- if(UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), organization.getGroupId(), Constants.ROLE_NAME_FIRMA, true)){
- gruopIds = ArrayUtil.append(gruopIds, organization.getGroupId());
- }
- }
- List listaFirmeAssegnateAlRuolo = AvvisoLocalServiceUtil.getAvvisiDaFirmarePrimaFirma(companyId, gruopIds, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
-
- sb.append("FIRME ASSEGNATE AL RUOLO");
- sb.append(StringPool.NEW_LINE);
-
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.progetto")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.protocollo")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.descrizione")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "provincia")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.dataAvviso")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.tipoDocumento")));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(StringPool.NEW_LINE);
-
- for (Iterator iterator = listaFirmeAssegnateAlRuolo.iterator(); iterator.hasNext();) {
- Avviso avviso = (Avviso) iterator.next();
-
- DettPratica dettPratica = DettPraticaLocalServiceUtil.fetchDettPratica(avviso.getClassPk());
- IntPratica intPratica = null;
- if(Validator.isNotNull(dettPratica)){
- intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
- } else {
- intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso.getIntPraticaId());
- }
- sb.append(CSVUtil.encode(intPratica.getNumeroProgetto()));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(Validator.isNotNull(dettPratica) ? dettPratica.getProtocollo() : StringPool.BLANK));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(avviso.getDescLong()));
- sb.append(StringPool.SEMICOLON);
-
- long territorioGroupId = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()).getGroupId();
- long organizationId = GroupLocalServiceUtil.getGroup(territorioGroupId).getOrganizationId();
- String genio = OrganizationLocalServiceUtil.getOrganization(organizationId).getName();
- sb.append(CSVUtil.encode(genio));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(dateFormat.format(avviso.getDtAvviso())));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, avviso.translateTipoDocumento())));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(StringPool.NEW_LINE);
- }
-
- return sb.toString();
- }
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
+ User user = UserLocalServiceUtil.getUser(serviceContext.getUserId());
+ long avvisoId = ParamUtil.getLong(actionRequest, "avvisoId");
+
+ Avviso avviso = AvvisoLocalServiceUtil.getAvviso(avvisoId);
+ if (GestioneFirmeUtil.userCanSignAvviso(user.getUserId(), avviso.getGroupId(), avviso.getAvvisoId())) {
+ AvvisoServiceUtil.assegnaFirma(avviso.getAvvisoId(), user.getScreenName());
+ PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ } else {
+ SessionErrors.add(actionRequest, "non possibile asssegnazione firma");
+ }
+ }
+
+ public void rilasciaFirma(ActionRequest actionRequest, ActionResponse actionResponse)
+ throws PortalException, SystemException {
+
+ ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
+ User user = UserLocalServiceUtil.getUser(serviceContext.getUserId());
+ long avvisoId = ParamUtil.getLong(actionRequest, "avvisoId");
+ Avviso avviso = AvvisoLocalServiceUtil.getAvviso(avvisoId);
+ AvvisoServiceUtil.rilasciaFirma(avviso.getAvvisoId(), user.getScreenName());
+ PortalUtil.copyRequestParameters(actionRequest, actionResponse);
+ }
+
+ // ADT BUG-ID=16 Sezione Pratiche Assegnate / Export CSV delle firme
+ @Override
+ public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse)
+ throws IOException, PortletException {
+
+ String resourceId = GetterUtil.getString(resourceRequest.getResourceID());
+
+ if (resourceId.equals("exportCSV")) {
+
+ ThemeDisplay themeDisplay = (ThemeDisplay) resourceRequest.getAttribute(WebKeys.THEME_DISPLAY);
+
+ long companyId = themeDisplay.getCompanyId();
+ Locale locale = themeDisplay.getLocale();
+ User user = themeDisplay.getUser();
+
+ String tabs1 = ParamUtil.getString(resourceRequest, "tabs1");
+
+ try {
+
+ String csv = null;
+ String fileName = null;
+
+ if ("Tab_AvvisiDaFirmare".equals(tabs1)) {
+ fileName = "firmati";
+ csv = exportToCSVAvvisiDaFirmare(companyId, user, locale);
+ } else if ("Tab_AvvisiAltri".equals(tabs1)) {
+ fileName = "assegnati_altri";
+ csv = exportToCSVAvvisiAltri(companyId, user, locale);
+ } else if ("Tab_AvvisiFirme".equals(tabs1)) {
+ fileName = "da_firmare";
+ csv = exportToCSVAvvisiFirme(companyId, user.getScreenName(), locale);
+ }
+
+ HttpServletRequest request = PortalUtil.getHttpServletRequest(resourceRequest);
+ HttpServletResponse response = PortalUtil.getHttpServletResponse(resourceResponse);
+
+ ServletResponseUtil.sendFile(request, response, "export_firme_" + fileName + ".csv",
+ csv.getBytes(StringPool.UTF8), ContentTypes.TEXT_CSV_UTF8);
+
+ } catch (Exception e) {
+ throw new IOException(e);
+ }
+
+ }
+
+ super.serveResource(resourceRequest, resourceResponse);
+ }
+
+ // ADT BUG-ID=16 Sezione Pratiche Assegnate / Export CSV delle firme
+ private String exportToCSVAvvisiFirme(long companyId, String cf, Locale locale) throws Exception {
+
+ Format dateFormat = FastDateFormatFactoryUtil.getDate(locale);
+ StringBuilder sb = new StringBuilder();
+
+ List lista = AvvisoLocalServiceUtil.getAvvisiFirmatiByCF(companyId, cf, QueryUtil.ALL_POS,
+ QueryUtil.ALL_POS);
+
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.progetto")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.protocollo")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.descrizione")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "provincia")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.dataAvviso")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.tipoDocumento")));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(StringPool.NEW_LINE);
+
+ for (Iterator iterator = lista.iterator(); iterator.hasNext();) {
+ Avviso avviso = (Avviso) iterator.next();
+
+ DettPratica dettPratica = DettPraticaLocalServiceUtil.fetchDettPratica(avviso.getClassPk());
+ IntPratica intPratica = null;
+ if (Validator.isNotNull(dettPratica)) {
+ intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
+ } else {
+ intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso.getIntPraticaId());
+ }
+ sb.append(CSVUtil.encode(intPratica.getNumeroProgetto()));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(Validator.isNotNull(dettPratica) ? dettPratica.getProtocollo()
+ : StringPool.BLANK));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(avviso.getDescLong()));
+ sb.append(StringPool.SEMICOLON);
+
+ long territorioGroupId = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId())
+ .getGroupId();
+ long organizationId = GroupLocalServiceUtil.getGroup(territorioGroupId).getOrganizationId();
+ String genio = OrganizationLocalServiceUtil.getOrganization(organizationId).getName();
+ sb.append(CSVUtil.encode(genio));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(dateFormat.format(avviso.getDtAvviso())));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ avviso.translateTipoDocumento())));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(StringPool.NEW_LINE);
+ }
+
+ return sb.toString();
+ }
+
+ // ADT BUG-ID=16 Sezione Pratiche Assegnate / Export CSV delle firme
+ private String exportToCSVAvvisiAltri(long companyId, User user, Locale locale) throws Exception {
+
+ Format dateFormat = FastDateFormatFactoryUtil.getDate(locale);
+ StringBuilder sb = new StringBuilder();
+
+ long[] gruopIds = new long[0];
+ List organizations = OrganizationLocalServiceUtil
+ .getUserOrganizations(user.getUserId());
+ for (Organization organization : organizations) {
+ if (UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), organization.getGroupId(),
+ Constants.ROLE_NAME_FIRMA, true)) {
+ gruopIds = ArrayUtil.append(gruopIds, organization.getGroupId());
+ }
+ }
+
+ List lista = AvvisoLocalServiceUtil.getAvvisiDaFirmarePrimaFirmaByNotCF(companyId, gruopIds,
+ user.getScreenName(), QueryUtil.ALL_POS, QueryUtil.ALL_POS);
+
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.progetto")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.protocollo")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.descrizione")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "provincia")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.dataAvviso")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.tipoDocumento")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.firma")));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(StringPool.NEW_LINE);
+
+ for (Iterator iterator = lista.iterator(); iterator.hasNext();) {
+ Avviso avviso = (Avviso) iterator.next();
+
+ DettPratica dettPratica = DettPraticaLocalServiceUtil.fetchDettPratica(avviso.getClassPk());
+ IntPratica intPratica = null;
+ if (Validator.isNotNull(dettPratica)) {
+ intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
+ } else {
+ intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso.getIntPraticaId());
+ }
+ sb.append(CSVUtil.encode(intPratica.getNumeroProgetto()));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(Validator.isNotNull(dettPratica) ? dettPratica.getProtocollo()
+ : StringPool.BLANK));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(avviso.getDescLong()));
+ sb.append(StringPool.SEMICOLON);
+
+ long territorioGroupId = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId())
+ .getGroupId();
+ long organizationId = GroupLocalServiceUtil.getGroup(territorioGroupId).getOrganizationId();
+ String genio = OrganizationLocalServiceUtil.getOrganization(organizationId).getName();
+ sb.append(CSVUtil.encode(genio));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(dateFormat.format(avviso.getDtAvviso())));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ avviso.translateTipoDocumento())));
+ sb.append(StringPool.SEMICOLON);
+
+ String cf = avviso.getUserCodiceFiscalePrimaFirma();
+ User userFirma = UserLocalServiceUtil.fetchUserByScreenName(companyId, cf);
+ sb.append(CSVUtil.encode(Validator.isNotNull(userFirma) ? userFirma.getFullName() : cf));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(StringPool.NEW_LINE);
+ }
+
+ return sb.toString();
+ }
+
+ // ADT BUG-ID=16 Sezione Pratiche Assegnate / Export CSV delle firme
+ private String exportToCSVAvvisiDaFirmare(long companyId, User user, Locale locale) throws Exception {
+
+ Format dateFormat = FastDateFormatFactoryUtil.getDate(locale);
+ StringBuilder sb = new StringBuilder();
+
+ List listaLeTueFirme = AvvisoLocalServiceUtil.getAvvisiDaFirmarePrimaFirmaByCF(companyId,
+ user.getScreenName(), QueryUtil.ALL_POS, QueryUtil.ALL_POS);
+
+ sb.append("LE TUE FIRME");
+ sb.append(StringPool.NEW_LINE);
+
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.progetto")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.protocollo")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.descrizione")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "provincia")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.dataAvviso")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.tipoDocumento")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.firma")));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(StringPool.NEW_LINE);
+
+ for (Iterator iterator = listaLeTueFirme.iterator(); iterator.hasNext();) {
+ Avviso avviso = (Avviso) iterator.next();
+
+ DettPratica dettPratica = DettPraticaLocalServiceUtil.fetchDettPratica(avviso.getClassPk());
+ IntPratica intPratica = null;
+ if (Validator.isNotNull(dettPratica)) {
+ intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
+ } else {
+ intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso.getIntPraticaId());
+ }
+ sb.append(CSVUtil.encode(intPratica.getNumeroProgetto()));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(Validator.isNotNull(dettPratica) ? dettPratica.getProtocollo()
+ : StringPool.BLANK));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(avviso.getDescLong()));
+ sb.append(StringPool.SEMICOLON);
+
+ long territorioGroupId = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId())
+ .getGroupId();
+ long organizationId = GroupLocalServiceUtil.getGroup(territorioGroupId).getOrganizationId();
+ String genio = OrganizationLocalServiceUtil.getOrganization(organizationId).getName();
+ sb.append(CSVUtil.encode(genio));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(dateFormat.format(avviso.getDtAvviso())));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ avviso.translateTipoDocumento())));
+ sb.append(StringPool.SEMICOLON);
+
+ String cf = avviso.getUserCodiceFiscalePrimaFirma();
+ User userFirma = UserLocalServiceUtil.fetchUserByScreenName(companyId, cf);
+ sb.append(CSVUtil.encode(Validator.isNotNull(userFirma) ? userFirma.getFullName() : cf));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(StringPool.NEW_LINE);
+ }
+
+ sb.append(StringPool.NEW_LINE);
+ sb.append(StringPool.NEW_LINE);
+
+ long[] gruopIds = new long[0];
+ List organizations = OrganizationLocalServiceUtil
+ .getUserOrganizations(user.getUserId());
+ for (Organization organization : organizations) {
+ if (UserGroupRoleLocalServiceUtil.hasUserGroupRole(user.getUserId(), organization.getGroupId(),
+ Constants.ROLE_NAME_FIRMA, true)) {
+ gruopIds = ArrayUtil.append(gruopIds, organization.getGroupId());
+ }
+ }
+ List listaFirmeAssegnateAlRuolo = AvvisoLocalServiceUtil.getAvvisiDaFirmarePrimaFirma(
+ companyId, gruopIds, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
+
+ sb.append("FIRME ASSEGNATE AL RUOLO");
+ sb.append(StringPool.NEW_LINE);
+
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.progetto")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.protocollo")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.descrizione")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "provincia")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.dataAvviso")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.avviso.tipoDocumento")));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(StringPool.NEW_LINE);
+
+ for (Iterator iterator = listaFirmeAssegnateAlRuolo.iterator(); iterator.hasNext();) {
+ Avviso avviso = (Avviso) iterator.next();
+
+ DettPratica dettPratica = DettPraticaLocalServiceUtil.fetchDettPratica(avviso.getClassPk());
+ IntPratica intPratica = null;
+ if (Validator.isNotNull(dettPratica)) {
+ intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
+ } else {
+ intPratica = IntPraticaLocalServiceUtil.getIntPratica(avviso.getIntPraticaId());
+ }
+ sb.append(CSVUtil.encode(intPratica.getNumeroProgetto()));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(Validator.isNotNull(dettPratica) ? dettPratica.getProtocollo()
+ : StringPool.BLANK));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(avviso.getDescLong()));
+ sb.append(StringPool.SEMICOLON);
+
+ long territorioGroupId = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId())
+ .getGroupId();
+ long organizationId = GroupLocalServiceUtil.getGroup(territorioGroupId).getOrganizationId();
+ String genio = OrganizationLocalServiceUtil.getOrganization(organizationId).getName();
+ sb.append(CSVUtil.encode(genio));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(dateFormat.format(avviso.getDtAvviso())));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ avviso.translateTipoDocumento())));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(StringPool.NEW_LINE);
+ }
+
+ return sb.toString();
+ }
}
-
\ No newline at end of file
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/SismicaAdministrationPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/SismicaAdministrationPortlet.java
index 0e6186b5..faf57c0a 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/SismicaAdministrationPortlet.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/SismicaAdministrationPortlet.java
@@ -6,28 +6,17 @@ import it.mwg.sismica.bo.util.SorteggioPraticaUtil;
import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.DocPratica;
-import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento;
-import it.tref.liferay.portos.bo.model.Sorteggio;
-import it.tref.liferay.portos.bo.model.Territorio;
-import it.tref.liferay.portos.bo.service.ConfigurazioneLocalService;
import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.ConfigurazioneServiceUtil;
-import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.DocPraticaLocalService;
import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.SorteggioLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.persistence.DocPraticaPersistenceImpl;
import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants;
import it.tref.liferay.portos.bo.util.PraticaUtil;
import java.io.File;
import java.io.IOException;
-import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
@@ -46,7 +35,6 @@ import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.repository.model.FileEntry;
import com.liferay.portal.kernel.repository.model.Folder;
import com.liferay.portal.kernel.upload.UploadPortletRequest;
-import com.liferay.portal.kernel.util.DigesterUtil;
import com.liferay.portal.kernel.util.MimeTypesUtil;
import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.portal.kernel.util.FileUtil;
@@ -307,73 +295,6 @@ public class SismicaAdministrationPortlet extends MVCPortlet {
}
- private void avvioWorkflowSorteggiate() {
-
- try {
- // int count =
- // SorteggioLocalServiceUtil.countDettPraticaWorkflowNonAvviato();
- // if (count > 0) {
- // for (int cursor = 0; cursor <= count; cursor += SIZE) {
- List dettPraticaIds = SorteggioLocalServiceUtil.getDettPraticaWorkflowNonAvviato(-1, -1);
- for (Long dettPraticaId : dettPraticaIds) {
- DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
- long intPraticaId = dettPratica.getIntPraticaId();
- ServiceContext serviceContext = getServiceContext(dettPratica);
- avvioWorkflow(intPraticaId, dettPratica, serviceContext);
- }
- // }
- // }
- } catch (Exception e) {
- _log.error("error", e);
- }
- }
-
- private void avvioWorkflow(long intPraticaId, DettPratica dettPratica, ServiceContext serviceContext)
- throws Exception {
-
- long userId = dettPratica.getUserId();
- IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
- Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
- ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.addControlloPratica(
- territorio.getGroupId(), userId, intPratica.getIntPraticaId(),
- dettPratica.getDettPraticaId(), false, serviceContext);
-
- // ADT: bug id=7 gestione workflow
- ControlloPraticaLocalServiceUtil.gestioneWFVarianti(controlloPratica);
-
- //
- // Date dtInvio = null;
- // if(intPratica.getDtSorteggio() != null){
- // dtInvio = intPratica.getDtSorteggio();
- // } else {
- // dtInvio = controlloPratica.getCreateDate();
- // }
- //
- // //Aggiorno il valore nella tabella delle tempistiche
- // ServiceContext serviceContextTempistica =
- // getServiceContext(controlloPratica);
- // TempisticaLocalServiceUtil.addTempistica(intPraticaId,
- // dettPratica.getDettPraticaId(), TempisticaConstants.TIPO_PRATICA,
- // dtInvio,
- // serviceContext);
-
- Sorteggio sorteggio = SorteggioLocalServiceUtil.findByIntPratica(intPraticaId);
- if (sorteggio != null) {
- sorteggio.setStatus(0);
- if (controlloPratica != null) {
- if (controlloPratica.getStatusByUserId() != 0l) {
- sorteggio.setStatusByUserId(controlloPratica.getStatusByUserId());
- }
- if (controlloPratica.getStatusByUserName() != null
- && !controlloPratica.getStatusByUserName().equals("")) {
- sorteggio.setStatusByUserName(controlloPratica.getStatusByUserName());
- }
- }
-
- SorteggioLocalServiceUtil.updateSorteggio(sorteggio);
- }
- }
-
private ServiceContext getServiceContext(ControlloPratica controlloPratica) {
ServiceContext serviceContext = new ServiceContext();
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/TempistichePortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/TempistichePortlet.java
index 653a5dce..e8394754 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/TempistichePortlet.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/TempistichePortlet.java
@@ -44,7 +44,6 @@ import com.liferay.portal.kernel.util.CSVUtil;
import com.liferay.portal.kernel.util.ContentTypes;
import com.liferay.portal.kernel.util.FastDateFormatFactoryUtil;
import com.liferay.portal.kernel.util.GetterUtil;
-import com.liferay.portal.kernel.util.LocaleUtil;
import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
@@ -60,293 +59,329 @@ import com.liferay.util.bridges.mvc.MVCPortlet;
*/
public class TempistichePortlet extends MVCPortlet {
- @Override
- public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException,
- PortletException {
-
- String resourceId = GetterUtil.getString(resourceRequest.getResourceID());
-
- if (resourceId.equals("exportCSV") || resourceId.equals("exportAllCSV")) {
-
- ThemeDisplay themeDisplay = (ThemeDisplay) resourceRequest.getAttribute(WebKeys.THEME_DISPLAY);
-
- long companyId = themeDisplay.getCompanyId();
- long groupId = ParamUtil.getLong(resourceRequest, "groupId", 0l);
- Locale locale = themeDisplay.getLocale();
-
- String tipoTempistica = ParamUtil.getString(resourceRequest, "tipoTempistica");
-
- //ADT - BUG-29 - Scadenziario / Creazione Filtri Ricerca
- Integer statoPratica = Validator.isNotNull(resourceRequest.getParameter("statoPratica")) && !"".equals(resourceRequest.getParameter("statoPratica")) ? ParamUtil.getInteger(resourceRequest, "statoPratica") : null;
-
- //ADT - BUG-29 - Scadenziario / Creazione Filtri Ricerca
- String tipoPratica = ParamUtil.getString(resourceRequest, "tipoPratica");
- String istruttore = ParamUtil.getString(resourceRequest, "istruttore");
-
- try {
- //ADT - BUG-29 - Scadenziario / Creazione Filtri Ricerca
- String csv = exportToCSV(companyId, groupId, locale, tipoTempistica, statoPratica, tipoPratica, istruttore, resourceId.equals("exportAllCSV"));
-
- HttpServletRequest request = PortalUtil.getHttpServletRequest(resourceRequest);
- HttpServletResponse response = PortalUtil.getHttpServletResponse(resourceResponse);
-
- ServletResponseUtil.sendFile(request, response, "export_scadenze_" + tipoTempistica + ".csv",
- csv.getBytes(StringPool.UTF8), ContentTypes.TEXT_CSV_UTF8);
-
- } catch (Exception e) {
- throw new IOException(e);
- }
-
- } else {
- super.serveResource(resourceRequest, resourceResponse);
- }
- }
-
- //ADT - BUG-29 - Scadenziario / Creazione Filtri Ricerca
- public void search(ActionRequest actionRequest, ActionResponse actionResponse){
-
- String tipoPratica = ParamUtil.getString(actionRequest, "tipoPratica", StringPool.BLANK);
- String istruttore = ParamUtil.getString(actionRequest, "istruttore", StringPool.BLANK);
- String statoPratica = ParamUtil.getString(actionRequest, "statoPratica", StringPool.BLANK);
-
- actionResponse.setRenderParameter("tipoPratica", tipoPratica);
- actionResponse.setRenderParameter("istruttore", istruttore);
- actionResponse.setRenderParameter("statoPratica", statoPratica);
- }
-
- //ADT - BUG-29 - Scadenziario / Creazione Filtri Ricerca
- private String exportToCSV(long companyId, long groupId, Locale locale, String tipoTempistica, Integer statoPratica, String tipoPratica, String istruttore, boolean isBackCompatibility) throws Exception {
-
- Format dateFormat = FastDateFormatFactoryUtil.getDate(locale);
- Format dateTimeFormat = FastDateFormatFactoryUtil.getDateTime(locale);
-
- StringBuilder sb = new StringBuilder();
-
- if (tipoTempistica.equals(TempisticaConstants.TIPO_PRATICA)) {
- //ADT - BUG-29 - Scadenziario / Creazione Filtri Ricerca
- List tempistiche = isBackCompatibility ?
- TempisticaLocalServiceUtil.scadenzePraticheForBackwardCompatibility(companyId, groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS) :
- TempisticaLocalServiceUtil.getScadenzePratiche(companyId, groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, statoPratica, tipoPratica, istruttore);
-
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.provincia")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.tipopratica")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.progetto")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.istruttore")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.datavidimazione")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.datasorteggio")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.start")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.tempoattivita")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.timerfermo")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.scadenza")));
-
- sb.append(StringPool.NEW_LINE);
-
- List alreadyInserted = new ArrayList();
-
- for (Object[] tempistica : tempistiche) {
-
- Long intPraticaId = (Long) tempistica[0];
- Long start = (Long) tempistica[1];
- Long stop = (Long) tempistica[2];
- // Long wait = (Long) tempistica[3];
- Long calcoloTempo = (Long) tempistica[4];
- Integer stato = (Integer) tempistica[5];
-
- Long dettPraticaId = 0L;
-
- DynamicQuery query = DynamicQueryFactoryUtil.forClass(Tempistica.class);
- query.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
- query.add(RestrictionsFactoryUtil.eq("tipo", "P"));
- Order defaultOrderDettPrtatica = OrderFactoryUtil.desc("createDate");
- query.addOrder(defaultOrderDettPrtatica);
-
- List lista = TempisticaLocalServiceUtil.dynamicQuery(query);
- if(lista != null && !lista.isEmpty() && lista.size() > 1){
- intPraticaId = lista.get(0).getIntPraticaId();
- dettPraticaId = lista.get(0).getDettPraticaId();
-
- stop = lista.get(0).getStop();
- if(alreadyInserted.contains(intPraticaId)){
- continue;
- }
-
- alreadyInserted.add(intPraticaId);
- } else {
- dettPraticaId = lista.get(0).getDettPraticaId();
-
- alreadyInserted.add(intPraticaId);
- }
-
-
- // DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
- IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
- Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(intPratica.getTerritorioId());
- Provincia provincia =
- ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia());
-
- sb.append(CSVUtil.encode(provincia.getProvincia()));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "tipo-pratica-"+intPratica.getTipoPratica())));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(intPratica.getNumeroProgetto()));
- sb.append(StringPool.SEMICOLON);
-
- long statusByUserId = intPratica.getStatusByUserId();
- if (Validator.isNotNull(statusByUserId) && intPratica.getStatus() != WorkflowConstants.STATUS_DRAFT) {
- try {
- User istruttoreUser = UserLocalServiceUtil.getUser(statusByUserId);
- sb.append(CSVUtil.encode(istruttoreUser.getFullName() + StringPool.SPACE + StringPool.OPEN_PARENTHESIS
- + istruttoreUser.getScreenName() + StringPool.CLOSE_PARENTHESIS));
- } catch (PortalException e) {
- }
- }
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(dateTimeFormat.format(intPratica.getDtPratica())));
- sb.append(StringPool.SEMICOLON);
-
- if (Validator.isNotNull(intPratica.getDtSorteggio())) {
- sb.append(CSVUtil.encode(dateFormat.format(intPratica.getDtSorteggio())));
- }
- sb.append(StringPool.SEMICOLON);
-
- DynamicQuery queryAvv = DynamicQueryFactoryUtil.forClass(Avviso.class);
- queryAvv.add(RestrictionsFactoryUtil.eq("intPraticaId", intPratica.getIntPraticaId()));
- queryAvv.add(RestrictionsFactoryUtil.eq("tipoDocumento", "SP"));
- queryAvv.add(RestrictionsFactoryUtil.eq("className", DettPratica.class.getName()));
- if(dettPraticaId != 0L ){
- queryAvv.add(RestrictionsFactoryUtil.eq("classPk", dettPraticaId));
- }
-
- Order defaultOrder = OrderFactoryUtil.desc("createDate");
- queryAvv.addOrder(defaultOrder);
-
-
- List listaAvv = AvvisoLocalServiceUtil.dynamicQuery(queryAvv);
- if(listaAvv != null && !listaAvv.isEmpty() && listaAvv.get(0).getDtInvio() != null){
- sb.append(CSVUtil.encode(dateFormat.format(listaAvv.get(0).getDtInvio())));
- } else {
- sb.append("");
- }
-
-// sb.append(CSVUtil.encode(dateFormat.format(new Date(start))));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(String.valueOf(TimeUnit.MILLISECONDS.toDays(calcoloTempo))));
- sb.append(StringPool.SEMICOLON);
-
- if (Validator.isNotNull(stop)) {
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.scadenza.si")));
- sb.append(StringPool.SPACE);
- sb.append(CSVUtil.encode(LanguageUtil.format(getPortletConfig(), locale,
- "label.scadenzegeniocivile.timer.dal", dateFormat.format(new Date(stop)))));
- } else {
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.scadenza.no")));
- }
- sb.append(StringPool.SEMICOLON);
-
- if (Validator.isNotNull(stop)) {
- sb.append(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.scadenza.inattesa"));
- } else if (stato.intValue() == TempisticaConstants.STATO_IN_SCADENZA) {
- sb.append(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.scadenza.inscadenza"));
- } else if (stato.intValue() == TempisticaConstants.STATO_SCADUTA) {
- sb.append(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.scadenza.scaduto"));
- } else if (stato.intValue() == TempisticaConstants.STATO_ATTIVA) {
- sb.append(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.scadenza.attivo"));
- }
-
- sb.append(StringPool.NEW_LINE);
- }
-
- } else if (tipoTempistica.equals(TempisticaConstants.TIPO_INTEGRAZIONE)) {
- List tempistiche =
- TempisticaLocalServiceUtil.getScadenzeIntegrazioni(companyId, groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, statoPratica);
-
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.provincia")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.tipopratica")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.progetto")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.istruttore")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.start")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.tempoattivita")));
- sb.append(StringPool.SEMICOLON);
- sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.scadenza")));
-
- sb.append(StringPool.NEW_LINE);
-
- for (Object[] tempistica : tempistiche) {
-
- Long intPraticaId = (Long) tempistica[0];
- Long start = (Long) tempistica[1];
- Long calcoloTempo = (Long) tempistica[2];
- Integer stato = (Integer) tempistica[3];
- Long dettPraticaId = (Long) tempistica[4];
-
- // DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
- IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
- Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(intPratica.getTerritorioId());
- Provincia provincia =
- ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia());
-
- sb.append(CSVUtil.encode(provincia.getProvincia()));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(intPratica.getTipoPratica()));
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(intPratica.getNumeroProgetto()));
- sb.append(StringPool.SEMICOLON);
-
- long statusByUserId = intPratica.getStatusByUserId();
- if (Validator.isNotNull(statusByUserId) && intPratica.getStatus() != WorkflowConstants.STATUS_DRAFT) {
- try {
- User istruttoreUser = UserLocalServiceUtil.getUser(statusByUserId);
- sb.append(CSVUtil.encode(istruttoreUser.getFullName() + StringPool.SPACE + StringPool.OPEN_PARENTHESIS
- + istruttoreUser.getScreenName() + StringPool.CLOSE_PARENTHESIS));
- } catch (PortalException e) {
- }
- }
- sb.append(StringPool.SEMICOLON);
-
-
- List avvisi =
- AvvisoLocalServiceUtil.findByClassPk_tipoDocumento(dettPraticaId, StatoPraticaConstants.SOTTOPOSTA_A_PARERE);
- if (avvisi.size() > 0 && avvisi.get(0).getDtAvviso() != null) {
- sb.append(CSVUtil.encode(dateFormat.format(avvisi.get(0).getDtInvio())));
- } else {
- sb.append("-");
-
- }
- sb.append(StringPool.SEMICOLON);
-
- sb.append(CSVUtil.encode(String.valueOf(TimeUnit.MILLISECONDS.toDays(calcoloTempo))));
- sb.append(StringPool.SEMICOLON);
-
- if (stato.intValue() == TempisticaConstants.STATO_SCADUTA) {
- sb.append(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.scadenza.scaduto"));
- } else if (stato.intValue() == TempisticaConstants.STATO_ATTIVA) {
- sb.append(LanguageUtil.get(getPortletConfig(), locale, "label.scadenzegeniocivile.scadenza.attivo"));
- }
-
- sb.append(StringPool.NEW_LINE);
- }
- }
-
- return sb.toString();
- }
+ @Override
+ public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse)
+ throws IOException, PortletException {
+
+ String resourceId = GetterUtil.getString(resourceRequest.getResourceID());
+
+ if (resourceId.equals("exportCSV") || resourceId.equals("exportAllCSV")) {
+
+ ThemeDisplay themeDisplay = (ThemeDisplay) resourceRequest.getAttribute(WebKeys.THEME_DISPLAY);
+
+ long companyId = themeDisplay.getCompanyId();
+ long groupId = ParamUtil.getLong(resourceRequest, "groupId", 0l);
+ Locale locale = themeDisplay.getLocale();
+
+ String tipoTempistica = ParamUtil.getString(resourceRequest, "tipoTempistica");
+
+ // ADT - BUG-29 - Scadenziario / Creazione Filtri Ricerca
+ Integer statoPratica = Validator.isNotNull(resourceRequest.getParameter("statoPratica"))
+ && !"".equals(resourceRequest.getParameter("statoPratica")) ? ParamUtil.getInteger(
+ resourceRequest, "statoPratica") : null;
+
+ // ADT - BUG-29 - Scadenziario / Creazione Filtri Ricerca
+ String tipoPratica = ParamUtil.getString(resourceRequest, "tipoPratica");
+ String istruttore = ParamUtil.getString(resourceRequest, "istruttore");
+
+ try {
+ // ADT - BUG-29 - Scadenziario / Creazione Filtri Ricerca
+ String csv = exportToCSV(companyId, groupId, locale, tipoTempistica, statoPratica,
+ tipoPratica, istruttore, resourceId.equals("exportAllCSV"));
+
+ HttpServletRequest request = PortalUtil.getHttpServletRequest(resourceRequest);
+ HttpServletResponse response = PortalUtil.getHttpServletResponse(resourceResponse);
+
+ ServletResponseUtil.sendFile(request, response, "export_scadenze_" + tipoTempistica + ".csv",
+ csv.getBytes(StringPool.UTF8), ContentTypes.TEXT_CSV_UTF8);
+
+ } catch (Exception e) {
+ throw new IOException(e);
+ }
+
+ } else {
+ super.serveResource(resourceRequest, resourceResponse);
+ }
+ }
+
+ // ADT - BUG-29 - Scadenziario / Creazione Filtri Ricerca
+ public void search(ActionRequest actionRequest, ActionResponse actionResponse) {
+
+ String tipoPratica = ParamUtil.getString(actionRequest, "tipoPratica", StringPool.BLANK);
+ String istruttore = ParamUtil.getString(actionRequest, "istruttore", StringPool.BLANK);
+ String statoPratica = ParamUtil.getString(actionRequest, "statoPratica", StringPool.BLANK);
+
+ actionResponse.setRenderParameter("tipoPratica", tipoPratica);
+ actionResponse.setRenderParameter("istruttore", istruttore);
+ actionResponse.setRenderParameter("statoPratica", statoPratica);
+ }
+
+ // ADT - BUG-29 - Scadenziario / Creazione Filtri Ricerca
+ private String exportToCSV(long companyId, long groupId, Locale locale, String tipoTempistica,
+ Integer statoPratica, String tipoPratica, String istruttore, boolean isBackCompatibility)
+ throws Exception {
+
+ Format dateFormat = FastDateFormatFactoryUtil.getDate(locale);
+ Format dateTimeFormat = FastDateFormatFactoryUtil.getDateTime(locale);
+
+ StringBuilder sb = new StringBuilder();
+
+ if (tipoTempistica.equals(TempisticaConstants.TIPO_PRATICA)) {
+ // ADT - BUG-29 - Scadenziario / Creazione Filtri Ricerca
+ List tempistiche = isBackCompatibility ? TempisticaLocalServiceUtil
+ .scadenzePraticheForBackwardCompatibility(companyId, groupId, QueryUtil.ALL_POS,
+ QueryUtil.ALL_POS) : TempisticaLocalServiceUtil.getScadenzePratiche(companyId,
+ groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, statoPratica, tipoPratica, istruttore);
+
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.provincia")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.tipopratica")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.progetto")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.istruttore")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.datavidimazione")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.datasorteggio")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.start")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.tempoattivita")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.timerfermo")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.scadenza")));
+
+ sb.append(StringPool.NEW_LINE);
+
+ List alreadyInserted = new ArrayList();
+
+ for (Object[] tempistica : tempistiche) {
+
+ Long intPraticaId = (Long) tempistica[0];
+ Long stop = (Long) tempistica[2];
+ // Long wait = (Long) tempistica[3];
+ Long calcoloTempo = (Long) tempistica[4];
+ Integer stato = (Integer) tempistica[5];
+
+ Long dettPraticaId = 0L;
+
+ DynamicQuery query = DynamicQueryFactoryUtil.forClass(Tempistica.class);
+ query.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
+ query.add(RestrictionsFactoryUtil.eq("tipo", "P"));
+ Order defaultOrderDettPrtatica = OrderFactoryUtil.desc("createDate");
+ query.addOrder(defaultOrderDettPrtatica);
+
+ List lista = TempisticaLocalServiceUtil.dynamicQuery(query);
+ if (lista != null && !lista.isEmpty() && lista.size() > 1) {
+ intPraticaId = lista.get(0).getIntPraticaId();
+ dettPraticaId = lista.get(0).getDettPraticaId();
+
+ stop = lista.get(0).getStop();
+ if (alreadyInserted.contains(intPraticaId)) {
+ continue;
+ }
+
+ alreadyInserted.add(intPraticaId);
+ } else {
+ dettPraticaId = lista.get(0).getDettPraticaId();
+
+ alreadyInserted.add(intPraticaId);
+ }
+
+ // DettPratica dettPratica =
+ // DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
+ IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
+ Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(intPratica
+ .getTerritorioId());
+ Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(),
+ territorio.getCodiceProvincia());
+
+ sb.append(CSVUtil.encode(provincia.getProvincia()));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale, "tipo-pratica-"
+ + intPratica.getTipoPratica())));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(intPratica.getNumeroProgetto()));
+ sb.append(StringPool.SEMICOLON);
+
+ long statusByUserId = intPratica.getStatusByUserId();
+ if (Validator.isNotNull(statusByUserId)
+ && intPratica.getStatus() != WorkflowConstants.STATUS_DRAFT) {
+ try {
+ User istruttoreUser = UserLocalServiceUtil.getUser(statusByUserId);
+ sb.append(CSVUtil.encode(istruttoreUser.getFullName() + StringPool.SPACE
+ + StringPool.OPEN_PARENTHESIS + istruttoreUser.getScreenName()
+ + StringPool.CLOSE_PARENTHESIS));
+ } catch (PortalException e) {
+ }
+ }
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(dateTimeFormat.format(intPratica.getDtPratica())));
+ sb.append(StringPool.SEMICOLON);
+
+ if (Validator.isNotNull(intPratica.getDtSorteggio())) {
+ sb.append(CSVUtil.encode(dateFormat.format(intPratica.getDtSorteggio())));
+ }
+ sb.append(StringPool.SEMICOLON);
+
+ DynamicQuery queryAvv = DynamicQueryFactoryUtil.forClass(Avviso.class);
+ queryAvv.add(RestrictionsFactoryUtil.eq("intPraticaId", intPratica.getIntPraticaId()));
+ queryAvv.add(RestrictionsFactoryUtil.eq("tipoDocumento", "SP"));
+ queryAvv.add(RestrictionsFactoryUtil.eq("className", DettPratica.class.getName()));
+ if (dettPraticaId != 0L) {
+ queryAvv.add(RestrictionsFactoryUtil.eq("classPk", dettPraticaId));
+ }
+
+ Order defaultOrder = OrderFactoryUtil.desc("createDate");
+ queryAvv.addOrder(defaultOrder);
+
+ List listaAvv = AvvisoLocalServiceUtil.dynamicQuery(queryAvv);
+ if (listaAvv != null && !listaAvv.isEmpty() && listaAvv.get(0).getDtInvio() != null) {
+ sb.append(CSVUtil.encode(dateFormat.format(listaAvv.get(0).getDtInvio())));
+ } else {
+ sb.append("");
+ }
+
+ // sb.append(CSVUtil.encode(dateFormat.format(new
+ // Date(start))));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(String.valueOf(TimeUnit.MILLISECONDS.toDays(calcoloTempo))));
+ sb.append(StringPool.SEMICOLON);
+
+ if (Validator.isNotNull(stop)) {
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.scadenza.si")));
+ sb.append(StringPool.SPACE);
+ sb.append(CSVUtil.encode(LanguageUtil.format(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.timer.dal", dateFormat.format(new Date(stop)))));
+ } else {
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.scadenza.no")));
+ }
+ sb.append(StringPool.SEMICOLON);
+
+ if (Validator.isNotNull(stop)) {
+ sb.append(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.scadenza.inattesa"));
+ } else if (stato.intValue() == TempisticaConstants.STATO_IN_SCADENZA) {
+ sb.append(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.scadenza.inscadenza"));
+ } else if (stato.intValue() == TempisticaConstants.STATO_SCADUTA) {
+ sb.append(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.scadenza.scaduto"));
+ } else if (stato.intValue() == TempisticaConstants.STATO_ATTIVA) {
+ sb.append(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.scadenza.attivo"));
+ }
+
+ sb.append(StringPool.NEW_LINE);
+ }
+
+ } else if (tipoTempistica.equals(TempisticaConstants.TIPO_INTEGRAZIONE)) {
+ List tempistiche = TempisticaLocalServiceUtil.getScadenzeIntegrazioni(companyId,
+ groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, statoPratica);
+
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.provincia")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.tipopratica")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.progetto")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.istruttore")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.start")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.tempoattivita")));
+ sb.append(StringPool.SEMICOLON);
+ sb.append(CSVUtil.encode(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.scadenza")));
+
+ sb.append(StringPool.NEW_LINE);
+
+ for (Object[] tempistica : tempistiche) {
+
+ Long intPraticaId = (Long) tempistica[0];
+ Long calcoloTempo = (Long) tempistica[2];
+ Integer stato = (Integer) tempistica[3];
+ Long dettPraticaId = (Long) tempistica[4];
+
+ // DettPratica dettPratica =
+ // DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
+ IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
+ Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(intPratica
+ .getTerritorioId());
+ Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(),
+ territorio.getCodiceProvincia());
+
+ sb.append(CSVUtil.encode(provincia.getProvincia()));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(intPratica.getTipoPratica()));
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(intPratica.getNumeroProgetto()));
+ sb.append(StringPool.SEMICOLON);
+
+ long statusByUserId = intPratica.getStatusByUserId();
+ if (Validator.isNotNull(statusByUserId)
+ && intPratica.getStatus() != WorkflowConstants.STATUS_DRAFT) {
+ try {
+ User istruttoreUser = UserLocalServiceUtil.getUser(statusByUserId);
+ sb.append(CSVUtil.encode(istruttoreUser.getFullName() + StringPool.SPACE
+ + StringPool.OPEN_PARENTHESIS + istruttoreUser.getScreenName()
+ + StringPool.CLOSE_PARENTHESIS));
+ } catch (PortalException e) {
+ }
+ }
+ sb.append(StringPool.SEMICOLON);
+
+ List avvisi = AvvisoLocalServiceUtil.findByClassPk_tipoDocumento(dettPraticaId,
+ StatoPraticaConstants.SOTTOPOSTA_A_PARERE);
+ if (avvisi.size() > 0 && avvisi.get(0).getDtAvviso() != null) {
+ sb.append(CSVUtil.encode(dateFormat.format(avvisi.get(0).getDtInvio())));
+ } else {
+ sb.append("-");
+
+ }
+ sb.append(StringPool.SEMICOLON);
+
+ sb.append(CSVUtil.encode(String.valueOf(TimeUnit.MILLISECONDS.toDays(calcoloTempo))));
+ sb.append(StringPool.SEMICOLON);
+
+ if (stato.intValue() == TempisticaConstants.STATO_SCADUTA) {
+ sb.append(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.scadenza.scaduto"));
+ } else if (stato.intValue() == TempisticaConstants.STATO_ATTIVA) {
+ sb.append(LanguageUtil.get(getPortletConfig(), locale,
+ "label.scadenzegeniocivile.scadenza.attivo"));
+ }
+
+ sb.append(StringPool.NEW_LINE);
+ }
+ }
+
+ return sb.toString();
+ }
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/bean/ReportAvvisoBean.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/bean/ReportAvvisoBean.java
index 93ceac2e..dc489dc7 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/bean/ReportAvvisoBean.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/bean/ReportAvvisoBean.java
@@ -4,15 +4,10 @@ import java.io.Serializable;
import java.util.Date;
import java.util.List;
-import com.liferay.portal.kernel.log.Log;
-import com.liferay.portal.kernel.log.LogFactoryUtil;
-
public class ReportAvvisoBean implements Serializable {
private static final long serialVersionUID = -1229588050032694212L;
- private static final Log _log = LogFactoryUtil.getLog(ReportAvvisoBean.class);
-
private String tipo;
private String codiceUnivoco;
private String lavoriDi;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoAllegatoBeanBuilder.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoAllegatoBeanBuilder.java
index b114450d..2830ff07 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoAllegatoBeanBuilder.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoAllegatoBeanBuilder.java
@@ -1,10 +1,8 @@
package it.tref.liferay.portos.bo.report.builder.builder;
-import it.toscana.rete.cart.www.servizi.iris_1_1.IdpInclude.TipoDestinatario;
import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.report.builder.bean.ReportAvvisoAllegatoBean;
import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil;
-import it.tref.liferay.portos.bo.service.persistence.DocPraticaUtil;
import it.tref.liferay.portos.bo.shared.util.DocumentiPraticaUtil;
import it.tref.liferay.portos.bo.util.FilesImporter;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoBeanBuilder.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoBeanBuilder.java
index f100adcd..f419733b 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoBeanBuilder.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoBeanBuilder.java
@@ -44,8 +44,6 @@ import java.util.Map;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.language.LanguageUtil;
-import com.liferay.portal.kernel.log.Log;
-import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.util.CalendarUtil;
import com.liferay.portal.kernel.util.LocaleUtil;
import com.liferay.portal.kernel.util.StringPool;
@@ -59,8 +57,6 @@ import com.liferay.portal.service.UserLocalServiceUtil;
public class ReportAvvisoBeanBuilder {
- private final static Log _log = LogFactoryUtil.getLog(ReportAvvisoBeanBuilder.class);
-
private ReportAvvisoBeanBuilder() {
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoSoggettoBeanBuilder.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoSoggettoBeanBuilder.java
index 317945c3..b8a38888 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoSoggettoBeanBuilder.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoSoggettoBeanBuilder.java
@@ -9,28 +9,28 @@ import com.liferay.portal.kernel.util.Validator;
public class ReportAvvisoSoggettoBeanBuilder {
- private ReportAvvisoSoggettoBeanBuilder() {
+ private ReportAvvisoSoggettoBeanBuilder() {
- }
+ }
- public static ReportAvvisoSoggettoBean build(Soggetto soggetto, long dettPraticaId) {
+ public static ReportAvvisoSoggettoBean build(Soggetto soggetto, long dettPraticaId) {
- ReportAvvisoSoggettoBean bean = new ReportAvvisoSoggettoBean();
+ ReportAvvisoSoggettoBean bean = new ReportAvvisoSoggettoBean();
- bean.setTipoSoggetto(LanguageUtil.get(LocaleUtil.ITALIAN, "gc-soggetto-" + soggetto.getTipologiaSoggetto()));
- bean.setDenominazione(soggetto.getTitle());
- if (soggetto.getDettPraticaId() == dettPraticaId) {
- bean.setTipoOperazione("aggiunto");
- } else if (soggetto.getDettPraticaIdRimozione() == dettPraticaId) {
- if (Validator.isNotNull(soggetto.getSostituitoDa())) {
- bean.setTipoOperazione("sostituito");
- } else {
- bean.setTipoOperazione("rimosso");
- }
- }
-
- return bean;
- }
+ bean.setTipoSoggetto(LanguageUtil.get(LocaleUtil.ITALIAN,
+ "gc-soggetto-" + soggetto.getTipologiaSoggetto()));
+ bean.setDenominazione(soggetto.getTitle());
+ if (soggetto.getDettPraticaId() == dettPraticaId) {
+ bean.setTipoOperazione("aggiunto");
+ } else if (soggetto.getDettPraticaIdRimozione() == dettPraticaId) {
+ if (Validator.isNotNull(soggetto.getSostituitoDa())) {
+ bean.setTipoOperazione("sostituito");
+ } else {
+ bean.setTipoOperazione("rimosso");
+ }
+ }
+ return bean;
+ }
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportSorteggioBeanBuilder.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportSorteggioBeanBuilder.java
index 4bf2d4e0..e05c5e8e 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportSorteggioBeanBuilder.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportSorteggioBeanBuilder.java
@@ -14,38 +14,39 @@ import com.liferay.portal.kernel.exception.SystemException;
public class ReportSorteggioBeanBuilder {
- private ReportSorteggioBeanBuilder() {
+ private ReportSorteggioBeanBuilder() {
- }
+ }
- public static ReportSorteggioBean build(Sorteggio sorteggio) throws SystemException {
+ public static ReportSorteggioBean build(Sorteggio sorteggio) throws SystemException {
- ReportSorteggioBean reportSorteggioBOBean = new ReportSorteggioBean();
+ ReportSorteggioBean reportSorteggioBOBean = new ReportSorteggioBean();
- try {
- DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(sorteggio.getDettPraticaId());
- IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
- Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
- reportSorteggioBOBean.setFascia(territorio.getFascia());
-
- //Task 32561
- reportSorteggioBOBean.setZona(territorio.getZona());
-
- reportSorteggioBOBean.setProvincia(sorteggio.getProvincia());
+ try {
+ DettPratica dettPratica = DettPraticaLocalServiceUtil
+ .getDettPratica(sorteggio.getDettPraticaId());
+ IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
+ Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
+ reportSorteggioBOBean.setFascia(territorio.getFascia());
- } catch (PortalException e) {
- }
+ // Task 32561
+ reportSorteggioBOBean.setZona(territorio.getZona());
- reportSorteggioBOBean.setNumeroEstrazione(String.valueOf(sorteggio.getNumeroEstrazione()));
+ reportSorteggioBOBean.setProvincia(sorteggio.getProvincia());
- reportSorteggioBOBean.setTecnico(sorteggio.getTecnico());
- reportSorteggioBOBean.setCommittente(sorteggio.getCommittente());
- reportSorteggioBOBean.setCitta(sorteggio.getComune());
- reportSorteggioBOBean.setPratica(sorteggio.getPratica());
+ } catch (PortalException e) {
+ }
- reportSorteggioBOBean.setFase(Boolean.parseBoolean(sorteggio.getMesePrecedente()) ? "1" : "2");
+ reportSorteggioBOBean.setNumeroEstrazione(String.valueOf(sorteggio.getNumeroEstrazione()));
- return reportSorteggioBOBean;
- }
+ reportSorteggioBOBean.setTecnico(sorteggio.getTecnico());
+ reportSorteggioBOBean.setCommittente(sorteggio.getCommittente());
+ reportSorteggioBOBean.setCitta(sorteggio.getComune());
+ reportSorteggioBOBean.setPratica(sorteggio.getPratica());
+
+ reportSorteggioBOBean.setFase(Boolean.parseBoolean(sorteggio.getMesePrecedente()) ? "1" : "2");
+
+ return reportSorteggioBOBean;
+ }
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/ParereGeologoLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/ParereGeologoLocalServiceClpInvoker.java
index 34d54c98..e5a36465 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/ParereGeologoLocalServiceClpInvoker.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/ParereGeologoLocalServiceClpInvoker.java
@@ -202,21 +202,21 @@ public class ParereGeologoLocalServiceClpInvoker {
_methodParameterTypes219 = new String[] { "long" };
- _methodName221 = "findNotParereByGeologoId";
+ _methodName220 = "findNotParereByGeologoId";
- _methodParameterTypes221 = new String[] { "long", "int", "int" };
+ _methodParameterTypes220 = new String[] { "long", "int", "int" };
- _methodName222 = "findWithParereByGeologoId";
+ _methodName221 = "findWithParereByGeologoId";
- _methodParameterTypes222 = new String[] { "long", "int", "int" };
+ _methodParameterTypes221 = new String[] { "long", "int", "int" };
- _methodName223 = "countFindNotParereByGeologoId";
+ _methodName222 = "countFindNotParereByGeologoId";
- _methodParameterTypes223 = new String[] { "long" };
+ _methodParameterTypes222 = new String[] { "long" };
- _methodName224 = "countFindWithParereByGeologoId";
+ _methodName223 = "countFindWithParereByGeologoId";
- _methodParameterTypes224 = new String[] { "long" };
+ _methodParameterTypes223 = new String[] { "long" };
}
public Object invokeMethod(String name, String[] parameterTypes,
@@ -436,27 +436,27 @@ public class ParereGeologoLocalServiceClpInvoker {
return ParereGeologoLocalServiceUtil.countByGeologoId(((Long)arguments[0]).longValue());
}
- if (_methodName221.equals(name) &&
- Arrays.deepEquals(_methodParameterTypes221, parameterTypes)) {
+ if (_methodName220.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes220, parameterTypes)) {
return ParereGeologoLocalServiceUtil.findNotParereByGeologoId(((Long)arguments[0]).longValue(),
((Integer)arguments[1]).intValue(),
((Integer)arguments[2]).intValue());
}
- if (_methodName222.equals(name) &&
- Arrays.deepEquals(_methodParameterTypes222, parameterTypes)) {
+ if (_methodName221.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes221, parameterTypes)) {
return ParereGeologoLocalServiceUtil.findWithParereByGeologoId(((Long)arguments[0]).longValue(),
((Integer)arguments[1]).intValue(),
((Integer)arguments[2]).intValue());
}
- if (_methodName223.equals(name) &&
- Arrays.deepEquals(_methodParameterTypes223, parameterTypes)) {
+ if (_methodName222.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes222, parameterTypes)) {
return ParereGeologoLocalServiceUtil.countFindNotParereByGeologoId(((Long)arguments[0]).longValue());
}
- if (_methodName224.equals(name) &&
- Arrays.deepEquals(_methodParameterTypes224, parameterTypes)) {
+ if (_methodName223.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes223, parameterTypes)) {
return ParereGeologoLocalServiceUtil.countFindWithParereByGeologoId(((Long)arguments[0]).longValue());
}
@@ -537,12 +537,12 @@ public class ParereGeologoLocalServiceClpInvoker {
private String[] _methodParameterTypes218;
private String _methodName219;
private String[] _methodParameterTypes219;
+ private String _methodName220;
+ private String[] _methodParameterTypes220;
private String _methodName221;
private String[] _methodParameterTypes221;
private String _methodName222;
private String[] _methodParameterTypes222;
private String _methodName223;
private String[] _methodParameterTypes223;
- private String _methodName224;
- private String[] _methodParameterTypes224;
}
\ No newline at end of file
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeLocalServiceImpl.java
index 4656ebb4..31fc777b 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeLocalServiceImpl.java
@@ -34,6 +34,7 @@ import com.liferay.portal.kernel.util.MimeTypesUtil;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.User;
+import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserGroupRoleLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
@@ -121,6 +122,7 @@ public class AllegatoManualeLocalServiceImpl extends AllegatoManualeLocalService
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
+ serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName);
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java
index 56092796..f9dc9c0c 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java
@@ -54,8 +54,6 @@ import com.liferay.portal.NoSuchRepositoryEntryException;
import com.liferay.portal.kernel.dao.orm.QueryUtil;
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.repository.model.FileEntry;
import com.liferay.portal.kernel.repository.model.Folder;
import com.liferay.portal.kernel.util.MimeTypesUtil;
@@ -63,6 +61,7 @@ import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User;
+import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
@@ -95,8 +94,6 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
* to access the asseverazione local service.
*/
- private Log _log = LogFactoryUtil.getLog(AsseverazioneLocalServiceImpl.class);
-
public String anteprimaAsseverazione(String tipo, User user, DettPratica dettPratica, String relazioni)
throws IOException, SystemException, PortalException {
return testoAsseverazione(tipo, user.getScreenName(), dettPratica, relazioni, true);
@@ -577,6 +574,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
+ serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java
index 7f570c65..4bbe83b1 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java
@@ -62,6 +62,7 @@ import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User;
+import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
@@ -982,7 +983,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
dynamicQuery.add(RestrictionsFactoryUtil.eq("fileEntryIdInvio", 0l));
dynamicQuery.add(RestrictionsFactoryUtil.ne("fileEntryIdBase", 0l));
dynamicQuery.add(RestrictionsFactoryUtil.eq("rifiutato", false));
- List avvisi = avvisoPersistence.findWithDynamicQuery(dynamicQuery);
+ List avvisi = (List) avvisoPersistence.findWithDynamicQuery(dynamicQuery);
return avvisi;
}
@@ -1083,6 +1084,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
if (Validator.isNotNull(folder)) {
byte[] bytes = Base64.decode(fileToSave);
+ serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry(avviso.getUserId(),
folder.getRepositoryId(), folderId, fileName,
MimeTypesUtil.getContentType(fileName + ".p7m"), fileName + ".p7m", "", "", bytes,
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java
index a3ee1d94..40782a75 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java
@@ -223,7 +223,6 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
}
@Override
- @SuppressWarnings("unchecked")
public List findByKeywords(long companyId, String keywords, int start, int end,
OrderByComparator orderByComparator) throws SystemException {
@@ -333,7 +332,7 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
return comuni;
}
- //ADT BUG BO ID = 1 SEZIONE ATTIVITà
+ //ADT BUG BO ID = 1 SEZIONE ATTIVIT�
public List getComuniForOrganizationByUserIdUfficioId(long userId, long ufficioId) throws SystemException {
List comuni = new ArrayList();
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java
index f27c724c..266f565f 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java
@@ -42,9 +42,6 @@ import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
-import java.util.Locale;
-
-import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.liferay.portal.kernel.dao.orm.Disjunction;
@@ -72,7 +69,6 @@ import com.liferay.portal.kernel.search.SearchContext;
import com.liferay.portal.kernel.util.ContentTypes;
import com.liferay.portal.kernel.util.FastDateFormatFactoryUtil;
import com.liferay.portal.kernel.util.GetterUtil;
-import com.liferay.portal.kernel.util.Http.Body;
import com.liferay.portal.kernel.util.Http.Options;
import com.liferay.portal.kernel.util.HttpUtil;
import com.liferay.portal.kernel.util.LocaleUtil;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaServiceImpl.java
index 4b20b79d..853040b2 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaServiceImpl.java
@@ -20,7 +20,6 @@ import it.tref.liferay.portos.bo.service.base.DettPraticaServiceBaseImpl;
import it.tref.liferay.portos.bo.service.permission.DettPraticaEntryPermission;
import it.tref.liferay.portos.bo.service.permission.DettPraticaPermission;
import it.tref.liferay.portos.bo.shared.util.Constants;
-import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
import it.tref.liferay.portos.bo.util.DelegheUtil;
import it.tref.liferay.portos.bo.util.PraticaUtil;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocAggiuntivaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocAggiuntivaLocalServiceImpl.java
index e1b24e19..6df51f79 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocAggiuntivaLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocAggiuntivaLocalServiceImpl.java
@@ -31,6 +31,7 @@ import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User;
+import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
@@ -141,6 +142,8 @@ public class DocAggiuntivaLocalServiceImpl extends DocAggiuntivaLocalServiceBase
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
+
+ serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName);
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java
index 54824b32..739e1bd4 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java
@@ -34,8 +34,6 @@ import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil;
import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil;
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.repository.model.FileEntry;
import com.liferay.portal.kernel.repository.model.Folder;
import com.liferay.portal.kernel.util.MimeTypesUtil;
@@ -45,6 +43,7 @@ import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.workflow.WorkflowConstants;
import com.liferay.portal.model.RoleConstants;
import com.liferay.portal.model.User;
+import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil;
import com.liferay.portal.security.permission.PermissionThreadLocal;
import com.liferay.portal.service.RoleLocalServiceUtil;
@@ -57,13 +56,14 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
* The implementation of the doc pratica local service.
*
*
- * All custom service methods should be put in this class. Whenever methods are added, rerun
- * ServiceBuilder to copy their definitions into the
+ * All custom service methods should be put in this class. Whenever methods are
+ * added, rerun ServiceBuilder to copy their definitions into the
* {@link it.tref.liferay.portos.bo.service.DocPraticaLocalService} interface.
*
*
- * This is a local service. Methods of this service will not have security checks based on the
- * propagated JAAS credentials because this service can only be accessed from within the same VM.
+ * This is a local service. Methods of this service will not have security
+ * checks based on the propagated JAAS credentials because this service can only
+ * be accessed from within the same VM.
*
*
* @author Davide Barbagallo, 3F Consulting
@@ -71,655 +71,661 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
* @see it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil
*/
public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
- /*
- * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link
- * it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil} to access the doc pratica local
- * service.
- */
-
- private Log _log = LogFactoryUtil.getLog(DocPraticaLocalServiceImpl.class);
-
- @Override
- public DocPratica deleteDocPratica(DocPratica docPratica) throws SystemException {
+ /*
+ * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use
+ * {@link it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil} to
+ * access the doc pratica local service.
+ */
+
+ @Override
+ public DocPratica deleteDocPratica(DocPratica docPratica) throws SystemException {
+
+ try {
+ if (Validator.isNotNull(docPratica.getDlFileEntryId())) {
+ dlAppLocalService.deleteFileEntry(docPratica.getDlFileEntryId());
+ }
+ } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) {
+
+ } catch (PortalException e) {
+ throw new SystemException(e);
+ }
+ return super.deleteDocPratica(docPratica);
+ }
+
+ @Override
+ public DocPratica deleteDocPratica(long docPraticaId) throws PortalException, SystemException {
+
+ return deleteDocPratica(docPraticaLocalService.getDocPratica(docPraticaId));
+ }
- try {
- if (Validator.isNotNull(docPratica.getDlFileEntryId())) {
- dlAppLocalService.deleteFileEntry(docPratica.getDlFileEntryId());
- }
- } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) {
+ public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId,
+ byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong,
+ String tipologia, String sha256, boolean aggiornato, String jsonFirmatari,
+ long dettPraticaIdRimozione, Date dtDataRimozione, ServiceContext serviceContext)
+ throws PortalException, SystemException {
+
+ User user = userPersistence.findByPrimaryKey(userId);
+
+ Date now = new Date();
+
+ validate(serviceContext.getScopeGroupId(), 0L, className, classPk, intPraticaId, dlFileEntry,
+ fileName, version, praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari,
+ dettPraticaIdRimozione, dtDataRimozione);
+
+ DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
+ .getName()));
+
+ FileEntry fileEntry = addAttachment(classPk, intPraticaId, userId, fileName, dlFileEntry, tipologia);
+
+ docPratica.setCompanyId(serviceContext.getCompanyId());
+ docPratica.setUserId(user.getUserId());
+ docPratica.setUserName(user.getFullName());
+ docPratica.setCreateDate(serviceContext.getCreateDate(now));
+ docPratica.setModifiedDate(serviceContext.getModifiedDate(now));
+ docPratica.setGroupId(serviceContext.getScopeGroupId());
+
+ docPratica.setClassName(className);
+ docPratica.setClassPk(classPk);
+ docPratica.setIntPraticaId(intPraticaId);
+ docPratica.setDlFileEntryId(fileEntry.getFileEntryId());
+ docPratica.setVersion(version);
+ docPratica.setPraticaValidata(praticaValidata);
+ docPratica.setDescLong(descLong);
+ docPratica.setTipologia(tipologia);
+ docPratica.setSha256(sha256);
+ docPratica.setAggiornato(aggiornato);
+ docPratica.setJsonFirmatari(jsonFirmatari);
+ docPratica.setDettPraticaIdRimozione(dettPraticaIdRimozione);
+ docPratica.setDtDataRimozione(dtDataRimozione);
+
+ docPratica.setStatus(WorkflowConstants.STATUS_PENDING);
+
+ docPratica = docPraticaPersistence.update(docPratica);
+
+ return docPratica;
+ }
+
+ public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId,
+ byte[] dlFileEntry, String fileName, String tipologia, String jsonFirmatari,
+ ServiceContext serviceContext) throws PortalException, SystemException {
+
+ User user = userPersistence.findByPrimaryKey(userId);
+
+ Date now = new Date();
+
+ DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
+ .getName()));
+
+ FileEntry fileEntry = addAttachment(classPk, intPraticaId, userId, fileName, dlFileEntry, tipologia);
+
+ docPratica.setCompanyId(serviceContext.getCompanyId());
+ docPratica.setUserId(user.getUserId());
+ docPratica.setUserName(user.getFullName());
+ docPratica.setCreateDate(serviceContext.getCreateDate(now));
+ docPratica.setModifiedDate(serviceContext.getModifiedDate(now));
+ docPratica.setGroupId(serviceContext.getScopeGroupId());
+
+ docPratica.setClassName(className);
+ docPratica.setClassPk(classPk);
+ docPratica.setIntPraticaId(intPraticaId);
+ docPratica.setDlFileEntryId(fileEntry.getFileEntryId());
+ docPratica.setVersion("0");
+ docPratica.setPraticaValidata(false);
+ docPratica.setDescLong(fileName);
+ docPratica.setTipologia(tipologia);
+ docPratica.setAggiornato(false);
+ docPratica.setJsonFirmatari(jsonFirmatari);
+ docPratica.setDettPraticaIdRimozione(0l);
+ docPratica.setDtDataRimozione(null);
+
+ docPratica.setStatus(WorkflowConstants.STATUS_PENDING);
+
+ docPratica = docPraticaPersistence.update(docPratica);
+
+ return docPratica;
+ }
+
+ public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId,
+ long fileEntryId, String fileName, String tipologia, String jsonFirmatari,
+ ServiceContext serviceContext) throws PortalException, SystemException {
+
+ User user = userPersistence.findByPrimaryKey(userId);
+
+ Date now = new Date();
+
+ DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
+ .getName()));
+
+ docPratica.setCompanyId(serviceContext.getCompanyId());
+ docPratica.setUserId(user.getUserId());
+ docPratica.setUserName(user.getFullName());
+ docPratica.setCreateDate(serviceContext.getCreateDate(now));
+ docPratica.setModifiedDate(serviceContext.getModifiedDate(now));
+ docPratica.setGroupId(serviceContext.getScopeGroupId());
+
+ docPratica.setClassName(className);
+ docPratica.setClassPk(classPk);
+ docPratica.setIntPraticaId(intPraticaId);
+ docPratica.setDlFileEntryId(fileEntryId);
+ docPratica.setVersion("0");
+ docPratica.setPraticaValidata(false);
+ docPratica.setDescLong(fileName);
+ docPratica.setTipologia(tipologia);
+ docPratica.setAggiornato(false);
+ docPratica.setJsonFirmatari(jsonFirmatari);
+ docPratica.setDettPraticaIdRimozione(0l);
+ docPratica.setDtDataRimozione(null);
+
+ docPratica.setStatus(WorkflowConstants.STATUS_PENDING);
+
+ docPratica = docPraticaPersistence.update(docPratica);
+
+ return docPratica;
+ }
+
+ public DocPratica addDocPraticaForImport(long userId, String className, long classPk, long intPraticaId,
+ byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong,
+ String tipologia, String sha256, boolean aggiornato, String jsonFirmatari,
+ long dettPraticaIdRimozione, Date dtDataRimozione, long oldDocPraticaId,
+ ServiceContext serviceContext) throws PortalException, SystemException {
+
+ Date now = new Date();
+
+ validate(serviceContext.getScopeGroupId(), 0L, className, classPk, intPraticaId, dlFileEntry,
+ fileName, version, praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari,
+ dettPraticaIdRimozione, dtDataRimozione);
+
+ DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
+ .getName()));
+
+ docPratica.setCompanyId(serviceContext.getCompanyId());
+ docPratica.setUserId(userId);
+ if (userId > 0) {
+ User user = userPersistence.findByPrimaryKey(userId);
+ docPratica.setUserName(user.getFullName());
+ }
+ docPratica.setCreateDate(serviceContext.getCreateDate(now));
+ docPratica.setModifiedDate(serviceContext.getModifiedDate(now));
+ docPratica.setGroupId(serviceContext.getScopeGroupId());
+ docPratica.setClassName(className);
+ docPratica.setClassPk(classPk);
+ docPratica.setIntPraticaId(intPraticaId);
+ docPratica.setVersion(version);
+ docPratica.setPraticaValidata(praticaValidata);
+ docPratica.setDescLong(descLong);
+ docPratica.setTipologia(tipologia);
+ docPratica.setSha256(sha256);
+ docPratica.setAggiornato(aggiornato);
+ docPratica.setJsonFirmatari(jsonFirmatari);
+ docPratica.setDettPraticaIdRimozione(dettPraticaIdRimozione);
+ docPratica.setDtDataRimozione(dtDataRimozione);
+ docPratica.setOldDocPraticaId(oldDocPraticaId);
+
+ docPratica.setStatus(WorkflowConstants.STATUS_APPROVED);
+
+ return docPraticaPersistence.update(docPratica);
+ }
+
+ public FileEntry addAttachment(long classPk, long intPraticaId, long delegaUserId, String sourceFileName,
+ byte[] content, String tipoAllegato) throws SystemException, PortalException {
+
+ FileEntry fileEntry = null;
+
+ // DettPratica dettPratica =
+ // dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId);
+ IntPratica intPratica = intPraticaPersistence.fetchByPrimaryKey(intPraticaId);
+ Territorio territorio = territorioPersistence.fetchByPrimaryKey(intPratica.getTerritorioId());
+
+ long companyId = territorio.getCompanyId();
+ long groupId = territorio.getGroupId();
+
+ // TODO forse è meglio ragionare con un'altra logica per i permessi
+ User user = UserLocalServiceUtil.getRoleUsers(
+ RoleLocalServiceUtil.getRole(intPratica.getCompanyId(), RoleConstants.ADMINISTRATOR)
+ .getRoleId()).get(0);
+ try {
+ PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil.create(user));
+ } catch (Exception e) {
+ throw new SystemException(e);
+
+ }
+ long userId = user.getUserId();
+
+ ServiceContext serviceContext = new ServiceContext();
+ serviceContext.setCompanyId(companyId);
+ serviceContext.setScopeGroupId(groupId);
+ serviceContext.setUserId(userId);
+ serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
+
+ long defaultFolderId = configurazioneLocalService.findByC_ChiaveLong(companyId,
+ ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
+
+ Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
+
+ String folderName = PraticaUtil.getFolderName(classPk);
+
+ Folder folder = null;
+ try {
+ folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),
+ defaultFolder.getFolderId(), folderName);
+ } catch (NoSuchFolderException e) {
+ // cartella non presente -> creo cartella
+ folder = dlAppLocalService.addFolder(userId, defaultFolder.getRepositoryId(),
+ defaultFolder.getFolderId(), folderName, StringPool.BLANK, serviceContext);
+ }
+ Date now = new Date();
+ String title = tipoAllegato + StringPool.UNDERLINE + sourceFileName;
+ String description = sourceFileName;
+ String mimeType = MimeTypesUtil.getContentType(sourceFileName);
+
+ String changeLog = StringPool.BLANK;
+ fileEntry = dlAppLocalService.addFileEntry(userId, folder.getRepositoryId(), folder.getFolderId(),
+ now.getTime() + "_" + sourceFileName, mimeType, title, description, changeLog, content,
+ serviceContext);
+
+ try {
+ PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil
+ .create(UserLocalServiceUtil.getUser(delegaUserId)));
+ } catch (Exception e) {
+ throw new SystemException(e);
+
+ }
+ return fileEntry;
+ }
+
+ public FileEntry getAttachment(long classPk) throws SystemException, PortalException {
+
+ DocPratica fileAllegato = docPraticaPersistence.findByPrimaryKey(classPk);
+ return dlAppLocalService.getFileEntry(fileAllegato.getDlFileEntryId());
+ }
+
+ public void addFirma(long docPraticaId, String codiceFiscale) throws PortalException, SystemException {
+
+ DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId);
+ docPratica.setJsonFirmatari(FirmeUtil.addFirma(docPratica.getJsonFirmatari(), codiceFiscale));
+ docPraticaLocalService.updateDocPratica(docPratica);
+ }
+
+ public void addFirmeAndApprova(long docPraticaId, List codiciFiscali) throws PortalException,
+ SystemException {
+
+ DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId);
+ String jsonFirmatari = docPratica.getJsonFirmatari();
+ for (String codiceFiscale : codiciFiscali) {
+ jsonFirmatari = FirmeUtil.addFirmaDigitale(jsonFirmatari, codiceFiscale);
+ }
+ docPratica.setJsonFirmatari(jsonFirmatari);
+ docPratica.setModifiedDate(new Date());
+ docPratica.setStatus(WorkflowConstants.STATUS_APPROVED);
+ docPraticaLocalService.updateDocPratica(docPratica);
+ }
- } catch (PortalException e) {
- throw new SystemException(e);
- }
- return super.deleteDocPratica(docPratica);
- }
+ public void addErrorAndApprova(long docPraticaId, String errorCode) throws PortalException,
+ SystemException {
- @Override
- public DocPratica deleteDocPratica(long docPraticaId) throws PortalException, SystemException {
+ DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId);
+ docPratica.setModifiedDate(new Date());
+ docPratica.setErrorCode(errorCode);
+ if ("400".equalsIgnoreCase(errorCode)) {
+ docPratica.setStatus(WorkflowConstants.STATUS_DENIED);
+ }
+ docPraticaLocalService.updateDocPratica(docPratica);
+ }
+
+ public void removeFirma(long docPraticaId, String codiceFiscale) throws PortalException, SystemException {
+
+ DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId);
+ docPratica.setJsonFirmatari(FirmeUtil.removeFirma(docPratica.getJsonFirmatari(), codiceFiscale));
+ docPraticaLocalService.updateDocPratica(docPratica);
+ }
+
+ private void validate(long groupId, long docPraticaId, String className, long classPk, long intPraticaId,
+ byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong,
+ String tipologia, String sha256, boolean aggiornato, String jsonFirmatari,
+ long dettPraticaIdRimozione, Date dtDataRimozione) throws PortalException, SystemException {
+
+ // TODO Write your own validation code
+
+ }
+
+ public DocPratica updateDocPraticaAggiornato(long docPraticaId, boolean aggiornato)
+ throws SystemException {
+
+ DocPratica docPratica = docPraticaPersistence.fetchByPrimaryKey(docPraticaId);
+ docPratica.setAggiornato(aggiornato);
+ docPratica.setModifiedDate(new Date());
+ return docPraticaLocalService.updateDocPratica(docPratica);
+ }
+
+ public int countDocPraticaDaInviareDax() throws SystemException {
+
+ DynamicQuery dynamicQuery = dynamicQueryDocPraticaDaInviareDax();
+ return (int) docPraticaPersistence.countWithDynamicQuery(dynamicQuery);
+ }
+
+ public List getDocPraticaDaInviareDax(int start, int end) throws SystemException {
+ DynamicQuery dynamicQuery = dynamicQueryDocPraticaDaInviareDax();
+ return docPraticaPersistence.findWithDynamicQuery(dynamicQuery, start, end);
+ }
+
+ private DynamicQuery dynamicQueryDocPraticaDaInviareDax() {
+ DynamicQuery dynamicQuery = docPraticaLocalService.dynamicQuery();
+ dynamicQuery.add(PropertyFactoryUtil.forName("dtInvioDax").isNull());
+ dynamicQuery.add(PropertyFactoryUtil.forName("daxId").eq(0L));
+ dynamicQuery.add(PropertyFactoryUtil.forName("praticaValidata").eq(true));
+ dynamicQuery.addOrder(OrderFactoryUtil.asc("createDate"));
+ return dynamicQuery;
+ }
- return deleteDocPratica(docPraticaLocalService.getDocPratica(docPraticaId));
- }
+ public int countByClassPk(long classPk) throws SystemException {
+ return docPraticaPersistence.countByClassPk(classPk);
+ }
- public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId, byte[] dlFileEntry,
- String fileName, String version, boolean praticaValidata, String descLong, String tipologia, String sha256,
- boolean aggiornato, String jsonFirmatari, long dettPraticaIdRimozione, Date dtDataRimozione,
- ServiceContext serviceContext) throws PortalException, SystemException {
+ public List findByClassPk(long classPk, int start, int end) throws SystemException {
- User user = userPersistence.findByPrimaryKey(userId);
+ return docPraticaPersistence.findByClassPk(classPk, start, end);
+ }
- Date now = new Date();
+ public List findByIntPratica(long intPraticaId) throws SystemException {
- validate(serviceContext.getScopeGroupId(), 0L, className, classPk, intPraticaId, dlFileEntry, fileName, version,
- praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari, dettPraticaIdRimozione,
- dtDataRimozione);
-
-
- DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName()));
-
- FileEntry fileEntry = addAttachment(classPk, intPraticaId, userId, fileName, dlFileEntry, tipologia);
+ return docPraticaPersistence.findByIntPratica(intPraticaId);
+ }
- docPratica.setCompanyId(serviceContext.getCompanyId());
- docPratica.setUserId(user.getUserId());
- docPratica.setUserName(user.getFullName());
- docPratica.setCreateDate(serviceContext.getCreateDate(now));
- docPratica.setModifiedDate(serviceContext.getModifiedDate(now));
- docPratica.setGroupId(serviceContext.getScopeGroupId());
+ public List findByClassPk(long classPk) throws SystemException {
- docPratica.setClassName(className);
- docPratica.setClassPk(classPk);
- docPratica.setIntPraticaId(intPraticaId);
- docPratica.setDlFileEntryId(fileEntry.getFileEntryId());
- docPratica.setVersion(version);
- docPratica.setPraticaValidata(praticaValidata);
- docPratica.setDescLong(descLong);
- docPratica.setTipologia(tipologia);
- docPratica.setSha256(sha256);
- docPratica.setAggiornato(aggiornato);
- docPratica.setJsonFirmatari(jsonFirmatari);
- docPratica.setDettPraticaIdRimozione(dettPraticaIdRimozione);
- docPratica.setDtDataRimozione(dtDataRimozione);
+ return docPraticaPersistence.findByClassPk(classPk);
+ }
- docPratica.setStatus(WorkflowConstants.STATUS_PENDING);
+ public List findByStaus(int status, int start, int end, OrderByComparator order)
+ throws SystemException {
- docPratica = docPraticaPersistence.update(docPratica);
+ return docPraticaPersistence.findByStatus(status, start, end, order);
+ }
+
+ public int countByStatus(long status) throws SystemException {
+
+ return docPraticaPersistence.countByStatus(status);
+ }
+
+ public int countByClassPk_Tipologia(long classPk, String tipologia) throws SystemException {
+
+ return docPraticaPersistence.countByClassPk_Tipologia(classPk, tipologia);
+ }
+
+ public List findByClassPk_Tipologia(long classPk, String tipologia, int start, int end)
+ throws SystemException {
+
+ return docPraticaPersistence.findByClassPk_Tipologia(classPk, tipologia, start, end);
+ }
- return docPratica;
- }
+ public List findByIntPratica_Tipologia(long intPraticaId, String tipologia, int start, int end)
+ throws SystemException {
- public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId, byte[] dlFileEntry,
- String fileName, String tipologia, String jsonFirmatari, ServiceContext serviceContext) throws PortalException,
- SystemException {
-
- User user = userPersistence.findByPrimaryKey(userId);
-
- Date now = new Date();
-
- DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName()));
-
- FileEntry fileEntry = addAttachment(classPk, intPraticaId, userId, fileName, dlFileEntry, tipologia);
-
- docPratica.setCompanyId(serviceContext.getCompanyId());
- docPratica.setUserId(user.getUserId());
- docPratica.setUserName(user.getFullName());
- docPratica.setCreateDate(serviceContext.getCreateDate(now));
- docPratica.setModifiedDate(serviceContext.getModifiedDate(now));
- docPratica.setGroupId(serviceContext.getScopeGroupId());
-
- docPratica.setClassName(className);
- docPratica.setClassPk(classPk);
- docPratica.setIntPraticaId(intPraticaId);
- docPratica.setDlFileEntryId(fileEntry.getFileEntryId());
- docPratica.setVersion("0");
- docPratica.setPraticaValidata(false);
- docPratica.setDescLong(fileName);
- docPratica.setTipologia(tipologia);
- docPratica.setAggiornato(false);
- docPratica.setJsonFirmatari(jsonFirmatari);
- docPratica.setDettPraticaIdRimozione(0l);
- docPratica.setDtDataRimozione(null);
-
- docPratica.setStatus(WorkflowConstants.STATUS_PENDING);
-
- docPratica = docPraticaPersistence.update(docPratica);
-
- return docPratica;
- }
-
- public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId, long fileEntryId,
- String fileName, String tipologia, String jsonFirmatari, ServiceContext serviceContext) throws PortalException,
- SystemException {
-
- User user = userPersistence.findByPrimaryKey(userId);
-
- Date now = new Date();
-
- DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName()));
-
- docPratica.setCompanyId(serviceContext.getCompanyId());
- docPratica.setUserId(user.getUserId());
- docPratica.setUserName(user.getFullName());
- docPratica.setCreateDate(serviceContext.getCreateDate(now));
- docPratica.setModifiedDate(serviceContext.getModifiedDate(now));
- docPratica.setGroupId(serviceContext.getScopeGroupId());
+ DynamicQuery dynamicQuery = dynamicQuery();
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
+ dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").eq(tipologia));
+ dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
+ return soggettoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
+ }
- docPratica.setClassName(className);
- docPratica.setClassPk(classPk);
- docPratica.setIntPraticaId(intPraticaId);
- docPratica.setDlFileEntryId(fileEntryId);
- docPratica.setVersion("0");
- docPratica.setPraticaValidata(false);
- docPratica.setDescLong(fileName);
- docPratica.setTipologia(tipologia);
- docPratica.setAggiornato(false);
- docPratica.setJsonFirmatari(jsonFirmatari);
- docPratica.setDettPraticaIdRimozione(0l);
- docPratica.setDtDataRimozione(null);
-
- docPratica.setStatus(WorkflowConstants.STATUS_PENDING);
-
- docPratica = docPraticaPersistence.update(docPratica);
-
- return docPratica;
- }
-
- public DocPratica addDocPraticaForImport(long userId, String className, long classPk, long intPraticaId,
- byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong, String tipologia,
- String sha256, boolean aggiornato, String jsonFirmatari, long dettPraticaIdRimozione, Date dtDataRimozione,
- long oldDocPraticaId, ServiceContext serviceContext) throws PortalException, SystemException {
-
- Date now = new Date();
-
- validate(serviceContext.getScopeGroupId(), 0L, className, classPk, intPraticaId, dlFileEntry, fileName, version,
- praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari, dettPraticaIdRimozione,
- dtDataRimozione);
-
-
- DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName()));
-
- docPratica.setCompanyId(serviceContext.getCompanyId());
- docPratica.setUserId(userId);
- if (userId > 0) {
- User user = userPersistence.findByPrimaryKey(userId);
- docPratica.setUserName(user.getFullName());
- }
- docPratica.setCreateDate(serviceContext.getCreateDate(now));
- docPratica.setModifiedDate(serviceContext.getModifiedDate(now));
- docPratica.setGroupId(serviceContext.getScopeGroupId());
- docPratica.setClassName(className);
- docPratica.setClassPk(classPk);
- docPratica.setIntPraticaId(intPraticaId);
- docPratica.setVersion(version);
- docPratica.setPraticaValidata(praticaValidata);
- docPratica.setDescLong(descLong);
- docPratica.setTipologia(tipologia);
- docPratica.setSha256(sha256);
- docPratica.setAggiornato(aggiornato);
- docPratica.setJsonFirmatari(jsonFirmatari);
- docPratica.setDettPraticaIdRimozione(dettPraticaIdRimozione);
- docPratica.setDtDataRimozione(dtDataRimozione);
- docPratica.setOldDocPraticaId(oldDocPraticaId);
-
- docPratica.setStatus(WorkflowConstants.STATUS_APPROVED);
-
- return docPraticaPersistence.update(docPratica);
- }
-
- public FileEntry addAttachment(long classPk, long intPraticaId, long delegaUserId, String sourceFileName,
- byte[] content, String tipoAllegato) throws SystemException, PortalException {
-
- FileEntry fileEntry = null;
-
- // DettPratica dettPratica = dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId);
- IntPratica intPratica = intPraticaPersistence.fetchByPrimaryKey(intPraticaId);
- Territorio territorio = territorioPersistence.fetchByPrimaryKey(intPratica.getTerritorioId());
-
- long companyId = territorio.getCompanyId();
- long groupId = territorio.getGroupId();
-
- // TODO forse è meglio ragionare con un'altra logica per i permessi
- User user =
- UserLocalServiceUtil.getRoleUsers(
- RoleLocalServiceUtil.getRole(intPratica.getCompanyId(), RoleConstants.ADMINISTRATOR).getRoleId()).get(0);
- try {
- PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil.create(user));
- } catch (Exception e) {
- throw new SystemException(e);
-
- }
- long userId = user.getUserId();
-
- ServiceContext serviceContext = new ServiceContext();
- serviceContext.setCompanyId(companyId);
- serviceContext.setScopeGroupId(groupId);
- serviceContext.setUserId(userId);
-
- // TODO forse mettiamo i permesssi ma non mi pare sicuro.
-
- long defaultFolderId =
- configurazioneLocalService.findByC_ChiaveLong(companyId, ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
-
- Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
-
- String folderName = PraticaUtil.getFolderName(classPk);
-
- Folder folder = null;
- try {
- folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName);
- } catch (NoSuchFolderException e) {
- // cartella non presente -> creo cartella
- folder =
- dlAppLocalService.addFolder(userId, defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName,
- StringPool.BLANK, serviceContext);
- }
- Date now = new Date();
- String title = tipoAllegato + StringPool.UNDERLINE + sourceFileName;
- String description = sourceFileName;
- String mimeType = MimeTypesUtil.getContentType(sourceFileName);
-
- String changeLog = StringPool.BLANK;
- fileEntry =
- dlAppLocalService.addFileEntry(userId, folder.getRepositoryId(), folder.getFolderId(), now.getTime() + "_"
- + sourceFileName, mimeType, title, description, changeLog, content, serviceContext);
-
- try {
- PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil.create(UserLocalServiceUtil
- .getUser(delegaUserId)));
- } catch (Exception e) {
- throw new SystemException(e);
-
- }
- return fileEntry;
- }
-
- public FileEntry getAttachment(long classPk) throws SystemException, PortalException {
+ public List findByIntPratica_ClassPk_Tipologia(long intPraticaId, long classPk,
+ String tipologia, int start, int end) throws SystemException {
- DocPratica fileAllegato = docPraticaPersistence.findByPrimaryKey(classPk);
- return dlAppLocalService.getFileEntry(fileAllegato.getDlFileEntryId());
- }
-
- public void addFirma(long docPraticaId, String codiceFiscale) throws PortalException, SystemException {
-
- DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId);
- docPratica.setJsonFirmatari(FirmeUtil.addFirma(docPratica.getJsonFirmatari(), codiceFiscale));
- docPraticaLocalService.updateDocPratica(docPratica);
- }
+ DynamicQuery dynamicQuery = dynamicQuery();
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
+ dynamicQuery.add(RestrictionsFactoryUtil.le("classPk", classPk));
+ dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").eq(tipologia));
+ dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
+ return dynamicQuery(dynamicQuery, start, end);
+ }
- public void addFirmeAndApprova(long docPraticaId, List codiciFiscali) throws PortalException, SystemException {
+ public List findByIntPratica_ClassPk_Tipologie(long intPraticaId, long classPk,
+ List tipologie) throws SystemException {
- DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId);
- String jsonFirmatari = docPratica.getJsonFirmatari();
- for (String codiceFiscale : codiciFiscali) {
- jsonFirmatari = FirmeUtil.addFirmaDigitale(jsonFirmatari, codiceFiscale);
- }
- docPratica.setJsonFirmatari(jsonFirmatari);
- docPratica.setModifiedDate(new Date());
- docPratica.setStatus(WorkflowConstants.STATUS_APPROVED);
- docPraticaLocalService.updateDocPratica(docPratica);
- }
+ DynamicQuery dynamicQuery = dynamicQuery();
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
+ dynamicQuery.add(RestrictionsFactoryUtil.le("classPk", classPk));
+ dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").in(tipologie));
+ dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
+ return dynamicQuery(dynamicQuery);
+ }
- public void addErrorAndApprova(long docPraticaId, String errorCode) throws PortalException, SystemException {
+ public List findByIntPratica_ClassPkEqual_Tipologie(long intPraticaId, long classPk,
+ List tipologie) throws SystemException {
- DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId);
- docPratica.setModifiedDate(new Date());
- docPratica.setErrorCode(errorCode);
- if ("400".equalsIgnoreCase(errorCode)) {
- docPratica.setStatus(WorkflowConstants.STATUS_DENIED);
- }
- docPraticaLocalService.updateDocPratica(docPratica);
- }
+ DynamicQuery dynamicQuery = dynamicQuery();
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("classPk", classPk));
+ dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").in(tipologie));
+ dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
+ return dynamicQuery(dynamicQuery);
+ }
- public void removeFirma(long docPraticaId, String codiceFiscale) throws PortalException, SystemException {
+ public DocPratica fetchByC_Group_DlFileEntry_Version(long dlFileEntryId, String version)
+ throws SystemException {
- DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId);
- docPratica.setJsonFirmatari(FirmeUtil.removeFirma(docPratica.getJsonFirmatari(), codiceFiscale));
- docPraticaLocalService.updateDocPratica(docPratica);
- }
+ return docPraticaPersistence.fetchByDlFileEntry_Version(dlFileEntryId, version);
+ }
- private void validate(long groupId, long docPraticaId, String className, long classPk, long intPraticaId,
- byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong, String tipologia,
- String sha256, boolean aggiornato, String jsonFirmatari, long dettPraticaIdRimozione, Date dtDataRimozione)
- throws PortalException, SystemException {
+ public DocPratica fetchByOldDocPraticaId(long oldDocPraticaId) throws SystemException {
- // TODO Write your own validation code
+ return docPraticaPersistence.fetchByOldDocPratica(oldDocPraticaId);
+ }
+ public List findDistinctDlFileEntryId(long classPk, String tipologia, int start, int end)
+ throws SystemException {
- }
+ return findDistinctDlFileEntryId(new long[] { classPk }, tipologia, start, end);
+ }
- public DocPratica updateDocPraticaAggiornato(long docPraticaId, boolean aggiornato) throws SystemException {
+ public List findDistinctDlFileEntryId(long[] classPks, String tipologia, int start, int end)
+ throws SystemException {
- DocPratica docPratica = docPraticaPersistence.fetchByPrimaryKey(docPraticaId);
- docPratica.setAggiornato(aggiornato);
- docPratica.setModifiedDate(new Date());
- return docPraticaLocalService.updateDocPratica(docPratica);
- }
+ DynamicQuery dynamicQuery = docPraticaLocalService.dynamicQuery();
+ dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil
+ .property("dlFileEntryId")));
+ dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").eq(tipologia));
+ Junction or = RestrictionsFactoryUtil.disjunction();
+ for (long classPk : classPks) {
+ or.add(PropertyFactoryUtil.forName("classPk").eq(classPk));
+ }
+ dynamicQuery.add(or);
+ dynamicQuery.addOrder(OrderFactoryUtil.desc("dlFileEntryId"));
+ return docPraticaPersistence.findWithDynamicQuery(dynamicQuery, start, end);
+ }
- public int countDocPraticaDaInviareDax() throws SystemException {
+ public List getValidByIntPratica(long intPraticaId) throws SystemException {
- DynamicQuery dynamicQuery = dynamicQueryDocPraticaDaInviareDax();
- return (int) docPraticaPersistence.countWithDynamicQuery(dynamicQuery);
- }
+ DynamicQuery dynamicQuery = dynamicQuery();
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione", null));
+ dynamicQuery.addOrder(OrderFactoryUtil.asc("dettPraticaIdRimozione"));
+ return dynamicQuery(dynamicQuery);
+ }
+
+ public List getValidByIntPratica_Tipologia(long intPraticaId, String tipologia, int start,
+ int end) throws SystemException {
+
+ DynamicQuery dynamicQuery = dynamicQuery();
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("rimosso", false));
+ dynamicQuery.addOrder(OrderFactoryUtil.asc("dettPraticaIdRimozione"));
+ return dynamicQuery(dynamicQuery, start, end);
+ }
+
+ public int countValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia)
+ throws SystemException {
+
+ DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
+
+ return (int) docPraticaPersistence.countWithDynamicQuery(dynamicQuery);
+ }
+
+ public List getValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia, int start,
+ int end) throws SystemException {
+
+ DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
+
+ dynamicQuery.addOrder(OrderFactoryUtil.asc("dettPraticaIdRimozione"));
+ return dynamicQuery(dynamicQuery, start, end);
+ }
+
+ public List getValidTmpByIntPratica_DettPratica_Tipologia(long intPraticaId,
+ long dettPraticaId, String tipologia, int start, int end) throws SystemException {
- @SuppressWarnings("unchecked")
- public List getDocPraticaDaInviareDax(int start, int end) throws SystemException {
+ DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("classPk", dettPraticaId));
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("className", DettPratica.class.getName()));
- DynamicQuery dynamicQuery = dynamicQueryDocPraticaDaInviareDax();
- return docPraticaPersistence.findWithDynamicQuery(dynamicQuery, start, end);
- }
+ dynamicQuery.addOrder(OrderFactoryUtil.asc("dettPraticaIdRimozione"));
+ return dynamicQuery(dynamicQuery, start, end);
+ }
- private DynamicQuery dynamicQueryDocPraticaDaInviareDax() {
+ public List getValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie,
+ int start, int end) throws SystemException {
- DynamicQuery dynamicQuery = docPraticaLocalService.dynamicQuery();
- dynamicQuery.add(PropertyFactoryUtil.forName("dtInvioDax").isNull());
- dynamicQuery.add(PropertyFactoryUtil.forName("daxId").eq(0L));
- dynamicQuery.add(PropertyFactoryUtil.forName("praticaValidata").eq(true));
- dynamicQuery.addOrder(OrderFactoryUtil.asc("createDate"));
- return dynamicQuery;
- }
+ DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
+ dynamicQuery.add(RestrictionsFactoryUtil.in("tipologia", tipologie));
+
+ dynamicQuery.addOrder(OrderFactoryUtil.asc("dettPraticaIdRimozione"));
+ return dynamicQuery(dynamicQuery, start, end);
+ }
+
+ public int countValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie)
+ throws SystemException {
+
+ DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
+ dynamicQuery.add(RestrictionsFactoryUtil.in("tipologia", tipologie));
- public int countByClassPk(long classPk) throws SystemException {
+ return (int) docPraticaPersistence.countWithDynamicQuery(dynamicQuery);
+ }
- return docPraticaPersistence.countByClassPk(classPk);
- }
+ private DynamicQuery createvalidTmpQueryByIntPratica(long intPraticaId) {
- public List findByClassPk(long classPk, int start, int end) throws SystemException {
+ DynamicQuery dynamicQuery = dynamicQuery();
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione", null));
+
+ return dynamicQuery;
+ }
+
+ public List getInvalidByIntPratica(long intPraticaId) throws SystemException {
+
+ DynamicQuery dynamicQuery = dynamicQuery();
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
+ dynamicQuery.add(RestrictionsFactoryUtil.ne("rimosso", false));
+ dynamicQuery.addOrder(OrderFactoryUtil.desc("dettPraticaIdRimozione"));
+ return dynamicQuery(dynamicQuery);
+ }
+
+ public List getInvalidTmpByIntPratica(long intPraticaId) throws SystemException {
+
+ DynamicQuery dynamicQuery = dynamicQuery();
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
+ dynamicQuery.add(RestrictionsFactoryUtil.ne("dettPraticaIdRimozione", null));
+ dynamicQuery.addOrder(OrderFactoryUtil.desc("dettPraticaIdRimozione"));
+ return dynamicQuery(dynamicQuery);
+ }
+
+ public List getValidUntilClassPkByIntPratica(long intPraticaId, long classPk,
+ String tipologia, int start, int end) throws SystemException {
+
+ DynamicQuery dynamicQuery = dynamicQuery();
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
+ dynamicQuery.add(RestrictionsFactoryUtil.le("classPk", classPk));
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
+ // dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione",
+ // null));
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("rimosso", false));
+ dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
+ return dynamicQuery(dynamicQuery, start, end);
+ }
+
+ public void completeInvalidation(long intPraticaId) throws SystemException {
+
+ Date now = new Date();
+ List allegatiDaInvalidare = getInvalidTmpByIntPratica(intPraticaId);
+ for (DocPratica docPratica : allegatiDaInvalidare) {
+ docPratica.setRimosso(true);
+ docPratica.setDtDataRimozione(now);
+
+ docPratica = updateDocPratica(docPratica);
+ }
+ }
+
+ public List getDocPraticaWithOldFileEntryId(int start, int end) throws SystemException {
+
+ DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(DocPratica.class);
+ dynamicQuery.add(PropertyFactoryUtil.forName("oldDlFileEntryId").ne(0L));
+ dynamicQuery.addOrder(OrderFactoryUtil.desc("oldDlFileEntryId"));
+
+ return docPraticaLocalService.dynamicQuery(dynamicQuery, start, end);
+ }
+
+ // ADT BUG FE ID = 9
+ public DocPratica addDocPraticaAnnullamento(long userId, String className, long classPk,
+ long intPraticaId, long fileEntryId, String fileName, String tipologia, String sha256,
+ String jsonFirmatari, ServiceContext serviceContext) throws PortalException, SystemException {
+
+ User user = userPersistence.findByPrimaryKey(userId);
+
+ Date now = new Date();
+
+ DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
+ .getName()));
+
+ docPratica.setCompanyId(serviceContext.getCompanyId());
+ docPratica.setUserId(user.getUserId());
+ docPratica.setUserName(user.getFullName());
+ docPratica.setCreateDate(serviceContext.getCreateDate(now));
+ docPratica.setModifiedDate(serviceContext.getModifiedDate(now));
+ docPratica.setGroupId(serviceContext.getScopeGroupId());
+
+ docPratica.setClassName(className);
+ docPratica.setClassPk(classPk);
+ docPratica.setIntPraticaId(intPraticaId);
+ docPratica.setDlFileEntryId(fileEntryId);
+ docPratica.setVersion("0");
+ docPratica.setPraticaValidata(false);
+ docPratica.setDescLong(fileName);
+ docPratica.setTipologia(tipologia);
+ docPratica.setSha256(sha256);
+ docPratica.setAggiornato(false);
+ docPratica.setJsonFirmatari(jsonFirmatari);
+ docPratica.setDettPraticaIdRimozione(0l);
+ docPratica.setDtDataRimozione(null);
+
+ docPratica.setStatus(WorkflowConstants.STATUS_PENDING);
+
+ docPratica = docPraticaPersistence.update(docPratica);
+
+ return docPratica;
+ }
+
+ /**
+ * Metodo nuovo ADT
+ *
+ * @param intPraticaId
+ * @param classPk
+ * @param tipologia
+ * @param start
+ * @param end
+ * @return
+ * @throws SystemException
+ */
+ public List findByIntPratica_ClassPk_TipologiaNew(long intPraticaId, long classPk,
+ String tipologia, int start, int end) throws SystemException {
+
+ DynamicQuery dynamicQuery = dynamicQuery();
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
+ dynamicQuery.add(RestrictionsFactoryUtil.eq("classPk", classPk));
+ dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").eq(tipologia));
+ dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
+ return dynamicQuery(dynamicQuery, start, end);
+ }
- return docPraticaPersistence.findByClassPk(classPk, start, end);
- }
-
- public List findByIntPratica(long intPraticaId) throws SystemException {
-
- return docPraticaPersistence.findByIntPratica(intPraticaId);
- }
-
- public List findByClassPk(long classPk) throws SystemException {
-
- return docPraticaPersistence.findByClassPk(classPk);
- }
-
- public List findByStaus(int status, int start, int end, OrderByComparator order) throws SystemException {
-
- return docPraticaPersistence.findByStatus(status, start, end, order);
- }
-
- public int countByStatus(long status) throws SystemException {
-
- return docPraticaPersistence.countByStatus(status);
- }
-
- public int countByClassPk_Tipologia(long classPk, String tipologia) throws SystemException {
-
- return docPraticaPersistence.countByClassPk_Tipologia(classPk, tipologia);
- }
-
- public List findByClassPk_Tipologia(long classPk, String tipologia, int start, int end)
- throws SystemException {
-
- return docPraticaPersistence.findByClassPk_Tipologia(classPk, tipologia, start, end);
- }
-
- public List findByIntPratica_Tipologia(long intPraticaId, String tipologia, int start, int end)
- throws SystemException {
-
- DynamicQuery dynamicQuery = dynamicQuery();
- dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
- dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").eq(tipologia));
- dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
- return soggettoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
- }
-
- public List findByIntPratica_ClassPk_Tipologia(long intPraticaId, long classPk, String tipologia,
- int start, int end) throws SystemException {
-
- DynamicQuery dynamicQuery = dynamicQuery();
- dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
- dynamicQuery.add(RestrictionsFactoryUtil.le("classPk", classPk));
- dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").eq(tipologia));
- dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
- return dynamicQuery(dynamicQuery, start, end);
- }
-
- public List findByIntPratica_ClassPk_Tipologie(long intPraticaId, long classPk, List tipologie)
- throws SystemException {
-
- DynamicQuery dynamicQuery = dynamicQuery();
- dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
- dynamicQuery.add(RestrictionsFactoryUtil.le("classPk", classPk));
- dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").in(tipologie));
- dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
- return dynamicQuery(dynamicQuery);
- }
-
- public List findByIntPratica_ClassPkEqual_Tipologie(long intPraticaId, long classPk,
- List tipologie) throws SystemException {
-
- DynamicQuery dynamicQuery = dynamicQuery();
- dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
- dynamicQuery.add(RestrictionsFactoryUtil.eq("classPk", classPk));
- dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").in(tipologie));
- dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
- return dynamicQuery(dynamicQuery);
- }
-
- public DocPratica fetchByC_Group_DlFileEntry_Version(long dlFileEntryId, String version) throws SystemException {
-
- return docPraticaPersistence.fetchByDlFileEntry_Version(dlFileEntryId, version);
- }
-
- public DocPratica fetchByOldDocPraticaId(long oldDocPraticaId) throws SystemException {
-
- return docPraticaPersistence.fetchByOldDocPratica(oldDocPraticaId);
- }
-
- public List findDistinctDlFileEntryId(long classPk, String tipologia, int start, int end)
- throws SystemException {
-
- return findDistinctDlFileEntryId(new long[] {classPk}, tipologia, start, end);
- }
-
- public List findDistinctDlFileEntryId(long[] classPks, String tipologia, int start, int end)
- throws SystemException {
-
- DynamicQuery dynamicQuery = docPraticaLocalService.dynamicQuery();
- dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property("dlFileEntryId")));
- dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").eq(tipologia));
- Junction or = RestrictionsFactoryUtil.disjunction();
- for (long classPk : classPks) {
- or.add(PropertyFactoryUtil.forName("classPk").eq(classPk));
- }
- dynamicQuery.add(or);
- dynamicQuery.addOrder(OrderFactoryUtil.desc("dlFileEntryId"));
- return docPraticaPersistence.findWithDynamicQuery(dynamicQuery, start, end);
- }
-
- public List getValidByIntPratica(long intPraticaId) throws SystemException {
-
- DynamicQuery dynamicQuery = dynamicQuery();
- dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
- dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione", null));
- dynamicQuery.addOrder(OrderFactoryUtil.asc("dettPraticaIdRimozione"));
- return dynamicQuery(dynamicQuery);
- }
-
- public List getValidByIntPratica_Tipologia(long intPraticaId, String tipologia, int start, int end)
- throws SystemException {
-
- DynamicQuery dynamicQuery = dynamicQuery();
- dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
- dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
- dynamicQuery.add(RestrictionsFactoryUtil.eq("rimosso", false));
- dynamicQuery.addOrder(OrderFactoryUtil.asc("dettPraticaIdRimozione"));
- return dynamicQuery(dynamicQuery, start, end);
- }
-
- public int countValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia) throws SystemException {
-
- DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
- dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
-
- return (int) docPraticaPersistence.countWithDynamicQuery(dynamicQuery);
- }
-
- public List getValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia, int start, int end)
- throws SystemException {
-
- DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
- dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
-
- dynamicQuery.addOrder(OrderFactoryUtil.asc("dettPraticaIdRimozione"));
- return dynamicQuery(dynamicQuery, start, end);
- }
-
- public List getValidTmpByIntPratica_DettPratica_Tipologia(long intPraticaId, long dettPraticaId, String tipologia, int start, int end)
- throws SystemException {
-
- DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
- dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
- dynamicQuery.add(RestrictionsFactoryUtil.eq("classPk", dettPraticaId));
- dynamicQuery.add(RestrictionsFactoryUtil.eq("className", DettPratica.class.getName()));
-
- dynamicQuery.addOrder(OrderFactoryUtil.asc("dettPraticaIdRimozione"));
- return dynamicQuery(dynamicQuery, start, end);
- }
-
- public List getValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie, int start, int end)
- throws SystemException {
-
- DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
- dynamicQuery.add(RestrictionsFactoryUtil.in("tipologia", tipologie));
-
- dynamicQuery.addOrder(OrderFactoryUtil.asc("dettPraticaIdRimozione"));
- return dynamicQuery(dynamicQuery, start, end);
- }
-
- public int countValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie) throws SystemException {
-
- DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
- dynamicQuery.add(RestrictionsFactoryUtil.in("tipologia", tipologie));
-
- return (int) docPraticaPersistence.countWithDynamicQuery(dynamicQuery);
- }
-
- private DynamicQuery createvalidTmpQueryByIntPratica(long intPraticaId) {
-
- DynamicQuery dynamicQuery = dynamicQuery();
- dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
- dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione", null));
-
- return dynamicQuery;
- }
-
- public List getInvalidByIntPratica(long intPraticaId) throws SystemException {
-
- DynamicQuery dynamicQuery = dynamicQuery();
- dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
- dynamicQuery.add(RestrictionsFactoryUtil.ne("rimosso", false));
- dynamicQuery.addOrder(OrderFactoryUtil.desc("dettPraticaIdRimozione"));
- return dynamicQuery(dynamicQuery);
- }
-
- public List getInvalidTmpByIntPratica(long intPraticaId) throws SystemException {
-
- DynamicQuery dynamicQuery = dynamicQuery();
- dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
- dynamicQuery.add(RestrictionsFactoryUtil.ne("dettPraticaIdRimozione", null));
- dynamicQuery.addOrder(OrderFactoryUtil.desc("dettPraticaIdRimozione"));
- return dynamicQuery(dynamicQuery);
- }
-
- public List getValidUntilClassPkByIntPratica(long intPraticaId, long classPk, String tipologia,
- int start, int end) throws SystemException {
-
- DynamicQuery dynamicQuery = dynamicQuery();
- dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
- dynamicQuery.add(RestrictionsFactoryUtil.le("classPk", classPk));
- dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
- // dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione", null));
- dynamicQuery.add(RestrictionsFactoryUtil.eq("rimosso", false));
- dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
- return dynamicQuery(dynamicQuery, start, end);
- }
-
- public void completeInvalidation(long intPraticaId) throws SystemException {
-
- Date now = new Date();
- List allegatiDaInvalidare = getInvalidTmpByIntPratica(intPraticaId);
- for (DocPratica docPratica : allegatiDaInvalidare) {
- docPratica.setRimosso(true);
- docPratica.setDtDataRimozione(now);
-
- docPratica = updateDocPratica(docPratica);
- }
- }
-
- public List getDocPraticaWithOldFileEntryId(int start, int end) throws SystemException {
-
- DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(DocPratica.class);
- dynamicQuery.add(PropertyFactoryUtil.forName("oldDlFileEntryId").ne(0L));
- dynamicQuery.addOrder(OrderFactoryUtil.desc("oldDlFileEntryId"));
-
- return docPraticaLocalService.dynamicQuery(dynamicQuery, start, end);
- }
-
-//ADT BUG FE ID = 9
- public DocPratica addDocPraticaAnnullamento(long userId, String className, long classPk, long intPraticaId, long fileEntryId,
- String fileName, String tipologia, String sha256, String jsonFirmatari, ServiceContext serviceContext) throws PortalException,
- SystemException {
-
- User user = userPersistence.findByPrimaryKey(userId);
-
- Date now = new Date();
-
- DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName()));
-
- docPratica.setCompanyId(serviceContext.getCompanyId());
- docPratica.setUserId(user.getUserId());
- docPratica.setUserName(user.getFullName());
- docPratica.setCreateDate(serviceContext.getCreateDate(now));
- docPratica.setModifiedDate(serviceContext.getModifiedDate(now));
- docPratica.setGroupId(serviceContext.getScopeGroupId());
-
- docPratica.setClassName(className);
- docPratica.setClassPk(classPk);
- docPratica.setIntPraticaId(intPraticaId);
- docPratica.setDlFileEntryId(fileEntryId);
- docPratica.setVersion("0");
- docPratica.setPraticaValidata(false);
- docPratica.setDescLong(fileName);
- docPratica.setTipologia(tipologia);
- docPratica.setSha256(sha256);
- docPratica.setAggiornato(false);
- docPratica.setJsonFirmatari(jsonFirmatari);
- docPratica.setDettPraticaIdRimozione(0l);
- docPratica.setDtDataRimozione(null);
-
- docPratica.setStatus(WorkflowConstants.STATUS_PENDING);
-
- docPratica = docPraticaPersistence.update(docPratica);
-
- return docPratica;
- }
-
-
- /**
- *Metodo nuovo ADT
- *
- * @param intPraticaId
- * @param classPk
- * @param tipologia
- * @param start
- * @param end
- * @return
- * @throws SystemException
- */
- public List findByIntPratica_ClassPk_TipologiaNew(long intPraticaId, long classPk, String tipologia,
- int start, int end) throws SystemException {
-
- DynamicQuery dynamicQuery = dynamicQuery();
- dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
- dynamicQuery.add(RestrictionsFactoryUtil.eq("classPk", classPk));
- dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").eq(tipologia));
- dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
- return dynamicQuery(dynamicQuery, start, end);
- }
-
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/InfoFascicoloLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/InfoFascicoloLocalServiceImpl.java
index 0478efef..f9d722ce 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/InfoFascicoloLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/InfoFascicoloLocalServiceImpl.java
@@ -20,8 +20,6 @@ import java.util.Date;
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.model.User;
import com.liferay.portal.service.ServiceContext;
@@ -51,8 +49,6 @@ public class InfoFascicoloLocalServiceImpl extends InfoFascicoloLocalServiceBase
* local service.
*/
- private static Log _log = LogFactoryUtil.getLog(InfoFascicoloLocalServiceImpl.class.getName());
-
public InfoFascicolo addInfoFascicolo(long intPraticaId, String numeroProgetto, ServiceContext serviceContext)
throws SystemException, PortalException {
return addInfoFascicolo(intPraticaId, numeroProgetto, false, serviceContext);
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java
index b0e5d684..82f96da1 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java
@@ -74,6 +74,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
+
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang.StringUtils;
@@ -107,6 +108,7 @@ import com.liferay.portal.kernel.workflow.WorkflowHandlerRegistryUtil;
import com.liferay.portal.kernel.workflow.WorkflowTask;
import com.liferay.portal.model.User;
import com.liferay.portal.model.WorkflowInstanceLink;
+import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.security.permission.PermissionThreadLocal;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
@@ -1133,6 +1135,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
+ serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java
index 09eeb388..9669c7ba 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java
@@ -44,6 +44,7 @@ import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User;
+import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
@@ -67,7 +68,8 @@ import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
* @see it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil
*/
public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
- private static final Log _log = LogFactoryUtil.getLog(PagamentoLocalServiceImpl.class);
+ private static final Log _log = LogFactoryUtil.getLog(PagamentoLocalServiceImpl.class);
+
/*
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use
* {@link it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil} to
@@ -272,7 +274,6 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return updatePagamento(pagamento);
}
- @SuppressWarnings("unchecked")
public List findByCommittente_Mezzo(String codiceFiscaleCommittente, String mezzo, int start,
int end) throws SystemException {
@@ -289,7 +290,6 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return (int) pagamentoPersistence.countWithDynamicQuery(dynamicQuery);
}
- @SuppressWarnings("unchecked")
public List findByCommittente_Mezzo_Utilizzata(String codiceFiscaleCommittente, String mezzo,
String utilizzata, int start, int end) throws SystemException {
@@ -585,6 +585,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
String folderName = PraticaUtil.getFolderName(pagamento.getClassPk());
+ serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),
@@ -644,6 +645,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
String folderName = PraticaUtil.getFolderName(pagamento.getClassPk());
+ serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java
index cb2ca483..8be80f14 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java
@@ -31,6 +31,7 @@ import com.liferay.portal.kernel.util.MimeTypesUtil;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User;
+import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
@@ -116,6 +117,7 @@ public class ParereGeologoLocalServiceImpl extends ParereGeologoLocalServiceBase
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(parereGeologo.getDettPraticaId());
+ serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),
@@ -229,12 +231,6 @@ public class ParereGeologoLocalServiceImpl extends ParereGeologoLocalServiceBase
return parereGeologoPersistence.countByGeologoId(geologoUserId);
}
- private void validate(ParereGeologo parereGeologo) {
-
- // TODO Auto-generated method stub
-
- }
-
public List findNotParereByGeologoId(long geologoUserId, int start, int end)
throws SystemException {
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ProvinciaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ProvinciaLocalServiceImpl.java
index a70b6f9e..dbd8199b 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ProvinciaLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ProvinciaLocalServiceImpl.java
@@ -172,7 +172,6 @@ public class ProvinciaLocalServiceImpl extends ProvinciaLocalServiceBaseImpl {
return provinciaPersistence.findByC_C(companyId, codiceProvincia);
}
- @SuppressWarnings("unchecked")
public List findByKeywords(long companyId, String keywords,
int start, int end, OrderByComparator orderByComparator)
throws SystemException {
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SorteggioLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SorteggioLocalServiceImpl.java
index 9f27cd47..17d23cf8 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SorteggioLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SorteggioLocalServiceImpl.java
@@ -12,7 +12,6 @@
package it.tref.liferay.portos.bo.service.impl;
-import it.mwg.sismica.bo.util.SorteggioPraticaUtil;
import it.tref.liferay.portos.bo.model.Sorteggio;
import it.tref.liferay.portos.bo.service.base.SorteggioLocalServiceBaseImpl;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java
index b040f227..5c96356f 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java
index 63caa01d..15633d6f 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java
index b95c271d..38e33edc 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java
index 0b546e1a..02dcaba3 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java
index b0b64b21..4a23bffd 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java
index 0b7f9ee2..f5b8166f 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java
index 66507dd0..32809343 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java
index 48cf51eb..a4fa6f91 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java
index 402cecd0..8c56fb32 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java
index bf34f897..f35bff1b 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java
index 649a5476..c25ae1dc 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java
index 42630357..255330f7 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java
index 41c1b2be..15f0504f 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java
index ad50d7ea..f80406ab 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IUVPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IUVPersistenceImpl.java
index a6ba54ac..6f469f0e 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IUVPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/InfoFascicoloPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/InfoFascicoloPersistenceImpl.java
index 12f22a0a..b85535de 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/InfoFascicoloPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java
index 97842225..bb4019f2 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java
index 8dbf29df..ee3b3b9b 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java
index c6ce3907..e4133c60 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java
index daa33e1b..2c7a846f 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java
index 29c4a390..ef2db5f2 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SorteggioPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SorteggioPersistenceImpl.java
index ec8a983f..fc566b28 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SorteggioPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java
index 78333501..0c095d3d 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java
index 720078c4..252fc452 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java
index a9c7f7d5..c8e0dee9 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/UtentePortosPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/UtentePortosPersistenceImpl.java
index 89f06b61..83b7ed61 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/UtentePortosPersistenceImpl.java
+++ b/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;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/startup/KaleoListenereStartupAction.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/startup/KaleoListenereStartupAction.java
index 783a4a16..47733f1d 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/startup/KaleoListenereStartupAction.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/startup/KaleoListenereStartupAction.java
@@ -14,18 +14,19 @@ import com.liferay.portal.workflow.kaleo.model.KaleoTaskInstanceToken;
public class KaleoListenereStartupAction extends ModelListenerStartupAction {
- @Override
- public ModelListenerWrapper[] getModelListenerWrappers() {
+ @Override
+ public ModelListenerWrapper[] getModelListenerWrappers() {
- return new ModelListenerWrapper[] {
- new ModelListenerWrapper("portos-kaleo-web", KaleoInstance.class.getName(),
- KaleoInstanceModelListener.class.getName()),
- new ModelListenerWrapper("portos-kaleo-web", KaleoTaskInstanceToken.class.getName(),
- KaleoTaskInstanceTokenModelListener.class.getName()),
- new ModelListenerWrapper("portos-kaleo-web", KaleoInstanceToken.class.getName(),
- KaleoInstanceTokenModelListener.class.getName()),
- new ModelListenerWrapper("portos-kaleo-web", KaleoLog.class.getName(), KaleoLogModelListener.class.getName())
+ return new ModelListenerWrapper[] {
+ new ModelListenerWrapper("portos-kaleo-web", KaleoInstance.class.getName(),
+ KaleoInstanceModelListener.class.getName()),
+ new ModelListenerWrapper("portos-kaleo-web", KaleoTaskInstanceToken.class.getName(),
+ KaleoTaskInstanceTokenModelListener.class.getName()),
+ new ModelListenerWrapper("portos-kaleo-web", KaleoInstanceToken.class.getName(),
+ KaleoInstanceTokenModelListener.class.getName()),
+ new ModelListenerWrapper("portos-kaleo-web", KaleoLog.class.getName(),
+ KaleoLogModelListener.class.getName())
- };
- }
+ };
+ }
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/startup/RoleUpdateAction.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/startup/RoleUpdateAction.java
index 69efd208..8f197296 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/startup/RoleUpdateAction.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/startup/RoleUpdateAction.java
@@ -21,40 +21,41 @@ import com.liferay.portal.service.UserLocalServiceUtil;
public class RoleUpdateAction extends SimpleAction {
- private static final Log _log = LogFactoryUtil.getLog(RoleUpdateAction.class);
-
- public RoleUpdateAction() {
-
- super();
- }
-
- public void run(String[] ids) throws ActionException {
-
- for (String companyId : ids) {
- // TODO aggiunta di tutti i ruoli
- try {
- Role role = RoleLocalServiceUtil.fetchRole(Long.valueOf(companyId), Constants.ROLE_NAME_GEOLOGO);
- if (Validator.isNull(role)) {
- long userId = UserLocalServiceUtil.getDefaultUserId(Long.valueOf(companyId));
- String className = Role.class.getName();
- long classPK = 0l;
- String name = Constants.ROLE_NAME_GEOLOGO;
- Map titleMap = new LinkedHashMap();
- titleMap.put(Locale.ITALY, Constants.ROLE_NAME_GEOLOGO);
- Map descriptionMap = new LinkedHashMap();
- descriptionMap.put(Locale.ITALY, "E' un geologo");
- int type = RoleConstants.TYPE_REGULAR;
- String subtype = null;
- ServiceContext serviceContext = null;
- RoleLocalServiceUtil.addRole(userId, className, classPK, name, titleMap, descriptionMap, type, subtype,
- serviceContext);
- _log.info("Aggiunto ruolo " + name);
- }
-
- } catch (PortalException | SystemException e) {
- _log.error("Errore durante l'aggiunta di un ruolo", e);
- }
- }
- }
+ private static final Log _log = LogFactoryUtil.getLog(RoleUpdateAction.class);
+
+ public RoleUpdateAction() {
+
+ super();
+ }
+
+ public void run(String[] ids) throws ActionException {
+
+ for (String companyId : ids) {
+ // TODO aggiunta di tutti i ruoli
+ try {
+ Role role = RoleLocalServiceUtil.fetchRole(Long.valueOf(companyId),
+ Constants.ROLE_NAME_GEOLOGO);
+ if (Validator.isNull(role)) {
+ long userId = UserLocalServiceUtil.getDefaultUserId(Long.valueOf(companyId));
+ String className = Role.class.getName();
+ long classPK = 0l;
+ String name = Constants.ROLE_NAME_GEOLOGO;
+ Map titleMap = new LinkedHashMap();
+ titleMap.put(Locale.ITALY, Constants.ROLE_NAME_GEOLOGO);
+ Map descriptionMap = new LinkedHashMap();
+ descriptionMap.put(Locale.ITALY, "E' un geologo");
+ int type = RoleConstants.TYPE_REGULAR;
+ String subtype = null;
+ ServiceContext serviceContext = null;
+ RoleLocalServiceUtil.addRole(userId, className, classPK, name, titleMap, descriptionMap,
+ type, subtype, serviceContext);
+ _log.info("Aggiunto ruolo " + name);
+ }
+
+ } catch (PortalException | SystemException e) {
+ _log.error("Errore durante l'aggiunta di un ruolo", e);
+ }
+ }
+ }
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/Constants.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/Constants.java
index 1a2722ca..ad92a186 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/Constants.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/Constants.java
@@ -1,20 +1,21 @@
package it.tref.liferay.portos.bo.util;
public class Constants extends it.tref.liferay.portos.bo.shared.util.Constants {
- public static final String NUMERO_PROGETTO_KEY_DB = "numero.progetto.key.db";
- public static final String[] AMMINISTRAZIONE_CSV_HEADERS_COMUNI = {"Codice Regione", "Codice Città Metropolitana",
- "Codice Provincia (1)", "Progressivo del Comune (2)", "Codice Comune formato alfanumerico",
- "Denominazione in italiano", "Denominazione in tedesco", "Codice Ripartizione Geografica",
- "Ripartizione geografica", "Denominazione regione", "Denominazione Città metropolitana",
- "Denominazione provincia", "Flag Comune capoluogo di provincia", "Sigla automobilistica",
- "Codice Comune formato numerico", "Codice Comune numerico con 110 province (dal 2010 al 2016)",
- "Codice Comune numerico con 107 province (dal 2006 al 2009)",
- "Codice Comune numerico con 103 province (dal 1995 al 2005)", "Codice Catastale del comune",
- "Popolazione legale 2011 (09/10/2011)", "Codice NUTS1 2010", "Codice NUTS2 2010 (3) ", "Codice NUTS3 2010",
- "Codice NUTS1 2006", "Codice NUTS2 2006 (3)", "Codice NUTS3 2006"};
- public static final String[] AMMINISTRAZIONE_CSV_HEADERS_PROVINCE = {"codice_provincia", "provincia", "regione",
- "sigla" };
+ public static final String NUMERO_PROGETTO_KEY_DB = "numero.progetto.key.db";
+ public static final String[] AMMINISTRAZIONE_CSV_HEADERS_COMUNI = { "Codice Regione",
+ "Codice Città Metropolitana", "Codice Provincia (1)", "Progressivo del Comune (2)",
+ "Codice Comune formato alfanumerico", "Denominazione in italiano", "Denominazione in tedesco",
+ "Codice Ripartizione Geografica", "Ripartizione geografica", "Denominazione regione",
+ "Denominazione Città metropolitana", "Denominazione provincia",
+ "Flag Comune capoluogo di provincia", "Sigla automobilistica", "Codice Comune formato numerico",
+ "Codice Comune numerico con 110 province (dal 2010 al 2016)",
+ "Codice Comune numerico con 107 province (dal 2006 al 2009)",
+ "Codice Comune numerico con 103 province (dal 1995 al 2005)", "Codice Catastale del comune",
+ "Popolazione legale 2011 (09/10/2011)", "Codice NUTS1 2010", "Codice NUTS2 2010 (3) ",
+ "Codice NUTS3 2010", "Codice NUTS1 2006", "Codice NUTS2 2006 (3)", "Codice NUTS3 2006" };
+ public static final String[] AMMINISTRAZIONE_CSV_HEADERS_PROVINCE = { "codice_provincia", "provincia",
+ "regione", "sigla" };
- public static final String PORTOS_BO_SITE_NAME = "Portos BackOffice";
+ public static final String PORTOS_BO_SITE_NAME = "Portos BackOffice";
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/ContentType.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/ContentType.java
index 04e07db2..5fb9e2a4 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/ContentType.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/ContentType.java
@@ -2,30 +2,29 @@ package it.tref.liferay.portos.bo.util;
public enum ContentType {
- PDF("application/pdf"), P7M("application/pkcs7-signature"), P7M_MIME("application/pkcs7-mime"), XDBF(
- "application/x-dbf");
+ PDF("application/pdf"), P7M("application/pkcs7-signature"), P7M_MIME("application/pkcs7-mime"), XDBF(
+ "application/x-dbf");
- private String contentType;
+ private String contentType;
- ContentType(String contentType) {
- this.contentType = contentType;
- }
+ ContentType(String contentType) {
+ this.contentType = contentType;
+ }
- public String getContentType() {
- return contentType;
- }
+ public String getContentType() {
+ return contentType;
+ }
- public static ContentType parse(String contentType) {
+ public static ContentType parse(String contentType) {
- for (ContentType value : values()) {
- if (value.contentType.equalsIgnoreCase(contentType)) {
- return value;
- }
- }
+ for (ContentType value : values()) {
+ if (value.contentType.equalsIgnoreCase(contentType)) {
+ return value;
+ }
+ }
- throw new IllegalArgumentException("Invalid value for ContentType: " + contentType);
-
- }
+ throw new IllegalArgumentException("Invalid value for ContentType: " + contentType);
+ }
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/FestivitaUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/FestivitaUtil.java
index 30f59f6f..725256cb 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/FestivitaUtil.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/FestivitaUtil.java
@@ -6,142 +6,142 @@ import java.util.GregorianCalendar;
import org.apache.commons.lang.time.DateUtils;
-
public class FestivitaUtil {
- public final static boolean isFestivo(Date date) {
-
- int year = DateUtils.toCalendar(date).get(Calendar.YEAR);
-
- boolean isCapodanno = is(date, 1, 1);
- boolean isBefana = is(date, 6, 1);
- boolean isPasqua = isPasqua(date);
-
- boolean isPasquetta = false;
- Date dtPasqua = findPasqua(year);
- if (dtPasqua != null) {
- Calendar calendar = DateUtils.toCalendar(dtPasqua);
- while (calendar.get(Calendar.DAY_OF_WEEK) != Calendar.MONDAY) {
- calendar.add(Calendar.DATE, 1);
- }
- isPasquetta = is(date, calendar.getTime());
- }
-
- boolean isFestaDellaLiberazione = is(date, 25, 4);
- boolean isFestaDeiLavoratori = is(date, 1, 5);
- boolean isFestaDellaRepubblica = is(date, 2, 6);
- boolean isFerragosto = is(date, 15, 8);
- boolean isOgnissanti = is(date, 1, 11);
- boolean isImmacolataConcezione = is(date, 8, 12);
- boolean isNatale = is(date, 25, 12);
- boolean isSantoStefano = is(date, 26, 12);
-
- return isCapodanno || isBefana || isPasqua || isPasquetta || isFestaDellaLiberazione || isFestaDeiLavoratori
- || isFestaDellaRepubblica || isFerragosto || isOgnissanti || isImmacolataConcezione || isNatale
- || isSantoStefano;
- }
-
- private final static boolean isPasqua(Date date) {
-
- Calendar calendar = new GregorianCalendar();
- calendar.setTime(date);
-
- int year = calendar.get(Calendar.YEAR);
- int dateYMD = year * 10000 + calendar.get(Calendar.MONTH) * 100 + calendar.get(Calendar.DAY_OF_MONTH);
-
- Date pasqua = findPasqua(year);
- if (pasqua != null) {
- calendar.setTime(pasqua);
- int pasquaYMD = year * 10000 + calendar.get(Calendar.MONTH) * 100 + calendar.get(Calendar.DAY_OF_MONTH);
- return (pasquaYMD == dateYMD);
- }
-
- return false;
- }
-
- private final static boolean is(Date date, int day, int month) {
- Calendar calendar = DateUtils.toCalendar(date);
- return calendar.get(Calendar.DATE) == day && (calendar.get(Calendar.MONTH) + 1) == month;
- }
-
- private final static boolean is(Date date, Date date2) {
- Calendar calendar = Calendar.getInstance();
- calendar.setTime(date);
- Calendar calendar2 = Calendar.getInstance();
- calendar2.setTime(date2);
- return calendar.get(Calendar.DATE) == calendar2.get(Calendar.DATE)
- && calendar.get(Calendar.MONTH) == calendar2.get(Calendar.MONTH);
- }
-
- private final static Date findPasqua(int year) {
-
- if ((year < 1573) || (year > 2499)) {
- throw null;
- }
-
- int a = year % 19;
- int b = year % 4;
- int c = year % 7;
-
- int m = 0;
- int n = 0;
-
- if ((year >= 1583) && (year <= 1699)) {
- m = 22;
- n = 2;
- }
- if ((year >= 1700) && (year <= 1799)) {
- m = 23;
- n = 3;
- }
- if ((year >= 1800) && (year <= 1899)) {
- m = 23;
- n = 4;
- }
- if ((year >= 1900) && (year <= 2099)) {
- m = 24;
- n = 5;
- }
- if ((year >= 2100) && (year <= 2199)) {
- m = 24;
- n = 6;
- }
- if ((year >= 2200) && (year <= 2299)) {
- m = 25;
- n = 0;
- }
- if ((year >= 2300) && (year <= 2399)) {
- m = 26;
- n = 1;
- }
- if ((year >= 2400) && (year <= 2499)) {
- m = 25;
- n = 1;
- }
-
- int d = (19 * a + m) % 30;
- int e = (2 * b + 4 * c + 6 * d + n) % 7;
-
- Calendar calendar = new GregorianCalendar();
- calendar.set(Calendar.YEAR, year);
-
- if (d + e < 10) {
- calendar.set(Calendar.YEAR, year);
- calendar.set(Calendar.MONTH, Calendar.MARCH);
- calendar.set(Calendar.DAY_OF_MONTH, d + e + 22);
- } else {
- calendar.set(Calendar.MONTH, Calendar.APRIL);
- int day = d + e - 9;
- if (26 == day) {
- day = 19;
- }
- if ((25 == day) && (28 == d) && (e == 6) && (a > 10)) {
- day = 18;
- }
- calendar.set(Calendar.DAY_OF_MONTH, day);
- }
-
- return calendar.getTime();
- }
+ public final static boolean isFestivo(Date date) {
+
+ int year = DateUtils.toCalendar(date).get(Calendar.YEAR);
+
+ boolean isCapodanno = is(date, 1, 1);
+ boolean isBefana = is(date, 6, 1);
+ boolean isPasqua = isPasqua(date);
+
+ boolean isPasquetta = false;
+ Date dtPasqua = findPasqua(year);
+ if (dtPasqua != null) {
+ Calendar calendar = DateUtils.toCalendar(dtPasqua);
+ while (calendar.get(Calendar.DAY_OF_WEEK) != Calendar.MONDAY) {
+ calendar.add(Calendar.DATE, 1);
+ }
+ isPasquetta = is(date, calendar.getTime());
+ }
+
+ boolean isFestaDellaLiberazione = is(date, 25, 4);
+ boolean isFestaDeiLavoratori = is(date, 1, 5);
+ boolean isFestaDellaRepubblica = is(date, 2, 6);
+ boolean isFerragosto = is(date, 15, 8);
+ boolean isOgnissanti = is(date, 1, 11);
+ boolean isImmacolataConcezione = is(date, 8, 12);
+ boolean isNatale = is(date, 25, 12);
+ boolean isSantoStefano = is(date, 26, 12);
+
+ return isCapodanno || isBefana || isPasqua || isPasquetta || isFestaDellaLiberazione
+ || isFestaDeiLavoratori || isFestaDellaRepubblica || isFerragosto || isOgnissanti
+ || isImmacolataConcezione || isNatale || isSantoStefano;
+ }
+
+ private final static boolean isPasqua(Date date) {
+
+ Calendar calendar = new GregorianCalendar();
+ calendar.setTime(date);
+
+ int year = calendar.get(Calendar.YEAR);
+ int dateYMD = year * 10000 + calendar.get(Calendar.MONTH) * 100 + calendar.get(Calendar.DAY_OF_MONTH);
+
+ Date pasqua = findPasqua(year);
+ if (pasqua != null) {
+ calendar.setTime(pasqua);
+ int pasquaYMD = year * 10000 + calendar.get(Calendar.MONTH) * 100
+ + calendar.get(Calendar.DAY_OF_MONTH);
+ return (pasquaYMD == dateYMD);
+ }
+
+ return false;
+ }
+
+ private final static boolean is(Date date, int day, int month) {
+ Calendar calendar = DateUtils.toCalendar(date);
+ return calendar.get(Calendar.DATE) == day && (calendar.get(Calendar.MONTH) + 1) == month;
+ }
+
+ private final static boolean is(Date date, Date date2) {
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+ Calendar calendar2 = Calendar.getInstance();
+ calendar2.setTime(date2);
+ return calendar.get(Calendar.DATE) == calendar2.get(Calendar.DATE)
+ && calendar.get(Calendar.MONTH) == calendar2.get(Calendar.MONTH);
+ }
+
+ private final static Date findPasqua(int year) {
+
+ if ((year < 1573) || (year > 2499)) {
+ throw null;
+ }
+
+ int a = year % 19;
+ int b = year % 4;
+ int c = year % 7;
+
+ int m = 0;
+ int n = 0;
+
+ if ((year >= 1583) && (year <= 1699)) {
+ m = 22;
+ n = 2;
+ }
+ if ((year >= 1700) && (year <= 1799)) {
+ m = 23;
+ n = 3;
+ }
+ if ((year >= 1800) && (year <= 1899)) {
+ m = 23;
+ n = 4;
+ }
+ if ((year >= 1900) && (year <= 2099)) {
+ m = 24;
+ n = 5;
+ }
+ if ((year >= 2100) && (year <= 2199)) {
+ m = 24;
+ n = 6;
+ }
+ if ((year >= 2200) && (year <= 2299)) {
+ m = 25;
+ n = 0;
+ }
+ if ((year >= 2300) && (year <= 2399)) {
+ m = 26;
+ n = 1;
+ }
+ if ((year >= 2400) && (year <= 2499)) {
+ m = 25;
+ n = 1;
+ }
+
+ int d = (19 * a + m) % 30;
+ int e = (2 * b + 4 * c + 6 * d + n) % 7;
+
+ Calendar calendar = new GregorianCalendar();
+ calendar.set(Calendar.YEAR, year);
+
+ if (d + e < 10) {
+ calendar.set(Calendar.YEAR, year);
+ calendar.set(Calendar.MONTH, Calendar.MARCH);
+ calendar.set(Calendar.DAY_OF_MONTH, d + e + 22);
+ } else {
+ calendar.set(Calendar.MONTH, Calendar.APRIL);
+ int day = d + e - 9;
+ if (26 == day) {
+ day = 19;
+ }
+ if ((25 == day) && (28 == d) && (e == 6) && (a > 10)) {
+ day = 18;
+ }
+ calendar.set(Calendar.DAY_OF_MONTH, day);
+ }
+
+ return calendar.getTime();
+ }
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/GenioCivileBaseUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/GenioCivileBaseUtil.java
index 918a4a69..02e49fcb 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/GenioCivileBaseUtil.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/GenioCivileBaseUtil.java
@@ -20,71 +20,72 @@ import com.liferay.portlet.PortletURLFactoryUtil;
public class GenioCivileBaseUtil {
- public static String getDettPraticaURL(long plid, long resourcePrimKey, int status, String portalURL,
- boolean maximized) {
- return getDettPraticaURL(plid, resourcePrimKey, status, portalURL, maximized, null);
- }
-
- public static String getDettPraticaURL(long plid, long resourcePrimKey, int status, String portalURL,
- boolean maximized, String redirect) {
-
- StringBundler sb = new StringBundler(11);
-
- sb.append(portalURL);
- sb.append(PortalUtil.getPathMain());
- sb.append("/portal/dettaglio_pratica/find_entry");
- sb.append(StringPool.QUESTION);
- sb.append("p_l_id");
- sb.append(StringPool.EQUAL);
- sb.append(String.valueOf(plid));
- sb.append(StringPool.AMPERSAND);
- // control panel
- if (Validator.isNotNull(redirect)) {
- sb.append("doAsGroupId");
- sb.append(StringPool.EQUAL);
- sb.append(HttpUtil.getParameter(redirect, "doAsGroupId", false));
- sb.append(StringPool.AMPERSAND);
- }
- sb.append("resourcePrimKey");
- sb.append(StringPool.EQUAL);
- sb.append(String.valueOf(resourcePrimKey));
-
- String url = sb.toString();
-
- if (status != WorkflowConstants.STATUS_APPROVED) {
- url = HttpUtil.addParameter(url, "status", String.valueOf(status));
- }
-
- if (maximized) {
- url = HttpUtil.addParameter(url, "maximized", String.valueOf(maximized));
- }
-
- if (Validator.isNotNull(redirect)) {
- url = HttpUtil.addParameter(url, "redirect", redirect);
- }
-
- return url;
- }
-
- public static String getDettPraticaURL(HttpServletRequest request, long plid, long resourcePrimKey, int status)
- throws PortletModeException, WindowStateException {
- return getDettPraticaURL(request, plid, resourcePrimKey, status, null);
- }
-
- public static String getDettPraticaURL(HttpServletRequest request, long plid, long resourcePrimKey, int status,
- String redirect) throws PortletModeException, WindowStateException {
-
- PortletURL url = PortletURLFactoryUtil.create(request, PortletKeys.FASCICOLO, plid, PortletRequest.RENDER_PHASE);
- url.setParameter("mvcPath", "/html/pratichegeniocivile/view.jsp");
- url.setParameter("resourcePrimKey", String.valueOf(resourcePrimKey));
- url.setParameter("redirect", redirect);
- url.setPortletMode(PortletMode.VIEW);
- url.setWindowState(LiferayWindowState.POP_UP);
-
- if (status != WorkflowConstants.STATUS_APPROVED) {
- url.setParameter("status", String.valueOf(status));
- }
-
- return url.toString();
- }
+ public static String getDettPraticaURL(long plid, long resourcePrimKey, int status, String portalURL,
+ boolean maximized) {
+ return getDettPraticaURL(plid, resourcePrimKey, status, portalURL, maximized, null);
+ }
+
+ public static String getDettPraticaURL(long plid, long resourcePrimKey, int status, String portalURL,
+ boolean maximized, String redirect) {
+
+ StringBundler sb = new StringBundler(11);
+
+ sb.append(portalURL);
+ sb.append(PortalUtil.getPathMain());
+ sb.append("/portal/dettaglio_pratica/find_entry");
+ sb.append(StringPool.QUESTION);
+ sb.append("p_l_id");
+ sb.append(StringPool.EQUAL);
+ sb.append(String.valueOf(plid));
+ sb.append(StringPool.AMPERSAND);
+ // control panel
+ if (Validator.isNotNull(redirect)) {
+ sb.append("doAsGroupId");
+ sb.append(StringPool.EQUAL);
+ sb.append(HttpUtil.getParameter(redirect, "doAsGroupId", false));
+ sb.append(StringPool.AMPERSAND);
+ }
+ sb.append("resourcePrimKey");
+ sb.append(StringPool.EQUAL);
+ sb.append(String.valueOf(resourcePrimKey));
+
+ String url = sb.toString();
+
+ if (status != WorkflowConstants.STATUS_APPROVED) {
+ url = HttpUtil.addParameter(url, "status", String.valueOf(status));
+ }
+
+ if (maximized) {
+ url = HttpUtil.addParameter(url, "maximized", String.valueOf(maximized));
+ }
+
+ if (Validator.isNotNull(redirect)) {
+ url = HttpUtil.addParameter(url, "redirect", redirect);
+ }
+
+ return url;
+ }
+
+ public static String getDettPraticaURL(HttpServletRequest request, long plid, long resourcePrimKey,
+ int status) throws PortletModeException, WindowStateException {
+ return getDettPraticaURL(request, plid, resourcePrimKey, status, null);
+ }
+
+ public static String getDettPraticaURL(HttpServletRequest request, long plid, long resourcePrimKey,
+ int status, String redirect) throws PortletModeException, WindowStateException {
+
+ PortletURL url = PortletURLFactoryUtil.create(request, PortletKeys.FASCICOLO, plid,
+ PortletRequest.RENDER_PHASE);
+ url.setParameter("mvcPath", "/html/pratichegeniocivile/view.jsp");
+ url.setParameter("resourcePrimKey", String.valueOf(resourcePrimKey));
+ url.setParameter("redirect", redirect);
+ url.setPortletMode(PortletMode.VIEW);
+ url.setWindowState(LiferayWindowState.POP_UP);
+
+ if (status != WorkflowConstants.STATUS_APPROVED) {
+ url.setParameter("status", String.valueOf(status));
+ }
+
+ return url.toString();
+ }
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/GestioneFirmeUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/GestioneFirmeUtil.java
index 0438da09..807f8ff3 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/GestioneFirmeUtil.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/GestioneFirmeUtil.java
@@ -19,6 +19,7 @@ import com.liferay.portal.service.UserLocalServiceUtil;
public class GestioneFirmeUtil {
+ @SuppressWarnings("serial")
private static List tipoDocumentoFirmaBase = new UniqueList() {
{
add("MA");
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/MockAllegato.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/MockAllegato.java
index 4b753e26..cb3c2b37 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/MockAllegato.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/MockAllegato.java
@@ -3,10 +3,8 @@ package it.tref.liferay.portos.bo.util;
public class MockAllegato {
public boolean checked;
public String status, name, tipo, invalidato;
-
-
- public MockAllegato(boolean checked, String status, String name,
- String tipo, String invalidato) {
+
+ public MockAllegato(boolean checked, String status, String name, String tipo, String invalidato) {
super();
this.checked = checked;
this.status = status;
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/OggettoProtocollo.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/OggettoProtocollo.java
index e7b2c5d0..14bf8927 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/OggettoProtocollo.java
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/OggettoProtocollo.java
@@ -8,68 +8,68 @@ import org.apache.commons.lang.StringUtils;
public class OggettoProtocollo {
- private final String protocolloEntityId;
- private final String protocolloEntityUtenteId;
- private final String protocolloEntityUfficioId;
- private final String dataInserimento;
- private final String protocolloEntityOggetto;
- private final String protocolloEntityFascicoloNumero;
- private final String fascicoloEntityTipo;
+ private final String protocolloEntityId;
+ private final String protocolloEntityUtenteId;
+ private final String protocolloEntityUfficioId;
+ private final String dataInserimento;
+ private final String protocolloEntityOggetto;
+ private final String protocolloEntityFascicoloNumero;
+ private final String fascicoloEntityTipo;
- public OggettoProtocollo(String protocolloEntityId, String protocolloEntityUtenteId,
- String protocolloEntityUfficioId, String protocolloEntityOggetto, String protocolloEntityFascicoloNumero,
- String dataInserimento, String fascicoloEntityTipo) throws ParseException {
+ public OggettoProtocollo(String protocolloEntityId, String protocolloEntityUtenteId,
+ String protocolloEntityUfficioId, String protocolloEntityOggetto,
+ String protocolloEntityFascicoloNumero, String dataInserimento, String fascicoloEntityTipo)
+ throws ParseException {
- super();
- this.protocolloEntityId = protocolloEntityId;
- this.protocolloEntityUtenteId = protocolloEntityUtenteId;
- this.protocolloEntityUfficioId = protocolloEntityUfficioId;
- this.protocolloEntityOggetto = protocolloEntityOggetto;
- this.dataInserimento = dataInserimento;
- SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- Calendar calendar = Calendar.getInstance();
- calendar.setTime(sdf.parse(dataInserimento));
+ super();
+ this.protocolloEntityId = protocolloEntityId;
+ this.protocolloEntityUtenteId = protocolloEntityUtenteId;
+ this.protocolloEntityUfficioId = protocolloEntityUfficioId;
+ this.protocolloEntityOggetto = protocolloEntityOggetto;
+ this.dataInserimento = dataInserimento;
+ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(sdf.parse(dataInserimento));
- this.protocolloEntityFascicoloNumero =
- calendar.get(Calendar.YEAR) + StringUtils.leftPad(protocolloEntityFascicoloNumero, 7).replace(' ', '0');
+ this.protocolloEntityFascicoloNumero = calendar.get(Calendar.YEAR)
+ + StringUtils.leftPad(protocolloEntityFascicoloNumero, 7).replace(' ', '0');
- this.fascicoloEntityTipo = fascicoloEntityTipo.equals("1") ? "partenza" : "arrivo";
- }
+ this.fascicoloEntityTipo = fascicoloEntityTipo.equals("1") ? "partenza" : "arrivo";
+ }
- public String getProtocolloEntityId() {
+ public String getProtocolloEntityId() {
- return protocolloEntityId;
- }
+ return protocolloEntityId;
+ }
- public String getProtocolloEntityUtenteId() {
+ public String getProtocolloEntityUtenteId() {
- return protocolloEntityUtenteId;
- }
+ return protocolloEntityUtenteId;
+ }
- public String getProtocolloEntityUfficioId() {
+ public String getProtocolloEntityUfficioId() {
- return protocolloEntityUfficioId;
- }
+ return protocolloEntityUfficioId;
+ }
- public String getProtocolloEntityOggetto() {
+ public String getProtocolloEntityOggetto() {
- return protocolloEntityOggetto;
- }
+ return protocolloEntityOggetto;
+ }
- public String getDataInserimento() {
+ public String getDataInserimento() {
- return dataInserimento;
- }
+ return dataInserimento;
+ }
- public String getProtocolloEntityFascicoloNumero() {
+ public String getProtocolloEntityFascicoloNumero() {
- return protocolloEntityFascicoloNumero;
- }
+ return protocolloEntityFascicoloNumero;
+ }
- public String getFascicoloEntityTipo() {
-
- return fascicoloEntityTipo;
- }
+ public String getFascicoloEntityTipo() {
+ return fascicoloEntityTipo;
+ }
}
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/portlet.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/portlet.properties
index eab79b7f..de10f85c 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/portlet.properties
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/portlet.properties
@@ -4,10 +4,9 @@ resource.actions.configs=resource-actions/default.xml
geniocivile.iris.receiver.id = RTIRIS
geniocivile.iris.receiver.sys = SIL_IRIS_ITR
-geniocivile.iris.speseistruttoria.sender.id = RegioneToscana
+geniocivile.iris.speseistruttoria.sender.id = RegioneSiciliana
geniocivile.iris.speseistruttoria.sender.sys = SIL_RTOSCANA_GC
-geniocivile.iris.bolli.sender.id = RegioneToscana
-#geniocivile.iris.bolli.sender.id = SPC/RegioneToscana
+geniocivile.iris.bolli.sender.id = RegioneSiciliana
geniocivile.iris.bolli.sender.sys = SIL_E_BOLLO
#geniocivile.iris.iuv.keystore.path = /resource/iris/keystore_iuv.p12
@@ -22,11 +21,6 @@ geniocivile.iris.speseistruttoria.descrizionecausale = Spese istruttoria Genio C
geniocivile.iris.bolli.tipopendenza = E_BOLLO
geniocivile.iris.bolli.descrizionecausale = Bolli Genio Civile
-#geniocivile.iris.bolli.iban = IT05N0200802800123456789012
-#geniocivile.iris.bolli.beneficiario = ALTRO BENEFICIARIO
-#geniocivile.iris.spese.iban = IT05N0200802800123456789012
-#geniocivile.iris.spese.beneficiario = ALTRO BENEFICIARIO
-
geniocivile.iris.bolli.riscossore.id = ADE
geniocivile.iris.bolli.riscossore.riferimento = BOLLI_GC
@@ -44,7 +38,6 @@ geniocivile.iris.bolli.password = Zui6(hR4
geniocivile.iris.error.tipopagamento.notallowed = Tipologia Pagamento non supportata
geniocivile.iris.error.iuv.url = IUV service url not set
-geniocivile.iris.error.iuv.falut = IUV Fault
geniocivile.iris.email.destinatario = support.iris@tasgroup.it
geniocivile.iris.email.mittente = noreply-FE-PORTOS@regione.toscana.it
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service-ext.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service-ext.properties
index 462aa1b3..7c1dea1a 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service-ext.properties
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service-ext.properties
@@ -1 +1 @@
-build.auto.upgrade = false
\ No newline at end of file
+build.auto.upgrade=false
\ No newline at end of file
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 7e4dffc5..e84041a2 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
@@ -14,7 +14,7 @@
build.namespace=portos_bo
build.number=2482
- build.date=1603111784183
+ build.date=1603111986866
build.auto.upgrade=true
##
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/ivy.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/ivy.xml
index 760439fb..f53f85ff 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/ivy.xml
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/ivy.xml
@@ -14,5 +14,7 @@
+
+