Sfoglia il codice sorgente

Nuovi documenti obbligatori

master
Salvatore La Manna 4 anni fa
parent
commit
a9bd8032f2
  1. BIN
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/httpclient.jar
  2. BIN
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/util-java.jar
  3. 5
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DocPraticaLocalService.java
  4. 124
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DocPraticaLocalServiceClp.java
  5. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DocPraticaLocalServiceUtil.java
  6. 8
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DocPraticaLocalServiceWrapper.java
  7. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/DocumentiPraticaUtil.java
  8. 287
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java
  9. 101
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/DocPraticaLocalServiceClpInvoker.java
  10. 183
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java
  11. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java
  12. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java
  13. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java
  14. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java
  15. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java
  16. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java
  17. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java
  18. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java
  19. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java
  20. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java
  21. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java
  22. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java
  23. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java
  24. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java
  25. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IUVPersistenceImpl.java
  26. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/InfoFascicoloPersistenceImpl.java
  27. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java
  28. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java
  29. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java
  30. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java
  31. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java
  32. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SorteggioPersistenceImpl.java
  33. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java
  34. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java
  35. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java
  36. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/UtentePortosPersistenceImpl.java
  37. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  38. 2
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java
  39. 2
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/common/save_actions.jspf

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

File binario non mostrato.

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

File binario non mostrato.

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

@ -472,6 +472,11 @@ public interface DocPraticaLocalService extends BaseLocalService,
java.lang.String tipologia)
throws com.liferay.portal.kernel.exception.SystemException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.util.List<it.tref.liferay.portos.bo.model.DocPratica> getValidTmpByIntPratica(
long intPraticaId, int start, int end)
throws com.liferay.portal.kernel.exception.SystemException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.util.List<it.tref.liferay.portos.bo.model.DocPratica> getValidTmpByIntPratica_Tipologia(
long intPraticaId, java.lang.String tipologia, int start, int end)

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

@ -297,61 +297,65 @@ public class DocPraticaLocalServiceClp implements DocPraticaLocalService {
_methodParameterTypes54 = new String[] { "long", "java.lang.String" };
_methodName55 = "getValidTmpByIntPratica_Tipologia";
_methodName55 = "getValidTmpByIntPratica";
_methodParameterTypes55 = new String[] {
_methodParameterTypes55 = new String[] { "long", "int", "int" };
_methodName56 = "getValidTmpByIntPratica_Tipologia";
_methodParameterTypes56 = new String[] {
"long", "java.lang.String", "int", "int"
};
_methodName56 = "getValidTmpByIntPratica_DettPratica_Tipologia";
_methodName57 = "getValidTmpByIntPratica_DettPratica_Tipologia";
_methodParameterTypes56 = new String[] {
_methodParameterTypes57 = new String[] {
"long", "long", "java.lang.String", "int", "int"
};
_methodName57 = "getValidTmpByIntPratica_Tipologie";
_methodName58 = "getValidTmpByIntPratica_Tipologie";
_methodParameterTypes57 = new String[] {
_methodParameterTypes58 = new String[] {
"long", "java.lang.String[][]", "int", "int"
};
_methodName58 = "countValidTmpByIntPratica_Tipologie";
_methodName59 = "countValidTmpByIntPratica_Tipologie";
_methodParameterTypes58 = new String[] { "long", "java.lang.String[][]" };
_methodParameterTypes59 = new String[] { "long", "java.lang.String[][]" };
_methodName59 = "getInvalidByIntPratica";
_methodName60 = "getInvalidByIntPratica";
_methodParameterTypes59 = new String[] { "long" };
_methodParameterTypes60 = new String[] { "long" };
_methodName60 = "getInvalidTmpByIntPratica";
_methodName61 = "getInvalidTmpByIntPratica";
_methodParameterTypes60 = new String[] { "long" };
_methodParameterTypes61 = new String[] { "long" };
_methodName61 = "getValidUntilClassPkByIntPratica";
_methodName62 = "getValidUntilClassPkByIntPratica";
_methodParameterTypes61 = new String[] {
_methodParameterTypes62 = new String[] {
"long", "long", "java.lang.String", "int", "int"
};
_methodName62 = "completeInvalidation";
_methodName63 = "completeInvalidation";
_methodParameterTypes62 = new String[] { "long" };
_methodParameterTypes63 = new String[] { "long" };
_methodName63 = "getDocPraticaWithOldFileEntryId";
_methodName64 = "getDocPraticaWithOldFileEntryId";
_methodParameterTypes63 = new String[] { "int", "int" };
_methodParameterTypes64 = new String[] { "int", "int" };
_methodName64 = "addDocPraticaAnnullamento";
_methodName65 = "addDocPraticaAnnullamento";
_methodParameterTypes64 = new String[] {
_methodParameterTypes65 = new String[] {
"long", "java.lang.String", "long", "long", "long",
"java.lang.String", "java.lang.String", "java.lang.String",
"java.lang.String", "com.liferay.portal.service.ServiceContext"
};
_methodName65 = "findByIntPratica_ClassPk_TipologiaNew";
_methodName66 = "findByIntPratica_ClassPk_TipologiaNew";
_methodParameterTypes65 = new String[] {
_methodParameterTypes66 = new String[] {
"long", "long", "java.lang.String", "int", "int"
};
}
@ -2252,14 +2256,44 @@ public class DocPraticaLocalServiceClp implements DocPraticaLocalService {
}
@Override
public java.util.List<it.tref.liferay.portos.bo.model.DocPratica> getValidTmpByIntPratica_Tipologia(
long intPraticaId, java.lang.String tipologia, int start, int end)
public java.util.List<it.tref.liferay.portos.bo.model.DocPratica> getValidTmpByIntPratica(
long intPraticaId, int start, int end)
throws com.liferay.portal.kernel.exception.SystemException {
Object returnObj = null;
try {
returnObj = _invokableLocalService.invokeMethod(_methodName55,
_methodParameterTypes55,
new Object[] { intPraticaId, start, end });
}
catch (Throwable t) {
t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof RuntimeException) {
throw (RuntimeException)t;
}
else {
throw new RuntimeException(t.getClass().getName() +
" is not a valid exception");
}
}
return (java.util.List<it.tref.liferay.portos.bo.model.DocPratica>)ClpSerializer.translateOutput(returnObj);
}
@Override
public java.util.List<it.tref.liferay.portos.bo.model.DocPratica> getValidTmpByIntPratica_Tipologia(
long intPraticaId, java.lang.String tipologia, int start, int end)
throws com.liferay.portal.kernel.exception.SystemException {
Object returnObj = null;
try {
returnObj = _invokableLocalService.invokeMethod(_methodName56,
_methodParameterTypes56,
new Object[] {
intPraticaId,
@ -2297,8 +2331,8 @@ public class DocPraticaLocalServiceClp implements DocPraticaLocalService {
Object returnObj = null;
try {
returnObj = _invokableLocalService.invokeMethod(_methodName56,
_methodParameterTypes56,
returnObj = _invokableLocalService.invokeMethod(_methodName57,
_methodParameterTypes57,
new Object[] {
intPraticaId,
@ -2337,8 +2371,8 @@ public class DocPraticaLocalServiceClp implements DocPraticaLocalService {
Object returnObj = null;
try {
returnObj = _invokableLocalService.invokeMethod(_methodName57,
_methodParameterTypes57,
returnObj = _invokableLocalService.invokeMethod(_methodName58,
_methodParameterTypes58,
new Object[] {
intPraticaId,
@ -2375,8 +2409,8 @@ public class DocPraticaLocalServiceClp implements DocPraticaLocalService {
Object returnObj = null;
try {
returnObj = _invokableLocalService.invokeMethod(_methodName58,
_methodParameterTypes58,
returnObj = _invokableLocalService.invokeMethod(_methodName59,
_methodParameterTypes59,
new Object[] {
intPraticaId,
@ -2409,8 +2443,8 @@ public class DocPraticaLocalServiceClp implements DocPraticaLocalService {
Object returnObj = null;
try {
returnObj = _invokableLocalService.invokeMethod(_methodName59,
_methodParameterTypes59, new Object[] { intPraticaId });
returnObj = _invokableLocalService.invokeMethod(_methodName60,
_methodParameterTypes60, new Object[] { intPraticaId });
}
catch (Throwable t) {
t = ClpSerializer.translateThrowable(t);
@ -2438,8 +2472,8 @@ public class DocPraticaLocalServiceClp implements DocPraticaLocalService {
Object returnObj = null;
try {
returnObj = _invokableLocalService.invokeMethod(_methodName60,
_methodParameterTypes60, new Object[] { intPraticaId });
returnObj = _invokableLocalService.invokeMethod(_methodName61,
_methodParameterTypes61, new Object[] { intPraticaId });
}
catch (Throwable t) {
t = ClpSerializer.translateThrowable(t);
@ -2467,8 +2501,8 @@ public class DocPraticaLocalServiceClp implements DocPraticaLocalService {
Object returnObj = null;
try {
returnObj = _invokableLocalService.invokeMethod(_methodName61,
_methodParameterTypes61,
returnObj = _invokableLocalService.invokeMethod(_methodName62,
_methodParameterTypes62,
new Object[] {
intPraticaId,
@ -2504,8 +2538,8 @@ public class DocPraticaLocalServiceClp implements DocPraticaLocalService {
public void completeInvalidation(long intPraticaId)
throws com.liferay.portal.kernel.exception.SystemException {
try {
_invokableLocalService.invokeMethod(_methodName62,
_methodParameterTypes62, new Object[] { intPraticaId });
_invokableLocalService.invokeMethod(_methodName63,
_methodParameterTypes63, new Object[] { intPraticaId });
}
catch (Throwable t) {
t = ClpSerializer.translateThrowable(t);
@ -2531,8 +2565,8 @@ public class DocPraticaLocalServiceClp implements DocPraticaLocalService {
Object returnObj = null;
try {
returnObj = _invokableLocalService.invokeMethod(_methodName63,
_methodParameterTypes63, new Object[] { start, end });
returnObj = _invokableLocalService.invokeMethod(_methodName64,
_methodParameterTypes64, new Object[] { start, end });
}
catch (Throwable t) {
t = ClpSerializer.translateThrowable(t);
@ -2565,8 +2599,8 @@ public class DocPraticaLocalServiceClp implements DocPraticaLocalService {
Object returnObj = null;
try {
returnObj = _invokableLocalService.invokeMethod(_methodName64,
_methodParameterTypes64,
returnObj = _invokableLocalService.invokeMethod(_methodName65,
_methodParameterTypes65,
new Object[] {
userId,
@ -2619,8 +2653,8 @@ public class DocPraticaLocalServiceClp implements DocPraticaLocalService {
Object returnObj = null;
try {
returnObj = _invokableLocalService.invokeMethod(_methodName65,
_methodParameterTypes65,
returnObj = _invokableLocalService.invokeMethod(_methodName66,
_methodParameterTypes66,
new Object[] {
intPraticaId,
@ -2783,4 +2817,6 @@ public class DocPraticaLocalServiceClp implements DocPraticaLocalService {
private String[] _methodParameterTypes64;
private String _methodName65;
private String[] _methodParameterTypes65;
private String _methodName66;
private String[] _methodParameterTypes66;
}

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

@ -589,6 +589,12 @@ public class DocPraticaLocalServiceUtil {
.countValidTmpByIntPratica_Tipologia(intPraticaId, tipologia);
}
public static java.util.List<it.tref.liferay.portos.bo.model.DocPratica> getValidTmpByIntPratica(
long intPraticaId, int start, int end)
throws com.liferay.portal.kernel.exception.SystemException {
return getService().getValidTmpByIntPratica(intPraticaId, start, end);
}
public static java.util.List<it.tref.liferay.portos.bo.model.DocPratica> getValidTmpByIntPratica_Tipologia(
long intPraticaId, java.lang.String tipologia, int start, int end)
throws com.liferay.portal.kernel.exception.SystemException {

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

@ -632,6 +632,14 @@ public class DocPraticaLocalServiceWrapper implements DocPraticaLocalService,
tipologia);
}
@Override
public java.util.List<it.tref.liferay.portos.bo.model.DocPratica> getValidTmpByIntPratica(
long intPraticaId, int start, int end)
throws com.liferay.portal.kernel.exception.SystemException {
return _docPraticaLocalService.getValidTmpByIntPratica(intPraticaId,
start, end);
}
@Override
public java.util.List<it.tref.liferay.portos.bo.model.DocPratica> getValidTmpByIntPratica_Tipologia(
long intPraticaId, java.lang.String tipologia, int start, int end)

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

@ -86,7 +86,6 @@ public class DocumentiPraticaUtil {
doc.add(TIPOLOGIA_ALLEGATO_A02);
doc.add(TIPOLOGIA_ALLEGATO_A03);
doc.add(TIPOLOGIA_ALLEGATO_A04);
doc.add(TIPOLOGIA_ALLEGATO_A05);
doc.add(TIPOLOGIA_ALLEGATO_A08);
doc.add(TIPOLOGIA_ALLEGATO_A09);
doc.add(TIPOLOGIA_ALLEGATO_A10);
@ -100,8 +99,6 @@ public class DocumentiPraticaUtil {
doc.add(TIPOLOGIA_ALLEGATO_A19);
doc.add(TIPOLOGIA_ALLEGATO_A20);
doc.add(TIPOLOGIA_ALLEGATO_A21);
doc.add(TIPOLOGIA_ALLEGATO_A22);
doc.add(TIPOLOGIA_ALLEGATO_A23);
doc.add(TIPOLOGIA_ALLEGATO_A24);
doc.add(TIPOLOGIA_ALLEGATO_A25);
doc.add(TIPOLOGIA_ALLEGATO_A26);
@ -142,7 +139,8 @@ public class DocumentiPraticaUtil {
if (dettPratica.getTcOperaA25()) {
docObbligatori.add(TIPOLOGIA_ALLEGATO_A25);
}
if (dettPratica.getTcCostruzioniEsistenti() || dettPratica.getTcNuovaCostruzionePertinenza()) {
if (dettPratica.getTcCostruzioniEsistenti() || dettPratica.getTcNuovaCostruzionePertinenza()
|| (dettPratica.getDestinazione().equals("3") && dettPratica.getTcManutOrdStraord())) {
docObbligatori.add(TIPOLOGIA_ALLEGATO_A26);
}
if (dettPratica.getNoCollaudo()) {

287
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java

@ -32,10 +32,19 @@ import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.mime.HttpMultipartMode;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.entity.mime.content.ByteArrayBody;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import com.liferay.portal.kernel.dao.orm.QueryUtil;
import com.liferay.portal.kernel.exception.PortalException;
@ -45,10 +54,8 @@ import com.liferay.portal.kernel.json.JSONFactoryUtil;
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.Http.FilePart;
import com.liferay.portal.kernel.util.Http.Options;
import com.liferay.portal.kernel.util.HttpUtil;
import com.liferay.portal.kernel.util.LocaleUtil;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.UniqueList;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.workflow.WorkflowConstants;
@ -230,16 +237,6 @@ public class ValidazionePraticaUtil {
DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId);
// return Validator.isNotNull(dettPratica)
// &&
// userScreenName.equalsIgnoreCase(dettPratica.getCodiceFiscaleDelegatoFineLavori())
// &&
// FineLavoriLocalServiceUtil.countByIntPraticaId_Parziale(intPraticaId,
// false) == 0
// && !praticaHasFineLavoriInProgress(intPraticaId) &&
// !praticaHasVarianteInProgress(intPraticaId)
// && !praticaHasIntegrazioneInProgress(intPraticaId);
return Validator.isNotNull(dettPratica)
&& userScreenName.equalsIgnoreCase(dettPratica.getCodiceFiscaleDelegatoFineLavori())
&& FineLavoriLocalServiceUtil.countByIntPraticaId_Parziale_Completata(intPraticaId, false,
@ -452,21 +449,6 @@ public class ValidazionePraticaUtil {
}
public static boolean isDelegaGeologoCompleted(long dettPraticaId) throws PortalException,
SystemException {
return hasDelegaGeologoCompleted(dettPraticaId).isEmpty();
}
public static List<String> hasDelegaGeologoCompleted(long dettPraticaId) throws PortalException,
SystemException {
List<String> notCompleted = notCompletedDatiSezionGeologica(dettPraticaId);
notCompleted.addAll(notCompletedAllegatiSezionGeologicaDelega(dettPraticaId));
return notCompleted;
}
private static List<String> notCompletedDettagliPrincipali(long dettPraticaId) throws PortalException,
SystemException {
@ -830,7 +812,7 @@ public class ValidazionePraticaUtil {
return notCompleted;
}
private static List<String> notCompletedSezioneGeologica(long dettPraticaId) throws PortalException,
public static List<String> notCompletedSezioneGeologica(long dettPraticaId) throws PortalException,
SystemException {
DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
@ -864,128 +846,119 @@ public class ValidazionePraticaUtil {
+ LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-A23"));
}
return notCompleted;
int indaginiGeologiche = DocPraticaLocalServiceUtil.countValidTmpByIntPratica_Tipologie(
dettPratica.getIntPraticaId(),
DocumentiPraticaUtil.getIndaginiGeologiche().toArray(new String[0]));
if (indaginiGeologiche == 0) {
notCompleted.add("Indagini Geologoche non presenti");
}
private static List<String> notCompletedDatiSezionGeologica(long dettPraticaId) throws PortalException,
SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
List<String> notCompleted = new ArrayList<>();
notCompleted.addAll(firmeMancanti(intPratica, dettPratica, DocumentiPraticaUtil.getDocGeologo()));
/*if (Validator.isNull(dettPratica.getGeoDtRelazione())) {
notCompleted.add("geo-dt-relazione");
}
if (Validator.isNull(dettPratica.getGeoClasseIndagine())) {
notCompleted.add("geo-classe-indagine");
}
if (Validator.isNull(dettPratica.getGeoOperaRilevante())) {
notCompleted.add("geo-opera-rilevante");
}
if (Validator.isNull(dettPratica.getGeoCategoriaSottosuolo())) {
notCompleted.add("geo-categoria-sottosuolo");
}
if (Validator.isNull(dettPratica.getGeoCategoriaTopografica())) {
notCompleted.add("geo-categoria-topografica");
}
if (Validator.isNull(dettPratica.getGeoOpereDiSostegno())) {
notCompleted.add("geo-opere-di-sostegno");
}
if (Validator.isNull(dettPratica.getGeoConsolidamento())) {
notCompleted.add("geo-consolidamento");
}
if (Validator.isNull(dettPratica.getGeoOpereInSotterranea())) {
notCompleted.add("geo-opere-in-sotterranea");
}
if (Validator.isNull(dettPratica.getGeoPericolositaGeologica())) {
notCompleted.add("geo-pericolosita-geologica");
}
if (Validator.isNull(dettPratica.getGeoPericolositaGeomorfica())) {
notCompleted.add("geo-pericolosita-geomorfica");
}
if (Validator.isNull(dettPratica.getGeoRischioGeomorfologicoPai())) {
notCompleted.add("geo-rischio-geomorfologico");
}*/
if (Validator.isNull(dettPratica.getGeoPericolositaIdraulicaPai())) {
notCompleted.add("geo-pericolosita-idraulica-pai");
return notCompleted;
}
if (Validator.isNull(dettPratica.getGeoRischioIdraulicoPai())) {
notCompleted.add("geo-rischio-idraulico-pai");
private static List<String> firmeMancanti(IntPratica intPratica, DettPratica dettPratica,
List<String> tipologie) throws SystemException {
List<String> notCompleted = new ArrayList<>();
List<Soggetto> soggetti = SoggettoLocalServiceUtil.getValidTmpByDettPratica(dettPratica
.getDettPraticaId());
String cfTitolare = intPratica.getUserName();
long intPraticaId = intPratica.getIntPraticaId();
for (String tipologia : tipologie) {
List<DocPratica> docs = DocPraticaLocalServiceUtil.getValidTmpByIntPratica_Tipologia(
intPraticaId, tipologia, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
List<String> firmeMancanti = new UniqueList<>();
for (DocPratica doc : docs) {
List<String> firmeObbligatorie = getFirmeObbligatorie(tipologia);
FirmeBean firmeBean = FirmeUtil.deserialize(doc.getJsonFirmatari());
List<String> firmePresenti = firmeBean.allSignatures();
for (Soggetto soggetto : soggetti) {
if (firmePresenti.contains(soggetto.getCodiceFiscale().toLowerCase())) {
firmeObbligatorie.remove(soggetto.getTipologiaSoggetto());
}
/*if (Validator.isNull(dettPratica.getGeoPericolositaSismica())) {
notCompleted.add("geo-pericolosita-sismica");
}
if (Validator.isNull(dettPratica.getGeoFattibilitaSismica())) {
notCompleted.add("geo-fattibilita-sismica");
if (firmePresenti.contains(cfTitolare)) {
firmeObbligatorie.remove(TipoSoggettoUtil.TITOLARE_DIGITALE);
}
if (Validator.isNull(dettPratica.getGeoPericolositaIdraulica())) {
notCompleted.add("geo-pericolosita-idraulica");
for (String firma : firmeObbligatorie) {
firmeMancanti.add(firma);
}
if (Validator.isNull(dettPratica.getGeoFattibilitaIdraulica())) {
notCompleted.add("geo-fattibilita-idraulica");
}
if (Validator.isNull(dettPratica.getGeoFattibilitaGeologica())) {
notCompleted.add("geo-fattibilita-geologica");
if (!firmeMancanti.isEmpty()) {
List<String> tipologieMancanti = new ArrayList<>();
for (String firmaMancante : firmeMancanti) {
tipologieMancanti.add(LanguageUtil.get(Locale.getDefault(), "gc-soggetto-"
+ firmaMancante));
}
if (Validator.isNull(dettPratica.getGeoPresenzaPrescrizioni())) {
notCompleted.add("geo-presenza-prescrizioni");
notCompleted.add(LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-"
+ tipologia)
+ ", firme mancanti: " + StringUtils.join(tipologieMancanti, ", "));
}
if (Validator.isNull(dettPratica.getGeoEvidenzeGeologiche())) {
notCompleted.add("geo-evidenze-geologiche-short");
}
if (Validator.isNull(dettPratica.getGeoEvidenzeGeomorfiche())) {
notCompleted.add("geo-evidenze-geomorfiche-short");
}*/
return notCompleted;
}
private static List<String> notCompletedAllegatiSezionGeologicaDelega(long dettPraticaId)
throws PortalException, SystemException {
private static List<String> notCompletedDatiSezionGeologica(long dettPraticaId) throws PortalException,
SystemException {
DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
List<String> notCompleted = new ArrayList<>();
// Allegati obbligatori devono essere presenti
/*
* int a05 =
* DocPraticaLocalServiceUtil.countValidTmpByIntPratica_Tipologia(
* dettPratica.getIntPraticaId(),
* DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A05);
* if (Validator.isNull(dettPratica.getGeoDtRelazione())) {
* notCompleted.add("geo-dt-relazione"); } if
* (Validator.isNull(dettPratica.getGeoClasseIndagine())) {
* notCompleted.add("geo-classe-indagine"); } if
* (Validator.isNull(dettPratica.getGeoOperaRilevante())) {
* notCompleted.add("geo-opera-rilevante"); } if
* (Validator.isNull(dettPratica.getGeoCategoriaSottosuolo())) {
* notCompleted.add("geo-categoria-sottosuolo"); } if
* (Validator.isNull(dettPratica.getGeoCategoriaTopografica())) {
* notCompleted.add("geo-categoria-topografica"); } if
* (Validator.isNull(dettPratica.getGeoOpereDiSostegno())) {
* notCompleted.add("geo-opere-di-sostegno"); } if
* (Validator.isNull(dettPratica.getGeoConsolidamento())) {
* notCompleted.add("geo-consolidamento"); } if
* (Validator.isNull(dettPratica.getGeoOpereInSotterranea())) {
* notCompleted.add("geo-opere-in-sotterranea"); } if
* (Validator.isNull(dettPratica.getGeoPericolositaGeologica())) {
* notCompleted.add("geo-pericolosita-geologica"); } if
* (Validator.isNull(dettPratica.getGeoPericolositaGeomorfica())) {
* notCompleted.add("geo-pericolosita-geomorfica"); } if
* (Validator.isNull(dettPratica.getGeoRischioGeomorfologicoPai())) {
* notCompleted.add("geo-rischio-geomorfologico"); }
*/
if (Validator.isNull(dettPratica.getGeoPericolositaIdraulicaPai())) {
notCompleted.add("geo-pericolosita-idraulica-pai");
}
if (Validator.isNull(dettPratica.getGeoRischioIdraulicoPai())) {
notCompleted.add("geo-rischio-idraulico-pai");
}
/*
* int a05 = 0; if (a05 == 0) {
* notCompleted.add(LanguageUtil.get(LocaleUtil.getDefault(),
* "label-documenti-tipologia-" +
* DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A05) + " non presente"); }
* if (Validator.isNull(dettPratica.getGeoPericolositaSismica())) {
* notCompleted.add("geo-pericolosita-sismica"); } if
* (Validator.isNull(dettPratica.getGeoFattibilitaSismica())) {
* notCompleted.add("geo-fattibilita-sismica"); } if
* (Validator.isNull(dettPratica.getGeoPericolositaIdraulica())) {
* notCompleted.add("geo-pericolosita-idraulica"); } if
* (Validator.isNull(dettPratica.getGeoFattibilitaIdraulica())) {
* notCompleted.add("geo-fattibilita-idraulica"); } if
* (Validator.isNull(dettPratica.getGeoFattibilitaGeologica())) {
* notCompleted.add("geo-fattibilita-geologica"); } if
* (Validator.isNull(dettPratica.getGeoPresenzaPrescrizioni())) {
* notCompleted.add("geo-presenza-prescrizioni"); } if
* (Validator.isNull(dettPratica.getGeoEvidenzeGeologiche())) {
* notCompleted.add("geo-evidenze-geologiche-short"); } if
* (Validator.isNull(dettPratica.getGeoEvidenzeGeomorfiche())) {
* notCompleted.add("geo-evidenze-geomorfiche-short"); }
*/
// int a06 =
// DocPraticaLocalServiceUtil.countValidTmpByIntPratica_Tipologia(dettPratica.getIntPraticaId(),
// DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A06);
// if (a06 == 0) {
// notCompleted.add(LanguageUtil.get(LocaleUtil.getDefault(),
// "label-documenti-tipologia-"
// + DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A06)
// + " non presente");
// }
// int a14 =
// DocPraticaLocalServiceUtil.countValidTmpByIntPratica_Tipologia(dettPratica.getIntPraticaId(),
// DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A14);
// if (a14 == 0) {
// notCompleted.add(LanguageUtil.get(LocaleUtil.getDefault(),
// "label-documenti-tipologia-"
// + DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A14)
// + " non presente");
// }
int indaginiGeologiche = DocPraticaLocalServiceUtil.countValidTmpByIntPratica_Tipologie(
dettPratica.getIntPraticaId(),
DocumentiPraticaUtil.getIndaginiGeologiche().toArray(new String[0]));
if (indaginiGeologiche == 0) {
notCompleted.add("Indagini Geologoche non presenti");
}
return notCompleted;
}
@ -999,7 +972,6 @@ public class ValidazionePraticaUtil {
List<String> docObbligatori = DocumentiPraticaUtil.getDocObbligatoriDomanda(intPratica, dettPratica);
List<Soggetto> soggetti = SoggettoLocalServiceUtil.getValidTmpByDettPratica(dettPraticaId);
String cfTitolare = intPratica.getUserName();
for (String docObbligatorio : docObbligatori) {
List<DocPratica> docs = DocPraticaLocalServiceUtil.getValidTmpByIntPratica_Tipologia(
@ -1008,38 +980,11 @@ public class ValidazionePraticaUtil {
notCompleted.add("Nessun allegato per "
+ LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-"
+ docObbligatorio));
} else {
List<String> firmeMancanti = new UniqueList<>();
for (DocPratica doc : docs) {
List<String> firmeObbligatorie = getFirmeObbligatorie(doc.getTipologia());
FirmeBean firmeBean = FirmeUtil.deserialize(doc.getJsonFirmatari());
List<String> firmePresenti = firmeBean.allSignatures();
for (Soggetto soggetto : soggetti) {
if (firmePresenti.contains(soggetto.getCodiceFiscale().toLowerCase())) {
firmeObbligatorie.remove(soggetto.getTipologiaSoggetto());
}
}
if (firmePresenti.contains(cfTitolare)) {
firmeObbligatorie.remove(TipoSoggettoUtil.TITOLARE_DIGITALE);
}
for (String firma : firmeObbligatorie) {
firmeMancanti.add(firma);
}
}
if (!firmeMancanti.isEmpty()) {
List<String> tipologieMancanti = new ArrayList<>();
for (String firmaMancante : firmeMancanti) {
tipologieMancanti.add(LanguageUtil.get(Locale.getDefault(), "gc-soggetto-"
+ firmaMancante));
}
notCompleted.add(LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-"
+ docObbligatorio)
+ ", firme mancanti: " + StringUtils.join(tipologieMancanti, ", "));
}
}
}
notCompleted.addAll(firmeMancanti(intPratica, dettPratica, DocumentiPraticaUtil.getDocDomanda()));
return notCompleted;
}
@ -1296,27 +1241,23 @@ public class ValidazionePraticaUtil {
Company company = CompanyLocalServiceUtil.getCompany(companyId);
String urlPdfExtractor = (String) company.getExpandoBridge().getAttribute("url_pdf_extractor", false);
Options options = new Options();
options.setLocation(urlPdfExtractor);
options.setPost(true);
List<FilePart> fileParts = new ArrayList<>();
// Amo l'ignoto autore di questo TODO!
// TODO perché cazzo non funziona il contentType???
FilePart filePart = new FilePart("file", fileName, fileBytes, "application/pkcs7-signature", "UTF-8");
fileParts.add(filePart);
options.setFileParts(fileParts);
String responseBody = HttpUtil.URLtoString(options);
if (options.getResponse().getResponseCode() == HttpServletResponse.SC_OK
|| options.getResponse().getResponseCode() == HttpServletResponse.SC_CREATED) {
HttpPost request = new HttpPost(urlPdfExtractor);
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
builder.addPart("file", new ByteArrayBody(fileBytes, fileName));
request.setEntity(builder.build());
CloseableHttpClient client = HttpClientBuilder.create().build();
HttpResponse httpResponse = client.execute(request);
int statusCode = httpResponse.getStatusLine().getStatusCode();
String responseBody = EntityUtils.toString(httpResponse.getEntity(), StringPool.UTF8);
client.close();
if (statusCode == HttpServletResponse.SC_OK || statusCode == HttpServletResponse.SC_CREATED) {
JSONArray arrayFirme = JSONFactoryUtil.createJSONObject(responseBody).getJSONArray("cf");
List<String> cf = new UniqueList<String>();
for (int i = 0; i < arrayFirme.length(); i++) {
cf.add(arrayFirme.getString(i));
}
return cf;
} else {
@ -1334,7 +1275,7 @@ public class ValidazionePraticaUtil {
return firme;
}
private static final Map<String, List<String>> firmeObbligatorie = new HashMap<String, List<String>>() {
private static final Map<String, List<String>> firmeObbligatorie = new HashMap<String, List<String>>(24) {
private static final long serialVersionUID = 1L;
{
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A01, new ArrayList<String>() {

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

@ -306,61 +306,65 @@ public class DocPraticaLocalServiceClpInvoker {
_methodParameterTypes239 = new String[] { "long", "java.lang.String" };
_methodName240 = "getValidTmpByIntPratica_Tipologia";
_methodName240 = "getValidTmpByIntPratica";
_methodParameterTypes240 = new String[] {
_methodParameterTypes240 = new String[] { "long", "int", "int" };
_methodName241 = "getValidTmpByIntPratica_Tipologia";
_methodParameterTypes241 = new String[] {
"long", "java.lang.String", "int", "int"
};
_methodName241 = "getValidTmpByIntPratica_DettPratica_Tipologia";
_methodName242 = "getValidTmpByIntPratica_DettPratica_Tipologia";
_methodParameterTypes241 = new String[] {
_methodParameterTypes242 = new String[] {
"long", "long", "java.lang.String", "int", "int"
};
_methodName242 = "getValidTmpByIntPratica_Tipologie";
_methodName243 = "getValidTmpByIntPratica_Tipologie";
_methodParameterTypes242 = new String[] {
_methodParameterTypes243 = new String[] {
"long", "java.lang.String[][]", "int", "int"
};
_methodName243 = "countValidTmpByIntPratica_Tipologie";
_methodName244 = "countValidTmpByIntPratica_Tipologie";
_methodParameterTypes243 = new String[] { "long", "java.lang.String[][]" };
_methodParameterTypes244 = new String[] { "long", "java.lang.String[][]" };
_methodName245 = "getInvalidByIntPratica";
_methodName246 = "getInvalidByIntPratica";
_methodParameterTypes245 = new String[] { "long" };
_methodParameterTypes246 = new String[] { "long" };
_methodName246 = "getInvalidTmpByIntPratica";
_methodName247 = "getInvalidTmpByIntPratica";
_methodParameterTypes246 = new String[] { "long" };
_methodParameterTypes247 = new String[] { "long" };
_methodName247 = "getValidUntilClassPkByIntPratica";
_methodName248 = "getValidUntilClassPkByIntPratica";
_methodParameterTypes247 = new String[] {
_methodParameterTypes248 = new String[] {
"long", "long", "java.lang.String", "int", "int"
};
_methodName248 = "completeInvalidation";
_methodName249 = "completeInvalidation";
_methodParameterTypes248 = new String[] { "long" };
_methodParameterTypes249 = new String[] { "long" };
_methodName249 = "getDocPraticaWithOldFileEntryId";
_methodName250 = "getDocPraticaWithOldFileEntryId";
_methodParameterTypes249 = new String[] { "int", "int" };
_methodParameterTypes250 = new String[] { "int", "int" };
_methodName250 = "addDocPraticaAnnullamento";
_methodName251 = "addDocPraticaAnnullamento";
_methodParameterTypes250 = new String[] {
_methodParameterTypes251 = new String[] {
"long", "java.lang.String", "long", "long", "long",
"java.lang.String", "java.lang.String", "java.lang.String",
"java.lang.String", "com.liferay.portal.service.ServiceContext"
};
_methodName251 = "findByIntPratica_ClassPk_TipologiaNew";
_methodName252 = "findByIntPratica_ClassPk_TipologiaNew";
_methodParameterTypes251 = new String[] {
_methodParameterTypes252 = new String[] {
"long", "long", "java.lang.String", "int", "int"
};
}
@ -749,14 +753,21 @@ public class DocPraticaLocalServiceClpInvoker {
if (_methodName240.equals(name) &&
Arrays.deepEquals(_methodParameterTypes240, parameterTypes)) {
return DocPraticaLocalServiceUtil.getValidTmpByIntPratica(((Long)arguments[0]).longValue(),
((Integer)arguments[1]).intValue(),
((Integer)arguments[2]).intValue());
}
if (_methodName241.equals(name) &&
Arrays.deepEquals(_methodParameterTypes241, parameterTypes)) {
return DocPraticaLocalServiceUtil.getValidTmpByIntPratica_Tipologia(((Long)arguments[0]).longValue(),
(java.lang.String)arguments[1],
((Integer)arguments[2]).intValue(),
((Integer)arguments[3]).intValue());
}
if (_methodName241.equals(name) &&
Arrays.deepEquals(_methodParameterTypes241, parameterTypes)) {
if (_methodName242.equals(name) &&
Arrays.deepEquals(_methodParameterTypes242, parameterTypes)) {
return DocPraticaLocalServiceUtil.getValidTmpByIntPratica_DettPratica_Tipologia(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue(),
(java.lang.String)arguments[2],
@ -764,32 +775,32 @@ public class DocPraticaLocalServiceClpInvoker {
((Integer)arguments[4]).intValue());
}
if (_methodName242.equals(name) &&
Arrays.deepEquals(_methodParameterTypes242, parameterTypes)) {
if (_methodName243.equals(name) &&
Arrays.deepEquals(_methodParameterTypes243, parameterTypes)) {
return DocPraticaLocalServiceUtil.getValidTmpByIntPratica_Tipologie(((Long)arguments[0]).longValue(),
(java.lang.String[])arguments[1],
((Integer)arguments[2]).intValue(),
((Integer)arguments[3]).intValue());
}
if (_methodName243.equals(name) &&
Arrays.deepEquals(_methodParameterTypes243, parameterTypes)) {
if (_methodName244.equals(name) &&
Arrays.deepEquals(_methodParameterTypes244, parameterTypes)) {
return DocPraticaLocalServiceUtil.countValidTmpByIntPratica_Tipologie(((Long)arguments[0]).longValue(),
(java.lang.String[])arguments[1]);
}
if (_methodName245.equals(name) &&
Arrays.deepEquals(_methodParameterTypes245, parameterTypes)) {
return DocPraticaLocalServiceUtil.getInvalidByIntPratica(((Long)arguments[0]).longValue());
}
if (_methodName246.equals(name) &&
Arrays.deepEquals(_methodParameterTypes246, parameterTypes)) {
return DocPraticaLocalServiceUtil.getInvalidTmpByIntPratica(((Long)arguments[0]).longValue());
return DocPraticaLocalServiceUtil.getInvalidByIntPratica(((Long)arguments[0]).longValue());
}
if (_methodName247.equals(name) &&
Arrays.deepEquals(_methodParameterTypes247, parameterTypes)) {
return DocPraticaLocalServiceUtil.getInvalidTmpByIntPratica(((Long)arguments[0]).longValue());
}
if (_methodName248.equals(name) &&
Arrays.deepEquals(_methodParameterTypes248, parameterTypes)) {
return DocPraticaLocalServiceUtil.getValidUntilClassPkByIntPratica(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue(),
(java.lang.String)arguments[2],
@ -797,21 +808,21 @@ public class DocPraticaLocalServiceClpInvoker {
((Integer)arguments[4]).intValue());
}
if (_methodName248.equals(name) &&
Arrays.deepEquals(_methodParameterTypes248, parameterTypes)) {
if (_methodName249.equals(name) &&
Arrays.deepEquals(_methodParameterTypes249, parameterTypes)) {
DocPraticaLocalServiceUtil.completeInvalidation(((Long)arguments[0]).longValue());
return null;
}
if (_methodName249.equals(name) &&
Arrays.deepEquals(_methodParameterTypes249, parameterTypes)) {
if (_methodName250.equals(name) &&
Arrays.deepEquals(_methodParameterTypes250, parameterTypes)) {
return DocPraticaLocalServiceUtil.getDocPraticaWithOldFileEntryId(((Integer)arguments[0]).intValue(),
((Integer)arguments[1]).intValue());
}
if (_methodName250.equals(name) &&
Arrays.deepEquals(_methodParameterTypes250, parameterTypes)) {
if (_methodName251.equals(name) &&
Arrays.deepEquals(_methodParameterTypes251, parameterTypes)) {
return DocPraticaLocalServiceUtil.addDocPraticaAnnullamento(((Long)arguments[0]).longValue(),
(java.lang.String)arguments[1],
((Long)arguments[2]).longValue(),
@ -822,8 +833,8 @@ public class DocPraticaLocalServiceClpInvoker {
(com.liferay.portal.service.ServiceContext)arguments[9]);
}
if (_methodName251.equals(name) &&
Arrays.deepEquals(_methodParameterTypes251, parameterTypes)) {
if (_methodName252.equals(name) &&
Arrays.deepEquals(_methodParameterTypes252, parameterTypes)) {
return DocPraticaLocalServiceUtil.findByIntPratica_ClassPk_TipologiaNew(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue(),
(java.lang.String)arguments[2],
@ -954,8 +965,8 @@ public class DocPraticaLocalServiceClpInvoker {
private String[] _methodParameterTypes242;
private String _methodName243;
private String[] _methodParameterTypes243;
private String _methodName245;
private String[] _methodParameterTypes245;
private String _methodName244;
private String[] _methodParameterTypes244;
private String _methodName246;
private String[] _methodParameterTypes246;
private String _methodName247;
@ -968,4 +979,6 @@ public class DocPraticaLocalServiceClpInvoker {
private String[] _methodParameterTypes250;
private String _methodName251;
private String[] _methodParameterTypes251;
private String _methodName252;
private String[] _methodParameterTypes252;
}

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

@ -57,13 +57,14 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
* The implementation of the doc pratica local service.
*
* <p>
* 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.
*
* <p>
* 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.
* </p>
*
* @author Davide Barbagallo, 3F Consulting
@ -72,9 +73,9 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
*/
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.
* 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);
@ -100,21 +101,22 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return deleteDocPratica(docPraticaLocalService.getDocPratica(docPraticaId));
}
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 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);
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 docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
.getName()));
FileEntry fileEntry = addAttachment(classPk, intPraticaId, userId, fileName, dlFileEntry, tipologia);
@ -146,15 +148,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
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 {
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()));
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
.getName()));
FileEntry fileEntry = addAttachment(classPk, intPraticaId, userId, fileName, dlFileEntry, tipologia);
@ -185,15 +188,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
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 {
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 docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
.getName()));
docPratica.setCompanyId(serviceContext.getCompanyId());
docPratica.setUserId(user.getUserId());
@ -223,18 +227,19 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
}
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 {
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);
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 docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
.getName()));
docPratica.setCompanyId(serviceContext.getCompanyId());
docPratica.setUserId(userId);
@ -269,7 +274,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
FileEntry fileEntry = null;
// DettPratica dettPratica = dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId);
// DettPratica dettPratica =
// dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId);
IntPratica intPratica = intPraticaPersistence.fetchByPrimaryKey(intPraticaId);
Territorio territorio = territorioPersistence.fetchByPrimaryKey(intPratica.getTerritorioId());
@ -277,9 +283,9 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
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);
User user = UserLocalServiceUtil.getRoleUsers(
RoleLocalServiceUtil.getRole(intPratica.getCompanyId(), RoleConstants.ADMINISTRATOR)
.getRoleId()).get(0);
try {
PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil.create(user));
} catch (Exception e) {
@ -295,8 +301,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
// TODO forse mettiamo i permesssi ma non mi pare sicuro.
long defaultFolderId =
configurazioneLocalService.findByC_ChiaveLong(companyId, ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
long defaultFolderId = configurazioneLocalService.findByC_ChiaveLong(companyId,
ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
@ -304,12 +310,12 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName);
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);
folder = dlAppLocalService.addFolder(userId, defaultFolder.getRepositoryId(),
defaultFolder.getFolderId(), folderName, StringPool.BLANK, serviceContext);
}
Date now = new Date();
String title = tipoAllegato + StringPool.UNDERLINE + sourceFileName;
@ -317,13 +323,13 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
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);
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)));
PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil
.create(UserLocalServiceUtil.getUser(delegaUserId)));
} catch (Exception e) {
throw new SystemException(e);
@ -344,7 +350,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
docPraticaLocalService.updateDocPratica(docPratica);
}
public void addFirmeAndApprova(long docPraticaId, List<String> codiciFiscali) throws PortalException, SystemException {
public void addFirmeAndApprova(long docPraticaId, List<String> codiciFiscali) throws PortalException,
SystemException {
DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId);
String jsonFirmatari = docPratica.getJsonFirmatari();
@ -357,7 +364,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
docPraticaLocalService.updateDocPratica(docPratica);
}
public void addErrorAndApprova(long docPraticaId, String errorCode) throws PortalException, SystemException {
public void addErrorAndApprova(long docPraticaId, String errorCode) throws PortalException,
SystemException {
DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId);
docPratica.setModifiedDate(new Date());
@ -376,16 +384,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
}
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 {
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 {
public DocPratica updateDocPraticaAggiornato(long docPraticaId, boolean aggiornato)
throws SystemException {
DocPratica docPratica = docPraticaPersistence.fetchByPrimaryKey(docPraticaId);
docPratica.setAggiornato(aggiornato);
@ -399,7 +407,6 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return (int) docPraticaPersistence.countWithDynamicQuery(dynamicQuery);
}
@SuppressWarnings("unchecked")
public List<DocPratica> getDocPraticaDaInviareDax(int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQueryDocPraticaDaInviareDax();
@ -436,7 +443,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPraticaPersistence.findByClassPk(classPk);
}
public List<DocPratica> findByStaus(int status, int start, int end, OrderByComparator order) throws SystemException {
public List<DocPratica> findByStaus(int status, int start, int end, OrderByComparator order)
throws SystemException {
return docPraticaPersistence.findByStatus(status, start, end, order);
}
@ -467,8 +475,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return soggettoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
}
public List<DocPratica> findByIntPratica_ClassPk_Tipologia(long intPraticaId, long classPk, String tipologia,
int start, int end) throws SystemException {
public List<DocPratica> findByIntPratica_ClassPk_Tipologia(long intPraticaId, long classPk,
String tipologia, int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
@ -478,8 +486,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end);
}
public List<DocPratica> findByIntPratica_ClassPk_Tipologie(long intPraticaId, long classPk, List<String> tipologie)
throws SystemException {
public List<DocPratica> findByIntPratica_ClassPk_Tipologie(long intPraticaId, long classPk,
List<String> tipologie) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
@ -500,7 +508,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery);
}
public DocPratica fetchByC_Group_DlFileEntry_Version(long dlFileEntryId, String version) throws SystemException {
public DocPratica fetchByC_Group_DlFileEntry_Version(long dlFileEntryId, String version)
throws SystemException {
return docPraticaPersistence.fetchByDlFileEntry_Version(dlFileEntryId, version);
}
@ -520,7 +529,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
throws SystemException {
DynamicQuery dynamicQuery = docPraticaLocalService.dynamicQuery();
dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property("dlFileEntryId")));
dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil
.property("dlFileEntryId")));
dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").eq(tipologia));
Junction or = RestrictionsFactoryUtil.disjunction();
for (long classPk : classPks) {
@ -540,8 +550,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery);
}
public List<DocPratica> getValidByIntPratica_Tipologia(long intPraticaId, String tipologia, int start, int end)
throws SystemException {
public List<DocPratica> getValidByIntPratica_Tipologia(long intPraticaId, String tipologia, int start,
int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
@ -551,7 +561,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end);
}
public int countValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia) throws SystemException {
public int countValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia)
throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
@ -559,8 +570,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return (int) docPraticaPersistence.countWithDynamicQuery(dynamicQuery);
}
public List<DocPratica> getValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia, int start, int end)
public List<DocPratica> getValidTmpByIntPratica(long intPraticaId, int start, int end)
throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.addOrder(OrderFactoryUtil.asc("tipologia"));
return dynamicQuery(dynamicQuery, start, end);
}
public List<DocPratica> getValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia, int start,
int end) throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
@ -569,8 +588,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end);
}
public List<DocPratica> getValidTmpByIntPratica_DettPratica_Tipologia(long intPraticaId, long dettPraticaId, String tipologia, int start, int end)
throws SystemException {
public List<DocPratica> 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));
@ -581,8 +600,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end);
}
public List<DocPratica> getValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie, int start, int end)
throws SystemException {
public List<DocPratica> getValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie,
int start, int end) throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.in("tipologia", tipologie));
@ -591,7 +610,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end);
}
public int countValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie) throws SystemException {
public int countValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie)
throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.in("tipologia", tipologie));
@ -626,14 +646,15 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery);
}
public List<DocPratica> getValidUntilClassPkByIntPratica(long intPraticaId, long classPk, String tipologia,
int start, int end) throws SystemException {
public List<DocPratica> 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("dettPraticaIdRimozione",
// null));
dynamicQuery.add(RestrictionsFactoryUtil.eq("rimosso", false));
dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
return dynamicQuery(dynamicQuery, start, end);
@ -661,15 +682,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
}
// 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 {
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 docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
.getName()));
docPratica.setCompanyId(serviceContext.getCompanyId());
docPratica.setUserId(user.getUserId());
@ -699,7 +721,6 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPratica;
}
/**
* Metodo nuovo ADT
*
@ -711,8 +732,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
* @return
* @throws SystemException
*/
public List<DocPratica> findByIntPratica_ClassPk_TipologiaNew(long intPraticaId, long classPk, String tipologia,
int start, int end) throws SystemException {
public List<DocPratica> findByIntPratica_ClassPk_TipologiaNew(long intPraticaId, long classPk,
String tipologia, int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -13,8 +13,8 @@
##
build.namespace=portos_bo
build.number=2601
build.date=1600763424994
build.number=2613
build.date=1600787107922
build.auto.upgrade=true
##

2
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java

@ -326,7 +326,7 @@ public class FascicoloFePortlet extends MVCPortlet {
long classPk = ParamUtil.getLong(resourceRequest, "classPk");
JSONObject json = JSONFactoryUtil.createJSONObject();
json.put("isCompleted", ValidazionePraticaUtil.isDelegaGeologoCompleted(classPk));
json.put("isCompleted", ValidazionePraticaUtil.notCompletedSezioneGeologica(classPk).isEmpty());
writeJSON(resourceRequest, resourceResponse, json);

2
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/common/save_actions.jspf

@ -165,7 +165,7 @@
StringBuilder tooltipSection = new StringBuilder();
if(delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)){
//List<String> notCompleted = ValidazionePraticaUtil.notCompletedSection(SezioniUtil.SEZIONE_GEOLOGICA, dettPraticaId);
List<String> notCompleted = ValidazionePraticaUtil.hasDelegaGeologoCompleted(dettPraticaId);
List<String> notCompleted = ValidazionePraticaUtil.notCompletedSezioneGeologica(dettPraticaId);
if(!notCompleted.isEmpty()){
validated = false;
tooltipSection.append("<ul class='list-body-modal'>");

Caricamento…
Annulla
Salva