Sfoglia il codice sorgente

Prima parte modifiche richieste 31/08

master 21.09
Salvatore La Manna 3 anni fa
parent
commit
3a9f8be6f3
  1. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/.settings/org.eclipse.wst.common.component
  2. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/DettPratica.java
  3. 19
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/DettPraticaClp.java
  4. 5
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/DettPraticaWrapper.java
  5. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalService.java
  6. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceUtil.java
  7. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/ControlloPraticaLocalServiceWrapper.java
  8. 112
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AsseverazioniUtil.java
  9. 100
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AzioniPraticheUtil.java
  10. 30
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/DelegheUtil.java
  11. 216
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/DocumentiPraticaUtil.java
  12. 11
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/MailUtil.java
  13. 23
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PagamentiCommonUtil.java
  14. 93
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/SoggettiUtil.java
  15. 328
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java
  16. 20
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/RicercaPosizionePortlet.java
  17. 92
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/DomandaUtil.java
  18. 37
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DettPraticaImpl.java
  19. 46
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java
  20. 19
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeServiceImpl.java
  21. 35
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java
  22. 59
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java
  23. 7
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/CollaudoLocalServiceImpl.java
  24. 5
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java
  25. 5
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneServiceImpl.java
  26. 24
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComunicazioneLocalServiceImpl.java
  27. 23
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ConfigurazioneServiceImpl.java
  28. 105
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ControlloPraticaLocalServiceImpl.java
  29. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DelegaLocalServiceImpl.java
  30. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java
  31. 8
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaServiceImpl.java
  32. 21
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java
  33. 23
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/FineLavoriLocalServiceImpl.java
  34. 40
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/HistoryWorkflowActionLocalServiceImpl.java
  35. 36
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java
  36. 16
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaServiceImpl.java
  37. 26
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java
  38. 7
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoServiceImpl.java
  39. 21
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java
  40. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoServiceImpl.java
  41. 87
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java
  42. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/TempisticaLocalServiceImpl.java
  43. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/TerritorioLocalServiceImpl.java
  44. 12
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/GestioneFirmeUtil.java
  45. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  46. 71
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/advanced_search.jsp
  47. 51
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivitaistruttore/advanced_search.jsp
  48. 4
      liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/src/it/tref/portos/comunicazione/ComunicazioneMediata.java
  49. 2
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/AllegatiPraticaPortlet.java
  50. 2022
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java
  51. 102
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/SoggettiPraticaPortlet.java
  52. 65
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/advanced_search.jsp
  53. 131
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp
  54. 99
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_soggetti.jsp
  55. 87
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/pareregeologo/actions.jsp
  56. 69
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/pareregeologo/actions/add_parere.jsp
  57. 71
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/pareregeologo/parericompletati.jsp
  58. 40
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/pareregeologo/pareridacompletare.jsp
  59. 242
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/soggettipratica/edit_soggetto.jsp
  60. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service.xml
  61. 40
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/NoSuchKaleoInstanceException.java
  62. 40
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/NoSuchKaleoInstanceTokenException.java
  63. 40
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/NoSuchKaleoLogException.java
  64. 40
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/NoSuchKaleoNodeException.java
  65. 40
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/NoSuchKaleoTaskAssignmentInstanceException.java
  66. 40
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/NoSuchKaleoTaskException.java
  67. 40
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/NoSuchKaleoTaskInstanceTokenException.java
  68. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstance.java
  69. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceClp.java
  70. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceModel.java
  71. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceSoap.java
  72. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceToken.java
  73. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceTokenClp.java
  74. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceTokenModel.java
  75. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceTokenSoap.java
  76. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceTokenWrapper.java
  77. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceWrapper.java
  78. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoLog.java
  79. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoLogClp.java
  80. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoLogModel.java
  81. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoLogSoap.java
  82. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoLogWrapper.java
  83. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoNode.java
  84. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoNodeClp.java
  85. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoNodeModel.java
  86. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoNodeSoap.java
  87. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoNodeWrapper.java
  88. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTask.java
  89. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskAssignmentInstance.java
  90. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskAssignmentInstanceClp.java
  91. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskAssignmentInstanceModel.java
  92. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskAssignmentInstanceSoap.java
  93. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskAssignmentInstanceWrapper.java
  94. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskClp.java
  95. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskInstanceToken.java
  96. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskInstanceTokenClp.java
  97. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskInstanceTokenModel.java
  98. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskInstanceTokenSoap.java
  99. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskInstanceTokenWrapper.java
  100. 2
      liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskModel.java
  101. Some files were not shown because too many files have changed in this diff Show More

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

@ -12,6 +12,12 @@
<dependent-module archiveName="portos-mail-manager-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-mail-manager-portlet/docroot/WEB-INF/lib/portos-mail-manager-portlet-service.jar"> <dependent-module archiveName="portos-mail-manager-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-mail-manager-portlet/docroot/WEB-INF/lib/portos-mail-manager-portlet-service.jar">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<dependent-module archiveName="portos-kaleo-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-kaleo-portlet/docroot/WEB-INF/lib/portos-kaleo-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="portos-mail-manager-portlet-service.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/portos-mail-manager-portlet/docroot/WEB-INF/lib/portos-mail-manager-portlet-service.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="portos-bo-portlet"/> <property name="context-root" value="portos-bo-portlet"/>
<property name="java-output-path" value="/portos-bo-portlet/docroot/WEB-INF/classes"/> <property name="java-output-path" value="/portos-bo-portlet/docroot/WEB-INF/classes"/>
</wb-module> </wb-module>

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/DettPratica.java

@ -31,8 +31,6 @@ public interface DettPratica extends DettPraticaModel, PersistedModel {
* *
* Never modify this interface directly. Add methods to {@link it.tref.liferay.portos.bo.model.impl.DettPraticaImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. * Never modify this interface directly. Add methods to {@link it.tref.liferay.portos.bo.model.impl.DettPraticaImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
*/ */
public java.util.Map<java.lang.String, java.lang.String> getTipologieSoggetto();
public java.lang.String getTitle(java.util.Locale locale); public java.lang.String getTitle(java.util.Locale locale);
public java.lang.String getTitle(); public java.lang.String getTitle();

19
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/DettPraticaClp.java

@ -8460,25 +8460,6 @@ public class DettPraticaClp extends BaseModelImpl<DettPratica>
} }
} }
@Override
public java.util.Map<java.lang.String, java.lang.String> getTipologieSoggetto() {
try {
String methodName = "getTipologieSoggetto";
Class<?>[] parameterTypes = new Class<?>[] { };
Object[] parameterValues = new Object[] { };
java.util.Map<java.lang.String, java.lang.String> returnObj = (java.util.Map<java.lang.String, java.lang.String>)invokeOnRemoteModel(methodName,
parameterTypes, parameterValues);
return returnObj;
}
catch (Exception e) {
throw new UnsupportedOperationException(e);
}
}
@Override @Override
public java.lang.String getMiddleDescription() { public java.lang.String getMiddleDescription() {
try { try {

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

@ -8229,11 +8229,6 @@ public class DettPraticaWrapper implements DettPratica,
_dettPratica.persist(); _dettPratica.persist();
} }
@Override
public java.util.Map<java.lang.String, java.lang.String> getTipologieSoggetto() {
return _dettPratica.getTipologieSoggetto();
}
@Override @Override
public java.lang.String getTitle(java.util.Locale locale) { public java.lang.String getTitle(java.util.Locale locale) {
return _dettPratica.getTitle(locale); return _dettPratica.getTitle(locale);

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

@ -394,9 +394,6 @@ public interface ControlloPraticaLocalService extends BaseLocalService,
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException; com.liferay.portal.kernel.exception.SystemException;
/**
* ADT: BUG ID=5 - tracciamento operazione aggiungi varianti al controllo
*/
@com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
public it.tref.liferay.portos.bo.model.ControlloPratica addPraticheAlControlloVarianti( public it.tref.liferay.portos.bo.model.ControlloPratica addPraticheAlControlloVarianti(
long controlloPraticaId, long dettPraticaId, long controlloPraticaId, long dettPraticaId,

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

@ -464,9 +464,6 @@ public class ControlloPraticaLocalServiceUtil {
.addPraticheAlControllo(controlloPraticaId, dettPraticaId); .addPraticheAlControllo(controlloPraticaId, dettPraticaId);
} }
/**
* ADT: BUG ID=5 - tracciamento operazione aggiungi varianti al controllo
*/
public static it.tref.liferay.portos.bo.model.ControlloPratica addPraticheAlControlloVarianti( public static it.tref.liferay.portos.bo.model.ControlloPratica addPraticheAlControlloVarianti(
long controlloPraticaId, long dettPraticaId, long controlloPraticaId, long dettPraticaId,
com.liferay.portal.service.ServiceContext serviceContext) com.liferay.portal.service.ServiceContext serviceContext)

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

@ -492,9 +492,6 @@ public class ControlloPraticaLocalServiceWrapper
dettPraticaId); dettPraticaId);
} }
/**
* ADT: BUG ID=5 - tracciamento operazione aggiungi varianti al controllo
*/
@Override @Override
public it.tref.liferay.portos.bo.model.ControlloPratica addPraticheAlControlloVarianti( public it.tref.liferay.portos.bo.model.ControlloPratica addPraticheAlControlloVarianti(
long controlloPraticaId, long dettPraticaId, long controlloPraticaId, long dettPraticaId,

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

@ -17,6 +17,7 @@ import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
@ -101,74 +102,34 @@ public class AsseverazioniUtil {
@SuppressWarnings("serial") @SuppressWarnings("serial")
private static final Map<String, List<String>> REQUIRED = new HashMap<String, List<String>>() { private static final Map<String, List<String>> REQUIRED = new HashMap<String, List<String>>() {
{ {
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A02, new ArrayList<String>() { put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A02,
{ Arrays.<String> asList(TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
add(TipoSoggettoUtil.PROGETTISTA); put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A03,
add(TipoSoggettoUtil.DIRETTORE_LAVORI); Arrays.<String> asList(TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
} put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A04,
}); Arrays.<String> asList(TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A03, new ArrayList<String>() { put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A08,
{ Arrays.<String> asList(TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
add(TipoSoggettoUtil.PROGETTISTA); put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A10,
add(TipoSoggettoUtil.DIRETTORE_LAVORI); Arrays.<String> asList(TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
} put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A13,
}); Arrays.<String> asList(TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A04, new ArrayList<String>() { put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A15,
{ Arrays.<String> asList(TipoSoggettoUtil.GEOLOGO, TipoSoggettoUtil.DIRETTORE_LAVORI));
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A08, new ArrayList<String>() {
{
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A10, new ArrayList<String>() {
{
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A13, new ArrayList<String>() {
{
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A15, new ArrayList<String>() {
{
add(TipoSoggettoUtil.GEOLOGO);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
}
});
// Domanda // Domanda
put(ASSEVERAZIONI_DOMANDA, new ArrayList<String>() { put(ASSEVERAZIONI_DOMANDA, Arrays.<String> asList(TipoSoggettoUtil.DIRETTORE_LAVORI,
{ TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DITTA, TipoSoggettoUtil.COLLAUDATORE,
add(TipoSoggettoUtil.DIRETTORE_LAVORI); TipoSoggettoUtil.TITOLARE_DIGITALE));
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DITTA);
add(TipoSoggettoUtil.COLLAUDATORE);
add(TipoSoggettoUtil.TITOLARE_DIGITALE);
}
});
// Variante // Variante
put(ASSEVERAZIONI_VARIANTE, new ArrayList<String>()); put(ASSEVERAZIONI_VARIANTE, Collections.<String> emptyList());
// Integrazioni // Integrazioni
put(ASSEVERAZIONI_INTEGRAZIONE, new ArrayList<String>()); put(ASSEVERAZIONI_INTEGRAZIONE, Collections.<String> emptyList());
// Fine Lavori // Fine Lavori
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_GIORNALE_LAVORI, new ArrayList<String>() { put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_GIORNALE_LAVORI,
{ Arrays.<String> asList(TipoSoggettoUtil.DIRETTORE_LAVORI));
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
}
});
// Collaudo // Collaudo
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_RELAZIONE_COLLAUDO, new ArrayList<String>() { put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_RELAZIONE_COLLAUDO,
{ Arrays.<String> asList(TipoSoggettoUtil.COLLAUDATORE));
add(TipoSoggettoUtil.COLLAUDATORE);
}
});
} }
}; };
@ -180,16 +141,9 @@ public class AsseverazioniUtil {
} }
}; };
@SuppressWarnings("serial") private static final List<String> oneIsEnough = Arrays.<String> asList(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A11,
private static final List<String> oneIsEnough = new ArrayList<String>() { DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A12, DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A17,
{ DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_ALTRI, DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_DELEGA);
add(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A11);
add(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A12);
add(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A17);
add(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_ALTRI);
add(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_DELEGA);
}
};
public static boolean isAsseverazioneDomandaRequiredByTipoSoggetto(long dettPraticaId, String tipoSoggetto) public static boolean isAsseverazioneDomandaRequiredByTipoSoggetto(long dettPraticaId, String tipoSoggetto)
throws PortalException, SystemException { throws PortalException, SystemException {
@ -214,7 +168,7 @@ public class AsseverazioniUtil {
User titolaredigitaleUser = UserLocalServiceUtil.getUser(intPratica.getUserId()); User titolaredigitaleUser = UserLocalServiceUtil.getUser(intPratica.getUserId());
Soggetto titolareDigitale = SoggettoLocalServiceUtil Soggetto titolareDigitale = SoggettoLocalServiceUtil
.getValidTmpByIntPratica_CodiceFiscale_TipologiaSoggetto(intPraticaId, .getValidTmpByIntPratica_CodiceFiscale_TipologiaSoggetto(intPraticaId,
titolaredigitaleUser.getScreenName(), tipoSoggetto, 0l); titolaredigitaleUser.getScreenName(), tipoSoggetto, 0);
if (Validator.isNotNull(titolareDigitale) if (Validator.isNotNull(titolareDigitale)
&& tipoSoggetto.equalsIgnoreCase(titolareDigitale.getTipologiaSoggetto())) { && tipoSoggetto.equalsIgnoreCase(titolareDigitale.getTipologiaSoggetto())) {
nuoviSoggetti.add(titolareDigitale); nuoviSoggetti.add(titolareDigitale);
@ -253,6 +207,7 @@ public class AsseverazioniUtil {
public static boolean isAsseverazioneDomandaRecommendedByTipoSoggetto(long dettPraticaId, String tipoSoggetto) public static boolean isAsseverazioneDomandaRecommendedByTipoSoggetto(long dettPraticaId, String tipoSoggetto)
throws PortalException, SystemException { throws PortalException, SystemException {
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId); DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione()) if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())
|| TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { || TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) {
@ -265,6 +220,7 @@ public class AsseverazioniUtil {
} }
public static boolean isAsseverazioneRequiredByCodiceDoc(String codiceDoc, String tipoSoggetto) { public static boolean isAsseverazioneRequiredByCodiceDoc(String codiceDoc, String tipoSoggetto) {
if (REQUIRED.containsKey(codiceDoc)) { if (REQUIRED.containsKey(codiceDoc)) {
return REQUIRED.get(codiceDoc).contains(tipoSoggetto); return REQUIRED.get(codiceDoc).contains(tipoSoggetto);
} }
@ -272,6 +228,7 @@ public class AsseverazioniUtil {
} }
public static boolean isAsseverazioneRecommendedByCodiceDoc(String codiceDoc, String tipoSoggetto) { public static boolean isAsseverazioneRecommendedByCodiceDoc(String codiceDoc, String tipoSoggetto) {
if (recommended.containsKey(codiceDoc)) { if (recommended.containsKey(codiceDoc)) {
return recommended.get(codiceDoc).contains(tipoSoggetto); return recommended.get(codiceDoc).contains(tipoSoggetto);
} }
@ -415,7 +372,7 @@ public class AsseverazioniUtil {
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(asseverazione.getDettPraticaId()); DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(asseverazione.getDettPraticaId());
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(asseverazione.getIntPraticaId()); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(asseverazione.getIntPraticaId());
Soggetto soggetto = SoggettoLocalServiceUtil.getValidTmpByIntPratica_CodiceFiscale_TipologiaSoggetto( Soggetto soggetto = SoggettoLocalServiceUtil.getValidTmpByIntPratica_CodiceFiscale_TipologiaSoggetto(
asseverazione.getIntPraticaId(), codiceFiscale, asseverazione.getTipologia(), 0l); asseverazione.getIntPraticaId(), codiceFiscale, asseverazione.getTipologia(), 0);
switch (tipoAsseverazione) { switch (tipoAsseverazione) {
case TipoSoggettoUtil.COLLAUDATORE: case TipoSoggettoUtil.COLLAUDATORE:
params = new Object[] { params = new Object[] {
@ -485,9 +442,6 @@ public class AsseverazioniUtil {
List<Soggetto> soggettiPerTipologia = SoggettoLocalServiceUtil.findByDettPratica_TipologiaSoggetto( List<Soggetto> soggettiPerTipologia = SoggettoLocalServiceUtil.findByDettPratica_TipologiaSoggetto(
dettPraticaId, tipoSoggetto); dettPraticaId, tipoSoggetto);
if (soggettiPerTipologia != null && soggettiPerTipologia.size() > 0) { return soggettiPerTipologia != null && soggettiPerTipologia.size() > 0;
return true;
}
return false;
} }
} }

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

@ -8,7 +8,6 @@ import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil; import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil; import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
@ -18,7 +17,6 @@ import java.util.Map;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.UniqueList;
import com.liferay.portal.kernel.workflow.WorkflowConstants; import com.liferay.portal.kernel.workflow.WorkflowConstants;
public class AzioniPraticheUtil { public class AzioniPraticheUtil {
@ -47,92 +45,36 @@ public class AzioniPraticheUtil {
public static final String STATE_FINE_LAVORI_TOTALE = "FINE_LAVORI_TOTALE"; public static final String STATE_FINE_LAVORI_TOTALE = "FINE_LAVORI_TOTALE";
public static final String STATE_COLLAUDO_PARZIALE = "COLLAUDO_PARZIALE"; public static final String STATE_COLLAUDO_PARZIALE = "COLLAUDO_PARZIALE";
@SuppressWarnings("serial") private static final List<String> ALL_ACTIONS = Arrays.<String> asList(ACTION_AGGIUNGI_SOGGETTO,
public static List<String> ALL_ACTIONS = new UniqueList<String>() { ACTION_RIMUOVI_SOGGETTO, ACTION_VARIAZIONE_SOGGETTI, ACTION_VARIANTE, ACTION_FL_PARZIALE, ACTION_FL_TOTALE,
{ ACTION_ANNULLA, ACTION_CO_PARZIALE, ACTION_CO_TOTALE);
add(ACTION_AGGIUNGI_SOGGETTO);
add(ACTION_RIMUOVI_SOGGETTO);
add(ACTION_VARIAZIONE_SOGGETTI);
add(ACTION_VARIANTE);
add(ACTION_FL_PARZIALE);
add(ACTION_FL_TOTALE);
add(ACTION_ANNULLA);
add(ACTION_CO_PARZIALE);
add(ACTION_CO_TOTALE);
}
};
@SuppressWarnings("serial") @SuppressWarnings("serial")
private static Map<String, List<String>> STATE_ACTIONS_MAP = new HashMap<String, List<String>>() { private static Map<String, List<String>> STATE_ACTIONS_MAP = new HashMap<String, List<String>>() {
{ {
put(STATE_VIDIMATO, ALL_ACTIONS); put(STATE_VIDIMATO, ALL_ACTIONS);
put(STATE_SOTTOPOSTO_A_PARERE_AUTORIZZAZIONE, new ArrayList<String>() { put(STATE_SOTTOPOSTO_A_PARERE_AUTORIZZAZIONE, Arrays.<String> asList(ACTION_AGGIUNGI_SOGGETTO,
{ ACTION_RIMUOVI_SOGGETTO, ACTION_VARIAZIONE_SOGGETTI, ACTION_ANNULLA));
add(ACTION_AGGIUNGI_SOGGETTO);
add(ACTION_RIMUOVI_SOGGETTO);
add(ACTION_VARIAZIONE_SOGGETTI);
add(ACTION_ANNULLA);
}
});
put(STATE_SOTTOPOSTO_A_PARERE_DEPOSITO, ALL_ACTIONS); put(STATE_SOTTOPOSTO_A_PARERE_DEPOSITO, ALL_ACTIONS);
put(STATE_ANNULLATO, Collections.<String> emptyList()); put(STATE_ANNULLATO, Collections.<String> emptyList());
put(STATE_NON_CONFORME, Collections.<String> emptyList()); put(STATE_NON_CONFORME, Collections.<String> emptyList());
put(NON_AUTORIZZATA, Collections.<String> emptyList()); put(NON_AUTORIZZATA, Collections.<String> emptyList());
put(STATE_INTEGRAZIONE_AUTORIZZAZIONE, new ArrayList<String>() { put(STATE_INTEGRAZIONE_AUTORIZZAZIONE, Arrays.<String> asList(ACTION_AGGIUNGI_SOGGETTO,
{ ACTION_RIMUOVI_SOGGETTO, ACTION_INTEGRAZIONE, ACTION_ANNULLA));
add(ACTION_AGGIUNGI_SOGGETTO); put(STATE_INTEGRAZIONE_DEPOSITO, Arrays.<String> asList(ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO,
add(ACTION_RIMUOVI_SOGGETTO); ACTION_INTEGRAZIONE, ACTION_ANNULLA));
add(ACTION_INTEGRAZIONE); put(STATE_COMPILAZIONE,
add(ACTION_ANNULLA); Arrays.<String> asList(ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, ACTION_ANNULLA));
} put(STATE_FINE_LAVORI_PARZIALE, Arrays.<String> asList(ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO,
}); ACTION_VARIANTE, ACTION_FL_PARZIALE, ACTION_FL_TOTALE, ACTION_CO_PARZIALE));
put(STATE_INTEGRAZIONE_DEPOSITO, new ArrayList<String>() { put(STATE_FINE_LAVORI_TOTALE, Arrays.<String> asList(ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO,
{ ACTION_CO_TOTALE, ACTION_CO_PARZIALE));
add(ACTION_AGGIUNGI_SOGGETTO); put(STATE_COLLAUDO_PARZIALE, Arrays.<String> asList(ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO,
add(ACTION_RIMUOVI_SOGGETTO); ACTION_VARIANTE, ACTION_CO_PARZIALE, ACTION_CO_TOTALE));
add(ACTION_INTEGRAZIONE);
add(ACTION_ANNULLA);
}
});
put(STATE_COMPILAZIONE, new ArrayList<String>() {
{
add(ACTION_AGGIUNGI_SOGGETTO);
add(ACTION_RIMUOVI_SOGGETTO);
add(ACTION_ANNULLA);
}
});
put(STATE_FINE_LAVORI_PARZIALE, new ArrayList<String>() {
{
add(ACTION_AGGIUNGI_SOGGETTO);
add(ACTION_RIMUOVI_SOGGETTO);
add(ACTION_VARIANTE);
add(ACTION_FL_PARZIALE);
add(ACTION_FL_TOTALE);
add(ACTION_CO_PARZIALE);
}
});
put(STATE_FINE_LAVORI_TOTALE, new ArrayList<String>() {
{
add(ACTION_AGGIUNGI_SOGGETTO);
add(ACTION_RIMUOVI_SOGGETTO);
add(ACTION_CO_TOTALE);
add(ACTION_CO_PARZIALE);
}
});
put(STATE_COLLAUDO_PARZIALE, new ArrayList<String>() {
{
add(ACTION_AGGIUNGI_SOGGETTO);
add(ACTION_RIMUOVI_SOGGETTO);
add(ACTION_VARIANTE);
add(ACTION_CO_PARZIALE);
add(ACTION_CO_TOTALE);
}
});
} }
}; };
public static boolean isAllowedAction(long intPraticaId, String action) throws PortalException, public static boolean isAllowedAction(long intPraticaId, String action) throws PortalException, SystemException {
SystemException {
if (!ALL_ACTIONS.contains(action) && !ACTION_INTEGRAZIONE.equalsIgnoreCase(action)) { if (!ALL_ACTIONS.contains(action) && !ACTION_INTEGRAZIONE.equalsIgnoreCase(action)) {
throw new SystemException("Azione non presente: " + action); throw new SystemException("Azione non presente: " + action);
@ -143,8 +85,7 @@ public class AzioniPraticheUtil {
String status = StringPool.BLANK; String status = StringPool.BLANK;
if (intPratica.getStatus() == WorkflowConstants.STATUS_PENDING) { if (intPratica.getStatus() == WorkflowConstants.STATUS_PENDING) {
if (StatoPraticaConstants.INTEGRAZIONE.equalsIgnoreCase(intPratica.getStatoPratica()) if (StatoPraticaConstants.INTEGRAZIONE.equalsIgnoreCase(intPratica.getStatoPratica())
|| StatoPraticaConstants.PREAVVISO_CONTRARIO.equalsIgnoreCase(intPratica || StatoPraticaConstants.PREAVVISO_CONTRARIO.equalsIgnoreCase(intPratica.getStatoPratica())) {
.getStatoPratica())) {
if (isDeposito) { if (isDeposito) {
status = STATE_INTEGRAZIONE_DEPOSITO; status = STATE_INTEGRAZIONE_DEPOSITO;
} else if (isAutorizzazione) { } else if (isAutorizzazione) {
@ -224,8 +165,7 @@ public class AzioniPraticheUtil {
} }
} }
public static boolean canPrintFascicoloVariante(long intPraticaId) throws PortalException, public static boolean canPrintFascicoloVariante(long intPraticaId) throws PortalException, SystemException {
SystemException {
int nVarianti = DettPraticaLocalServiceUtil.countCompletedByIntPraticaAndTipoPratica(intPraticaId, int nVarianti = DettPraticaLocalServiceUtil.countCompletedByIntPraticaAndTipoPratica(intPraticaId,
Arrays.asList(new String[] { TipoIntegrazioneUtil.VARIANTE })); Arrays.asList(new String[] { TipoIntegrazioneUtil.VARIANTE }));

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

@ -5,7 +5,6 @@ import it.tref.liferay.portos.bo.model.Delega;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.DocPratica; import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.FineLavori; import it.tref.liferay.portos.bo.model.FineLavori;
import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Soggetto; import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.service.CollaudoServiceUtil; import it.tref.liferay.portos.bo.service.CollaudoServiceUtil;
import it.tref.liferay.portos.bo.service.DelegaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DelegaLocalServiceUtil;
@ -13,7 +12,6 @@ import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DettPraticaServiceUtil; import it.tref.liferay.portos.bo.service.DettPraticaServiceUtil;
import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.FineLavoriServiceUtil; import it.tref.liferay.portos.bo.service.FineLavoriServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil; import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil;
import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil; import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil;
@ -133,42 +131,22 @@ public class DelegheUtil {
public static boolean hasCambioStatoDelega(long userId, long delegaId) throws PortalException, SystemException { public static boolean hasCambioStatoDelega(long userId, long delegaId) throws PortalException, SystemException {
// TODO completare e controllare return true;
boolean controllo = true;
Delega delega = DelegaLocalServiceUtil.getDelega(delegaId);
IntPratica dettPratica = IntPraticaLocalServiceUtil.getIntPratica(delega.getIntPraticaId());
User user = UserLocalServiceUtil.fetchUserByScreenName(delega.getCompanyId(), delega.getCodiceFiscale());
if (dettPratica.getUserId() == userId) {
controllo = true;
} else if (user != null && user.getUserId() == userId) {
controllo = true;
}
return controllo;
} }
public static boolean hasCreazioneDelega(long userId, long intPraticaId) throws PortalException, SystemException { public static boolean hasCreazioneDelega(long userId, long intPraticaId) throws PortalException, SystemException {
// TODO completare e controllare return true;
boolean controllo = true;
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
if (intPratica.getUserId() == userId) {
controllo = true;
}
return controllo;
} }
public static boolean hasDeleteDelega(long userId, long intPraticaId) throws PortalException, SystemException { public static boolean hasDeleteDelega(long userId, long intPraticaId) throws PortalException, SystemException {
// TODO completare e controllare return hasCreazioneDelega(userId, intPraticaId);
boolean controllo = hasCreazioneDelega(userId, intPraticaId);
return controllo;
} }
public static boolean hasAnnullaDelega(long userId, long intPraticaId) throws PortalException, SystemException { public static boolean hasAnnullaDelega(long userId, long intPraticaId) throws PortalException, SystemException {
// TODO completare e controllare return hasCreazioneDelega(userId, intPraticaId);
boolean controllo = hasCreazioneDelega(userId, intPraticaId);
return controllo;
} }
public static boolean hasDelegaCompilazioneDomanda(long userId, long dettPraticaId) throws PortalException, public static boolean hasDelegaCompilazioneDomanda(long userId, long dettPraticaId) throws PortalException,

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

@ -5,11 +5,12 @@ import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.shared.util.Constants; import it.tref.liferay.portos.bo.shared.util.Constants;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
import java.util.Map;
import com.liferay.portal.kernel.language.LanguageUtil; import com.liferay.portal.kernel.language.LanguageUtil;
import com.liferay.portal.kernel.util.LocaleUtil; import com.liferay.portal.kernel.util.LocaleUtil;
@ -107,12 +108,12 @@ public class DocumentiPraticaUtil {
addDocDomanda(TIPOLOGIA_ALLEGATO_A20); addDocDomanda(TIPOLOGIA_ALLEGATO_A20);
addDocDomanda(TIPOLOGIA_ALLEGATO_A21); addDocDomanda(TIPOLOGIA_ALLEGATO_A21);
addDocDomanda(TIPOLOGIA_ALLEGATO_A24); addDocDomanda(TIPOLOGIA_ALLEGATO_A24);
//addDocDomanda(TIPOLOGIA_ALLEGATO_A25); // addDocDomanda(TIPOLOGIA_ALLEGATO_A25);
addDocDomanda(TIPOLOGIA_ALLEGATO_A26); addDocDomanda(TIPOLOGIA_ALLEGATO_A26);
//addDocDomanda(TIPOLOGIA_ALLEGATO_A27); // addDocDomanda(TIPOLOGIA_ALLEGATO_A27);
addDocDomanda(TIPOLOGIA_ALLEGATO_A28); addDocDomanda(TIPOLOGIA_ALLEGATO_A28);
//addDocDomanda(TIPOLOGIA_ALLEGATO_A29); // addDocDomanda(TIPOLOGIA_ALLEGATO_A29);
//addDocDomanda(TIPOLOGIA_ALLEGATO_A30); // addDocDomanda(TIPOLOGIA_ALLEGATO_A30);
addDocDomanda(TIPOLOGIA_ALLEGATO_ALTRI); addDocDomanda(TIPOLOGIA_ALLEGATO_ALTRI);
addDocDomanda(TIPOLOGIA_ALLEGATO_DELEGA); addDocDomanda(TIPOLOGIA_ALLEGATO_DELEGA);
} }
@ -141,27 +142,21 @@ public class DocumentiPraticaUtil {
case Constants.PROCEDURA_Q1: case Constants.PROCEDURA_Q1:
docObbligatori.add(TIPOLOGIA_ALLEGATO_A03); docObbligatori.add(TIPOLOGIA_ALLEGATO_A03);
docObbligatori.add(TIPOLOGIA_ALLEGATO_A09); docObbligatori.add(TIPOLOGIA_ALLEGATO_A09);
/*if (dettPratica.getNoCollaudo()) { /*
docObbligatori.add(TIPOLOGIA_ALLEGATO_A27); * if (dettPratica.getNoCollaudo()) { docObbligatori.add(TIPOLOGIA_ALLEGATO_A27); }
}*/ */
break; break;
case Constants.PROCEDURA_P2: case Constants.PROCEDURA_P2:
case Constants.PROCEDURA_Q2: case Constants.PROCEDURA_Q2:
docObbligatori.add(TIPOLOGIA_ALLEGATO_A01); docObbligatori.add(TIPOLOGIA_ALLEGATO_A01);
docObbligatori.add(TIPOLOGIA_ALLEGATO_A03); docObbligatori.add(TIPOLOGIA_ALLEGATO_A03);
docObbligatori.add(TIPOLOGIA_ALLEGATO_A09); docObbligatori.add(TIPOLOGIA_ALLEGATO_A09);
/*if (dettPratica.getNoCollaudo()) {
docObbligatori.add(TIPOLOGIA_ALLEGATO_A27);
}*/
break; break;
case Constants.PROCEDURA_P3: case Constants.PROCEDURA_P3:
case Constants.PROCEDURA_Q3: case Constants.PROCEDURA_Q3:
docObbligatori.add(TIPOLOGIA_ALLEGATO_A01); docObbligatori.add(TIPOLOGIA_ALLEGATO_A01);
docObbligatori.add(TIPOLOGIA_ALLEGATO_A02); docObbligatori.add(TIPOLOGIA_ALLEGATO_A02);
docObbligatori.add(TIPOLOGIA_ALLEGATO_A24); docObbligatori.add(TIPOLOGIA_ALLEGATO_A24);
/*if (dettPratica.getNoCollaudo()) {
docObbligatori.add(TIPOLOGIA_ALLEGATO_A27);
}*/
break; break;
case Constants.PROCEDURA_P4: case Constants.PROCEDURA_P4:
case Constants.PROCEDURA_Q4: case Constants.PROCEDURA_Q4:
@ -173,12 +168,6 @@ public class DocumentiPraticaUtil {
if (dettPratica.getTcViarch()) { if (dettPratica.getTcViarch()) {
docObbligatori.add(TIPOLOGIA_ALLEGATO_A24); docObbligatori.add(TIPOLOGIA_ALLEGATO_A24);
} }
/*if (dettPratica.getTcOperaA25()) {
docObbligatori.add(TIPOLOGIA_ALLEGATO_A25);
}
if (dettPratica.getNoCollaudo()) {
docObbligatori.add(TIPOLOGIA_ALLEGATO_A27);
}*/
break; break;
case Constants.PROCEDURA_P5: case Constants.PROCEDURA_P5:
case Constants.PROCEDURA_Q5: case Constants.PROCEDURA_Q5:
@ -189,12 +178,10 @@ public class DocumentiPraticaUtil {
if (dettPratica.getTcViarch()) { if (dettPratica.getTcViarch()) {
docObbligatori.add(TIPOLOGIA_ALLEGATO_A24); docObbligatori.add(TIPOLOGIA_ALLEGATO_A24);
} }
/*if (dettPratica.getTcOperaA25()) { /*
docObbligatori.add(TIPOLOGIA_ALLEGATO_A25); * if (dettPratica.getTcOperaA25()) { docObbligatori.add(TIPOLOGIA_ALLEGATO_A25); } if
} * (dettPratica.getNoCollaudo()) { docObbligatori.add(TIPOLOGIA_ALLEGATO_A27); }
if (dettPratica.getNoCollaudo()) { */
docObbligatori.add(TIPOLOGIA_ALLEGATO_A27);
}*/
break; break;
case Constants.PROCEDURA_P6: case Constants.PROCEDURA_P6:
case Constants.PROCEDURA_P7: case Constants.PROCEDURA_P7:
@ -209,12 +196,10 @@ public class DocumentiPraticaUtil {
if (dettPratica.getTcViarch()) { if (dettPratica.getTcViarch()) {
docObbligatori.add(TIPOLOGIA_ALLEGATO_A24); docObbligatori.add(TIPOLOGIA_ALLEGATO_A24);
} }
/*if (dettPratica.getTcOperaA25()) { /*
docObbligatori.add(TIPOLOGIA_ALLEGATO_A25); * if (dettPratica.getTcOperaA25()) { docObbligatori.add(TIPOLOGIA_ALLEGATO_A25); } if
} * (dettPratica.getNoCollaudo()) { docObbligatori.add(TIPOLOGIA_ALLEGATO_A27); }
if (dettPratica.getNoCollaudo()) { */
docObbligatori.add(TIPOLOGIA_ALLEGATO_A27);
}*/
break; break;
case Constants.PROCEDURA_P8: case Constants.PROCEDURA_P8:
case Constants.PROCEDURA_Q8: case Constants.PROCEDURA_Q8:
@ -227,9 +212,9 @@ public class DocumentiPraticaUtil {
docObbligatori.add(TIPOLOGIA_ALLEGATO_A19); docObbligatori.add(TIPOLOGIA_ALLEGATO_A19);
docObbligatori.add(TIPOLOGIA_ALLEGATO_A20); docObbligatori.add(TIPOLOGIA_ALLEGATO_A20);
docObbligatori.add(TIPOLOGIA_ALLEGATO_A21); docObbligatori.add(TIPOLOGIA_ALLEGATO_A21);
/*if (dettPratica.getNoCollaudo()) { /*
docObbligatori.add(TIPOLOGIA_ALLEGATO_A27); * if (dettPratica.getNoCollaudo()) { docObbligatori.add(TIPOLOGIA_ALLEGATO_A27); }
}*/ */
break; break;
case Constants.PROCEDURA_P9: case Constants.PROCEDURA_P9:
case Constants.PROCEDURA_Q9: case Constants.PROCEDURA_Q9:
@ -246,32 +231,32 @@ public class DocumentiPraticaUtil {
docObbligatori.add(TIPOLOGIA_ALLEGATO_A19); docObbligatori.add(TIPOLOGIA_ALLEGATO_A19);
docObbligatori.add(TIPOLOGIA_ALLEGATO_A20); docObbligatori.add(TIPOLOGIA_ALLEGATO_A20);
docObbligatori.add(TIPOLOGIA_ALLEGATO_A21); docObbligatori.add(TIPOLOGIA_ALLEGATO_A21);
/*if (dettPratica.getNoCollaudo()) { /*
docObbligatori.add(TIPOLOGIA_ALLEGATO_A27); * if (dettPratica.getNoCollaudo()) { docObbligatori.add(TIPOLOGIA_ALLEGATO_A27); }
}*/ */
break; break;
case Constants.PROCEDURA_P10: case Constants.PROCEDURA_P10:
case Constants.PROCEDURA_Q10: case Constants.PROCEDURA_Q10:
docObbligatori.add(TIPOLOGIA_ALLEGATO_A12); docObbligatori.add(TIPOLOGIA_ALLEGATO_A12);
/*if (dettPratica.getNoCollaudo()) { /*
docObbligatori.add(TIPOLOGIA_ALLEGATO_A27); * if (dettPratica.getNoCollaudo()) { docObbligatori.add(TIPOLOGIA_ALLEGATO_A27); }
}*/ */
break; break;
} }
if (dettPratica.getTcCostruzioniEsistenti() || dettPratica.getTcNuovaCostruzionePertinenza() if (dettPratica.getTcCostruzioniEsistenti() || dettPratica.getTcNuovaCostruzionePertinenza()
|| dettPratica.getTcManutOrdStraord()) { || dettPratica.getTcManutOrdStraord()) {
docObbligatori.add(TIPOLOGIA_ALLEGATO_A26); docObbligatori.add(TIPOLOGIA_ALLEGATO_A26);
} }
/*if (dettPratica.getNormLavoriInProprio()) { /*
docObbligatori.add(TIPOLOGIA_ALLEGATO_A29); * if (dettPratica.getNormLavoriInProprio()) { docObbligatori.add(TIPOLOGIA_ALLEGATO_A29); }
}*/ */
if (!dettPratica.getTcNoOpereEscavazione() && if (!dettPratica.getTcNoOpereEscavazione()
(!intPratica.getTipoProcedura().equals(Constants.PROCEDURA_Q8) || && (!intPratica.getTipoProcedura().equals(Constants.PROCEDURA_Q8)
!intPratica.getTipoProcedura().equals(Constants.PROCEDURA_P8) || || !intPratica.getTipoProcedura().equals(Constants.PROCEDURA_P8)
!intPratica.getTipoProcedura().equals(Constants.PROCEDURA_Q9) || || !intPratica.getTipoProcedura().equals(Constants.PROCEDURA_Q9)
!intPratica.getTipoProcedura().equals(Constants.PROCEDURA_P9) || || !intPratica.getTipoProcedura().equals(Constants.PROCEDURA_P9)
!intPratica.getTipoProcedura().equals(Constants.PROCEDURA_Q10) || || !intPratica.getTipoProcedura().equals(Constants.PROCEDURA_Q10) || !intPratica
!intPratica.getTipoProcedura().equals(Constants.PROCEDURA_P10))) { .getTipoProcedura().equals(Constants.PROCEDURA_P10))) {
docObbligatori.add(TIPOLOGIA_ALLEGATO_A10); docObbligatori.add(TIPOLOGIA_ALLEGATO_A10);
} }
if (richiestoA24(dettPratica)) { if (richiestoA24(dettPratica)) {
@ -287,127 +272,64 @@ public class DocumentiPraticaUtil {
.getIntervNonAssoggettabile()); .getIntervNonAssoggettabile());
} }
@SuppressWarnings("serial")
public static List<String> getDocGeologo() { public static List<String> getDocGeologo() {
return new ArrayList<String>() { return Arrays
{ .<String> asList(TIPOLOGIA_ALLEGATO_A05, TIPOLOGIA_ALLEGATO_A22, TIPOLOGIA_ALLEGATO_A23,
add(TIPOLOGIA_ALLEGATO_A05); TIPOLOGIA_ALLEGATO_GEOLOGO_CAROTAGGIO, TIPOLOGIA_ALLEGATO_GEOLOGO_LABORATORIO,
add(TIPOLOGIA_ALLEGATO_A22); TIPOLOGIA_ALLEGATO_GEOLOGO_CPT, TIPOLOGIA_ALLEGATO_GEOLOGO_DPSH,
add(TIPOLOGIA_ALLEGATO_A23); TIPOLOGIA_ALLEGATO_GEOLOGO_INCLINOMETRICHE, TIPOLOGIA_ALLEGATO_GEOLOGO_GEOGNOSTICO,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_CAROTAGGIO); TIPOLOGIA_ALLEGATO_GEOLOGO_AFFIORAMENTI, TIPOLOGIA_ALLEGATO_GEOLOGO_GEOMECCANICO,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_LABORATORIO); TIPOLOGIA_ALLEGATO_GEOLOGO_RIFRAZIONE, TIPOLOGIA_ALLEGATO_GEOLOGO_MASW,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_CPT); TIPOLOGIA_ALLEGATO_GEOLOGO_HVSR, TIPOLOGIA_ALLEGATO_GEOLOGO_DH,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_DPSH); TIPOLOGIA_ALLEGATO_GEOLOGO_PROSPEZIONI, TIPOLOGIA_ALLEGATO_GEOLOGO_ARCHIVIO,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_INCLINOMETRICHE); TIPOLOGIA_ALLEGATO_GEOLOGO_ALTRO, TIPOLOGIA_ALLEGATO_GEOLOGO_VARIE);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_GEOGNOSTICO);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_AFFIORAMENTI);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_GEOMECCANICO);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_RIFRAZIONE);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_MASW);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_HVSR);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_DH);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_PROSPEZIONI);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_ARCHIVIO);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_ALTRO);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_VARIE);
}
};
} }
@SuppressWarnings("serial")
public static List<String> getIndaginiGeologiche() { public static List<String> getIndaginiGeologiche() {
return new ArrayList<String>() { return Arrays.<String> asList(TIPOLOGIA_ALLEGATO_GEOLOGO_CAROTAGGIO, TIPOLOGIA_ALLEGATO_GEOLOGO_LABORATORIO,
{ TIPOLOGIA_ALLEGATO_GEOLOGO_CPT, TIPOLOGIA_ALLEGATO_GEOLOGO_DPSH,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_CAROTAGGIO); TIPOLOGIA_ALLEGATO_GEOLOGO_INCLINOMETRICHE, TIPOLOGIA_ALLEGATO_GEOLOGO_GEOGNOSTICO,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_LABORATORIO); TIPOLOGIA_ALLEGATO_GEOLOGO_AFFIORAMENTI, TIPOLOGIA_ALLEGATO_GEOLOGO_GEOMECCANICO,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_CPT); TIPOLOGIA_ALLEGATO_GEOLOGO_RIFRAZIONE, TIPOLOGIA_ALLEGATO_GEOLOGO_MASW,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_DPSH); TIPOLOGIA_ALLEGATO_GEOLOGO_HVSR, TIPOLOGIA_ALLEGATO_GEOLOGO_DH, TIPOLOGIA_ALLEGATO_GEOLOGO_PROSPEZIONI,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_INCLINOMETRICHE); TIPOLOGIA_ALLEGATO_GEOLOGO_ARCHIVIO, TIPOLOGIA_ALLEGATO_GEOLOGO_ALTRO);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_GEOGNOSTICO);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_AFFIORAMENTI);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_GEOMECCANICO);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_RIFRAZIONE);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_MASW);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_HVSR);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_DH);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_PROSPEZIONI);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_ARCHIVIO);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_ALTRO);
}
};
} }
@SuppressWarnings("serial")
public static List<String> getDocUnivoci() { public static List<String> getDocUnivoci() {
return new ArrayList<String>() { return Arrays
{ .<String> asList(TIPOLOGIA_ALLEGATO_GEOLOGO_CAROTAGGIO, TIPOLOGIA_ALLEGATO_GEOLOGO_LABORATORIO,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_CAROTAGGIO); TIPOLOGIA_ALLEGATO_GEOLOGO_CPT, TIPOLOGIA_ALLEGATO_GEOLOGO_DPSH,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_LABORATORIO); TIPOLOGIA_ALLEGATO_GEOLOGO_INCLINOMETRICHE, TIPOLOGIA_ALLEGATO_GEOLOGO_GEOGNOSTICO,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_CPT); TIPOLOGIA_ALLEGATO_GEOLOGO_AFFIORAMENTI, TIPOLOGIA_ALLEGATO_GEOLOGO_GEOMECCANICO,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_DPSH); TIPOLOGIA_ALLEGATO_GEOLOGO_RIFRAZIONE, TIPOLOGIA_ALLEGATO_GEOLOGO_MASW,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_INCLINOMETRICHE); TIPOLOGIA_ALLEGATO_GEOLOGO_HVSR, TIPOLOGIA_ALLEGATO_GEOLOGO_DH,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_GEOGNOSTICO); TIPOLOGIA_ALLEGATO_GEOLOGO_PROSPEZIONI, TIPOLOGIA_ALLEGATO_GEOLOGO_ARCHIVIO,
add(TIPOLOGIA_ALLEGATO_GEOLOGO_AFFIORAMENTI); TIPOLOGIA_ALLEGATO_GEOLOGO_ALTRO, TIPOLOGIA_ALLEGATO_GEOLOGO_VARIE);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_GEOMECCANICO);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_RIFRAZIONE);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_MASW);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_HVSR);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_DH);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_PROSPEZIONI);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_ARCHIVIO);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_ALTRO);
add(TIPOLOGIA_ALLEGATO_GEOLOGO_VARIE);
}
};
} }
@SuppressWarnings("serial")
public static List<String> getDocFineLavori() { public static List<String> getDocFineLavori() {
return new ArrayList<String>() { return Arrays.<String> asList(TIPOLOGIA_ALLEGATO_GIORNALE_LAVORI, TIPOLOGIA_ALLEGATO_CERTIFICATO_CALCESTRUZZO,
{ TIPOLOGIA_ALLEGATO_CERTIFICATO_ACCIAIO, TIPOLOGIA_ALLEGATO_CERTIFICATO_LEGNO,
add(TIPOLOGIA_ALLEGATO_GIORNALE_LAVORI); TIPOLOGIA_ALLEGATO_CERTIFICATO_LATERIZIO, TIPOLOGIA_ALLEGATO_ALTRI_FINE_LAVORI,
add(TIPOLOGIA_ALLEGATO_CERTIFICATO_CALCESTRUZZO); TIPOLOGIA_DOCUMENTAZIONE_ALTRA_FINE_LAVORI);
add(TIPOLOGIA_ALLEGATO_CERTIFICATO_ACCIAIO);
add(TIPOLOGIA_ALLEGATO_CERTIFICATO_LEGNO);
add(TIPOLOGIA_ALLEGATO_CERTIFICATO_LATERIZIO);
add(TIPOLOGIA_ALLEGATO_ALTRI_FINE_LAVORI);
add(TIPOLOGIA_DOCUMENTAZIONE_ALTRA_FINE_LAVORI);
}
};
} }
@SuppressWarnings("serial")
public static List<String> getDocObbligatoriFineLavori() { public static List<String> getDocObbligatoriFineLavori() {
return new ArrayList<String>() { return Arrays.<String> asList(TIPOLOGIA_ALLEGATO_GIORNALE_LAVORI);
{
add(TIPOLOGIA_ALLEGATO_GIORNALE_LAVORI);
}
};
} }
@SuppressWarnings("serial")
public static List<String> getDocCollaudo() { public static List<String> getDocCollaudo() {
return new ArrayList<String>() { return Arrays.<String> asList(TIPOLOGIA_ALLEGATO_RELAZIONE_COLLAUDO, TIPOLOGIA_ALLEGATO_ALTRA_DOC);
{
add(TIPOLOGIA_ALLEGATO_RELAZIONE_COLLAUDO);
add(TIPOLOGIA_ALLEGATO_ALTRA_DOC);
}
};
} }
@SuppressWarnings("serial")
public static List<String> getDocObbligatoriCollaudo() { public static List<String> getDocObbligatoriCollaudo() {
return new ArrayList<String>() { return Arrays.<String> asList(TIPOLOGIA_ALLEGATO_RELAZIONE_COLLAUDO);
{
add(TIPOLOGIA_ALLEGATO_RELAZIONE_COLLAUDO);
}
};
} }
} }

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

@ -95,9 +95,7 @@ public class MailUtil {
allegati, serviceContext); allegati, serviceContext);
} }
/** // ADT
* ADT
*/
public static void invioNotificaAssegnazioneIstruttore(Avviso avviso) throws PortalException, SystemException { public static void invioNotificaAssegnazioneIstruttore(Avviso avviso) throws PortalException, SystemException {
_log.info("start invioNotificaAssegnazioneIstruttore: avviso_id = " + avviso.getAvvisoId() _log.info("start invioNotificaAssegnazioneIstruttore: avviso_id = " + avviso.getAvvisoId()
@ -155,9 +153,7 @@ public class MailUtil {
AvvisoLocalServiceUtil.updateAvvisoInviatoTecnico(avviso.getAvvisoId(), true); AvvisoLocalServiceUtil.updateAvvisoInviatoTecnico(avviso.getAvvisoId(), true);
} }
/** // Invio notifica istruttore dopo inserimento parere geologo
* Invio notifica istruttore dopo inserimento parere geologo
*/
public static void invioNotificaIstruttoreByGeologo(long parereGeologoId, ServiceContext serviceContext) { public static void invioNotificaIstruttoreByGeologo(long parereGeologoId, ServiceContext serviceContext) {
_log.info("start invioNotificaIstruttoreByGeologo parereGeologoId=" + parereGeologoId); _log.info("start invioNotificaIstruttoreByGeologo parereGeologoId=" + parereGeologoId);
@ -204,9 +200,6 @@ public class MailUtil {
} }
} }
/**
* Invio Notifica Geologo
*/
public static void invioNotificaGeologo(ParereGeologo parereGeologo, ServiceContext serviceContext) { public static void invioNotificaGeologo(ParereGeologo parereGeologo, ServiceContext serviceContext) {
_log.info("start invioNotificaGeologo parereGeologo=" + parereGeologo.getParereGeologoId()); _log.info("start invioNotificaGeologo parereGeologo=" + parereGeologo.getParereGeologoId());

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

@ -30,7 +30,7 @@ public abstract class PagamentiCommonUtil {
private static Log _log = LogFactoryUtil.getLog(PagamentiCommonUtil.class); private static Log _log = LogFactoryUtil.getLog(PagamentiCommonUtil.class);
private static Map<String, Integer> numeroBolliIntegrazioneMap = new HashMap<String, Integer>() { private static final Map<String, Integer> NUMERO_BOLLI_INTEGRAZIONE = new HashMap<String, Integer>() {
{ {
put(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE, 0); put(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE, 0);
put(TipoIntegrazioneUtil.FINE_LAVORI_PARZIALE, 2); put(TipoIntegrazioneUtil.FINE_LAVORI_PARZIALE, 2);
@ -46,11 +46,7 @@ public abstract class PagamentiCommonUtil {
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId); DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
if (intPratica.getTipoPratica().equals(Constants.TIPO_PRATICA_DEPOSITO)) { return intPratica.getTipoPratica().equals(Constants.TIPO_PRATICA_DEPOSITO);
return true;
} else {
return false;
}
} }
public static BigDecimal getImportoBolli(long companyId, long classPK, String className, String tipoIntegrazione) public static BigDecimal getImportoBolli(long companyId, long classPK, String className, String tipoIntegrazione)
@ -71,8 +67,7 @@ public abstract class PagamentiCommonUtil {
if (normEsenteBollo) { if (normEsenteBollo) {
return new BigDecimal("0.00"); return new BigDecimal("0.00");
} }
} catch (PortalException e) { } catch (PortalException e) {}
}
int numeroBolli = getNumeroBolli(tipoIntegrazione); int numeroBolli = getNumeroBolli(tipoIntegrazione);
BigDecimal importoBolliBigDecimal = new BigDecimal(ConfigurazioneLocalServiceUtil.findByC_ChiaveString( BigDecimal importoBolliBigDecimal = new BigDecimal(ConfigurazioneLocalServiceUtil.findByC_ChiaveString(
companyId, ConfigurazioneConstants.IMPORTO_BOLLO)); companyId, ConfigurazioneConstants.IMPORTO_BOLLO));
@ -82,16 +77,16 @@ public abstract class PagamentiCommonUtil {
public static Integer getNumeroBolli(String tipoIntegrazione) throws PortalException, SystemException { public static Integer getNumeroBolli(String tipoIntegrazione) throws PortalException, SystemException {
if (Validator.isNotNull(tipoIntegrazione)) { if (Validator.isNull(tipoIntegrazione)) {
return getNumeroBolliByTipoIntegrazione(tipoIntegrazione);
} else {
return 2; return 2;
} else {
return getNumeroBolliByTipoIntegrazione(tipoIntegrazione);
} }
} }
private static Integer getNumeroBolliByTipoIntegrazione(String tipoIntegrazione) { private static Integer getNumeroBolliByTipoIntegrazione(String tipoIntegrazione) {
return numeroBolliIntegrazioneMap.get(tipoIntegrazione); return NUMERO_BOLLI_INTEGRAZIONE.get(tipoIntegrazione);
} }
public static boolean existsSpeseIstruttoria(String tipoIntegrazione) { public static boolean existsSpeseIstruttoria(String tipoIntegrazione) {
@ -141,8 +136,8 @@ public abstract class PagamentiCommonUtil {
boolean normEsenteSpese = false; boolean normEsenteSpese = false;
boolean normEsenteBollo = false; boolean normEsenteBollo = false;
long pagamentoIdSpese = 0L; long pagamentoIdSpese = 0;
long pagamentoIdBolli = 0L; long pagamentoIdBolli = 0;
if (DettPratica.class.getName().equals(className)) { if (DettPratica.class.getName().equals(className)) {
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(classPK); DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(classPK);

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

@ -22,13 +22,11 @@ public class SoggettiUtil {
public static boolean isCommittenteAndDitta(long intPraticaId) throws SystemException { public static boolean isCommittenteAndDitta(long intPraticaId) throws SystemException {
List<Soggetto> ditte = List<Soggetto> ditte = SoggettoLocalServiceUtil.getValidTmpByDettPratica_TipologiaSoggetto(intPraticaId,
SoggettoLocalServiceUtil.getValidTmpByDettPratica_TipologiaSoggetto(intPraticaId, TipoSoggettoUtil.DITTA); TipoSoggettoUtil.DITTA);
List<Soggetto> committenti = List<Soggetto> committenti = SoggettoLocalServiceUtil.getValidTmpByDettPratica_TipologiaSoggetto(intPraticaId,
SoggettoLocalServiceUtil.getValidTmpByDettPratica_TipologiaSoggetto(intPraticaId, TipoSoggettoUtil.COMMITTENTE); TipoSoggettoUtil.COMMITTENTE);
return isCommittenteAndDitta(committenti, ditte); return isCommittenteAndDitta(committenti, ditte);
} }
public static boolean isCommittenteAndDitta(List<Soggetto> committenti, List<Soggetto> ditte) { public static boolean isCommittenteAndDitta(List<Soggetto> committenti, List<Soggetto> ditte) {
@ -40,43 +38,21 @@ public class SoggettiUtil {
} }
} }
} }
return false;
}
public static boolean isTitolareInSoggetti(long intPraticaId) throws SystemException, PortalException {
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId);
User titolareUser = UserLocalServiceUtil.getUserById(intPratica.getUserId());
String codiceFiscaleTitolare = titolareUser.getScreenName();
List<Soggetto> soggetti = SoggettoServiceUtil.getValidTmpByIntPratica(intPraticaId);
for (Soggetto soggetto : soggetti) {
if (codiceFiscaleTitolare.equalsIgnoreCase(soggetto.getCodiceFiscale())) {
return true;
}
}
return false; return false;
} }
public static boolean isTitolareInCommittenti(long intPraticaId) throws SystemException, PortalException { public static boolean isTitolareInCommittenti(long intPraticaId) throws SystemException, PortalException {
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId);
User titolareUser = UserLocalServiceUtil.getUserById(intPratica.getUserId()); User titolareUser = UserLocalServiceUtil.getUserById(intPratica.getUserId());
String codiceFiscaleTitolare = titolareUser.getScreenName(); String codiceFiscaleTitolare = titolareUser.getScreenName();
List<Soggetto> committenti = SoggettoServiceUtil.getValidTmpByIntPratica_TipologiaSoggetto(intPraticaId,
List<Soggetto> committenti = TipoSoggettoUtil.COMMITTENTE);
SoggettoServiceUtil.getValidTmpByIntPratica_TipologiaSoggetto(intPraticaId, TipoSoggettoUtil.COMMITTENTE);
for (Soggetto soggetto : committenti) { for (Soggetto soggetto : committenti) {
if (codiceFiscaleTitolare.equalsIgnoreCase(soggetto.getCodiceFiscale())) { if (codiceFiscaleTitolare.equalsIgnoreCase(soggetto.getCodiceFiscale())) {
return true; return true;
} }
} }
return false; return false;
} }
@ -84,37 +60,6 @@ public class SoggettiUtil {
SystemException { SystemException {
Soggetto soggetto = SoggettoServiceUtil.getSoggetto(soggettoId); Soggetto soggetto = SoggettoServiceUtil.getSoggetto(soggettoId);
// DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
//
// switch (soggetto.getTipologiaSoggetto()) {
// case TipoSoggettoUtil.COMMITTENTE:
// return
// soggetto.getCodiceFiscale().equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleCommittente());
//
// case TipoSoggettoUtil.COLLAUDATORE:
// return
// soggetto.getCodiceFiscale().equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleCollaudatore());
//
// case TipoSoggettoUtil.DIRETTORE_LAVORI:
// return
// soggetto.getCodiceFiscale().equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleDirettoreLavori());
//
// case TipoSoggettoUtil.PROGETTISTA:
// return
// soggetto.getCodiceFiscale().equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleProgettista());
//
// case TipoSoggettoUtil.GEOLOGO:
// return
// soggetto.getCodiceFiscale().equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleGeologo());
//
// case TipoSoggettoUtil.DITTA:
// return
// soggetto.getCodiceFiscale().equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleDitta());
//
// default:
// return false;
// }
return isSoggettoPrincipale(soggetto.getCodiceFiscale(), soggetto.getTipologiaSoggetto(), dettPraticaId); return isSoggettoPrincipale(soggetto.getCodiceFiscale(), soggetto.getTipologiaSoggetto(), dettPraticaId);
} }
@ -122,77 +67,57 @@ public class SoggettiUtil {
throws PortalException, SystemException { throws PortalException, SystemException {
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId); DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId);
switch (tipologiaSoggetto) { switch (tipologiaSoggetto) {
case TipoSoggettoUtil.COMMITTENTE: case TipoSoggettoUtil.COMMITTENTE:
return codiceFiscale.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleCommittente()); return codiceFiscale.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleCommittente());
case TipoSoggettoUtil.COLLAUDATORE: case TipoSoggettoUtil.COLLAUDATORE:
return codiceFiscale.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleCollaudatore()); return codiceFiscale.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleCollaudatore());
case TipoSoggettoUtil.DIRETTORE_LAVORI: case TipoSoggettoUtil.DIRETTORE_LAVORI:
return codiceFiscale.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleDirettoreLavori()); return codiceFiscale.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleDirettoreLavori());
case TipoSoggettoUtil.PROGETTISTA: case TipoSoggettoUtil.PROGETTISTA:
return codiceFiscale.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleProgettista()); return codiceFiscale.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleProgettista());
case TipoSoggettoUtil.GEOLOGO: case TipoSoggettoUtil.GEOLOGO:
return codiceFiscale.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleGeologo()); return codiceFiscale.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleGeologo());
case TipoSoggettoUtil.DITTA: case TipoSoggettoUtil.DITTA:
return codiceFiscale.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleDitta()); return codiceFiscale.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleDitta());
case TipoSoggettoUtil.ARCHEOLOGO: case TipoSoggettoUtil.ARCHEOLOGO:
return codiceFiscale.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleArcheologo()); return codiceFiscale.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleArcheologo());
default: default:
return false; return false;
} }
} }
public static boolean hasSoggettoPrincipale(long dettPraticaId, String tipologiaSoggetto) throws PortalException, public static boolean hasSoggettoPrincipale(long dettPraticaId, String tipologiaSoggetto) throws PortalException,
SystemException { SystemException {
DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId); DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
switch (tipologiaSoggetto) { switch (tipologiaSoggetto) {
case TipoSoggettoUtil.COMMITTENTE: case TipoSoggettoUtil.COMMITTENTE:
return Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleCommittente()); return Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleCommittente());
case TipoSoggettoUtil.COLLAUDATORE: case TipoSoggettoUtil.COLLAUDATORE:
return Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleCollaudatore()); return Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleCollaudatore());
case TipoSoggettoUtil.DIRETTORE_LAVORI: case TipoSoggettoUtil.DIRETTORE_LAVORI:
return Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleDirettoreLavori()); return Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleDirettoreLavori());
case TipoSoggettoUtil.PROGETTISTA: case TipoSoggettoUtil.PROGETTISTA:
return Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleProgettista()); return Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleProgettista());
case TipoSoggettoUtil.GEOLOGO: case TipoSoggettoUtil.GEOLOGO:
return Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleGeologo()); return Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleGeologo());
case TipoSoggettoUtil.DITTA: case TipoSoggettoUtil.DITTA:
return Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleDitta()); return Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleDitta());
default: default:
return false; return false;
} }
} }
//ADT BUG ID = 16 public static boolean isCollaudatorePresent(long dettPraticaId) throws SystemException {
public static boolean isCollaudatorePresent (long dettPraticaId) throws SystemException{ List<Soggetto> soggettiInseriti = SoggettoLocalServiceUtil.findByDettPratica(dettPraticaId);
List<Soggetto> soggettiInseriti = SoggettoLocalServiceUtil
.findByDettPratica(dettPraticaId);
boolean collaudatorePresente = false; boolean collaudatorePresente = false;
for (Soggetto soggetto : soggettiInseriti) { for (Soggetto soggetto : soggettiInseriti) {
if (soggetto.getTipologiaSoggetto().equals( if (soggetto.getTipologiaSoggetto().equals(TipoSoggettoUtil.COLLAUDATORE)) {
TipoSoggettoUtil.COLLAUDATORE)) {
collaudatorePresente = true; collaudatorePresente = true;
break; break;
} }
} }
return collaudatorePresente; return collaudatorePresente;
} }
} }

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

@ -87,7 +87,8 @@ public class ValidazionePraticaUtil {
public static boolean canEditPratica(long intPraticaId) throws PortalException, SystemException { public static boolean canEditPratica(long intPraticaId) throws PortalException, SystemException {
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId);
return (intPratica.getStatus() == WorkflowConstants.STATUS_ANY || intPratica.getStatus() == WorkflowConstants.STATUS_INCOMPLETE); return intPratica.getStatus() == WorkflowConstants.STATUS_ANY
|| intPratica.getStatus() == WorkflowConstants.STATUS_INCOMPLETE;
} }
public static boolean canDeletePratica(long intPraticaId, long userId) throws PortalException, SystemException { public static boolean canDeletePratica(long intPraticaId, long userId) throws PortalException, SystemException {
@ -132,7 +133,7 @@ public class ValidazionePraticaUtil {
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId);
DettPratica dettPratica = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId, DettPratica dettPratica = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId,
Arrays.asList(TipoIntegrazioneUtil.VARIANTE, TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE, Arrays.<String> asList(TipoIntegrazioneUtil.VARIANTE, TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE,
TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO)); TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO));
return Validator.isNotNull(dettPratica) || intPratica.getStatus() == WorkflowConstants.STATUS_ANY return Validator.isNotNull(dettPratica) || intPratica.getStatus() == WorkflowConstants.STATUS_ANY
|| intPratica.getStatus() == WorkflowConstants.STATUS_INCOMPLETE; || intPratica.getStatus() == WorkflowConstants.STATUS_INCOMPLETE;
@ -142,7 +143,7 @@ public class ValidazionePraticaUtil {
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId);
DettPratica dettPratica = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId, DettPratica dettPratica = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId,
Arrays.asList(TipoIntegrazioneUtil.VARIANTE)); Arrays.<String> asList(TipoIntegrazioneUtil.VARIANTE));
if (Validator.isNotNull(dettPratica)) { if (Validator.isNotNull(dettPratica)) {
return false; return false;
} }
@ -166,18 +167,15 @@ public class ValidazionePraticaUtil {
public static boolean praticaHasVarianteInProgress(long intPraticaId) throws SystemException, PortalException { public static boolean praticaHasVarianteInProgress(long intPraticaId) throws SystemException, PortalException {
DettPratica dettPratica = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId, DettPratica dettPratica = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId,
Arrays.asList(TipoIntegrazioneUtil.VARIANTE)); Arrays.<String> asList(TipoIntegrazioneUtil.VARIANTE));
if (Validator.isNotNull(dettPratica)) { return Validator.isNotNull(dettPratica);
return true;
}
return false;
} }
public static boolean praticaCanAddIntegrazione(long intPraticaId) throws SystemException, PortalException { public static boolean praticaCanAddIntegrazione(long intPraticaId) throws SystemException, PortalException {
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId);
DettPratica dettPratica = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId, DettPratica dettPratica = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId,
Arrays.asList(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE)); Arrays.<String> asList(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE));
if (Validator.isNotNull(dettPratica)) { if (Validator.isNotNull(dettPratica)) {
return false; return false;
} }
@ -208,7 +206,7 @@ public class ValidazionePraticaUtil {
public static boolean praticaHasIntegrazioneInProgress(long intPraticaId) throws SystemException, PortalException { public static boolean praticaHasIntegrazioneInProgress(long intPraticaId) throws SystemException, PortalException {
DettPratica dettPratica = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId, DettPratica dettPratica = DettPraticaServiceUtil.getLastEditabledByIntPraticaAndTipoPratica(intPraticaId,
Arrays.asList(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE)); Arrays.<String> asList(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE));
return Validator.isNotNull(dettPratica); return Validator.isNotNull(dettPratica);
} }
@ -222,7 +220,6 @@ public class ValidazionePraticaUtil {
PortalException { PortalException {
DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId); DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId);
return Validator.isNotNull(dettPratica) return Validator.isNotNull(dettPratica)
&& userScreenName.equalsIgnoreCase(dettPratica.getCodiceFiscaleDelegatoFineLavori()) && userScreenName.equalsIgnoreCase(dettPratica.getCodiceFiscaleDelegatoFineLavori())
&& FineLavoriLocalServiceUtil.countByIntPraticaId_Parziale_Completata(intPraticaId, false, true) == 0 && FineLavoriLocalServiceUtil.countByIntPraticaId_Parziale_Completata(intPraticaId, false, true) == 0
@ -267,7 +264,6 @@ public class ValidazionePraticaUtil {
PortalException { PortalException {
DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId); DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId);
return Validator.isNotNull(dettPratica) return Validator.isNotNull(dettPratica)
&& userScreenName.equalsIgnoreCase(dettPratica.getCodiceFiscaleDelegatoCollaudo()) && userScreenName.equalsIgnoreCase(dettPratica.getCodiceFiscaleDelegatoCollaudo())
&& FineLavoriLocalServiceUtil.countByIntPraticaId(intPraticaId) > 0 && FineLavoriLocalServiceUtil.countByIntPraticaId(intPraticaId) > 0
@ -333,7 +329,6 @@ public class ValidazionePraticaUtil {
DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId); DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
return praticaIsCompleta(dettPraticaId) && !DelegheUtil.hasDelegheCompilazioneAttive(dettPraticaId) return praticaIsCompleta(dettPraticaId) && !DelegheUtil.hasDelegheCompilazioneAttive(dettPraticaId)
&& AsseverazioniUtil.allAsseverazioniCompleted(dettPraticaId) && !dettPratica.isCompleta() && AsseverazioniUtil.allAsseverazioniCompleted(dettPraticaId) && !dettPratica.isCompleta()
&& !intPratica.getStatoPratica().equals(StatoPraticaConstants.INTEGRAZIONE) && !intPratica.getStatoPratica().equals(StatoPraticaConstants.INTEGRAZIONE)
@ -344,7 +339,6 @@ public class ValidazionePraticaUtil {
DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId); DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
return praticaIsCompleta(dettPraticaId) return praticaIsCompleta(dettPraticaId)
&& !DelegheUtil.hasDelegheCompilazioneAttive(dettPraticaId) && !DelegheUtil.hasDelegheCompilazioneAttive(dettPraticaId)
&& AsseverazioniUtil.allAsseverazioniCompleted(dettPraticaId) && AsseverazioniUtil.allAsseverazioniCompleted(dettPraticaId)
@ -357,7 +351,6 @@ public class ValidazionePraticaUtil {
public static boolean praticaCanAbort(long intPraticaId, long userId) throws SystemException, PortalException { public static boolean praticaCanAbort(long intPraticaId, long userId) throws SystemException, PortalException {
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId);
return Validator.isNotNull(intPratica) && intPratica.getUserId() == userId return Validator.isNotNull(intPratica) && intPratica.getUserId() == userId
&& intPratica.getStatus() != WorkflowConstants.STATUS_ANY && intPratica.getStatus() != WorkflowConstants.STATUS_ANY
&& intPratica.getStatus() != WorkflowConstants.STATUS_INCOMPLETE && intPratica.getStatus() != WorkflowConstants.STATUS_INCOMPLETE
@ -411,7 +404,6 @@ public class ValidazionePraticaUtil {
default: default:
return Collections.emptyList(); return Collections.emptyList();
} }
} }
private static List<String> notCompletedDettagliPrincipali(long dettPraticaId) throws PortalException, private static List<String> notCompletedDettagliPrincipali(long dettPraticaId) throws PortalException,
@ -508,9 +500,7 @@ public class ValidazionePraticaUtil {
return notCompleted; return notCompleted;
} }
/** // ADT
* ADT
*/
public static boolean isCollaudatoreRequired(DettPratica dettPratica) { public static boolean isCollaudatoreRequired(DettPratica dettPratica) {
return dettPratica.getNoCollaudo() || dettPratica.getCollaudoStatico(); return dettPratica.getNoCollaudo() || dettPratica.getCollaudoStatico();
@ -530,7 +520,6 @@ public class ValidazionePraticaUtil {
|| dettPratica.getNominaImpresa(); || dettPratica.getNominaImpresa();
List<String> soggettiRichiesti = new ArrayList<>(); List<String> soggettiRichiesti = new ArrayList<>();
List<String> notCompleted = new ArrayList<>(); List<String> notCompleted = new ArrayList<>();
switch (intPratica.getTipoProcedura()) { switch (intPratica.getTipoProcedura()) {
case Constants.PROCEDURA_P1: case Constants.PROCEDURA_P1:
case Constants.PROCEDURA_Q1: case Constants.PROCEDURA_Q1:
@ -541,7 +530,6 @@ public class ValidazionePraticaUtil {
soggettiRichiesti.add(TipoSoggettoUtil.COMMITTENTE); soggettiRichiesti.add(TipoSoggettoUtil.COMMITTENTE);
soggettiRichiesti.add(TipoSoggettoUtil.PROGETTISTA); soggettiRichiesti.add(TipoSoggettoUtil.PROGETTISTA);
break; break;
case Constants.PROCEDURA_P2: case Constants.PROCEDURA_P2:
case Constants.PROCEDURA_P4: case Constants.PROCEDURA_P4:
case Constants.PROCEDURA_P5: case Constants.PROCEDURA_P5:
@ -558,19 +546,16 @@ public class ValidazionePraticaUtil {
soggettiRichiesti.add(TipoSoggettoUtil.DIRETTORE_LAVORI); soggettiRichiesti.add(TipoSoggettoUtil.DIRETTORE_LAVORI);
soggettiRichiesti.add(TipoSoggettoUtil.COLLAUDATORE); soggettiRichiesti.add(TipoSoggettoUtil.COLLAUDATORE);
break; break;
case Constants.PROCEDURA_P3: case Constants.PROCEDURA_P3:
case Constants.PROCEDURA_Q3: case Constants.PROCEDURA_Q3:
soggettiRichiesti.add(TipoSoggettoUtil.COMMITTENTE); soggettiRichiesti.add(TipoSoggettoUtil.COMMITTENTE);
soggettiRichiesti.add(TipoSoggettoUtil.PROGETTISTA); soggettiRichiesti.add(TipoSoggettoUtil.PROGETTISTA);
soggettiRichiesti.add(TipoSoggettoUtil.ARCHEOLOGO); soggettiRichiesti.add(TipoSoggettoUtil.ARCHEOLOGO);
break; break;
case Constants.PROCEDURA_P10: case Constants.PROCEDURA_P10:
case Constants.PROCEDURA_Q10: case Constants.PROCEDURA_Q10:
soggettiRichiesti.add(TipoSoggettoUtil.COMMITTENTE); soggettiRichiesti.add(TipoSoggettoUtil.COMMITTENTE);
break; break;
} }
boolean isDelegaCommittente = SoggettiUtil.isTitolareInCommittenti(intPraticaId) boolean isDelegaCommittente = SoggettiUtil.isTitolareInCommittenti(intPraticaId)
|| Validator.isNotNull(dettPratica.getCodiceFiscaleDelegatoCommittente()); || Validator.isNotNull(dettPratica.getCodiceFiscaleDelegatoCommittente());
@ -589,7 +574,6 @@ public class ValidazionePraticaUtil {
if (!isDelegaCollaudo) { if (!isDelegaCollaudo) {
notCompleted.add("delega-collaudatore"); notCompleted.add("delega-collaudatore");
} }
List<Soggetto> soggettiPratica = SoggettoLocalServiceUtil.getValidTmpByIntPratica(intPraticaId); List<Soggetto> soggettiPratica = SoggettoLocalServiceUtil.getValidTmpByIntPratica(intPraticaId);
boolean dlPresente = false; boolean dlPresente = false;
boolean collaudatorePresente = false; boolean collaudatorePresente = false;
@ -597,47 +581,84 @@ public class ValidazionePraticaUtil {
boolean progettistaPresente = false; boolean progettistaPresente = false;
for (Soggetto soggetto : soggettiPratica) { for (Soggetto soggetto : soggettiPratica) {
soggettiRichiesti.remove(soggetto.getTipologiaSoggetto()); soggettiRichiesti.remove(soggetto.getTipologiaSoggetto());
if(soggetto.getTipologiaSoggetto() == TipoSoggettoUtil.DIRETTORE_LAVORI) if (TipoSoggettoUtil.DIRETTORE_LAVORI.equals(soggetto.getTipologiaSoggetto())) {
dlPresente = true; dlPresente = true;
if(soggetto.getTipologiaSoggetto() == TipoSoggettoUtil.COLLAUDATORE) } else if (TipoSoggettoUtil.COLLAUDATORE.equals(soggetto.getTipologiaSoggetto())) {
collaudatorePresente = true; collaudatorePresente = true;
if(soggetto.getTipologiaSoggetto() == TipoSoggettoUtil.DITTA) } else if (TipoSoggettoUtil.DITTA.equals(soggetto.getTipologiaSoggetto())) {
dittaPresente = true; dittaPresente = true;
if(soggetto.getTipologiaSoggetto() == TipoSoggettoUtil.PROGETTISTA) } else if (TipoSoggettoUtil.PROGETTISTA.equals(soggetto.getTipologiaSoggetto())) {
progettistaPresente = true; progettistaPresente = true;
} }
}
if (direttoreLavoriNotRequired) { if (direttoreLavoriNotRequired) {
soggettiRichiesti.remove(TipoSoggettoUtil.DIRETTORE_LAVORI); soggettiRichiesti.remove(TipoSoggettoUtil.DIRETTORE_LAVORI);
if(dlPresente) if (dlPresente) {
notCompleted.add("Rimuovere "+LanguageUtil.get(LocaleUtil.getDefault(), "gc-soggetto-"+TipoSoggettoUtil.DIRETTORE_LAVORI)+" da soggetti censiti"); StringBuilder sb = new StringBuilder();
sb.append("Rimuovere ")
.append(LanguageUtil.get(LocaleUtil.getDefault(), "gc-soggetto-"
+ TipoSoggettoUtil.DIRETTORE_LAVORI)).append(" da soggetti censiti o deselezionare \"");
if (dettPratica.getNormLavoriNoDirettore()) {
sb.append(LanguageUtil.get(LocaleUtil.getDefault(),
LanguageUtil.get(LocaleUtil.getDefault(), "norm-lavori-no-direttore")));
} else if (dettPratica.getNominaDirettoreLavori()) {
sb.append(LanguageUtil.get(LocaleUtil.getDefault(),
LanguageUtil.get(LocaleUtil.getDefault(), "nomina-direttore-lavori")));
}
sb.append(StringPool.QUOTE);
notCompleted.add(sb.toString());
}
} }
if (collaudatoreNotRequired) { if (collaudatoreNotRequired) {
soggettiRichiesti.remove(TipoSoggettoUtil.COLLAUDATORE); soggettiRichiesti.remove(TipoSoggettoUtil.COLLAUDATORE);
if(collaudatorePresente) if (collaudatorePresente) {
notCompleted.add("Rimuovere "+LanguageUtil.get(LocaleUtil.getDefault(), "gc-soggetto-"+TipoSoggettoUtil.COLLAUDATORE)+" da soggetti censiti"); StringBuilder sb = new StringBuilder();
sb.append("Rimuovere ")
.append(LanguageUtil.get(LocaleUtil.getDefault(), "gc-soggetto-"
+ TipoSoggettoUtil.COLLAUDATORE)).append(" da soggetti censiti o deselezionare \"");
if (dettPratica.getNoCollaudo()) {
sb.append(LanguageUtil.get(LocaleUtil.getDefault(),
LanguageUtil.get(LocaleUtil.getDefault(), "no-collaudo")));
} else if (dettPratica.getCollaudoStatico()) {
sb.append(LanguageUtil.get(LocaleUtil.getDefault(),
LanguageUtil.get(LocaleUtil.getDefault(), "collaudo-statico")));
}
sb.append(StringPool.QUOTE);
notCompleted.add(sb.toString());
}
} }
if (dittaNotRequired) { if (dittaNotRequired) {
soggettiRichiesti.remove(TipoSoggettoUtil.DITTA); soggettiRichiesti.remove(TipoSoggettoUtil.DITTA);
if(dittaPresente) if (dittaPresente) {
notCompleted.add("Rimuovere "+LanguageUtil.get(LocaleUtil.getDefault(), "gc-soggetto-"+TipoSoggettoUtil.DITTA)+" da soggetti censiti"); StringBuilder sb = new StringBuilder();
} sb.append("Rimuovere ")
.append(LanguageUtil.get(LocaleUtil.getDefault(), "gc-soggetto-"
if(collaudatorePresente){ + TipoSoggettoUtil.DITTA)).append(" da soggetti censiti o deselezionare \"");
if (dettPratica.getNormLavoriInProprio()) {
sb.append(LanguageUtil.get(LocaleUtil.getDefault(),
LanguageUtil.get(LocaleUtil.getDefault(), "norm-lavori-in-proprio")));
} else if (dettPratica.getNominaImpresa()) {
sb.append(LanguageUtil.get(LocaleUtil.getDefault(),
LanguageUtil.get(LocaleUtil.getDefault(), "nomina-impresa")));
}
sb.append(StringPool.QUOTE);
notCompleted.add(sb.toString());
}
}
if (collaudatorePresente) {
String codFiscaleCollaudatore = dettPratica.getCodiceFiscalePrincipaleCollaudatore(); String codFiscaleCollaudatore = dettPratica.getCodiceFiscalePrincipaleCollaudatore();
if(Validator.isNotNull(dettPratica.getCodiceFiscaleDelegatoCollaudo())) if (Validator.isNotNull(dettPratica.getCodiceFiscaleDelegatoCollaudo())) {
codFiscaleCollaudatore = dettPratica.getCodiceFiscaleDelegatoCollaudo(); codFiscaleCollaudatore = dettPratica.getCodiceFiscaleDelegatoCollaudo();
}
if(progettistaPresente && codFiscaleCollaudatore.equals(dettPratica.getCodiceFiscalePrincipaleProgettista())) if (progettistaPresente
&& codFiscaleCollaudatore.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleProgettista())) {
notCompleted.add("Il collaudatore non può essere il progettista"); notCompleted.add("Il collaudatore non può essere il progettista");
}
if(dlPresente && codFiscaleCollaudatore.equals(dettPratica.getCodiceFiscalePrincipaleDirettoreLavori())) if (dlPresente
&& codFiscaleCollaudatore.equalsIgnoreCase(dettPratica.getCodiceFiscalePrincipaleDirettoreLavori())) {
notCompleted.add("Il collaudatore non può essere il direttore lavori"); notCompleted.add("Il collaudatore non può essere il direttore lavori");
} }
}
for (String soggetto : soggettiRichiesti) { for (String soggetto : soggettiRichiesti) {
notCompleted.add("gc-soggetto-" + soggetto + "-principale-not-present"); notCompleted.add("gc-soggetto-" + soggetto + "-principale-not-present");
} }
@ -648,24 +669,8 @@ public class ValidazionePraticaUtil {
return notCompleted; return notCompleted;
} }
@SuppressWarnings("serial") private static final List<String> INFRASTRUTTURE = Arrays.<String> asList("1A", "2A", "A4A", "A4B", "A4C", "A4D",
private static final List<String> infrastrutture = new ArrayList<String>() { "A4E", "A4F", "A5A", "B4A", "B4B", "B4C", "B5A");
{
add("1A");
add("2A");
add("A4A");
add("A4B");
add("A4C");
add("A4D");
add("A4E");
add("A4F");
add("A5A");
add("B4A");
add("B4B");
add("B4C");
add("B5A");
}
};
private static List<String> notCompletedDescrizioneEdificio(long dettPraticaId) throws PortalException, private static List<String> notCompletedDescrizioneEdificio(long dettPraticaId) throws PortalException,
SystemException { SystemException {
@ -684,7 +689,7 @@ public class ValidazionePraticaUtil {
return notCompleted; return notCompleted;
} }
// se infrastruttura controllo solo DATI INFRASTRUTTURA // se infrastruttura controllo solo DATI INFRASTRUTTURA
if (infrastrutture.contains(dettPratica.getDestinazione())) { if (INFRASTRUTTURE.contains(dettPratica.getDestinazione())) {
boolean isCompleted = dettPratica.getDeInfStradaleStrada() || dettPratica.getDeInfStradalePonte() boolean isCompleted = dettPratica.getDeInfStradaleStrada() || dettPratica.getDeInfStradalePonte()
|| dettPratica.getDeInfStradaleAltro() || dettPratica.getDeInfIdraulicaLong() || dettPratica.getDeInfStradaleAltro() || dettPratica.getDeInfIdraulicaLong()
|| dettPratica.getDeInfIdraulicaTrasv() || dettPratica.getDeInfIdraulicaAltro() || dettPratica.getDeInfIdraulicaTrasv() || dettPratica.getDeInfIdraulicaAltro()
@ -822,31 +827,22 @@ public class ValidazionePraticaUtil {
+ LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-A22")); + LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-A22"));
} }
} }
if ((Validator.isNotNull(pericolositaGeomorfologicaPai) && !pericolositaGeomorfologicaPai if ((Validator.isNotNull(pericolositaGeomorfologicaPai) && !pericolositaGeomorfologicaPai
.equalsIgnoreCase("NA")) .equalsIgnoreCase("NA"))
|| (Validator.isNotNull(rischioGeomorfologicoPai) && !rischioGeomorfologicoPai.equalsIgnoreCase("NA")) || (Validator.isNotNull(rischioGeomorfologicoPai) && !rischioGeomorfologicoPai.equalsIgnoreCase("NA"))
|| (Validator.isNotNull(pericolositaIdraulicaPai) && !pericolositaIdraulicaPai.equalsIgnoreCase("NA")) || (Validator.isNotNull(pericolositaIdraulicaPai) && !pericolositaIdraulicaPai.equalsIgnoreCase("NA"))
|| (Validator.isNotNull(rischioIdraulicoPai) && !rischioIdraulicoPai.equalsIgnoreCase("NA"))) { || (Validator.isNotNull(rischioIdraulicoPai) && !rischioIdraulicoPai.equalsIgnoreCase("NA"))) {
if (DocPraticaLocalServiceUtil.getValidTmpByIntPratica_Tipologia(dettPratica.getIntPraticaId(), "A23", if (DocPraticaLocalServiceUtil.getValidTmpByIntPratica_Tipologia(dettPratica.getIntPraticaId(), "A23",
QueryUtil.ALL_POS, QueryUtil.ALL_POS).isEmpty()) { QueryUtil.ALL_POS, QueryUtil.ALL_POS).isEmpty()) {
notCompleted.add("Nessun allegato per A23 - " notCompleted.add("Nessun allegato per A23 - "
+ LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-A23")); + LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-A23"));
} }
if (DocPraticaLocalServiceUtil.getValidTmpByIntPratica_Tipologia(dettPratica.getIntPraticaId(), "A22", if (DocPraticaLocalServiceUtil.getValidTmpByIntPratica_Tipologia(dettPratica.getIntPraticaId(), "A22",
QueryUtil.ALL_POS, QueryUtil.ALL_POS).isEmpty()) { QueryUtil.ALL_POS, QueryUtil.ALL_POS).isEmpty()) {
notCompleted.add("Nessun allegato per A22 - " notCompleted.add("Nessun allegato per A22 - "
+ LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-A22")); + LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-A22"));
} }
} }
/*
* int indaginiGeologiche = DocPraticaLocalServiceUtil.countValidTmpByIntPratica_Tipologie(
* dettPratica.getIntPraticaId(), DocumentiPraticaUtil.getIndaginiGeologiche().toArray(new String[0])); if
* (indaginiGeologiche == 0) { notCompleted.add("Indagini Geologiche non presenti"); }
*/
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
notCompleted.addAll(firmeMancanti(intPratica, dettPratica, DocumentiPraticaUtil.getDocGeologo())); notCompleted.addAll(firmeMancanti(intPratica, dettPratica, DocumentiPraticaUtil.getDocGeologo()));
return notCompleted; return notCompleted;
@ -1057,7 +1053,6 @@ public class ValidazionePraticaUtil {
for (DocPratica doc : docs) { for (DocPratica doc : docs) {
FirmeBean firme = FirmeUtil.deserialize(doc.getJsonFirmatari()); FirmeBean firme = FirmeUtil.deserialize(doc.getJsonFirmatari());
List<String> signatures = firme.allSignatures(); List<String> signatures = firme.allSignatures();
if (!isAllRequiredValid(codiceDoc, intPraticaId, signatures, TipoSoggettoUtil.getAllSubjects(), doc)) { if (!isAllRequiredValid(codiceDoc, intPraticaId, signatures, TipoSoggettoUtil.getAllSubjects(), doc)) {
return false; // Return false if is required per this subjectType but it is not present return false; // Return false if is required per this subjectType but it is not present
} }
@ -1163,28 +1158,14 @@ public class ValidazionePraticaUtil {
throws PortalException, SystemException { throws PortalException, SystemException {
List<String> firme = new ArrayList<>(); List<String> firme = new ArrayList<>();
if (firmeObbligatorie.containsKey(tipologiaAllegato)) { if (FIRME_OBBLIGATORIE.containsKey(tipologiaAllegato)) {
firme.addAll(firmeObbligatorie.get(tipologiaAllegato)); firme.addAll(FIRME_OBBLIGATORIE.get(tipologiaAllegato));
} }
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
/*
* if (intPratica.getTipoProcedura().equals(Constants.PROCEDURA_P8) ||
* intPratica.getTipoProcedura().equals(Constants.PROCEDURA_P9) || dettPratica.getNormLavoriNoDirettore() ||
* intPratica.getTipoProcedura().equals(Constants.PROCEDURA_Q8) ||
* intPratica.getTipoProcedura().equals(Constants.PROCEDURA_Q9)) {
* firme.remove(TipoSoggettoUtil.DIRETTORE_LAVORI); }
*/
/*if (intPratica.getTipoProcedura().equals(Constants.PROCEDURA_P9)
|| intPratica.getTipoProcedura().equals(Constants.PROCEDURA_Q9)) {
firme.remove(TipoSoggettoUtil.PROGETTISTA);
}*/
if (intPratica.getTipoProcedura().equals(Constants.PROCEDURA_P10) if (intPratica.getTipoProcedura().equals(Constants.PROCEDURA_P10)
|| intPratica.getTipoProcedura().equals(Constants.PROCEDURA_Q10)) { || intPratica.getTipoProcedura().equals(Constants.PROCEDURA_Q10)) {
firme.remove(TipoSoggettoUtil.PROGETTISTA); firme.remove(TipoSoggettoUtil.PROGETTISTA);
// firme.remove(TipoSoggettoUtil.DIRETTORE_LAVORI);
} }
List<Soggetto> soggetti = SoggettoLocalServiceUtil.getValidTmpByIntPratica(dettPratica.getIntPraticaId()); List<Soggetto> soggetti = SoggettoLocalServiceUtil.getValidTmpByIntPratica(dettPratica.getIntPraticaId());
boolean dir_lavori = false; boolean dir_lavori = false;
for (Soggetto soggetto : soggetti) { for (Soggetto soggetto : soggetti) {
@ -1193,142 +1174,45 @@ public class ValidazionePraticaUtil {
break; break;
} }
} }
if (!dir_lavori) if (!dir_lavori)
firme.remove(TipoSoggettoUtil.DIRETTORE_LAVORI); firme.remove(TipoSoggettoUtil.DIRETTORE_LAVORI);
return firme; return firme;
} }
@SuppressWarnings("serial") @SuppressWarnings("serial")
private static final Map<String, List<String>> firmeObbligatorie = new HashMap<String, List<String>>(19) { private static final Map<String, List<String>> FIRME_OBBLIGATORIE = new HashMap<String, List<String>>(19) {
{
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A01, new ArrayList<String>() {
{
add(TipoSoggettoUtil.TITOLARE_DIGITALE);
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A02, new ArrayList<String>() {
{
add(TipoSoggettoUtil.TITOLARE_DIGITALE);
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A03, new ArrayList<String>() {
{
add(TipoSoggettoUtil.TITOLARE_DIGITALE);
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A04, new ArrayList<String>() {
{
add(TipoSoggettoUtil.TITOLARE_DIGITALE);
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A05, new ArrayList<String>() {
{
add(TipoSoggettoUtil.TITOLARE_DIGITALE);
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
add(TipoSoggettoUtil.GEOLOGO);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A09, new ArrayList<String>() {
{
add(TipoSoggettoUtil.TITOLARE_DIGITALE);
add(TipoSoggettoUtil.PROGETTISTA);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A10, new ArrayList<String>() {
{
add(TipoSoggettoUtil.TITOLARE_DIGITALE);
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A11, new ArrayList<String>() {
{
add(TipoSoggettoUtil.TITOLARE_DIGITALE);
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A12, new ArrayList<String>() {
{
add(TipoSoggettoUtil.TITOLARE_DIGITALE);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A15, new ArrayList<String>() {
{ {
add(TipoSoggettoUtil.TITOLARE_DIGITALE); put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A01, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE,
} TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
}); put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A02, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE,
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A16, new ArrayList<String>() { TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
{ put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A03, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE,
add(TipoSoggettoUtil.TITOLARE_DIGITALE); TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
} put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A04, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE,
}); TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A17, new ArrayList<String>() { put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A05, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE,
{ TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI, TipoSoggettoUtil.GEOLOGO));
add(TipoSoggettoUtil.TITOLARE_DIGITALE); put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A09,
} Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE, TipoSoggettoUtil.PROGETTISTA));
}); put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A10, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE,
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A18, new ArrayList<String>() { TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
{ put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A11, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE,
add(TipoSoggettoUtil.TITOLARE_DIGITALE); TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI));
} put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A12, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE));
}); put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A15, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE));
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A19, new ArrayList<String>() { put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A16, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE));
{ put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A17, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE));
add(TipoSoggettoUtil.TITOLARE_DIGITALE); put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A18, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE));
} put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A19, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE));
}); put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A20, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE));
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A20, new ArrayList<String>() { put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A21, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE));
{ put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A22, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE,
add(TipoSoggettoUtil.TITOLARE_DIGITALE); TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI, TipoSoggettoUtil.GEOLOGO));
} put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A23, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE,
}); TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI, TipoSoggettoUtil.GEOLOGO));
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A21, new ArrayList<String>() { put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A24, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE,
{ TipoSoggettoUtil.PROGETTISTA, TipoSoggettoUtil.DIRETTORE_LAVORI, TipoSoggettoUtil.ARCHEOLOGO));
add(TipoSoggettoUtil.TITOLARE_DIGITALE); put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A28, Arrays.<String> asList(TipoSoggettoUtil.TITOLARE_DIGITALE));
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A22, new ArrayList<String>() {
{
add(TipoSoggettoUtil.TITOLARE_DIGITALE);
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
add(TipoSoggettoUtil.GEOLOGO);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A23, new ArrayList<String>() {
{
add(TipoSoggettoUtil.TITOLARE_DIGITALE);
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
add(TipoSoggettoUtil.GEOLOGO);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A24, new ArrayList<String>() {
{
add(TipoSoggettoUtil.TITOLARE_DIGITALE);
add(TipoSoggettoUtil.PROGETTISTA);
add(TipoSoggettoUtil.DIRETTORE_LAVORI);
add(TipoSoggettoUtil.ARCHEOLOGO);
}
});
put(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_A28, new ArrayList<String>() {
{
add(TipoSoggettoUtil.TITOLARE_DIGITALE);
}
});
} }
}; };
} }

20
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/RicercaPosizionePortlet.java

@ -11,7 +11,7 @@ import it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.Arrays;
import java.util.List; import java.util.List;
import javax.portlet.ActionRequest; import javax.portlet.ActionRequest;
@ -40,22 +40,12 @@ public class RicercaPosizionePortlet extends MVCPortlet {
private static final Log _log = LogFactoryUtil.getLog(RicercaPosizionePortlet.class); private static final Log _log = LogFactoryUtil.getLog(RicercaPosizionePortlet.class);
@SuppressWarnings("serial") @SuppressWarnings("serial")
private static final List<String> campi = new ArrayList<String>() { private static final List<String> CAMPI = Arrays.<String> asList("tabs1", "numeroProgetto", "provincia", "comune",
{ "via", "lat", "long", "raggio");
add("tabs1");
add("numeroProgetto");
add("provincia");
add("comune");
add("via");
add("lat");
add("long");
add("raggio");
}
};
public void ricerca(ActionRequest actionRequest, ActionResponse actionResponse) { public void ricerca(ActionRequest actionRequest, ActionResponse actionResponse) {
for (String campo : campi) { for (String campo : CAMPI) {
String val = ParamUtil.getString(actionRequest, campo, StringPool.BLANK); String val = ParamUtil.getString(actionRequest, campo, StringPool.BLANK);
actionResponse.setRenderParameter(campo, val); actionResponse.setRenderParameter(campo, val);
} }
@ -103,7 +93,6 @@ public class RicercaPosizionePortlet extends MVCPortlet {
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(companyId, codice); Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(companyId, codice);
object.put("id", provincia.getCodiceProvincia()); object.put("id", provincia.getCodiceProvincia());
object.put("nome", provincia.getProvincia()); object.put("nome", provincia.getProvincia());
array.put(object); array.put(object);
} }
writeJSON(resourceRequest, resourceResponse, array); writeJSON(resourceRequest, resourceResponse, array);
@ -117,7 +106,6 @@ public class RicercaPosizionePortlet extends MVCPortlet {
Comune comune = ComuneLocalServiceUtil.getComune(comuneId); Comune comune = ComuneLocalServiceUtil.getComune(comuneId);
object.put("id", comune.getComuneId()); object.put("id", comune.getComuneId());
object.put("nome", comune.getDenominazione()); object.put("nome", comune.getDenominazione());
array.put(object); array.put(object);
} }
} }

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

@ -3,6 +3,7 @@ package it.mwg.sismica.bo.util;
import it.tref.liferay.portos.bo.model.impl.DettPraticaImpl; import it.tref.liferay.portos.bo.model.impl.DettPraticaImpl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
@ -42,80 +43,23 @@ public class DomandaUtil {
} }
} }
} }
@SuppressWarnings("serial") List<String> hiddenFields = Arrays.<String> asList("causalePagamentoBolli", "causalePagamentoOneri",
List<String> hiddenFields = new ArrayList<String>() { "codicePagamentoBolli", "codicePagamentoOneri", "companyId", "completa", "createDate",
{ "dataEffettuazione", "dettPraticaId", "dtInvioSignal", "dtProtocollo", "geoDtRelazione", "gestita",
add("causalePagamentoBolli"); "groupId", "importoBolli", "importoSpeseIstruttoria", "integrazione", "intPraticaId",
add("causalePagamentoOneri"); "mezzoPagamentoBolli", "mezzoPagamentoOneri", "modifiedDate", "pagAdeguamentoSismico",
add("codicePagamentoBolli"); "pagAltriCasiCulturali", "pagAltriCasiPaesaggistici", "pagAltro", "pagamentoIdBolli",
add("codicePagamentoOneri"); "pagamentoIdOneri", "pagCalcolatoAdeguamentoSismico", "pagCalcolatoMiglioramentoSismico",
add("companyId"); "pagCalcolatoOperaNonQuantificabile", "pagCalcolatoRiparazioneInterventoLocale", "pagCondotte",
add("completa"); "pagConsultazioniArchivio", "pagEffettivoAdeguamentoSismico", "pagEffettivoMiglioramentoSismico",
add("createDate"); "pagEffettivoOperaNonQuantificabile", "pagEffettivoRiparazioneInterventoLocale", "pagGrandiStrutture",
add("dataEffettuazione"); "pagImmobiliPreesistenti", "pagImpiantiEolici", "pagInterventiRestauroManufatti", "pagLottizzazioni",
add("dettPraticaId"); "pagManifestiPubblicitari", "pagMiglioramentoSismico", "pagMiglioramentoSismicoSicilia",
add("dtInvioSignal"); "pagNoteUtente", "pagNuovaCostruzione", "pagNuoveRealizzazioni", "pagOperaNonQuantificabile",
add("dtProtocollo"); "pagPalificazioni", "pagPareriDiMassima", "pagRilascioAttestazioni", "pagRiparazioneInterventoLocale",
add("geoDtRelazione"); "pagSoggettiAdAutorizzazione", "pagVarianti", "pagVariantiPareriResi", "protocollo",
add("gestita"); "soggettoSostituitoId", "status", "statusByUserId", "statusByUserName", "statusDate", "statusTask",
add("groupId"); "tipoIntegrazione", "uuid_", "userId", "userName", "varianteNumero", "version");
add("importoBolli");
add("importoSpeseIstruttoria");
add("integrazione");
add("intPraticaId");
add("mezzoPagamentoBolli");
add("mezzoPagamentoOneri");
add("modifiedDate");
add("pagAdeguamentoSismico");
add("pagAltriCasiCulturali");
add("pagAltriCasiPaesaggistici");
add("pagAltro");
add("pagamentoIdBolli");
add("pagamentoIdOneri");
add("pagCalcolatoAdeguamentoSismico");
add("pagCalcolatoMiglioramentoSismico");
add("pagCalcolatoOperaNonQuantificabile");
add("pagCalcolatoRiparazioneInterventoLocale");
add("pagCondotte");
add("pagConsultazioniArchivio");
add("pagEffettivoAdeguamentoSismico");
add("pagEffettivoMiglioramentoSismico");
add("pagEffettivoOperaNonQuantificabile");
add("pagEffettivoRiparazioneInterventoLocale");
add("pagGrandiStrutture");
add("pagImmobiliPreesistenti");
add("pagImpiantiEolici");
add("pagInterventiRestauroManufatti");
add("pagLottizzazioni");
add("pagManifestiPubblicitari");
add("pagMiglioramentoSismico");
add("pagMiglioramentoSismicoSicilia");
add("pagNoteUtente");
add("pagNuovaCostruzione");
add("pagNuoveRealizzazioni");
add("pagOperaNonQuantificabile");
add("pagPalificazioni");
add("pagPareriDiMassima");
add("pagRilascioAttestazioni");
add("pagRiparazioneInterventoLocale");
add("pagSoggettiAdAutorizzazione");
add("pagVarianti");
add("pagVariantiPareriResi");
add("protocollo");
add("soggettoSostituitoId");
add("status");
add("statusByUserId");
add("statusByUserName");
add("statusDate");
add("statusTask");
add("tipoIntegrazione");
add("uuid_");
add("userId");
add("userName");
add("varianteNumero");
add("version");
}
};
DETT_PRATICA_FIELDS = new ArrayList<>(); DETT_PRATICA_FIELDS = new ArrayList<>();
DETT_PRATICA_FIELDS_TYPES = new HashMap<>(); DETT_PRATICA_FIELDS_TYPES = new HashMap<>();
for (int i = 0; i < DettPraticaImpl.TABLE_COLUMNS.length; i++) { for (int i = 0; i < DettPraticaImpl.TABLE_COLUMNS.length; i++) {

37
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DettPraticaImpl.java

@ -1,28 +1,19 @@
/** /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
* * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* any later version. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/ */
package it.tref.liferay.portos.bo.model.impl; package it.tref.liferay.portos.bo.model.impl;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil;
import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil;
import it.tref.liferay.portos.bo.util.AzioniPraticheUtil; import it.tref.liferay.portos.bo.util.AzioniPraticheUtil;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.LinkedHashMap;
import java.util.Locale; import java.util.Locale;
import java.util.Map;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.exception.SystemException;
@ -37,7 +28,6 @@ import com.liferay.portal.kernel.util.Validator;
/** /**
* The extended model implementation for the DettPratica service. Represents a row in the * The extended model implementation for the DettPratica service. Represents a row in the
* &quot;portos_bo_DettPratica&quot; database table, with each column mapped to a property of this class. * &quot;portos_bo_DettPratica&quot; database table, with each column mapped to a property of this class.
*
* <p> * <p>
* Helper methods and all application logic should be put in this class. Whenever methods are added, rerun * 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.DettPratica} interface. * ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.bo.model.DettPratica} interface.
@ -55,22 +45,7 @@ public class DettPraticaImpl extends DettPraticaBaseImpl {
private static final Log _log = LogFactoryUtil.getLog(DettPraticaImpl.class); private static final Log _log = LogFactoryUtil.getLog(DettPraticaImpl.class);
public DettPraticaImpl() { public DettPraticaImpl() {}
}
public Map<String, String> getTipologieSoggetto(){
Map<String, String> soggetti = SoggettoLocalServiceUtil.getTipologieSoggetti();
if(getNoCollaudo() || getNominaCollaudatore())
soggetti.remove(TipoSoggettoUtil.COLLAUDATORE);
if(getNormLavoriNoDirettore() || getNominaDirettoreLavori())
soggetti.remove(TipoSoggettoUtil.DIRETTORE_LAVORI);
if(getNormLavoriInProprio() || getNominaImpresa())
soggetti.remove(TipoSoggettoUtil.DITTA);
return soggetti;
}
@Override @Override
public String getTitle(Locale locale) { public String getTitle(Locale locale) {

46
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java

@ -1,13 +1,9 @@
/** /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
* * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* any later version. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/ */
package it.tref.liferay.portos.bo.model.impl; package it.tref.liferay.portos.bo.model.impl;
@ -36,6 +32,7 @@ import org.apache.commons.lang.StringUtils;
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.util.HtmlUtil;
import com.liferay.portal.kernel.util.LocaleUtil; import com.liferay.portal.kernel.util.LocaleUtil;
import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
@ -43,7 +40,6 @@ import com.liferay.portal.kernel.util.Validator;
/** /**
* The extended model implementation for the IntPratica service. Represents a row in the * The extended model implementation for the IntPratica service. Represents a row in the
* &quot;portos_bo_IntPratica&quot; database table, with each column mapped to a property of this class. * &quot;portos_bo_IntPratica&quot; database table, with each column mapped to a property of this class.
*
* <p> * <p>
* Helper methods and all application logic should be put in this class. Whenever methods are added, rerun * 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.IntPratica} interface. * ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.bo.model.IntPratica} interface.
@ -61,8 +57,7 @@ public class IntPraticaImpl extends IntPraticaBaseImpl {
private static final Log _log = LogFactoryUtil.getLog(IntPraticaImpl.class); private static final Log _log = LogFactoryUtil.getLog(IntPraticaImpl.class);
private Integer distanzaOrtodromica = null; private Integer distanzaOrtodromica = null;
public IntPraticaImpl() { public IntPraticaImpl() {}
}
@Override @Override
public String getTitle(Locale locale, boolean completed) { public String getTitle(Locale locale, boolean completed) {
@ -110,63 +105,57 @@ public class IntPraticaImpl extends IntPraticaBaseImpl {
} }
@Override @Override
public int getTipoRichiesta(){ public int getTipoRichiesta() {
switch(getTipoProcedura()){ switch (getTipoProcedura()) {
case Constants.PROCEDURA_P1: case Constants.PROCEDURA_P1:
case Constants.PROCEDURA_Q1: case Constants.PROCEDURA_Q1:
return Constants.BENI_MOBILI; return Constants.BENI_MOBILI;
case Constants.PROCEDURA_P2: case Constants.PROCEDURA_P2:
case Constants.PROCEDURA_Q2: case Constants.PROCEDURA_Q2:
return Constants.BENI_IMMOBILI; return Constants.BENI_IMMOBILI;
case Constants.PROCEDURA_P3: case Constants.PROCEDURA_P3:
case Constants.PROCEDURA_Q3: case Constants.PROCEDURA_Q3:
return Constants.VIARCH; return Constants.VIARCH;
case Constants.PROCEDURA_P4: case Constants.PROCEDURA_P4:
case Constants.PROCEDURA_Q4: case Constants.PROCEDURA_Q4:
return Constants.AUT_URBANISTICA; return Constants.AUT_URBANISTICA;
case Constants.PROCEDURA_P5: case Constants.PROCEDURA_P5:
case Constants.PROCEDURA_Q5: case Constants.PROCEDURA_Q5:
return Constants.SETTORI_SPECIALI; return Constants.SETTORI_SPECIALI;
case Constants.PROCEDURA_P6: case Constants.PROCEDURA_P6:
case Constants.PROCEDURA_Q6: case Constants.PROCEDURA_Q6:
return Constants.AUT_PAESAGGISTICA; return Constants.AUT_PAESAGGISTICA;
case Constants.PROCEDURA_P7: case Constants.PROCEDURA_P7:
case Constants.PROCEDURA_Q7: case Constants.PROCEDURA_Q7:
return Constants.LIEVE_ENTITA; return Constants.LIEVE_ENTITA;
case Constants.PROCEDURA_P8:
//case Constants.PROCEDURA_P8: case Constants.PROCEDURA_Q8:
case Constants.PROCEDURA_P9: case Constants.PROCEDURA_P9:
//case Constants.PROCEDURA_Q8:
case Constants.PROCEDURA_Q9: case Constants.PROCEDURA_Q9:
return Constants.SANATORIE; return Constants.SANATORIE;
case Constants.PROCEDURA_P10: case Constants.PROCEDURA_P10:
case Constants.PROCEDURA_Q10: case Constants.PROCEDURA_Q10:
return Constants.VINCOLI; return Constants.VINCOLI;
default: default:
return 0; return 0;
} }
} }
@Override
public String getIndirizzo() throws SystemException { public String getIndirizzo() throws SystemException {
Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(getTerritorioId()); Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(getTerritorioId());
Comune comune = ComuneLocalServiceUtil.fetchComune(territorio.getComuneId()); Comune comune = ComuneLocalServiceUtil.fetchComune(territorio.getComuneId());
DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(getIntPraticaId()); DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(getIntPraticaId());
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(),
territorio.getCodiceProvincia()); territorio.getCodiceProvincia());
return comune.getDenominazione() + " (" + provincia.getSigla() + ")<br/>" + dettPratica.getVia(); return comune.getDenominazione() + " (" + provincia.getSigla() + ")<br/>"
+ HtmlUtil.escape(dettPratica.getVia());
} }
@Override @Override
public Integer calcolaDistanzaOrtodromica(double lat, double lng) throws SystemException { public Integer calcolaDistanzaOrtodromica(double lat, double lng) throws SystemException {
String localizzazione = null; String localizzazione = null;
distanzaOrtodromica = null; distanzaOrtodromica = null;
DettPratica dett = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(getIntPraticaId()); DettPratica dett = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(getIntPraticaId());
@ -189,8 +178,7 @@ public class IntPraticaImpl extends IntPraticaBaseImpl {
@Override @Override
public Integer getDistanzaOrtodromica() { public Integer getDistanzaOrtodromica() {
return distanzaOrtodromica; return distanzaOrtodromica;
} }
} }

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

@ -1,20 +1,15 @@
/** /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
* * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* any later version. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/ */
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.AllegatoManuale; import it.tref.liferay.portos.bo.model.AllegatoManuale;
import it.tref.liferay.portos.bo.model.Avviso; import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.AllegatoManualeServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.AllegatoManualeServiceBaseImpl;
import java.util.List; import java.util.List;
@ -27,11 +22,9 @@ import com.liferay.portal.service.ServiceContext;
/** /**
* The implementation of the allegato manuale remote service. * The implementation of the allegato manuale remote service.
*
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy * 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.AllegatoManualeService} interface. * their definitions into the {@link it.tref.liferay.portos.bo.service.AllegatoManualeService} interface.
*
* <p> * <p>
* This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS
* credentials because this service can be accessed remotely. * credentials because this service can be accessed remotely.
@ -96,7 +89,7 @@ public class AllegatoManualeServiceImpl extends AllegatoManualeServiceBaseImpl {
@Override @Override
public AllegatoManuale deleteAllegatoManuale(AllegatoManuale allegatoManuale) throws SystemException { public AllegatoManuale deleteAllegatoManuale(AllegatoManuale allegatoManuale) throws SystemException {
Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(allegatoManuale.getAvvisoId()); Avviso avviso = avvisoLocalService.fetchAvviso(allegatoManuale.getAvvisoId());
if (Validator.isNotNull(avviso) && Validator.isNull(avviso.getFileEntryIdInvio())) { if (Validator.isNotNull(avviso) && Validator.isNull(avviso.getFileEntryIdInvio())) {
return allegatoManualeLocalService.deleteAllegatoManuale(allegatoManuale); return allegatoManualeLocalService.deleteAllegatoManuale(allegatoManuale);
} else { } else {

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

@ -15,13 +15,6 @@ import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Provincia; import it.tref.liferay.portos.bo.model.Provincia;
import it.tref.liferay.portos.bo.model.Soggetto; import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DelegaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.AsseverazioneLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.AsseverazioneLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants; import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil; import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
@ -62,10 +55,8 @@ import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException; import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.NoSuchFolderException; import com.liferay.portlet.documentlibrary.NoSuchFolderException;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
/** /**
* The implementation of the asseverazione local service. * The implementation of the asseverazione local service.
@ -105,7 +96,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
public String testoAsseverazione(String tipo, String codiceFiscale, long dettPraticaId, String relazioni) public String testoAsseverazione(String tipo, String codiceFiscale, long dettPraticaId, String relazioni)
throws PortalException, SystemException, IOException { throws PortalException, SystemException, IOException {
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId); DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId);
return testoAsseverazione(tipo, codiceFiscale, dettPratica, relazioni); return testoAsseverazione(tipo, codiceFiscale, dettPratica, relazioni);
} }
@ -119,7 +110,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
private String testoAsseverazione(String tipo, String codiceFiscale, DettPratica dettPratica, String relazioni, private String testoAsseverazione(String tipo, String codiceFiscale, DettPratica dettPratica, String relazioni,
boolean anteprima) throws SystemException, PortalException, IOException { boolean anteprima) throws SystemException, PortalException, IOException {
List<Soggetto> soggetti = SoggettoLocalServiceUtil.getValidTmpByIntPratica_TipologiaSoggetto( List<Soggetto> soggetti = soggettoLocalService.getValidTmpByIntPratica_TipologiaSoggetto(
dettPratica.getIntPraticaId(), tipo); dettPratica.getIntPraticaId(), tipo);
Soggetto soggetto = null; Soggetto soggetto = null;
for (Soggetto iter : soggetti) { for (Soggetto iter : soggetti) {
@ -136,7 +127,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
return testoAsseverazione(tipo, nome, cognome, codiceFiscale, soggetto.getAmbitoProfessione(), dettPratica, return testoAsseverazione(tipo, nome, cognome, codiceFiscale, soggetto.getAmbitoProfessione(), dettPratica,
relazioni, anteprima, albo, albon, albop); relazioni, anteprima, albo, albon, albop);
} }
User user = UserLocalServiceUtil.fetchUserByScreenName(dettPratica.getCompanyId(), codiceFiscale); User user = userLocalService.fetchUserByScreenName(dettPratica.getCompanyId(), codiceFiscale);
if (Validator.isNotNull(user)) { if (Validator.isNotNull(user)) {
return testoAsseverazione(tipo, user.getFirstName(), user.getLastName(), user.getScreenName(), return testoAsseverazione(tipo, user.getFirstName(), user.getLastName(), user.getScreenName(),
StringPool.BLANK, dettPratica, relazioni, anteprima, StringPool.BLANK, StringPool.BLANK, StringPool.BLANK, dettPratica, relazioni, anteprima, StringPool.BLANK, StringPool.BLANK,
@ -199,8 +190,8 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
boolean rischio = (RG.equals("3") || RG.equals("4") || RG.equals("5") || RI.equals("3") || RI.equals("4") boolean rischio = (RG.equals("3") || RG.equals("4") || RG.equals("5") || RI.equals("3") || RI.equals("4")
|| PG.equals("3") || PG.equals("4") || PI.equals("3") || PI.equals("4") || PI.equals("5")); || PG.equals("3") || PG.equals("4") || PI.equals("3") || PI.equals("4") || PI.equals("5"));
boolean coniugio = Validator.isNotNull(relazioni); boolean coniugio = Validator.isNotNull(relazioni);
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); IntPratica intPratica = intPraticaLocalService.getIntPratica(dettPratica.getIntPraticaId());
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
float ag = 0; float ag = 0;
if (Validator.isNotNull(dettPratica.getAg())) { if (Validator.isNotNull(dettPratica.getAg())) {
ag = Float.parseFloat(dettPratica.getAg().replace(StringPool.COMMA, StringPool.PERIOD)); ag = Float.parseFloat(dettPratica.getAg().replace(StringPool.COMMA, StringPool.PERIOD));
@ -326,14 +317,14 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId); DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId);
long intPraticaId = dettPratica.getIntPraticaId(); long intPraticaId = dettPratica.getIntPraticaId();
IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
User titolaredigitaleUser = UserLocalServiceUtil.getUser(intPratica.getUserId()); User titolaredigitaleUser = userLocalService.getUser(intPratica.getUserId());
if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione()) if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())
|| TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione()) || TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())
|| TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { || TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) {
Set<Soggetto> nuoviSoggetti = new HashSet<>(soggettoLocalService.getValidTmpByDettPratica(dettPraticaId)); Set<Soggetto> nuoviSoggetti = new HashSet<>(soggettoLocalService.getValidTmpByDettPratica(dettPraticaId));
List<String> cfNuoviSoggetti = soggettoLocalService.getCfValidTmpByDettPratica(dettPraticaId); List<String> cfNuoviSoggetti = soggettoLocalService.getCfValidTmpByDettPratica(dettPraticaId);
List<String> nuoviDelegati = new ArrayList<String>( List<String> nuoviDelegati = new ArrayList<String>(
DelegaLocalServiceUtil.findCfByDettPratica_Tipologia_InEsito(dettPraticaId, new String[] { delegaLocalService.findCfByDettPratica_Tipologia_InEsito(dettPraticaId, new String[] {
TipoSoggettoUtil.COMMITTENTE, TipoSoggettoUtil.DIRETTORE_LAVORI, TipoSoggettoUtil.GEOLOGO, TipoSoggettoUtil.COMMITTENTE, TipoSoggettoUtil.DIRETTORE_LAVORI, TipoSoggettoUtil.GEOLOGO,
TipoSoggettoUtil.DITTA, TipoSoggettoUtil.PROGETTISTA }, TipoSoggettoUtil.DITTA, TipoSoggettoUtil.PROGETTISTA },
new String[] { AsseverazioniUtil.STATO_ESEGUITA })); new String[] { AsseverazioniUtil.STATO_ESEGUITA }));
@ -396,7 +387,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
asseverazione.setEsito(AsseverazioniUtil.STATO_ASSEGNATA); asseverazione.setEsito(AsseverazioniUtil.STATO_ASSEGNATA);
asseverazione.setDtEsito(null); asseverazione.setDtEsito(null);
if (asseverazione.getFileEntryId() != 0) { if (asseverazione.getFileEntryId() != 0) {
DLAppLocalServiceUtil.deleteFileEntry(asseverazione.getFileEntryId()); dlAppLocalService.deleteFileEntry(asseverazione.getFileEntryId());
asseverazione.setFileEntryId(0); asseverazione.setFileEntryId(0);
} }
asseverazionePersistence.update(asseverazione); asseverazionePersistence.update(asseverazione);
@ -468,10 +459,10 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
testoAsseverazione = AsseverazioniUtil.retrieveAsseverazioneText(asseverazione, testoAsseverazione = AsseverazioniUtil.retrieveAsseverazioneText(asseverazione,
asseverazione.getCodiceFiscale()); asseverazione.getCodiceFiscale());
} }
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(asseverazione.getIntPraticaId()); IntPratica intPratica = intPraticaLocalService.getIntPratica(asseverazione.getIntPraticaId());
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId()); Comune comune = comuneLocalService.getComune(territorio.getComuneId());
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(asseverazione.getCompanyId(), Provincia provincia = provinciaLocalService.fetchByC_C(asseverazione.getCompanyId(),
comune.getCodiceProvincia()); comune.getCodiceProvincia());
parameters.put("html", testoAsseverazione); parameters.put("html", testoAsseverazione);
parameters.put("modello", asseverazione.getModello()); parameters.put("modello", asseverazione.getModello());
@ -516,7 +507,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
Asseverazione asseverazione = getAsseverazione(asseverazioneId); Asseverazione asseverazione = getAsseverazione(asseverazioneId);
if (asseverazione.getEsito().equalsIgnoreCase(AsseverazioniUtil.STATO_ESEGUITA) if (asseverazione.getEsito().equalsIgnoreCase(AsseverazioniUtil.STATO_ESEGUITA)
&& asseverazione.getFileEntryId() != 0) { && asseverazione.getFileEntryId() != 0) {
DLAppLocalServiceUtil.deleteFileEntry(asseverazione.getFileEntryId()); dlAppLocalService.deleteFileEntry(asseverazione.getFileEntryId());
asseverazione.setEsito(null); asseverazione.setEsito(null);
asseverazione.setDtEsito(null); asseverazione.setDtEsito(null);
asseverazione.setFileEntryId(0); asseverazione.setFileEntryId(0);

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

@ -1,21 +1,15 @@
/** /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
* * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* any later version. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/ */
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.Avviso; import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.AvvisoLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.AvvisoLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants; import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
@ -64,16 +58,13 @@ import com.liferay.portal.model.User;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException; import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.NoSuchFolderException; import com.liferay.portlet.documentlibrary.NoSuchFolderException;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
import com.liferay.util.dao.orm.CustomSQLUtil; import com.liferay.util.dao.orm.CustomSQLUtil;
/** /**
* The implementation of the avviso local service. * The implementation of the avviso local service.
*
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy * 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.AvvisoLocalService} interface. * their definitions into the {@link it.tref.liferay.portos.bo.service.AvvisoLocalService} interface.
*
* <p> * <p>
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS * 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. * credentials because this service can only be accessed from within the same VM.
@ -89,7 +80,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
* it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil} to access the avviso local service. * it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil} to access the avviso local service.
*/ */
private static final Log _log = LogFactoryUtil.getLog(AvvisoLocalServiceImpl.class.getName()); private static final Log _log = LogFactoryUtil.getLog(AvvisoLocalServiceImpl.class);
@Override @Override
public Avviso createStandardAvvisoPratica(IntPratica intPratica, long classPk, String className, public Avviso createStandardAvvisoPratica(IntPratica intPratica, long classPk, String className,
@ -145,21 +136,20 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
serviceContext); serviceContext);
} else { } else {
byte[] bytes = Base64.decode(base64File.substring(28)); byte[] bytes = Base64.decode(base64File.substring(28));
long attachmentFolderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(serviceContext.getCompanyId(), long attachmentFolderId = configurazioneLocalService.findByC_ChiaveLong(serviceContext.getCompanyId(),
ConfigurazioneConstants.ATTACHMENT_FOLDER_ID); ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
Folder attachmentFolder = DLAppLocalServiceUtil.getFolder(attachmentFolderId); Folder attachmentFolder = dlAppLocalService.getFolder(attachmentFolderId);
long repositoryId = attachmentFolder.getRepositoryId(); long repositoryId = attachmentFolder.getRepositoryId();
String folderName = PraticaUtil.getFolderName(classPk); String folderName = PraticaUtil.getFolderName(classPk);
Folder folder = null; Folder folder = null;
try { try {
folder = DLAppLocalServiceUtil.getFolder(repositoryId, attachmentFolder.getFolderId(), folderName); folder = dlAppLocalService.getFolder(repositoryId, attachmentFolder.getFolderId(), folderName);
} catch (NoSuchFolderException e) { } catch (NoSuchFolderException e) {
folder = DLAppLocalServiceUtil.addFolder(serviceContext.getUserId(), folder = dlAppLocalService.addFolder(serviceContext.getUserId(), attachmentFolder.getRepositoryId(),
attachmentFolder.getRepositoryId(), attachmentFolder.getFolderId(), folderName, attachmentFolder.getFolderId(), folderName, StringPool.BLANK, serviceContext);
StringPool.BLANK, serviceContext);
} }
String targetFileName = getFileNameAvviso(classPk, StatoPraticaConstants.SANZIONE_DOC1, null, "F") + ".pdf"; String targetFileName = getFileNameAvviso(classPk, StatoPraticaConstants.SANZIONE_DOC1, null, "F") + ".pdf";
FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry(serviceContext.getUserId(), repositoryId, FileEntry fileEntry = dlAppLocalService.addFileEntry(serviceContext.getUserId(), repositoryId,
folder.getFolderId(), StringPool.BLANK, ContentTypes.APPLICATION_PDF, targetFileName, folder.getFolderId(), StringPool.BLANK, ContentTypes.APPLICATION_PDF, targetFileName,
targetFileName, StringPool.BLANK, bytes, serviceContext); targetFileName, StringPool.BLANK, bytes, serviceContext);
return addAvviso(intPraticaId, StringPool.BLANK, new Date(), tipoAvviso, stato, 0L, classPk, className, return addAvviso(intPraticaId, StringPool.BLANK, new Date(), tipoAvviso, stato, 0L, classPk, className,
@ -380,20 +370,17 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
if (Validator.isNotNull(avviso.getFileEntryIdBase())) { if (Validator.isNotNull(avviso.getFileEntryIdBase())) {
dlAppLocalService.deleteFileEntry(avviso.getFileEntryIdBase()); dlAppLocalService.deleteFileEntry(avviso.getFileEntryIdBase());
} }
} catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) { } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) {}
}
try { try {
if (Validator.isNotNull(avviso.getFileEntryIdInvio())) { if (Validator.isNotNull(avviso.getFileEntryIdInvio())) {
dlAppLocalService.deleteFileEntry(avviso.getFileEntryIdInvio()); dlAppLocalService.deleteFileEntry(avviso.getFileEntryIdInvio());
} }
} catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) { } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) {}
}
try { try {
if (Validator.isNotNull(avviso.getFileEntryIdProtocollo())) { if (Validator.isNotNull(avviso.getFileEntryIdProtocollo())) {
dlAppLocalService.deleteFileEntry(avviso.getFileEntryIdProtocollo()); dlAppLocalService.deleteFileEntry(avviso.getFileEntryIdProtocollo());
} }
} catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) { } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) {}
}
} catch (PortalException e) { } catch (PortalException e) {
throw new SystemException(e); throw new SystemException(e);
} }
@ -1072,15 +1059,15 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
public Avviso addFileFirmato(long avvisoId, long classPk, String fileToSave, ServiceContext serviceContext) public Avviso addFileFirmato(long avvisoId, long classPk, String fileToSave, ServiceContext serviceContext)
throws Exception { throws Exception {
Avviso avviso = AvvisoLocalServiceUtil.fetchAvviso(avvisoId); Avviso avviso = fetchAvviso(avvisoId);
long folderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(avviso.getCompanyId(), avvisoLocalService long folderId = configurazioneLocalService.findByC_ChiaveLong(avviso.getCompanyId(),
.getAllTipoDocumentoFolderProps().get(avviso.getTipoDocumento())); getAllTipoDocumentoFolderProps().get(avviso.getTipoDocumento()));
String fileName = getFileNameAvviso(classPk, avviso.getTipoDocumento(), avviso.getAvvisoId(), "F"); String fileName = getFileNameAvviso(classPk, avviso.getTipoDocumento(), avviso.getAvvisoId(), "F");
if (Validator.isNotNull(folderId)) { if (Validator.isNotNull(folderId)) {
Folder folder = DLAppLocalServiceUtil.getFolder(folderId); Folder folder = dlAppLocalService.getFolder(folderId);
if (Validator.isNotNull(folder)) { if (Validator.isNotNull(folder)) {
byte[] bytes = Base64.decode(fileToSave); byte[] bytes = Base64.decode(fileToSave);
FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry(avviso.getUserId(), folder.getRepositoryId(), FileEntry fileEntry = dlAppLocalService.addFileEntry(avviso.getUserId(), folder.getRepositoryId(),
folderId, fileName, MimeTypesUtil.getContentType(fileName + ".p7m"), fileName + ".p7m", folderId, fileName, MimeTypesUtil.getContentType(fileName + ".p7m"), fileName + ".p7m",
StringPool.BLANK, StringPool.BLANK, bytes, serviceContext); StringPool.BLANK, StringPool.BLANK, bytes, serviceContext);
avviso.setFileEntryIdInvio(fileEntry.getFileEntryId()); avviso.setFileEntryIdInvio(fileEntry.getFileEntryId());
@ -1130,7 +1117,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
} else if (Validator.isNotNull(numeroProtocollo) || Validator.isNotNull(dataDa) || Validator.isNotNull(dataA)) { } else if (Validator.isNotNull(numeroProtocollo) || Validator.isNotNull(dataDa) || Validator.isNotNull(dataA)) {
Order defaultOrder = OrderFactoryUtil.asc("dtProtocollo"); Order defaultOrder = OrderFactoryUtil.asc("dtProtocollo");
query.addOrder(defaultOrder); query.addOrder(defaultOrder);
lista = AvvisoLocalServiceUtil.dynamicQuery(query, start, end); lista = dynamicQuery(query, start, end);
} }
return lista; return lista;
} }
@ -1242,7 +1229,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
@Override @Override
public Avviso getAvvisoVidimazione(long intPraticaId, long dettPraticaID) throws SystemException { public Avviso getAvvisoVidimazione(long intPraticaId, long dettPraticaID) throws SystemException {
DynamicQuery dynamicQuery = AvvisoLocalServiceUtil.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento").in( dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento").in(
new String[] { StatoPraticaConstants.VIDIMATA })); new String[] { StatoPraticaConstants.VIDIMATA }));
dynamicQuery.add(PropertyFactoryUtil.forName("fileEntryIdProtocollo").ne(0L)); dynamicQuery.add(PropertyFactoryUtil.forName("fileEntryIdProtocollo").ne(0L));
@ -1260,7 +1247,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
@Override @Override
public Avviso getLastAvvisoIntegrazione(long intPraticaId) throws SystemException { public Avviso getLastAvvisoIntegrazione(long intPraticaId) throws SystemException {
DynamicQuery dynamicQuery = AvvisoLocalServiceUtil.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento").in( dynamicQuery.add(PropertyFactoryUtil.forName("tipoDocumento").in(
new String[] { StatoPraticaConstants.INTEGRAZIONE, StatoPraticaConstants.PREAVVISO_CONTRARIO })); new String[] { StatoPraticaConstants.INTEGRAZIONE, StatoPraticaConstants.PREAVVISO_CONTRARIO }));
dynamicQuery.add(PropertyFactoryUtil.forName("fileEntryIdProtocollo").ne(0L)); dynamicQuery.add(PropertyFactoryUtil.forName("fileEntryIdProtocollo").ne(0L));

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

@ -14,7 +14,6 @@ import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.DocPratica; import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.CollaudoLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.CollaudoLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.PagamentoConstants; import it.tref.liferay.portos.bo.shared.util.PagamentoConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil; import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
@ -92,7 +91,7 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
public Collaudo addCollaudo(long intPraticaId, ServiceContext serviceContext) throws PortalException, public Collaudo addCollaudo(long intPraticaId, ServiceContext serviceContext) throws PortalException,
SystemException { SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
Collaudo collaudo = initCollaudo(serviceContext); Collaudo collaudo = initCollaudo(serviceContext);
collaudo.setGroupId(intPratica.getGroupId()); collaudo.setGroupId(intPratica.getGroupId());
collaudo.setIntPraticaId(intPraticaId); collaudo.setIntPraticaId(intPraticaId);
@ -173,7 +172,7 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
public void updateEsitoPagamento(long pagamentoId, long collaudoId, String stato) throws SystemException, public void updateEsitoPagamento(long pagamentoId, long collaudoId, String stato) throws SystemException,
PortalException { PortalException {
updateEsitoPagamento(pagamentoId, collaudoId, 0l, stato); updateEsitoPagamento(pagamentoId, collaudoId, 0, stato);
} }
@Override @Override
@ -249,7 +248,7 @@ public class CollaudoLocalServiceImpl extends CollaudoLocalServiceBaseImpl {
serviceContext.setScopeGroupId(collaudo.getGroupId()); serviceContext.setScopeGroupId(collaudo.getGroupId());
serviceContext.setCompanyId(collaudo.getCompanyId()); serviceContext.setCompanyId(collaudo.getCompanyId());
serviceContext.setUserId(collaudo.getUserId()); serviceContext.setUserId(collaudo.getUserId());
MailUtil.invioMailNotifica(collaudo.getIntPraticaId(), 0l, collaudoId, Collaudo.class.getName(), to, cc, ccn, MailUtil.invioMailNotifica(collaudo.getIntPraticaId(), 0, collaudoId, Collaudo.class.getName(), to, cc, ccn,
"NOTIFICA-BO", templateVariables, null, serviceContext); "NOTIFICA-BO", templateVariables, null, serviceContext);
} }

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

@ -20,7 +20,6 @@ import it.tref.liferay.portos.bo.DenominazioneException;
import it.tref.liferay.portos.bo.DuplicateComuneException; import it.tref.liferay.portos.bo.DuplicateComuneException;
import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.Comune;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ComuneLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.ComuneLocalServiceBaseImpl;
import java.util.ArrayList; import java.util.ArrayList;
@ -282,7 +281,7 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(userId); List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrganizations(userId);
if (Validator.isNotNull(organizationList)) { if (Validator.isNotNull(organizationList)) {
for (Organization org : organizationList) { for (Organization org : organizationList) {
List<Territorio> territori = TerritorioLocalServiceUtil.getTerritori(org.getCompanyId(), List<Territorio> territori = territorioLocalService.getTerritori(org.getCompanyId(),
org.getGroupId(), QueryUtil.ALL_POS, QueryUtil.ALL_POS); org.getGroupId(), QueryUtil.ALL_POS, QueryUtil.ALL_POS);
if (Validator.isNotNull(territori)) { if (Validator.isNotNull(territori)) {
for (Territorio terr : territori) { for (Territorio terr : territori) {
@ -309,7 +308,7 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl {
if (Validator.isNotNull(organizationList)) { if (Validator.isNotNull(organizationList)) {
for (Organization org : organizationList) { for (Organization org : organizationList) {
if (org.getGroupId() == ufficioId) { if (org.getGroupId() == ufficioId) {
List<Territorio> territori = TerritorioLocalServiceUtil.getTerritori(org.getCompanyId(), List<Territorio> territori = territorioLocalService.getTerritori(org.getCompanyId(),
org.getGroupId(), QueryUtil.ALL_POS, QueryUtil.ALL_POS); org.getGroupId(), QueryUtil.ALL_POS, QueryUtil.ALL_POS);
if (Validator.isNotNull(territori)) { if (Validator.isNotNull(territori)) {
for (Territorio terr : territori) { for (Territorio terr : territori) {

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

@ -9,7 +9,6 @@
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.Comune;
import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ComuneServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.ComuneServiceBaseImpl;
import java.util.List; import java.util.List;
@ -40,12 +39,12 @@ public class ComuneServiceImpl extends ComuneServiceBaseImpl {
@Override @Override
public Comune getComune(long comuneId) throws PortalException, SystemException { public Comune getComune(long comuneId) throws PortalException, SystemException {
return ComuneLocalServiceUtil.getComune(comuneId); return comuneLocalService.getComune(comuneId);
} }
@Override @Override
public List<Comune> getComunes(int start, int end) throws SystemException { public List<Comune> getComunes(int start, int end) throws SystemException {
return ComuneLocalServiceUtil.getComunes(start, end); return comuneLocalService.getComunes(start, end);
} }
} }

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

@ -1,13 +1,9 @@
/** /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
* * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* any later version. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/ */
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
@ -42,11 +38,9 @@ import com.liferay.portal.service.ServiceContext;
/** /**
* The implementation of the comunicazione local service. * The implementation of the comunicazione local service.
*
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy * 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.ComunicazioneLocalService} interface. * their definitions into the {@link it.tref.liferay.portos.bo.service.ComunicazioneLocalService} interface.
*
* <p> * <p>
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS * 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. * credentials because this service can only be accessed from within the same VM.
@ -58,9 +52,7 @@ import com.liferay.portal.service.ServiceContext;
*/ */
public class ComunicazioneLocalServiceImpl extends ComunicazioneLocalServiceBaseImpl { public class ComunicazioneLocalServiceImpl extends ComunicazioneLocalServiceBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link
*
* Never reference this interface directly. Always use {@link
* it.tref.liferay.portos.bo.service.ComunicazioneLocalServiceUtil} to access the comunicazione local service. * it.tref.liferay.portos.bo.service.ComunicazioneLocalServiceUtil} to access the comunicazione local service.
*/ */
@ -155,7 +147,7 @@ public class ComunicazioneLocalServiceImpl extends ComunicazioneLocalServiceBase
JSONObject templateVariable = JSONFactoryUtil.createJSONObject(); JSONObject templateVariable = JSONFactoryUtil.createJSONObject();
templateVariable.put("receiver", receiver); templateVariable.put("receiver", receiver);
templateVariable.put("link", url); templateVariable.put("link", url);
MailUtil.invioMailNotifica(comunicazione.getIntPraticaId(), 0l, comunicazioneId, Comunicazione.class.getName(), MailUtil.invioMailNotifica(comunicazione.getIntPraticaId(), 0, comunicazioneId, Comunicazione.class.getName(),
to, cc, ccn, "INVIO-RICHIESTA-ASSEVERAZIONE", templateVariable, null, serviceContext); to, cc, ccn, "INVIO-RICHIESTA-ASSEVERAZIONE", templateVariable, null, serviceContext);
} }
@ -184,7 +176,7 @@ public class ComunicazioneLocalServiceImpl extends ComunicazioneLocalServiceBase
serviceContext.setScopeGroupId(comunicazione.getGroupId()); serviceContext.setScopeGroupId(comunicazione.getGroupId());
serviceContext.setCompanyId(comunicazione.getCompanyId()); serviceContext.setCompanyId(comunicazione.getCompanyId());
serviceContext.setUserId(comunicazione.getUserId()); serviceContext.setUserId(comunicazione.getUserId());
MailUtil.invioMailNotifica(comunicazione.getIntPraticaId(), 0l, comunicazioneId, Comunicazione.class.getName(), MailUtil.invioMailNotifica(comunicazione.getIntPraticaId(), 0, comunicazioneId, Comunicazione.class.getName(),
to, cc, ccn, "NOTIFICA-BO", templateVariables, null, serviceContext); to, cc, ccn, "NOTIFICA-BO", templateVariables, null, serviceContext);
} }
} }

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

@ -1,18 +1,13 @@
/** /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
* * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* any later version. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/ */
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ConfigurazioneServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.ConfigurazioneServiceBaseImpl;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
@ -21,11 +16,9 @@ import com.liferay.portal.service.ServiceContext;
/** /**
* The implementation of the configurazione remote service. * The implementation of the configurazione remote service.
*
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy * 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.ConfigurazioneService} interface. * their definitions into the {@link it.tref.liferay.portos.bo.service.ConfigurazioneService} interface.
*
* <p> * <p>
* This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS
* credentials because this service can be accessed remotely. * credentials because this service can be accessed remotely.
@ -44,19 +37,19 @@ public class ConfigurazioneServiceImpl extends ConfigurazioneServiceBaseImpl {
@Override @Override
public long findByC_ChiaveLong(long companyId, String chiave) throws SystemException { public long findByC_ChiaveLong(long companyId, String chiave) throws SystemException {
return ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, chiave); return configurazioneLocalService.findByC_ChiaveLong(companyId, chiave);
} }
@Override @Override
public String findByC_ChiaveString(long companyId, String chiave) throws SystemException { public String findByC_ChiaveString(long companyId, String chiave) throws SystemException {
return ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId, chiave); return configurazioneLocalService.findByC_ChiaveString(companyId, chiave);
} }
@Override @Override
public void storeConfig(String chiave, String valore, ServiceContext serviceContext) throws PortalException, public void storeConfig(String chiave, String valore, ServiceContext serviceContext) throws PortalException,
SystemException { SystemException {
ConfigurazioneLocalServiceUtil.storeConfig(chiave, valore, serviceContext); configurazioneLocalService.storeConfig(chiave, valore, serviceContext);
} }
} }

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

@ -15,11 +15,6 @@ import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.model.ControlloPratica; import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TempisticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ControlloPraticaLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.ControlloPraticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.Constants; import it.tref.liferay.portos.bo.shared.util.Constants;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
@ -83,8 +78,6 @@ import com.liferay.portal.service.OrganizationLocalServiceUtil;
import com.liferay.portal.service.RoleLocalServiceUtil; import com.liferay.portal.service.RoleLocalServiceUtil;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserGroupRoleLocalServiceUtil; import com.liferay.portal.service.UserGroupRoleLocalServiceUtil;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil;
import com.liferay.portal.util.PortalUtil; import com.liferay.portal.util.PortalUtil;
import com.liferay.portal.workflow.kaleo.model.KaleoInstance; import com.liferay.portal.workflow.kaleo.model.KaleoInstance;
import com.liferay.portal.workflow.kaleo.service.KaleoInstanceLocalServiceUtil; import com.liferay.portal.workflow.kaleo.service.KaleoInstanceLocalServiceUtil;
@ -150,14 +143,14 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
serviceContext.getAssetLinkEntryIds(), now); serviceContext.getAssetLinkEntryIds(), now);
// ADT: BUG BO GESTIONE WORKFLOW // ADT: BUG BO GESTIONE WORKFLOW
Map<String, Serializable> wfContextMap = new HashMap<String, Serializable>(); Map<String, Serializable> wfContextMap = new HashMap<String, Serializable>();
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId); DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId);
if (dettPratica != null && dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)) { if (dettPratica != null && dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)) {
wfContextMap.put("wf_variante", "OK"); wfContextMap.put("wf_variante", "OK");
} }
// Workflow // Workflow
WorkflowHandlerRegistryUtil.startWorkflowInstance(entry.getCompanyId(), entry.getGroupId(), entry.getUserId(), WorkflowHandlerRegistryUtil.startWorkflowInstance(entry.getCompanyId(), entry.getGroupId(), entry.getUserId(),
ControlloPratica.class.getName(), entry.getPrimaryKey(), entry, serviceContext, wfContextMap); ControlloPratica.class.getName(), entry.getPrimaryKey(), entry, serviceContext, wfContextMap);
TempisticaLocalServiceUtil.addTempistica(intPraticaId, dettPraticaId, TempisticaConstants.TIPO_PRATICA, tempisticaLocalService.addTempistica(intPraticaId, dettPraticaId, TempisticaConstants.TIPO_PRATICA,
entry.getCreateDate(), serviceContext); entry.getCreateDate(), serviceContext);
return entry; return entry;
} }
@ -278,13 +271,13 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public boolean generazioneDocumento(long controlloPraticaId, String jsonParams, String tipoAvviso, public boolean generazioneDocumento(long controlloPraticaId, String jsonParams, String tipoAvviso,
long userIdFirma, Map<String, Serializable> workflowContext) throws PortalException, SystemException { long userIdFirma, Map<String, Serializable> workflowContext) throws PortalException, SystemException {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId()); DettPratica dettPratica = dettPraticaLocalService.getDettPratica(controlloPratica.getDettPraticaId());
ServiceContext serviceContext = new ServiceContext(); ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(controlloPratica.getCompanyId()); serviceContext.setCompanyId(controlloPratica.getCompanyId());
serviceContext.setScopeGroupId(controlloPratica.getGroupId()); serviceContext.setScopeGroupId(controlloPratica.getGroupId());
serviceContext.setUserId(controlloPratica.getUserId()); serviceContext.setUserId(controlloPratica.getUserId());
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); IntPratica intPratica = intPraticaLocalService.getIntPratica(dettPratica.getIntPraticaId());
String userCodiceFiscale = GestioneFirmeUtil.getCodiceFiscaleFirma(controlloPratica.getCompanyId(), String userCodiceFiscale = GestioneFirmeUtil.getCodiceFiscaleFirma(controlloPratica.getCompanyId(),
controlloPratica.getGroupId(), intPratica.getStatoPratica()); controlloPratica.getGroupId(), intPratica.getStatoPratica());
if (!intPratica.getStatoPratica().equalsIgnoreCase(StatoPraticaConstants.CONFORME)) { if (!intPratica.getStatoPratica().equalsIgnoreCase(StatoPraticaConstants.CONFORME)) {
@ -299,14 +292,14 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public boolean generaDocumentoFinale(long controlloPraticaId, String jsonParams, long userIdFirma, public boolean generaDocumentoFinale(long controlloPraticaId, String jsonParams, long userIdFirma,
Map<String, Serializable> workflowContext) throws PortalException, SystemException { Map<String, Serializable> workflowContext) throws PortalException, SystemException {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId()); DettPratica dettPratica = dettPraticaLocalService.getDettPratica(controlloPratica.getDettPraticaId());
ServiceContext serviceContext = new ServiceContext(); ServiceContext serviceContext = new ServiceContext();
serviceContext.setCompanyId(controlloPratica.getCompanyId()); serviceContext.setCompanyId(controlloPratica.getCompanyId());
serviceContext.setScopeGroupId(controlloPratica.getGroupId()); serviceContext.setScopeGroupId(controlloPratica.getGroupId());
serviceContext.setUserId(controlloPratica.getUserId()); serviceContext.setUserId(controlloPratica.getUserId());
String statoPratica = getEsitoFinale(controlloPraticaId, workflowContext); String statoPratica = getEsitoFinale(controlloPraticaId, workflowContext);
User user = UserLocalServiceUtil.fetchUser(userIdFirma); User user = userLocalService.fetchUser(userIdFirma);
String codiceFiscale = StringPool.BLANK; String codiceFiscale = StringPool.BLANK;
if (user != null) { if (user != null) {
codiceFiscale = user.getScreenName(); codiceFiscale = user.getScreenName();
@ -385,7 +378,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
private String getEsitoFinale(long controlloPraticaId, Map<String, Serializable> workflowContext) private String getEsitoFinale(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException { throws PortalException, SystemException {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
Map<String, Serializable> parametri = WorkflowUtil.getFormParameters(controlloPratica); Map<String, Serializable> parametri = WorkflowUtil.getFormParameters(controlloPratica);
String esitoScelta = (String) parametri.get("esito"); String esitoScelta = (String) parametri.get("esito");
if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) { if (AzioniPraticheUtil.isAutorizzazione(controlloPratica.getIntPraticaId())) {
@ -416,8 +409,8 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public String getJsonListaIstruttori(long controlloPraticaId, Map<String, Serializable> workflowContext) public String getJsonListaIstruttori(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException { throws PortalException, SystemException {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
int unitaOperativa = IntPraticaLocalServiceUtil.getIntPratica(controlloPratica.getIntPraticaId()) int unitaOperativa = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId())
.getUnitaOperativa(); .getUnitaOperativa();
boolean preassegnazione = (0 == unitaOperativa); boolean preassegnazione = (0 == unitaOperativa);
long companyId = controlloPratica.getCompanyId(); long companyId = controlloPratica.getCompanyId();
@ -466,39 +459,42 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public String getJsonEsitoPratica(long controlloPraticaId, Map<String, Serializable> workflowContext) public String getJsonEsitoPratica(long controlloPraticaId, Map<String, Serializable> workflowContext)
throws PortalException, SystemException { throws PortalException, SystemException {
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
IntPratica intPratica = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId()); IntPratica intPratica = intPraticaLocalService.getIntPratica(controlloPratica.getIntPraticaId());
switch (intPratica.getTipoRichiesta()) { switch (intPratica.getTipoRichiesta()) {
case Constants.SANATORIE: case Constants.SANATORIE:
return JSON_SANATORIA; return getJsonSanatoria();
case Constants.VIARCH: case Constants.VIARCH:
return JSON_VIARCH; return getJsonViarch();
case Constants.VINCOLI: case Constants.VINCOLI:
return JSON_VINCOLI; return getJsonVincoli();
} }
return JSON_AUTORIZZAZIONE; return getJsonAutorizzazione();
} }
private static final String JSON_AUTORIZZAZIONE = getJsonAutorizzazione(); private static String jsonAutorizzazione = null;
private static final String JSON_SANATORIA = getJsonSanatoria();
private static final String JSON_VIARCH = getJsonViarch();
private static final String JSON_VINCOLI = getJsonVincoli();
private static String getJsonAutorizzazione() { private static String getJsonAutorizzazione() {
if (jsonAutorizzazione == null) {
JSONArray esito = JSONFactoryUtil.createJSONArray(); JSONArray esito = JSONFactoryUtil.createJSONArray();
esito.put(etichettaEsito(StatoPraticaConstants.CONFORME)); esito.put(etichettaEsito(StatoPraticaConstants.CONFORME));
esito.put(etichettaEsito(StatoPraticaConstants.NON_CONFORME)); esito.put(etichettaEsito(StatoPraticaConstants.NON_CONFORME));
esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE)); esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE));
esito.put(etichettaEsito(StatoPraticaConstants.PREAVVISO_CONTRARIO)); esito.put(etichettaEsito(StatoPraticaConstants.PREAVVISO_CONTRARIO));
esito.put(etichettaEsito(StatoPraticaConstants.NO_PARERE)); esito.put(etichettaEsito(StatoPraticaConstants.NO_PARERE));
JSONObject ret = JSONFactoryUtil.createJSONObject(); JSONObject json = JSONFactoryUtil.createJSONObject();
ret.put("esito", esito); json.put("esito", esito);
return ret.toString(); jsonAutorizzazione = esito.toString();
}
return jsonAutorizzazione;
} }
private static String jsonSanatoria = null;
private static String getJsonSanatoria() { private static String getJsonSanatoria() {
if (jsonSanatoria == null) {
JSONArray esito = JSONFactoryUtil.createJSONArray(); JSONArray esito = JSONFactoryUtil.createJSONArray();
esito.put(etichettaEsito(StatoPraticaConstants.CONFORME)); esito.put(etichettaEsito(StatoPraticaConstants.CONFORME));
esito.put(etichettaEsito("Perizia sanzione", StatoPraticaConstants.INTEGRAZIONE, true)); esito.put(etichettaEsito("Perizia sanzione", StatoPraticaConstants.INTEGRAZIONE, true));
@ -506,33 +502,46 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE)); esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE));
esito.put(etichettaEsito(StatoPraticaConstants.PREAVVISO_CONTRARIO)); esito.put(etichettaEsito(StatoPraticaConstants.PREAVVISO_CONTRARIO));
esito.put(etichettaEsito(StatoPraticaConstants.NO_PARERE)); esito.put(etichettaEsito(StatoPraticaConstants.NO_PARERE));
JSONObject ret = JSONFactoryUtil.createJSONObject(); JSONObject json = JSONFactoryUtil.createJSONObject();
ret.put("esito", esito); json.put("esito", esito);
return ret.toString(); jsonSanatoria = json.toString();
}
return jsonSanatoria;
} }
private static String jsonViarch = null;
private static String getJsonViarch() { private static String getJsonViarch() {
if (jsonViarch == null) {
JSONArray esito = JSONFactoryUtil.createJSONArray(); JSONArray esito = JSONFactoryUtil.createJSONArray();
esito.put(etichettaEsito("Attiva VIArch", StatoPraticaConstants.CONFORME)); esito.put(etichettaEsito("Attiva VIArch", StatoPraticaConstants.CONFORME));
esito.put(etichettaEsito("Concludi VIArch", StatoPraticaConstants.NON_CONFORME)); esito.put(etichettaEsito("Concludi VIArch", StatoPraticaConstants.NON_CONFORME));
esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE)); esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE));
JSONObject ret = JSONFactoryUtil.createJSONObject(); esito.put(etichettaEsito(StatoPraticaConstants.NO_PARERE));
ret.put("esito", esito); JSONObject json = JSONFactoryUtil.createJSONObject();
return ret.toString(); json.put("esito", esito);
jsonViarch = json.toString();
} }
return jsonViarch;
}
private static String jsonVincoli = null;
private static String getJsonVincoli() { private static String getJsonVincoli() {
if (jsonVincoli == null) {
JSONArray esito = JSONFactoryUtil.createJSONArray(); JSONArray esito = JSONFactoryUtil.createJSONArray();
esito.put(etichettaEsito("Attestazione", StatoPraticaConstants.CONFORME)); esito.put(etichettaEsito("Attestazione", StatoPraticaConstants.CONFORME));
esito.put(etichettaEsito(StatoPraticaConstants.NON_CONFORME)); esito.put(etichettaEsito(StatoPraticaConstants.NON_CONFORME));
esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE)); esito.put(etichettaEsito(StatoPraticaConstants.INTEGRAZIONE));
esito.put(etichettaEsito(StatoPraticaConstants.PREAVVISO_CONTRARIO)); esito.put(etichettaEsito(StatoPraticaConstants.PREAVVISO_CONTRARIO));
esito.put(etichettaEsito(StatoPraticaConstants.NO_PARERE)); esito.put(etichettaEsito(StatoPraticaConstants.NO_PARERE));
JSONObject ret = JSONFactoryUtil.createJSONObject(); JSONObject json = JSONFactoryUtil.createJSONObject();
ret.put("esito", esito); json.put("esito", esito);
return ret.toString(); jsonVincoli = json.toString();
}
return jsonVincoli;
} }
private static JSONObject etichettaEsito(String value) { private static JSONObject etichettaEsito(String value) {
@ -570,9 +579,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
return controlloPraticaPersistence.update(controlloPratica); return controlloPraticaPersistence.update(controlloPratica);
} }
/** // ADT: BUG ID=5 - tracciamento operazione aggiungi varianti al controllo
* ADT: BUG ID=5 - tracciamento operazione aggiungi varianti al controllo
*/
@Override @Override
@Indexable(type = IndexableType.REINDEX) @Indexable(type = IndexableType.REINDEX)
public ControlloPratica addPraticheAlControlloVarianti(long controlloPraticaId, long dettPraticaId, public ControlloPratica addPraticheAlControlloVarianti(long controlloPraticaId, long dettPraticaId,
@ -603,7 +610,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public String getReturnValueScriptIniziale(long controlloPraticaId) throws PortalException, SystemException { public String getReturnValueScriptIniziale(long controlloPraticaId) throws PortalException, SystemException {
ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = getControlloPratica(controlloPraticaId);
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(controlloPratica.getDettPraticaId()); DettPratica dettPratica = dettPraticaLocalService.getDettPratica(controlloPratica.getDettPraticaId());
if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { if (TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) {
return "portos1_integrazioni"; return "portos1_integrazioni";
} else { } else {
@ -615,7 +622,7 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
public String getTipoEsito(long controlloPraticaId) throws SystemException, PortalException { public String getTipoEsito(long controlloPraticaId) throws SystemException, PortalException {
String tipoEsito = StringPool.BLANK; String tipoEsito = StringPool.BLANK;
ControlloPratica controlloPratica = ControlloPraticaLocalServiceUtil.fetchControlloPratica(controlloPraticaId); ControlloPratica controlloPratica = fetchControlloPratica(controlloPraticaId);
ClassLoader classLoaderKaleo = (ClassLoader) PortletBeanLocatorUtil.locate( ClassLoader classLoaderKaleo = (ClassLoader) PortletBeanLocatorUtil.locate(
com.liferay.portal.workflow.kaleo.service.ClpSerializer.getServletContextName(), "portletClassLoader"); com.liferay.portal.workflow.kaleo.service.ClpSerializer.getServletContextName(), "portletClassLoader");
DynamicQuery dqKaleo = DynamicQueryFactoryUtil.forClass(KaleoInstance.class, classLoaderKaleo); DynamicQuery dqKaleo = DynamicQueryFactoryUtil.forClass(KaleoInstance.class, classLoaderKaleo);
@ -658,12 +665,12 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
@Override @Override
public Long calculateDateAvvioProcedimento(long controlloPraticaId) throws SystemException, PortalException { public Long calculateDateAvvioProcedimento(long controlloPraticaId) throws SystemException, PortalException {
ControlloPratica controllo = ControlloPraticaLocalServiceUtil.fetchControlloPratica(controlloPraticaId); ControlloPratica controllo = fetchControlloPratica(controlloPraticaId);
IntPratica pratica = IntPraticaLocalServiceUtil.fetchIntPratica(controllo.getIntPraticaId()); IntPratica pratica = intPraticaLocalService.fetchIntPratica(controllo.getIntPraticaId());
Date apertura = pratica.getDtPratica(); Date apertura = pratica.getDtPratica();
Date chiusura = null; Date chiusura = null;
long stop = 0; long stop = 0;
List<Avviso> avvisi = AvvisoLocalServiceUtil.findByIntPratica( List<Avviso> avvisi = avvisoLocalService.findByIntPratica(
pratica.getIntPraticaId(), pratica.getIntPraticaId(),
QueryUtil.ALL_POS, QueryUtil.ALL_POS,
QueryUtil.ALL_POS, QueryUtil.ALL_POS,
@ -764,11 +771,11 @@ public class ControlloPraticaLocalServiceImpl extends ControlloPraticaLocalServi
do { do {
controlli = controlloPraticaPersistence.findWithDynamicQuery(queryCP, start, start + 10); controlli = controlloPraticaPersistence.findWithDynamicQuery(queryCP, start, start + 10);
for (ControlloPratica controllo : controlli) { for (ControlloPratica controllo : controlli) {
IntPratica pratica = IntPraticaLocalServiceUtil.getIntPratica(controllo.getIntPraticaId()); IntPratica pratica = intPraticaLocalService.getIntPratica(controllo.getIntPraticaId());
if ((0 == unitaOperativa) || (pratica.getUnitaOperativa() == unitaOperativa)) { if ((0 == unitaOperativa) || (pratica.getUnitaOperativa() == unitaOperativa)) {
long workflowInstanceId = 0L; long workflowInstanceId = 0L;
try { try {
workflowInstanceId = WorkflowInstanceLinkLocalServiceUtil.getWorkflowInstanceLink(companyId, workflowInstanceId = workflowInstanceLinkLocalService.getWorkflowInstanceLink(companyId,
groupId, ControlloPratica.class.getName(), controllo.getPrimaryKey()) groupId, ControlloPratica.class.getName(), controllo.getPrimaryKey())
.getWorkflowInstanceId(); .getWorkflowInstanceId();
} catch (NoSuchWorkflowInstanceLinkException e) {} } catch (NoSuchWorkflowInstanceLinkException e) {}

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

@ -9,7 +9,6 @@
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.Delega; import it.tref.liferay.portos.bo.model.Delega;
import it.tref.liferay.portos.bo.service.AsseverazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.DelegaLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.DelegaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.bean.FirmeBean; import it.tref.liferay.portos.bo.shared.bean.FirmeBean;
import it.tref.liferay.portos.bo.shared.util.FirmeUtil; import it.tref.liferay.portos.bo.shared.util.FirmeUtil;
@ -44,7 +43,6 @@ import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.model.DLFolder; import com.liferay.portlet.documentlibrary.model.DLFolder;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil; import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil;
/** /**
@ -390,7 +388,7 @@ public class DelegaLocalServiceImpl extends DelegaLocalServiceBaseImpl {
long userId = serviceContext.getUserId(); long userId = serviceContext.getUserId();
DLFolder folderTemplate = DLFolderLocalServiceUtil.getFolder(serviceContext.getThemeDisplay() DLFolder folderTemplate = DLFolderLocalServiceUtil.getFolder(serviceContext.getThemeDisplay()
.getCompanyGroupId(), 0L, "Template"); .getCompanyGroupId(), 0L, "Template");
FileEntry fileEntryIdTemplate = DLAppLocalServiceUtil.getFileEntry(serviceContext.getThemeDisplay() FileEntry fileEntryIdTemplate = dlAppLocalService.getFileEntry(serviceContext.getThemeDisplay()
.getCompanyGroupId(), folderTemplate.getFolderId(), "Modello Asseverazione"); .getCompanyGroupId(), folderTemplate.getFolderId(), "Modello Asseverazione");
DLFolder folderAllegati = DLFolderLocalServiceUtil.getFolder(serviceContext.getThemeDisplay() DLFolder folderAllegati = DLFolderLocalServiceUtil.getFolder(serviceContext.getThemeDisplay()
.getCompanyGroupId(), 0L, "Allegati"); .getCompanyGroupId(), 0L, "Allegati");
@ -419,7 +417,7 @@ public class DelegaLocalServiceImpl extends DelegaLocalServiceBaseImpl {
relazioni = (String) dichiarazioniMap.get("relazioni"); relazioni = (String) dichiarazioniMap.get("relazioni");
} }
User user = userLocalService.getUser(userId); User user = userLocalService.getUser(userId);
parameters.put("html", AsseverazioneLocalServiceUtil.testoAsseverazione(TipoSoggettoUtil.GEOLOGO, user, parameters.put("html", asseverazioneLocalService.testoAsseverazione(TipoSoggettoUtil.GEOLOGO, user,
dettPraticaId, relazioni)); dettPraticaId, relazioni));
parameters.put("modello", "AS-GEO"); parameters.put("modello", "AS-GEO");
ReportResultDto result = ReportUtil.generateReport(delega.getCompanyId(), userId, reportDto, null); ReportResultDto result = ReportUtil.generateReport(delega.getCompanyId(), userId, reportDto, null);

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

@ -19,7 +19,6 @@ import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.model.Soggetto; import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.model.Tempistica; import it.tref.liferay.portos.bo.model.Tempistica;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.DettPraticaLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.DettPraticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.PagamentoConstants; import it.tref.liferay.portos.bo.shared.util.PagamentoConstants;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
@ -1015,6 +1014,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
String interventoVoceP7, boolean nominaImpresa, boolean nominaDirettoreLavori, boolean nominaCollaudatore, String interventoVoceP7, boolean nominaImpresa, boolean nominaDirettoreLavori, boolean nominaCollaudatore,
boolean tcNoOpereEscavazione) throws PortalException, SystemException { boolean tcNoOpereEscavazione) throws PortalException, SystemException {
_log.info("Ciao1");
Date now = new Date(); Date now = new Date();
DettPratica dettPratica = dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId); DettPratica dettPratica = dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId);
dettPratica.setModifiedDate(serviceContext.getModifiedDate(now)); dettPratica.setModifiedDate(serviceContext.getModifiedDate(now));
@ -1699,7 +1699,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
dettPratica.setCodiceFiscalePrincipaleArcheologo(codiceFiscale); dettPratica.setCodiceFiscalePrincipaleArcheologo(codiceFiscale);
break; break;
} }
dettPratica = DettPraticaLocalServiceUtil.updateDettPratica(dettPratica); dettPratica = updateDettPratica(dettPratica);
return dettPratica; return dettPratica;
} }

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

@ -14,8 +14,6 @@ package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.DettPraticaServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.DettPraticaServiceBaseImpl; 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.DettPraticaEntryPermission;
import it.tref.liferay.portos.bo.service.permission.DettPraticaPermission; import it.tref.liferay.portos.bo.service.permission.DettPraticaPermission;
@ -66,7 +64,7 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
public DettPratica addDettPratica(long territorioId, String tipoProcedura, ServiceContext serviceContext) public DettPratica addDettPratica(long territorioId, String tipoProcedura, ServiceContext serviceContext)
throws PortalException, SystemException { throws PortalException, SystemException {
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(territorioId); Territorio territorio = territorioLocalService.getTerritorio(territorioId);
DettPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.ADD_ENTRY); DettPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.ADD_ENTRY);
return dettPraticaLocalService.addDettPratica(territorioId, tipoProcedura, serviceContext); return dettPraticaLocalService.addDettPratica(territorioId, tipoProcedura, serviceContext);
} }
@ -333,7 +331,7 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
@Override @Override
public DettPratica updateEsito(long dettPraticaId, int stato) throws IOException, SystemException, PortalException { public DettPratica updateEsito(long dettPraticaId, int stato) throws IOException, SystemException, PortalException {
DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId); DettPratica dettPratica = getDettPratica(dettPraticaId);
DettPraticaPermission.check(getPermissionChecker(), dettPratica.getGroupId(), ActionKeys.ADD_ENTRY); DettPraticaPermission.check(getPermissionChecker(), dettPratica.getGroupId(), ActionKeys.ADD_ENTRY);
return dettPraticaLocalService.updateEsito(dettPraticaId, stato); return dettPraticaLocalService.updateEsito(dettPraticaId, stato);
} }
@ -342,7 +340,7 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
public DettPratica updateEsitoIntegrazione(long dettPraticaId, int stato) throws IOException, SystemException, public DettPratica updateEsitoIntegrazione(long dettPraticaId, int stato) throws IOException, SystemException,
PortalException { PortalException {
DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId); DettPratica dettPratica = getDettPratica(dettPraticaId);
DettPraticaPermission.check(getPermissionChecker(), dettPratica.getGroupId(), ActionKeys.ADD_ENTRY); DettPraticaPermission.check(getPermissionChecker(), dettPratica.getGroupId(), ActionKeys.ADD_ENTRY);
return dettPraticaLocalService.updateEsitoIntegrazione(dettPraticaId, stato); return dettPraticaLocalService.updateEsitoIntegrazione(dettPraticaId, stato);
} }

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

@ -1,13 +1,9 @@
/** /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
* * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* any later version. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/ */
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
@ -52,11 +48,9 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
/** /**
* The implementation of the doc pratica local service. * The implementation of the doc pratica local service.
*
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy * 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. * their definitions into the {@link it.tref.liferay.portos.bo.service.DocPraticaLocalService} interface.
*
* <p> * <p>
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS * 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. * credentials because this service can only be accessed from within the same VM.
@ -79,8 +73,7 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
if (Validator.isNotNull(docPratica.getDlFileEntryId())) { if (Validator.isNotNull(docPratica.getDlFileEntryId())) {
dlAppLocalService.deleteFileEntry(docPratica.getDlFileEntryId()); dlAppLocalService.deleteFileEntry(docPratica.getDlFileEntryId());
} }
} catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) { } catch (NoSuchFileEntryException | NoSuchRepositoryEntryException e) {} catch (PortalException e) {
} catch (PortalException e) {
throw new SystemException(e); throw new SystemException(e);
} }
return super.deleteDocPratica(docPratica); return super.deleteDocPratica(docPratica);
@ -198,7 +191,7 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
long companyId = territorio.getCompanyId(); long companyId = territorio.getCompanyId();
long groupId = territorio.getGroupId(); long groupId = territorio.getGroupId();
// TODO forse è meglio ragionare con un'altra logica per i permessi // TODO forse è meglio ragionare con un'altra logica per i permessi
User user = UserLocalServiceUtil.getRoleUsers( User user = userLocalService.getRoleUsers(
RoleLocalServiceUtil.getRole(intPratica.getCompanyId(), RoleConstants.ADMINISTRATOR).getRoleId()) RoleLocalServiceUtil.getRole(intPratica.getCompanyId(), RoleConstants.ADMINISTRATOR).getRoleId())
.get(0); .get(0);
try { try {

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

@ -1,13 +1,9 @@
/** /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
* * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* any later version. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/ */
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
@ -18,7 +14,6 @@ import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.FineLavori; import it.tref.liferay.portos.bo.model.FineLavori;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.FineLavoriLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.FineLavoriLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.PagamentoConstants; import it.tref.liferay.portos.bo.shared.util.PagamentoConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil; import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
@ -55,11 +50,9 @@ import com.liferay.portal.service.ServiceContext;
/** /**
* The implementation of the fine lavori local service. * The implementation of the fine lavori local service.
*
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy * 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.FineLavoriLocalService} interface. * their definitions into the {@link it.tref.liferay.portos.bo.service.FineLavoriLocalService} interface.
*
* <p> * <p>
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS * 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. * credentials because this service can only be accessed from within the same VM.
@ -103,7 +96,7 @@ public class FineLavoriLocalServiceImpl extends FineLavoriLocalServiceBaseImpl {
public FineLavori addFineLavori(long intPraticaId, ServiceContext serviceContext) throws PortalException, public FineLavori addFineLavori(long intPraticaId, ServiceContext serviceContext) throws PortalException,
SystemException { SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
FineLavori fineLavori = initFineLavori(serviceContext); FineLavori fineLavori = initFineLavori(serviceContext);
fineLavori.setGroupId(intPratica.getGroupId()); fineLavori.setGroupId(intPratica.getGroupId());
fineLavori.setIntPraticaId(intPraticaId); fineLavori.setIntPraticaId(intPraticaId);
@ -196,7 +189,7 @@ public class FineLavoriLocalServiceImpl extends FineLavoriLocalServiceBaseImpl {
public void updateEsitoPagamento(long pagamentoId, long fineLavoriId, String stato) throws SystemException, public void updateEsitoPagamento(long pagamentoId, long fineLavoriId, String stato) throws SystemException,
PortalException { PortalException {
updateEsitoPagamento(pagamentoId, fineLavoriId, 0l, stato); updateEsitoPagamento(pagamentoId, fineLavoriId, 0, stato);
} }
@Override @Override
@ -275,7 +268,7 @@ public class FineLavoriLocalServiceImpl extends FineLavoriLocalServiceBaseImpl {
serviceContext.setScopeGroupId(fineLavori.getGroupId()); serviceContext.setScopeGroupId(fineLavori.getGroupId());
serviceContext.setCompanyId(fineLavori.getCompanyId()); serviceContext.setCompanyId(fineLavori.getCompanyId());
serviceContext.setUserId(fineLavori.getUserId()); serviceContext.setUserId(fineLavori.getUserId());
MailUtil.invioMailNotifica(fineLavori.getIntPraticaId(), 0l, fineLavoriId, FineLavori.class.getName(), to, cc, MailUtil.invioMailNotifica(fineLavori.getIntPraticaId(), 0, fineLavoriId, FineLavori.class.getName(), to, cc,
ccn, "NOTIFICA-BO", templateVariables, null, serviceContext); ccn, "NOTIFICA-BO", templateVariables, null, serviceContext);
} }

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

@ -1,21 +1,14 @@
/** /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
* * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
* This library is free software; you can redistribute it and/or modify it under * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
* the terms of the GNU Lesser General Public License as published by the Free * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* Software Foundation; either version 2.1 of the License, or (at your option) * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/ */
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.HistoryWorkflowAction; import it.tref.liferay.portos.bo.model.HistoryWorkflowAction;
import it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.HistoryWorkflowActionLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.HistoryWorkflowActionLocalServiceBaseImpl;
import java.util.List; import java.util.List;
@ -28,17 +21,12 @@ import com.liferay.portal.kernel.exception.SystemException;
/** /**
* The implementation of the history workflow action local service. * The implementation of the history workflow action local service.
*
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy
* added, rerun ServiceBuilder to copy their definitions into the * their definitions into the {@link it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalService} interface.
* {@link it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalService}
* interface.
*
* <p> * <p>
* This is a local service. Methods of this service will not have security * This is a local service. Methods of this service will not have security checks based on the propagated JAAS
* checks based on the propagated JAAS credentials because this service can only * credentials because this service can only be accessed from within the same VM.
* be accessed from within the same VM.
* </p> * </p>
* *
* @author Davide Barbagallo, 3F Consulting + Manifattura Web Group s.r.l. * @author Davide Barbagallo, 3F Consulting + Manifattura Web Group s.r.l.
@ -47,11 +35,9 @@ import com.liferay.portal.kernel.exception.SystemException;
*/ */
public class HistoryWorkflowActionLocalServiceImpl extends HistoryWorkflowActionLocalServiceBaseImpl { public class HistoryWorkflowActionLocalServiceImpl extends HistoryWorkflowActionLocalServiceBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link
* * it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalServiceUtil} to access the history workflow action
* Never reference this interface directly. Always use {@link * local service.
* it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalServiceUtil}
* to access the history workflow action local service.
*/ */
@Override @Override
@ -64,7 +50,7 @@ public class HistoryWorkflowActionLocalServiceImpl extends HistoryWorkflowAction
query.addOrder(OrderFactoryUtil.asc("createDate")); query.addOrder(OrderFactoryUtil.asc("createDate"));
else else
query.addOrder(OrderFactoryUtil.desc("createDate")); query.addOrder(OrderFactoryUtil.desc("createDate"));
return HistoryWorkflowActionLocalServiceUtil.dynamicQuery(query); return dynamicQuery(query);
} }
@Override @Override

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

@ -26,11 +26,6 @@ import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.model.StoricoSoggettoPratica; import it.tref.liferay.portos.bo.model.StoricoSoggettoPratica;
import it.tref.liferay.portos.bo.model.Tempistica; import it.tref.liferay.portos.bo.model.Tempistica;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.StoricoSoggettoPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.IntPraticaLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.IntPraticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.service.persistence.IntPraticaFinderUtil; import it.tref.liferay.portos.bo.service.persistence.IntPraticaFinderUtil;
import it.tref.liferay.portos.bo.shared.bean.FirmeBean; import it.tref.liferay.portos.bo.shared.bean.FirmeBean;
@ -102,7 +97,6 @@ import com.liferay.portal.security.permission.PermissionThreadLocal;
import com.liferay.portal.service.GroupLocalServiceUtil; import com.liferay.portal.service.GroupLocalServiceUtil;
import com.liferay.portal.service.OrganizationLocalServiceUtil; import com.liferay.portal.service.OrganizationLocalServiceUtil;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil; import com.liferay.portal.service.WorkflowInstanceLinkLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFolderException; import com.liferay.portlet.documentlibrary.NoSuchFolderException;
@ -150,7 +144,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
throws SystemException, PortalException { throws SystemException, PortalException {
User user = userLocalService.getUser(serviceContext.getUserId()); User user = userLocalService.getUser(serviceContext.getUserId());
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(territorioId); Territorio territorio = territorioLocalService.getTerritorio(territorioId);
Date now = new Date(); Date now = new Date();
IntPratica intPratica = createIntPratica(counterLocalService.increment(IntPratica.class.getName())); IntPratica intPratica = createIntPratica(counterLocalService.increment(IntPratica.class.getName()));
intPratica.setCompanyId(serviceContext.getCompanyId()); intPratica.setCompanyId(serviceContext.getCompanyId());
@ -177,7 +171,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
Date dtPratica, ServiceContext serviceContext) throws PortalException, SystemException { Date dtPratica, ServiceContext serviceContext) throws PortalException, SystemException {
Date now = new Date(); Date now = new Date();
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(territorioId); Territorio territorio = territorioLocalService.getTerritorio(territorioId);
IntPratica intPratica = intPraticaPersistence.create(counterLocalService.increment(IntPratica.class.getName())); IntPratica intPratica = intPraticaPersistence.create(counterLocalService.increment(IntPratica.class.getName()));
intPratica.setCompanyId(serviceContext.getCompanyId()); intPratica.setCompanyId(serviceContext.getCompanyId());
intPratica.setUserId(userId); intPratica.setUserId(userId);
@ -400,7 +394,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
private DynamicQuery queryPosizione() { private DynamicQuery queryPosizione() {
DynamicQuery query = IntPraticaLocalServiceUtil.dynamicQuery(); DynamicQuery query = dynamicQuery();
query.add(RestrictionsFactoryUtil.ne("numeroProgetto", StringPool.BLANK)); query.add(RestrictionsFactoryUtil.ne("numeroProgetto", StringPool.BLANK));
query.add(RestrictionsFactoryUtil.isNotNull("numeroProgetto")); query.add(RestrictionsFactoryUtil.isNotNull("numeroProgetto"));
return query; return query;
@ -443,16 +437,16 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
IntPratica intPratica = getIntPratica(intPraticaId); IntPratica intPratica = getIntPratica(intPraticaId);
intPratica.setModifiedDate(new Date()); intPratica.setModifiedDate(new Date());
User oldUser = UserLocalServiceUtil.getUser(intPratica.getUserId()); User oldUser = userLocalService.getUser(intPratica.getUserId());
User newUser = UserLocalServiceUtil.getUser(soggettoId); User newUser = userLocalService.getUser(soggettoId);
// sostituisci int pratica // sostituisci int pratica
intPratica.setUserId(soggettoId); intPratica.setUserId(soggettoId);
intPratica.setUserName(newUser.getFullName()); intPratica.setUserName(newUser.getFullName());
DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId); DettPratica dettPratica = dettPraticaLocalService.getLastCompletedByIntPratica(intPraticaId);
dettPratica.setCodiceFiscaleDelegatoCommittente(newUser.getScreenName()); dettPratica.setCodiceFiscaleDelegatoCommittente(newUser.getScreenName());
DettPraticaLocalServiceUtil.updateDettPratica(dettPratica); dettPraticaLocalService.updateDettPratica(dettPratica);
// registra storico // registra storico
StoricoSoggettoPraticaLocalServiceUtil.addStoricoSoggettoPratica(intPraticaId, oldUser.getFirstName(), storicoSoggettoPraticaLocalService.addStoricoSoggettoPratica(intPraticaId, oldUser.getFirstName(),
oldUser.getLastName(), oldUser.getScreenName(), serviceContext); oldUser.getLastName(), oldUser.getScreenName(), serviceContext);
Indexer indexer = IndexerRegistryUtil.getIndexer(IntPratica.class); Indexer indexer = IndexerRegistryUtil.getIndexer(IntPratica.class);
intPratica = updateIntPratica(intPratica); intPratica = updateIntPratica(intPratica);
@ -542,7 +536,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
private DynamicQuery createQueryProgetti(long companyId, long soggettoId) throws SystemException, PortalException { private DynamicQuery createQueryProgetti(long companyId, long soggettoId) throws SystemException, PortalException {
DynamicQuery dynamicQuery = intPraticaLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("companyId").eq(companyId)); dynamicQuery.add(PropertyFactoryUtil.forName("companyId").eq(companyId));
dynamicQuery.add(PropertyFactoryUtil.forName("userId").eq(soggettoId)); dynamicQuery.add(PropertyFactoryUtil.forName("userId").eq(soggettoId));
dynamicQuery.add(RestrictionsFactoryUtil.ne("statoPratica", StatoPraticaConstants.ANNULLATA)); dynamicQuery.add(RestrictionsFactoryUtil.ne("statoPratica", StatoPraticaConstants.ANNULLATA));
@ -587,7 +581,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
private DynamicQuery createQueryArchivio(long companyId, long soggettoId, List<Long> ids) throws SystemException, private DynamicQuery createQueryArchivio(long companyId, long soggettoId, List<Long> ids) throws SystemException,
PortalException { PortalException {
DynamicQuery dynamicQuery = intPraticaLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("companyId").eq(companyId)); dynamicQuery.add(PropertyFactoryUtil.forName("companyId").eq(companyId));
Disjunction disjunction = RestrictionsFactoryUtil.disjunction(); Disjunction disjunction = RestrictionsFactoryUtil.disjunction();
@ -636,7 +630,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
private DynamicQuery createQueryAltriProgetti(long companyId, List<Long> ids) throws SystemException, private DynamicQuery createQueryAltriProgetti(long companyId, List<Long> ids) throws SystemException,
PortalException { PortalException {
DynamicQuery dynamicQuery = intPraticaLocalService.dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(PropertyFactoryUtil.forName("companyId").eq(companyId)); dynamicQuery.add(PropertyFactoryUtil.forName("companyId").eq(companyId));
dynamicQuery.add(RestrictionsFactoryUtil.ne("status", WorkflowConstants.STATUS_ANY)); dynamicQuery.add(RestrictionsFactoryUtil.ne("status", WorkflowConstants.STATUS_ANY));
@ -860,7 +854,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
queryCP.add(RestrictionsFactoryUtil.eq("intPraticaId", intPratica.getIntPraticaId())); queryCP.add(RestrictionsFactoryUtil.eq("intPraticaId", intPratica.getIntPraticaId()));
queryCP.addOrder(OrderFactoryUtil.desc("controlloPraticaId")); queryCP.addOrder(OrderFactoryUtil.desc("controlloPraticaId"));
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
List<ControlloPratica> appList = ControlloPraticaLocalServiceUtil.dynamicQuery(queryCP, QueryUtil.ALL_POS, List<ControlloPratica> appList = controlloPraticaLocalService.dynamicQuery(queryCP, QueryUtil.ALL_POS,
QueryUtil.ALL_POS); QueryUtil.ALL_POS);
for (ControlloPratica controlloPratica : appList) { for (ControlloPratica controlloPratica : appList) {
_log.info("disattivazione - ControlloPraticaId=" + controlloPratica.getControlloPraticaId()); _log.info("disattivazione - ControlloPraticaId=" + controlloPratica.getControlloPraticaId());
@ -1203,7 +1197,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
DynamicQuery queryCP = DynamicQueryFactoryUtil.forClass(ControlloPratica.class); DynamicQuery queryCP = DynamicQueryFactoryUtil.forClass(ControlloPratica.class);
queryCP.add(RestrictionsFactoryUtil.eq("intPraticaId", intPratica.getIntPraticaId())); queryCP.add(RestrictionsFactoryUtil.eq("intPraticaId", intPratica.getIntPraticaId()));
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
List<ControlloPratica> appList = ControlloPraticaLocalServiceUtil.dynamicQuery(queryCP, List<ControlloPratica> appList = controlloPraticaLocalService.dynamicQuery(queryCP,
QueryUtil.ALL_POS, QueryUtil.ALL_POS); QueryUtil.ALL_POS, QueryUtil.ALL_POS);
for (ControlloPratica controlloPratica : appList) { for (ControlloPratica controlloPratica : appList) {
controlloIndexer.delete(companyId, controlloPratica.getUuid()); controlloIndexer.delete(companyId, controlloPratica.getUuid());
@ -1220,14 +1214,14 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
public void reIndexFasciolo(String numeroProgetto, long companyId) throws SystemException { public void reIndexFasciolo(String numeroProgetto, long companyId) throws SystemException {
IntPratica intPratica = null; IntPratica intPratica = null;
intPratica = IntPraticaLocalServiceUtil.findByNumeroProgetto(numeroProgetto); intPratica = findByNumeroProgetto(numeroProgetto);
reIndexFascicolo(intPratica, companyId); reIndexFascicolo(intPratica, companyId);
} }
@Override @Override
public void reIndexFasciolo(long intPraticaId, long companyId) throws PortalException, SystemException { public void reIndexFasciolo(long intPraticaId, long companyId) throws PortalException, SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = getIntPratica(intPraticaId);
reIndexFascicolo(intPratica, companyId); reIndexFascicolo(intPratica, companyId);
} }

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

@ -14,8 +14,6 @@ package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.IntPraticaServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.IntPraticaServiceBaseImpl;
import it.tref.liferay.portos.bo.service.permission.IntPraticaPermission; import it.tref.liferay.portos.bo.service.permission.IntPraticaPermission;
import it.tref.liferay.portos.bo.shared.util.ActionKeys; import it.tref.liferay.portos.bo.shared.util.ActionKeys;
@ -62,7 +60,7 @@ public class IntPraticaServiceImpl extends IntPraticaServiceBaseImpl {
@Override @Override
public void deleteIntPratica(long intPraticaId, long userId) throws PortalException, SystemException { public void deleteIntPratica(long intPraticaId, long userId) throws PortalException, SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
if (ValidazionePraticaUtil.canDeletePratica(intPraticaId, userId)) { if (ValidazionePraticaUtil.canDeletePratica(intPraticaId, userId)) {
intPraticaLocalService.deleteIntPratica(intPratica); intPraticaLocalService.deleteIntPratica(intPratica);
} else { } else {
@ -73,8 +71,8 @@ public class IntPraticaServiceImpl extends IntPraticaServiceBaseImpl {
@Override @Override
public void sospendiPratica(long intPraticaId, boolean sospesa) throws PortalException, SystemException { public void sospendiPratica(long intPraticaId, boolean sospesa) throws PortalException, SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.SOSPENDI_FASCICOLO); IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.SOSPENDI_FASCICOLO);
intPraticaLocalService.sospendiPratica(intPraticaId, sospesa); intPraticaLocalService.sospendiPratica(intPraticaId, sospesa);
} }
@ -83,8 +81,8 @@ public class IntPraticaServiceImpl extends IntPraticaServiceBaseImpl {
public void cambiaTitolare(long intPraticaId, long soggettoId, ServiceContext serviceContext) public void cambiaTitolare(long intPraticaId, long soggettoId, ServiceContext serviceContext)
throws PortalException, SystemException { throws PortalException, SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.CAMBIO_TITOLARE); IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.CAMBIO_TITOLARE);
intPraticaLocalService.cambiaTitolare(intPraticaId, soggettoId, serviceContext); intPraticaLocalService.cambiaTitolare(intPraticaId, soggettoId, serviceContext);
} }
@ -92,8 +90,8 @@ public class IntPraticaServiceImpl extends IntPraticaServiceBaseImpl {
@Override @Override
public void updateStatoPratica(long intPraticaId, String statoPratica) throws PortalException, SystemException { public void updateStatoPratica(long intPraticaId, String statoPratica) throws PortalException, SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.CAMBIO_STATO); IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.CAMBIO_STATO);
intPraticaLocalService.updateStatoPratica(intPraticaId, statoPratica); intPraticaLocalService.updateStatoPratica(intPraticaId, statoPratica);
} }

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

@ -1,13 +1,9 @@
/** /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
* * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* any later version. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/ */
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
@ -45,15 +41,12 @@ import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFolderException; import com.liferay.portlet.documentlibrary.NoSuchFolderException;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
/** /**
* The implementation of the pagamento local service. * The implementation of the pagamento local service.
*
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy * 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.PagamentoLocalService} interface. * their definitions into the {@link it.tref.liferay.portos.bo.service.PagamentoLocalService} interface.
*
* <p> * <p>
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS * 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. * credentials because this service can only be accessed from within the same VM.
@ -72,7 +65,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
private static final Log _log = LogFactoryUtil.getLog(PagamentoLocalServiceImpl.class); private static final Log _log = LogFactoryUtil.getLog(PagamentoLocalServiceImpl.class);
@SuppressWarnings("serial") @SuppressWarnings("serial")
private static Map<String, Double> pagamenti = new HashMap<String, Double>() { private static final Map<String, Double> PAGAMENTI = new HashMap<String, Double>() {
{ {
put("pagSoggettiAdAutorizzazione", 30.00); put("pagSoggettiAdAutorizzazione", 30.00);
put("pagInterventiRestauroManufatti", 35.00); put("pagInterventiRestauroManufatti", 35.00);
@ -96,7 +89,8 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
@Override @Override
public Map<String, Double> getPagamenti() { public Map<String, Double> getPagamenti() {
return PagamentoLocalServiceImpl.pagamenti;
return PAGAMENTI;
} }
@Override @Override
@ -376,7 +370,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
public Pagamento deletePagamento(long pagamentoId) throws PortalException, SystemException { public Pagamento deletePagamento(long pagamentoId) throws PortalException, SystemException {
Pagamento pagamento = super.deletePagamento(pagamentoId); Pagamento pagamento = super.deletePagamento(pagamentoId);
DLAppLocalServiceUtil.deleteFileEntry(pagamento.getFileEntryId()); dlAppLocalService.deleteFileEntry(pagamento.getFileEntryId());
deleteDettPraticaPagamento(pagamento); deleteDettPraticaPagamento(pagamento);
return pagamento; return pagamento;
} }
@ -387,7 +381,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
pagamento = super.deletePagamento(pagamento); pagamento = super.deletePagamento(pagamento);
if (Validator.isNotNull(pagamento.getFileEntryId())) { if (Validator.isNotNull(pagamento.getFileEntryId())) {
try { try {
DLAppLocalServiceUtil.deleteFileEntry(pagamento.getFileEntryId()); dlAppLocalService.deleteFileEntry(pagamento.getFileEntryId());
} catch (PortalException | SystemException e) { } catch (PortalException | SystemException e) {
_log.info("L'allegato del pagamento " + pagamento.getPagamentoId() + " non esisteva."); _log.info("L'allegato del pagamento " + pagamento.getPagamentoId() + " non esisteva.");
} }

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

@ -16,7 +16,6 @@ import it.tref.liferay.portos.bo.model.Collaudo;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.FineLavori; import it.tref.liferay.portos.bo.model.FineLavori;
import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.PagamentoServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.PagamentoServiceBaseImpl;
import it.tref.liferay.portos.bo.service.permission.PendingPagamentiPermission; import it.tref.liferay.portos.bo.service.permission.PendingPagamentiPermission;
import it.tref.liferay.portos.bo.shared.util.ActionKeys; import it.tref.liferay.portos.bo.shared.util.ActionKeys;
@ -54,7 +53,7 @@ public class PagamentoServiceImpl extends PagamentoServiceBaseImpl {
public void sostituisciPagamento(long pagamentoId, String codiceFiscaleCommittente, String mezzo, String url, public void sostituisciPagamento(long pagamentoId, String codiceFiscaleCommittente, String mezzo, String url,
ServiceContext serviceContext) throws PortalException, SystemException { ServiceContext serviceContext) throws PortalException, SystemException {
Pagamento pagamento = PagamentoLocalServiceUtil.getPagamento(pagamentoId); Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId);
long userId = findTitolare(pagamentoId); long userId = findTitolare(pagamentoId);
if (getUserId() == userId || DelegheUtil.hasDelegaPagamento(userId, pagamento.getClassPk())) { if (getUserId() == userId || DelegheUtil.hasDelegaPagamento(userId, pagamento.getClassPk())) {
pagamentoLocalService.sostituisciPagamento(pagamentoId, codiceFiscaleCommittente, mezzo, url, pagamentoLocalService.sostituisciPagamento(pagamentoId, codiceFiscaleCommittente, mezzo, url,
@ -94,7 +93,7 @@ public class PagamentoServiceImpl extends PagamentoServiceBaseImpl {
public void updatePagamentoManuale(long pagamentoId, String numeroBollettino, byte[] content, public void updatePagamentoManuale(long pagamentoId, String numeroBollettino, byte[] content,
String sourceFileName, ServiceContext serviceContext) throws IOException, PortalException, SystemException { String sourceFileName, ServiceContext serviceContext) throws IOException, PortalException, SystemException {
Pagamento pagamento = PagamentoLocalServiceUtil.getPagamento(pagamentoId); Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId);
long userId = findTitolare(pagamentoId); long userId = findTitolare(pagamentoId);
if (getUserId() == userId || DelegheUtil.hasDelegaPagamento(userId, pagamento.getClassPk())) { if (getUserId() == userId || DelegheUtil.hasDelegaPagamento(userId, pagamento.getClassPk())) {
pagamentoLocalService.updatePagamentoManuale(pagamentoId, numeroBollettino, content, sourceFileName, pagamentoLocalService.updatePagamentoManuale(pagamentoId, numeroBollettino, content, sourceFileName,
@ -107,7 +106,7 @@ public class PagamentoServiceImpl extends PagamentoServiceBaseImpl {
private long findTitolare(long pagamentoId) throws PortalException, SystemException { private long findTitolare(long pagamentoId) throws PortalException, SystemException {
Pagamento pagamento = PagamentoLocalServiceUtil.getPagamento(pagamentoId); Pagamento pagamento = pagamentoLocalService.getPagamento(pagamentoId);
long userId = 0L; long userId = 0L;
if (DettPratica.class.getName().equals(pagamento.getClassName())) { if (DettPratica.class.getName().equals(pagamento.getClassName())) {
DettPratica dettPratica = dettPraticaLocalService.getDettPratica(pagamento.getClassPk()); DettPratica dettPratica = dettPraticaLocalService.getDettPratica(pagamento.getClassPk());

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

@ -1,13 +1,9 @@
/** /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
* * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* any later version. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/ */
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
@ -41,18 +37,15 @@ import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.util.PortalUtil; import com.liferay.portal.util.PortalUtil;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException; import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.NoSuchFolderException; import com.liferay.portlet.documentlibrary.NoSuchFolderException;
/** /**
* The implementation of the parere geologo local service. * The implementation of the parere geologo local service.
*
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy * 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.ParereGeologoLocalService} interface. * their definitions into the {@link it.tref.liferay.portos.bo.service.ParereGeologoLocalService} interface.
*
* <p> * <p>
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS * 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. * credentials because this service can only be accessed from within the same VM.
@ -77,7 +70,7 @@ public class ParereGeologoLocalServiceImpl extends ParereGeologoLocalServiceBase
long parereGeologoId = counterLocalService.increment(ParereGeologo.class.getName()); long parereGeologoId = counterLocalService.increment(ParereGeologo.class.getName());
ParereGeologo parereGeologo = parereGeologoPersistence.create(parereGeologoId); ParereGeologo parereGeologo = parereGeologoPersistence.create(parereGeologoId);
parereGeologo.setCompanyId(serviceContext.getCompanyId()); parereGeologo.setCompanyId(serviceContext.getCompanyId());
User user = UserLocalServiceUtil.getUser(serviceContext.getUserId()); User user = userLocalService.getUser(serviceContext.getUserId());
parereGeologo.setUserId(user.getUserId()); parereGeologo.setUserId(user.getUserId());
parereGeologo.setUserName(user.getScreenName()); parereGeologo.setUserName(user.getScreenName());
parereGeologo.setCreateDate(serviceContext.getCreateDate()); parereGeologo.setCreateDate(serviceContext.getCreateDate());
@ -96,7 +89,7 @@ public class ParereGeologoLocalServiceImpl extends ParereGeologoLocalServiceBase
ServiceContext serviceContext) throws PortalException, SystemException { ServiceContext serviceContext) throws PortalException, SystemException {
ParereGeologo parereGeologo = getParereGeologo(parereGeologoId); ParereGeologo parereGeologo = getParereGeologo(parereGeologoId);
User geologo = UserLocalServiceUtil.getUser(serviceContext.getUserId()); User geologo = userLocalService.getUser(serviceContext.getUserId());
if (Validator.isNotNull(geologo) && serviceContext.getUserId() == geologo.getUserId()) { if (Validator.isNotNull(geologo) && serviceContext.getUserId() == geologo.getUserId()) {
Date now = new Date(); Date now = new Date();
parereGeologo.setModifiedDate(serviceContext.getModifiedDate()); parereGeologo.setModifiedDate(serviceContext.getModifiedDate());

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

@ -15,8 +15,6 @@ package it.tref.liferay.portos.bo.service.impl;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.ParereGeologo; import it.tref.liferay.portos.bo.model.ParereGeologo;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.ParereGeologoServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.ParereGeologoServiceBaseImpl;
import it.tref.liferay.portos.bo.service.permission.IntPraticaPermission; import it.tref.liferay.portos.bo.service.permission.IntPraticaPermission;
import it.tref.liferay.portos.bo.shared.util.ActionKeys; import it.tref.liferay.portos.bo.shared.util.ActionKeys;
@ -53,8 +51,8 @@ public class ParereGeologoServiceImpl extends ParereGeologoServiceBaseImpl {
public ParereGeologo addParereGeologo(long geologoUserId, long intPraticaId, long dettPraticaId, public ParereGeologo addParereGeologo(long geologoUserId, long intPraticaId, long dettPraticaId,
String noteRichiedente, ServiceContext serviceContext) throws SystemException, PortalException { String noteRichiedente, ServiceContext serviceContext) throws SystemException, PortalException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = territorioLocalService.getTerritorio(intPratica.getTerritorioId());
IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.RICHIEDI_PARERE_GEOLOGO); IntPraticaPermission.check(getPermissionChecker(), territorio.getGroupId(), ActionKeys.RICHIEDI_PARERE_GEOLOGO);
return parereGeologoLocalService.addParereGeologo(geologoUserId, intPraticaId, dettPraticaId, noteRichiedente, serviceContext); return parereGeologoLocalService.addParereGeologo(geologoUserId, intPraticaId, dettPraticaId, noteRichiedente, serviceContext);
} }

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

@ -1,13 +1,9 @@
/** /**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. * Copyright (c) 2000-present Liferay, Inc. All rights reserved. This library is free software; you can redistribute it
* * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* any later version. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/ */
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
@ -22,6 +18,7 @@ import it.tref.liferay.portos.bo.util.DocumentiPraticaUtil;
import it.tref.liferay.portos.bo.util.SoggettiUtil; import it.tref.liferay.portos.bo.util.SoggettiUtil;
import it.tref.liferay.portos.bo.util.WorkflowConstants; import it.tref.liferay.portos.bo.util.WorkflowConstants;
import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
@ -48,11 +45,9 @@ import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
/** /**
* The implementation of the soggetto local service. * The implementation of the soggetto local service.
*
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy * 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.SoggettoLocalService} interface. * their definitions into the {@link it.tref.liferay.portos.bo.service.SoggettoLocalService} interface.
*
* <p> * <p>
* This is a local service. Methods of this service will not have security checks based on the propagated JAAS * 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. * credentials because this service can only be accessed from within the same VM.
@ -1233,51 +1228,53 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery); return dynamicQuery(dynamicQuery);
} }
@SuppressWarnings("serial") private static Map<String, String> tipologieSoggetti = null;
private static final Map<String, String> TIPOLOGIE_SOGGETTI = new LinkedHashMap<String, String>() {
{ @Override
put(TipoSoggettoUtil.COMMITTENTE, public Map<String, String> getTipologieSoggetti() {
if (tipologieSoggetti == null) {
Map<String, String> m = new LinkedHashMap<>();
m.put(TipoSoggettoUtil.COMMITTENTE,
LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.COMMITTENTE)); LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.COMMITTENTE));
put(TipoSoggettoUtil.PROGETTISTA, m.put(TipoSoggettoUtil.PROGETTISTA,
LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.PROGETTISTA)); LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.PROGETTISTA));
put(TipoSoggettoUtil.DIRETTORE_LAVORI, m.put(TipoSoggettoUtil.DIRETTORE_LAVORI,
LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.DIRETTORE_LAVORI)); LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.DIRETTORE_LAVORI));
put(TipoSoggettoUtil.DITTA, LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.DITTA)); m.put(TipoSoggettoUtil.DITTA, LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.DITTA));
put(TipoSoggettoUtil.GEOLOGO, LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.GEOLOGO)); m.put(TipoSoggettoUtil.GEOLOGO, LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.GEOLOGO));
put(TipoSoggettoUtil.COLLAUDATORE, m.put(TipoSoggettoUtil.COLLAUDATORE,
LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.COLLAUDATORE)); LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.COLLAUDATORE));
put(TipoSoggettoUtil.ARCHEOLOGO, m.put(TipoSoggettoUtil.ARCHEOLOGO,
LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.ARCHEOLOGO)); LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.ARCHEOLOGO));
put(TipoSoggettoUtil.ALTRO_SOGGETTO, m.put(TipoSoggettoUtil.ALTRO_SOGGETTO,
LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.ALTRO_SOGGETTO)); LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.ALTRO_SOGGETTO));
tipologieSoggetti = Collections.unmodifiableMap(m);
} }
}; return tipologieSoggetti;
@Override
public Map<String, String> getTipologieSoggetti() {
return TIPOLOGIE_SOGGETTI;
} }
@SuppressWarnings("serial") private static Map<String, String> ambitiProfessionali = null;
private static final Map<String, String> AMBITI_PROFESSIONALI = new LinkedHashMap<String, String>() {
{
put("strutturale", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutturale"));
put("fondazioni", LanguageUtil.get(Locale.ITALIAN, "label-ambito-fondazioni"));
put("strutt-ele", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-ele"));
put("solai", LanguageUtil.get(Locale.ITALIAN, "label-ambito-solai"));
put("copertura", LanguageUtil.get(Locale.ITALIAN, "label-ambito-copertura"));
put("strutt-pref", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-pref"));
put("strutt-in-legno", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-legno"));
put("strutt-in-acciaio", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-acciaio"));
put("strutt-in-ca", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-ca"));
put("strutt-in-muratura", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-muratura"));
put("architettonico", LanguageUtil.get(Locale.ITALIAN, "label-ambito-architettonico"));
put("ambitoProf-altro", LanguageUtil.get(Locale.ITALIAN, "label-ambito-altro"));
}
};
@Override @Override
public Map<String, String> getAmbitiProfessionali() { public Map<String, String> getAmbitiProfessionali() {
return AMBITI_PROFESSIONALI;
if (ambitiProfessionali == null) {
Map<String, String> m = new LinkedHashMap<>();
m.put("strutturale", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutturale"));
m.put("fondazioni", LanguageUtil.get(Locale.ITALIAN, "label-ambito-fondazioni"));
m.put("strutt-ele", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-ele"));
m.put("solai", LanguageUtil.get(Locale.ITALIAN, "label-ambito-solai"));
m.put("copertura", LanguageUtil.get(Locale.ITALIAN, "label-ambito-copertura"));
m.put("strutt-pref", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-pref"));
m.put("strutt-in-legno", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-legno"));
m.put("strutt-in-acciaio", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-acciaio"));
m.put("strutt-in-ca", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-ca"));
m.put("strutt-in-muratura", LanguageUtil.get(Locale.ITALIAN, "label-ambito-strutt-in-muratura"));
m.put("architettonico", LanguageUtil.get(Locale.ITALIAN, "label-ambito-architettonico"));
m.put("ambitoProf-altro", LanguageUtil.get(Locale.ITALIAN, "label-ambito-altro"));
ambitiProfessionali = Collections.unmodifiableMap(m);
}
return ambitiProfessionali;
} }
} }

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

@ -16,8 +16,6 @@ import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.Tempistica; 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.TempisticaImpl;
import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.TempisticaLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.TempisticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil; import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
@ -227,7 +225,7 @@ public class TempisticaLocalServiceImpl extends TempisticaLocalServiceBaseImpl {
public String getDtSottopostaAParere(long intPraticaId) throws SystemException { public String getDtSottopostaAParere(long intPraticaId) throws SystemException {
// ADT: BUG SCADENZARIO // ADT: BUG SCADENZARIO
DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId); DettPratica dettPratica = dettPraticaLocalService.getLastCompletedByIntPratica(intPraticaId);
if (dettPratica != null && dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)) { if (dettPratica != null && dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)) {
Date d = dettPratica.getDtProtocollo(); Date d = dettPratica.getDtProtocollo();
if (d != null) { if (d != null) {
@ -241,7 +239,7 @@ public class TempisticaLocalServiceImpl extends TempisticaLocalServiceBaseImpl {
Order defaultOrder = OrderFactoryUtil.desc("createDate"); Order defaultOrder = OrderFactoryUtil.desc("createDate");
queryAvv.addOrder(defaultOrder); queryAvv.addOrder(defaultOrder);
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
List<Avviso> listaAvv = AvvisoLocalServiceUtil.dynamicQuery(queryAvv); List<Avviso> listaAvv = avvisoLocalService.dynamicQuery(queryAvv);
return listaAvv.isEmpty() ? StringPool.BLANK : sdf.format(listaAvv.get(0).getDtInvio()); return listaAvv.isEmpty() ? StringPool.BLANK : sdf.format(listaAvv.get(0).getDtInvio());
} }

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

@ -140,7 +140,7 @@ public class TerritorioLocalServiceImpl extends TerritorioLocalServiceBaseImpl {
dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property("codiceProvincia"))); dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property("codiceProvincia")));
Junction and = RestrictionsFactoryUtil.conjunction(); Junction and = RestrictionsFactoryUtil.conjunction();
Date date = new Date(); Date date = new Date();
and.add(PropertyFactoryUtil.forName("groupId").ne(0l)); and.add(PropertyFactoryUtil.forName("groupId").ne(0L));
and.add(PropertyFactoryUtil.forName("dtIni").le(date)); and.add(PropertyFactoryUtil.forName("dtIni").le(date));
Junction or = RestrictionsFactoryUtil.disjunction(); Junction or = RestrictionsFactoryUtil.disjunction();
or.add(PropertyFactoryUtil.forName("dtFin").isNull()); or.add(PropertyFactoryUtil.forName("dtFin").isNull());
@ -159,7 +159,7 @@ public class TerritorioLocalServiceImpl extends TerritorioLocalServiceBaseImpl {
dynamicQuery.add(RestrictionsFactoryUtil.eq("codiceProvincia", codiceProvincia)); dynamicQuery.add(RestrictionsFactoryUtil.eq("codiceProvincia", codiceProvincia));
Junction and = RestrictionsFactoryUtil.conjunction(); Junction and = RestrictionsFactoryUtil.conjunction();
Date date = new Date(); Date date = new Date();
and.add(PropertyFactoryUtil.forName("groupId").ne(0l)); and.add(PropertyFactoryUtil.forName("groupId").ne(0L));
and.add(PropertyFactoryUtil.forName("dtIni").le(date)); and.add(PropertyFactoryUtil.forName("dtIni").le(date));
Junction or = RestrictionsFactoryUtil.disjunction(); Junction or = RestrictionsFactoryUtil.disjunction();
or.add(PropertyFactoryUtil.forName("dtFin").isNull()); or.add(PropertyFactoryUtil.forName("dtFin").isNull());
@ -177,7 +177,7 @@ public class TerritorioLocalServiceImpl extends TerritorioLocalServiceBaseImpl {
dynamicQuery.add(PropertyFactoryUtil.forName("comuneId").eq(comuneId)); dynamicQuery.add(PropertyFactoryUtil.forName("comuneId").eq(comuneId));
Junction and = RestrictionsFactoryUtil.conjunction(); Junction and = RestrictionsFactoryUtil.conjunction();
Date date = new Date(); Date date = new Date();
and.add(PropertyFactoryUtil.forName("groupId").ne(0l)); and.add(PropertyFactoryUtil.forName("groupId").ne(0L));
and.add(PropertyFactoryUtil.forName("dtIni").le(date)); and.add(PropertyFactoryUtil.forName("dtIni").le(date));
Junction or = RestrictionsFactoryUtil.disjunction(); Junction or = RestrictionsFactoryUtil.disjunction();
or.add(PropertyFactoryUtil.forName("dtFin").isNull()); or.add(PropertyFactoryUtil.forName("dtFin").isNull());

12
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/GestioneFirmeUtil.java

@ -4,7 +4,7 @@ import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil; import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants; import it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants;
import java.util.ArrayList; import java.util.Arrays;
import java.util.List; import java.util.List;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
@ -20,13 +20,9 @@ import com.liferay.portal.service.UserLocalServiceUtil;
public class GestioneFirmeUtil { public class GestioneFirmeUtil {
@SuppressWarnings("serial") @SuppressWarnings("serial")
private static List<String> tipoDocumentoFirmaBase = new ArrayList<String>() { private static List<String> tipoDocumentoFirmaBase = Arrays.<String> asList(
{ StatoPraticaConstants.INVIO_AVVISO_MANUALE, StatoPraticaConstants.INTEGRAZIONE,
add(StatoPraticaConstants.INVIO_AVVISO_MANUALE); StatoPraticaConstants.PREAVVISO_CONTRARIO);
add(StatoPraticaConstants.INTEGRAZIONE);
add(StatoPraticaConstants.PREAVVISO_CONTRARIO);
}
};
public static boolean hasFirmaPermision(long userId, long groupId) throws PortalException, SystemException { public static boolean hasFirmaPermision(long userId, long groupId) throws PortalException, SystemException {

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.namespace=portos_bo
build.number=3256 build.number=3308
build.date=1630403731363 build.date=1630678547546
build.auto.upgrade=true build.auto.upgrade=true
## ##

71
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/advanced_search.jsp

@ -30,65 +30,26 @@ List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrgani
</div> </div>
<div class="col-xs-12 col-md-3"> <div class="col-xs-12 col-md-3">
<aui:select name="tipoPratica" label="Tipo Pratica"> <aui:select name="tipoPratica" label="Tipo Pratica">
<aui:option value="-1">Seleziona il tipo di pratica</aui:option> <aui:option value="-1" label="Seleziona il tipo di pratica" />
<aui:option value="01"> <aui:option value="01" label="deposito" />
<liferay-ui:message key="deposito" /> <aui:option value="02" label="autorizzazione" />
</aui:option> <aui:option value="03" label="sanatoria" />
<aui:option value="02">
<liferay-ui:message key="autorizzazione" />
</aui:option>
<aui:option value="03">
<liferay-ui:message key="sanatoria" />
</aui:option>
<%-- ADT - BUG-11 Aggiunta filtro ricerca --%>
<aui:option value="sorteggio"><liferay-ui:message key="sorteggiata"/></aui:option>
</aui:select> </aui:select>
</div> </div>
<div class="col-xs-12 col-md-3"> <div class="col-xs-12 col-md-3">
<aui:select name="statoPratica" label="Stato Pratica"> <aui:select name="statoPratica" label="Stato Pratica">
<aui:option value="-1">Stato Pratica</aui:option> <aui:option value="-1" label="Stato Pratica" />
<aui:option value="<%= StatoPraticaConstants.ANNULLATA %>"> <aui:option value="<%= StatoPraticaConstants.ANNULLATA %>" label="annullata" />
<liferay-ui:message key="annullata" /> <aui:option value="<%= StatoPraticaConstants.AUTORIZZATA %>" label="autorizzata" />
</aui:option> <aui:option value="<%= StatoPraticaConstants.NON_AUTORIZZATA %>" label="non autorizzata" />
<aui:option value="<%= StatoPraticaConstants.AUTORIZZATA %>"> <aui:option value="<%= StatoPraticaConstants.COLLAUDO %>" label="collaudo" />
<liferay-ui:message key="autorizzata" /> <aui:option value="<%= StatoPraticaConstants.FINE_LAVORI %>" label="fine lavori" />
</aui:option> <aui:option value="<%= StatoPraticaConstants.COLLAUDO_PARZIALE %>" label="collaudo parziale" />
<aui:option value="<%= StatoPraticaConstants.NON_AUTORIZZATA %>"> <aui:option value="<%= StatoPraticaConstants.FINE_LAVORI_PARZIALE %>" label="fine lavori parziale" />
<liferay-ui:message key="non autorizzata" /> <aui:option value="VA" label="variata" />
</aui:option> <aui:option value="<%= StatoPraticaConstants.VIDIMATA %>" label="vidimata" />
<aui:option value="<%= StatoPraticaConstants.COLLAUDO %>"> <aui:option value="<%= StatoPraticaConstants.INTEGRAZIONE %>" label="integrazione in corso" />
<liferay-ui:message key="collaudo" /> <aui:option value="sospesa" label="sospesa" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.CONFORME %>">
<liferay-ui:message key="conforme" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.FINE_LAVORI %>">
<liferay-ui:message key="fine lavori" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.COLLAUDO_PARZIALE %>">
<liferay-ui:message key="collaudo parziale" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.FINE_LAVORI_PARZIALE %>">
<liferay-ui:message key="fine lavori parziali" />
</aui:option>
<aui:option value="VA">
<liferay-ui:message key="variata" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.VIDIMATA %>">
<liferay-ui:message key="vidimata" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.NON_CONFORME %>">
<liferay-ui:message key="nonConforme" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.INTEGRAZIONE %>">
<liferay-ui:message key="integrazione in corso" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.SOTTOPOSTA_A_PARERE %>">
<liferay-ui:message key="sottoposta a parere" />
</aui:option>
<aui:option value="sospesa">
<liferay-ui:message key="sospesa"/>
</aui:option>
</aui:select> </aui:select>
</div> </div>
</div> </div>

51
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivitaistruttore/advanced_search.jsp

@ -41,47 +41,24 @@ List<Organization> organizationList = OrganizationLocalServiceUtil.getUserOrgani
</div> </div>
<div class="col-xs-12 col-md-3"> <div class="col-xs-12 col-md-3">
<aui:select name="tipoPratica" label="Tipo Pratica"> <aui:select name="tipoPratica" label="Tipo Pratica">
<aui:option value="-1">Seleziona il tipo di pratica</aui:option> <aui:option value="-1" label="Seleziona il tipo di pratica" />
<aui:option value="01"><liferay-ui:message key="deposito" /></aui:option> <aui:option value="01" label="deposito" />
<aui:option value="02"><liferay-ui:message key="autorizzazione" /></aui:option> <aui:option value="02" label="autorizzazione" />
<aui:option value="03"><liferay-ui:message key="sanatoria" /></aui:option> <aui:option value="03" label="sanatoria" />
</aui:select> </aui:select>
</div> </div>
<div class="col-xs-12 col-md-3"> <div class="col-xs-12 col-md-3">
<aui:select name="statoPratica" label="Stato Pratica"> <aui:select name="statoPratica" label="Stato Pratica">
<aui:option value="-1">Stato Pratica</aui:option> <aui:option value="-1" label="Stato Pratica" />
<aui:option value="<%= StatoPraticaConstants.ANNULLATA %>"> <aui:option value="<%= StatoPraticaConstants.ANNULLATA %>" label="annullata" />
<liferay-ui:message key="annullata" /> <aui:option value="<%= StatoPraticaConstants.COLLAUDO %>" label="collaudo" />
</aui:option> <aui:option value="sospesa" label="sospesa" />
<aui:option value="<%= StatoPraticaConstants.COLLAUDO %>"> <aui:option value="<%= StatoPraticaConstants.FINE_LAVORI %>" label= label="fine lavori" />
<liferay-ui:message key="collaudo" /> <aui:option value="<%= StatoPraticaConstants.COLLAUDO_PARZIALE %>" label="collaudo parziale" />
</aui:option> <aui:option value="<%= StatoPraticaConstants.FINE_LAVORI_PARZIALE %>" label="fine lavori parziali" />
<aui:option value="<%= StatoPraticaConstants.CONFORME %>"> <aui:option value="VA" label="variata" />
<liferay-ui:message key="conforme" /> <aui:option value="<%= StatoPraticaConstants.INTEGRAZIONE %>" label="integrazione in corso" />
</aui:option> <aui:option value="<%= StatoPraticaConstants.RIFIUTATA %>" label="rifiutata" />
<aui:option value="sospesa"><liferay-ui:message key="sospesa" /></aui:option>
<aui:option value="<%= StatoPraticaConstants.FINE_LAVORI %>">
<liferay-ui:message key="fine lavori" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.COLLAUDO_PARZIALE %>">
<liferay-ui:message key="collaudo parziale" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.FINE_LAVORI_PARZIALE %>">
<liferay-ui:message key="fine lavori parziali" />
</aui:option>
<aui:option value="VA"><liferay-ui:message key="variata" /></aui:option>
<aui:option value="<%= StatoPraticaConstants.NON_CONFORME %>">
<liferay-ui:message key="nonConforme" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.INTEGRAZIONE %>">
<liferay-ui:message key="integrazione in corso" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.RIFIUTATA %>">
<liferay-ui:message key="rifiutata" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.SOTTOPOSTA_A_PARERE %>">
<liferay-ui:message key="sottoposta a parere" />
</aui:option>
</aui:select> </aui:select>
</div> </div>
</div> </div>

4
liferay-plugins-sdk-6.2/portlets/portos-comunicazioni-portlet/docroot/WEB-INF/src/it/tref/portos/comunicazione/ComunicazioneMediata.java

@ -17,9 +17,6 @@ import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.ServiceContextFactory; import com.liferay.portal.service.ServiceContextFactory;
import com.liferay.util.bridges.mvc.MVCPortlet; import com.liferay.util.bridges.mvc.MVCPortlet;
/**
* Portlet implementation class ComunicazioneMediata
*/
public class ComunicazioneMediata extends MVCPortlet { public class ComunicazioneMediata extends MVCPortlet {
private static Log _log = LogFactoryUtil.getLog(ComunicazioneMediata.class); private static Log _log = LogFactoryUtil.getLog(ComunicazioneMediata.class);
@ -41,6 +38,7 @@ public class ComunicazioneMediata extends MVCPortlet {
} }
public void updateComunicazione(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException { public void updateComunicazione(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException {
long comunicazioneId = ParamUtil.getLong(actionRequest, "comunicazioneId"); long comunicazioneId = ParamUtil.getLong(actionRequest, "comunicazioneId");
String risposta = ParamUtil.getString(actionRequest, "risposta"); String risposta = ParamUtil.getString(actionRequest, "risposta");
try { try {

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

@ -213,7 +213,7 @@ public class AllegatiPraticaPortlet extends MVCPortlet {
try { try {
long docPraticaId = ParamUtil.getLong(actionRequest, "docPraticaId"); long docPraticaId = ParamUtil.getLong(actionRequest, "docPraticaId");
DocPratica docPratica = DocPraticaServiceUtil.getDocPratica(docPraticaId); DocPratica docPratica = DocPraticaServiceUtil.getDocPratica(docPraticaId);
docPratica.setDettPraticaIdRimozione(0l); docPratica.setDettPraticaIdRimozione(0);
DocPraticaLocalServiceUtil.updateDocPratica(docPratica); DocPraticaLocalServiceUtil.updateDocPratica(docPratica);
} catch (PortalException | SystemException e) { } catch (PortalException | SystemException e) {
_log.error(e, e); _log.error(e, e);

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

File diff soppresso perché troppo grande Load Diff

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

@ -322,24 +322,40 @@ public class SoggettiPraticaPortlet extends MVCPortlet {
} }
@Override @Override
public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException, public void serveResource(ResourceRequest request, ResourceResponse response) throws IOException, PortletException {
PortletException {
String id = resourceRequest.getResourceID();
try { try {
ServiceContext serviceContext = ServiceContextFactory.getInstance(resourceRequest); switch (request.getResourceID()) {
if ("compilaSoggetti".equals(id)) { case "compilaSoggetti":
long userId = ParamUtil.getLong(resourceRequest, "userId", 0L); resourceCompilaSoggetti(request, response);
String codiceFiscale = ParamUtil.getString(resourceRequest, "codiceFiscale"); break;
String tipologiaSoggetto = ParamUtil.getString(resourceRequest, "tipologiaSoggetto"); case "comuni":
JSONArray jsonSoggetti = JSONFactoryUtil.createJSONArray(); resourceComuni(request, response);
if (Validator.isNotNull(userId) && Validator.isNotNull(codiceFiscale) break;
&& Validator.isNotNull(tipologiaSoggetto)) { case "province":
resourceProvince(request, response);
break;
default:
super.serveResource(request, response);
}
} catch (Exception e) {
_log.error(e, e);
throw new IOException(e);
}
}
private void resourceCompilaSoggetti(ResourceRequest request, ResourceResponse response) throws IOException,
SystemException {
long userId = ParamUtil.getLong(request, "userId", 0L);
String codiceFiscale = ParamUtil.getString(request, "codiceFiscale");
String tipologiaSoggetto = ParamUtil.getString(request, "tipologiaSoggetto");
JSONArray result = JSONFactoryUtil.createJSONArray();
if (Validator.isNotNull(userId) && Validator.isNotNull(codiceFiscale) && Validator.isNotNull(tipologiaSoggetto)) {
OrderByComparator orderByComparator = OrderByComparatorFactoryUtil.create("portos_bo_soggetto", OrderByComparator orderByComparator = OrderByComparatorFactoryUtil.create("portos_bo_soggetto",
"createDate", false); "createDate", false);
List<Soggetto> soggetti = SoggettoLocalServiceUtil.findByUserId_CodiceFiscale_TipologiaSoggetto( List<Soggetto> soggetti = SoggettoLocalServiceUtil.findByUserId_CodiceFiscale_TipologiaSoggetto(userId,
userId, codiceFiscale, tipologiaSoggetto, QueryUtil.ALL_POS, QueryUtil.ALL_POS, codiceFiscale, tipologiaSoggetto, QueryUtil.ALL_POS, QueryUtil.ALL_POS, orderByComparator);
orderByComparator);
if (soggetti.isEmpty()) { if (soggetti.isEmpty()) {
soggetti = SoggettoLocalServiceUtil.findByUserId_CodiceFiscale(userId, codiceFiscale, soggetti = SoggettoLocalServiceUtil.findByUserId_CodiceFiscale(userId, codiceFiscale,
QueryUtil.ALL_POS, QueryUtil.ALL_POS, orderByComparator); QueryUtil.ALL_POS, QueryUtil.ALL_POS, orderByComparator);
@ -348,42 +364,44 @@ public class SoggettiPraticaPortlet extends MVCPortlet {
JSONSerializer jsonSerializer = JSONFactoryUtil.createJSONSerializer(); JSONSerializer jsonSerializer = JSONFactoryUtil.createJSONSerializer();
jsonSerializer.exclude("class"); jsonSerializer.exclude("class");
String serialized = jsonSerializer.serialize(SoggettoSoap.toSoapModel(soggetto)); String serialized = jsonSerializer.serialize(SoggettoSoap.toSoapModel(soggetto));
jsonSoggetti.put(serialized); result.put(serialized);
} }
} }
writeJSON(resourceRequest, resourceResponse, jsonSoggetti); writeJSON(request, response, result);
} else if ("province".equals(id)) { }
JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
List<Provincia> province = ProvinciaLocalServiceUtil.findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, private void resourceComuni(ResourceRequest request, ResourceResponse response) throws IOException,
OrderByComparatorFactoryUtil.create("portos_bo_Provincia", "provincia", true)); PortalException, SystemException {
for (Provincia provincia : province) {
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); ServiceContext serviceContext = ServiceContextFactory.getInstance(request);
jsonObject.put("provinciaId", provincia.getCodiceProvincia()); String codiceProvincia = ParamUtil.getString(request, "provinciaId");
jsonObject.put("descLong", provincia.getSigla() + "- " + provincia.getProvincia()); JSONArray result = JSONFactoryUtil.createJSONArray();
jsonArray.put(jsonObject);
}
writeJSON(resourceRequest, resourceResponse, jsonArray);
} else if ("comuni".equals(id)) {
String codiceProvincia = ParamUtil.getString(resourceRequest, "provinciaId");
JSONArray jsonArray = JSONFactoryUtil.createJSONArray();
if (Validator.isNotNull(codiceProvincia) && Validator.isNotNull(codiceProvincia)) { if (Validator.isNotNull(codiceProvincia) && Validator.isNotNull(codiceProvincia)) {
List<Comune> comuni = ComuneLocalServiceUtil.findByCompanyIdCodiceProvincia( List<Comune> comuni = ComuneLocalServiceUtil.findByCompanyIdCodiceProvincia(serviceContext.getCompanyId(),
serviceContext.getCompanyId(), codiceProvincia, QueryUtil.ALL_POS, QueryUtil.ALL_POS, codiceProvincia, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
OrderByComparatorFactoryUtil.create("portos_bo_Comune", "denominazione", true)); OrderByComparatorFactoryUtil.create("portos_bo_Comune", "denominazione", true));
for (Comune comune : comuni) { for (Comune comune : comuni) {
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); JSONObject jso = JSONFactoryUtil.createJSONObject();
jsonObject.put("comuneId", comune.getComuneId()); jso.put("comuneId", comune.getComuneId());
jsonObject.put("descLong", comune.getDenominazione()); jso.put("descLong", comune.getDenominazione());
jsonArray.put(jsonObject); result.put(jso);
} }
} }
writeJSON(resourceRequest, resourceResponse, jsonArray); writeJSON(request, response, result);
} else {
super.serveResource(resourceRequest, resourceResponse);
} }
} catch (Exception e) {
_log.error(e, e); private void resourceProvince(ResourceRequest request, ResourceResponse response) throws IOException,
throw new IOException(e); SystemException {
JSONArray result = JSONFactoryUtil.createJSONArray();
List<Provincia> province = ProvinciaLocalServiceUtil.findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS,
OrderByComparatorFactoryUtil.create("portos_bo_Provincia", "provincia", true));
for (Provincia provincia : province) {
JSONObject jso = JSONFactoryUtil.createJSONObject();
jso.put("provinciaId", provincia.getCodiceProvincia());
jso.put("descLong", provincia.getSigla() + "- " + provincia.getProvincia());
result.put(jso);
} }
writeJSON(request, response, result);
} }
} }

65
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/advanced_search.jsp

@ -14,59 +14,26 @@
</div> </div>
<div class="col-xs-12 col-md-3"> <div class="col-xs-12 col-md-3">
<aui:select name="tipoPratica" label="Tipo Pratica"> <aui:select name="tipoPratica" label="Tipo Pratica">
<aui:option value="-1">Seleziona il tipo di pratica</aui:option> <aui:option value="-1" label="Seleziona il tipo di pratica" />
<aui:option value="<%= Constants.TIPO_PRATICA_DEPOSITO %>"> <aui:option value="<%= Constants.TIPO_PRATICA_DEPOSITO %>" label="deposito" />
<liferay-ui:message key="deposito" /> <aui:option value="<%= Constants.TIPO_PRATICA_AUTORIZZAZIONE %>" label="autorizzazione" />
</aui:option> <aui:option value="<%= Constants.TIPO_PRATICA_SANATORIA %>" label="sanatoria" />
<aui:option value="<%= Constants.TIPO_PRATICA_AUTORIZZAZIONE %>">
<liferay-ui:message key="autorizzazione" />
</aui:option>
<aui:option value="<%= Constants.TIPO_PRATICA_SANATORIA %>">
<liferay-ui:message key="sanatoria" />
</aui:option>
</aui:select> </aui:select>
</div> </div>
<div class="col-xs-12 col-md-3"> <div class="col-xs-12 col-md-3">
<aui:select name="statoPratica" label="Stato Pratica"> <aui:select name="statoPratica" label="Stato Pratica">
<aui:option value="-1">Stato Pratica</aui:option> <aui:option value="-1" label="Stato Pratica" />
<aui:option value="<%= StatoPraticaConstants.ANNULLATA %>"> <aui:option value="<%= StatoPraticaConstants.ANNULLATA %>" label="annullata" />
<liferay-ui:message key="annullata" /> <aui:option value="<%= StatoPraticaConstants.COLLAUDO %>" label="collaudo" />
</aui:option> <aui:option value="sospesa" label="sospesa" />
<aui:option value="<%= StatoPraticaConstants.COLLAUDO %>"> <aui:option value="<%= StatoPraticaConstants.FINE_LAVORI %>" label="fine lavori" />
<liferay-ui:message key="collaudo" /> <aui:option value="<%= StatoPraticaConstants.COLLAUDO_PARZIALE %>" label="collaudo parziale" />
</aui:option> <aui:option value="<%= StatoPraticaConstants.FINE_LAVORI_PARZIALE %>" label="fine lavori parziali" />
<aui:option value="<%= StatoPraticaConstants.CONFORME %>"> <aui:option value="<%= StatoPraticaConstants.VARIATA %>" label="variata" />
<liferay-ui:message key="conforme" /> <aui:option value="<%= StatoPraticaConstants.VIDIMATA %>" label="vidimata" />
</aui:option> <aui:option value="<%= StatoPraticaConstants.INTEGRAZIONE %>" label="integrazione in corso" />
<aui:option value="sospesa"><liferay-ui:message key="sospesa" /></aui:option> <aui:option value="<%= StatoPraticaConstants.RIFIUTATA %>" label="rifiutata" />
<aui:option value="<%= StatoPraticaConstants.FINE_LAVORI %>"> <aui:option value="IC" label="in compilazione" />
<liferay-ui:message key="fine lavori" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.COLLAUDO_PARZIALE %>">
<liferay-ui:message key="collaudo parziale" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.FINE_LAVORI_PARZIALE %>">
<liferay-ui:message key="fine lavori parziali" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.VARIATA %>">
<liferay-ui:message key="variata" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.VIDIMATA %>">
<liferay-ui:message key="vidimata" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.NON_CONFORME %>">
<liferay-ui:message key="nonConforme" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.INTEGRAZIONE %>">
<liferay-ui:message key="integrazione in corso" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.RIFIUTATA %>">
<liferay-ui:message key="rifiutata" />
</aui:option>
<aui:option value="<%= StatoPraticaConstants.SOTTOPOSTA_A_PARERE %>">
<liferay-ui:message key="sottoposta a parere" />
</aui:option>
<aui:option value="IC"><liferay-ui:message key="in compilazione" /></aui:option>
</aui:select> </aui:select>
</div> </div>
</div> </div>

131
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp

@ -1,7 +1,9 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%>
<%@ include file="/html/fascicolofe/init.jsp" %> <%@ include file="/html/fascicolofe/init.jsp" %>
<% String formName = ParamUtil.getString(request, "formName","fm"); %> <%
String formName = ParamUtil.getString(request, "formName", "fm");
%>
<div class="container-fluid add-new-project"> <div class="container-fluid add-new-project">
<div class="row"> <div class="row">
<div class="col-sm-12 col-md-12"> <div class="col-sm-12 col-md-12">
@ -9,18 +11,18 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row add-new-project__row"> <div class="row add-new-project__row">
<div class="col-xs-6 col-sm-6 col-md-6 add-new-project__provincia"> <div class="col-xs-6 col-sm-6 col-md-6 add-new-project__provincia">
<aui:select name="provincia" label="Provincia" showEmptyOption="false" showRequiredLabel="true"> <aui:select name="provincia" label="Provincia" showEmptyOption="false"
showRequiredLabel="true">
</aui:select> </aui:select>
</div> </div>
<div class="col-xs-6 col-sm-6 col-md-6 add-new-project__comune" > <div class="col-xs-6 col-sm-6 col-md-6 add-new-project__comune" >
<aui:select name="comune" label="Comune" showEmptyOption="false" showRequiredLabel="true" disabled="<%=true%>" helpMessage="Nel caso di interventi estesi nel territorio e comprendenti più comuni, verrà evidenziato il comune in cui l'intervento è territorialmente prevalente"> <aui:select name="comune" label="Comune" showEmptyOption="false" showRequiredLabel="true"
helpMessage="Nel caso di interventi estesi nel territorio e comprendenti più comuni, verrà evidenziato il comune in cui l'intervento è territorialmente prevalente"
disabled="true">
</aui:select> </aui:select>
</div> </div>
</div> </div>
<aui:input type="hidden" name="territorioId" value="1901" showEmptyOption="false" showRequiredLabel="true" /> <aui:input type="hidden" name="territorioId" value="1901" showEmptyOption="false" showRequiredLabel="true" />
<div class="row add-new-project__row"> <div class="row add-new-project__row">
<div class="col-xs-12 add-new-project__procedura"> <div class="col-xs-12 add-new-project__procedura">
<aui:field-wrapper label=""> <aui:field-wrapper label="">
@ -29,7 +31,8 @@
.entrySet()) { .entrySet()) {
String tipo = procedura.getKey(); String tipo = procedura.getKey();
String label = procedura.getValue(); String label = procedura.getValue();
String nomeProcedura = LanguageUtil.get(pageContext, "label_procedura_"+tipo) + ") " + label; String nomeProcedura = LanguageUtil.get(pageContext, "label_procedura_"+tipo)
+ ") " + label;
%> %>
<aui:input label="<%= nomeProcedura %>" name="tipoProcedura" <aui:input label="<%= nomeProcedura %>" name="tipoProcedura"
id='<%= "tipo_procedura_" + tipo %>' type="radio" value="<%= tipo %>" id='<%= "tipo_procedura_" + tipo %>' type="radio" value="<%= tipo %>"
@ -42,7 +45,6 @@
</aui:field-wrapper> </aui:field-wrapper>
</div> </div>
</div> </div>
<div class="row add-new-project__row add-new-project__flex"> <div class="row add-new-project__row add-new-project__flex">
<div class="col-xs-6 col-xs-offset-6 add-new-project__btn"> <div class="col-xs-6 col-xs-offset-6 add-new-project__btn">
<aui:button type="submit" value="add-fascicolo"></aui:button> <aui:button type="submit" value="add-fascicolo"></aui:button>
@ -53,111 +55,73 @@
</div> </div>
</div> </div>
</div> </div>
<liferay-portlet:resourceURL id="province" var="getProvinceURL" /> <liferay-portlet:resourceURL id="province" var="getProvinceURL" />
<liferay-portlet:resourceURL id="comuni" var="getComuniURL" /> <liferay-portlet:resourceURL id="comuni" var="getComuniURL" />
<!--<liferay-portlet:resourceURL id="zoneFasce" var="getZoneFasceURL" />-->
<aui:script use="aui-io-request,liferay-dynamic-select,aui-form-validator"> <aui:script use="aui-io-request,liferay-dynamic-select,aui-form-validator">
var defaultFormValidator = A.config.FormValidator; var defaultFormValidator = A.config.FormValidator;
var procedure = {};
A.mix( A.mix(
defaultFormValidator.RULES, defaultFormValidator.RULES,
{ {
requiredSelect: function (value, fieldNode, ruleValue) { requiredSelect: function (value, fieldNode, ruleValue) {
if(undefined == value || value == '0' || value == ''){ if (undefined == value || value == '0' || value == '') {
return false; return false;
} }
return true; return true;
}, },
}, },
true true
); );
A.mix(
A.mix(
defaultFormValidator.STRINGS, defaultFormValidator.STRINGS,
{ {
requiredSelect: Liferay.Language.get('this-select-x-is-required') requiredSelect: Liferay.Language.get('this-select-x-is-required')
}, },
true true
); );
new A.FormValidator( new A.FormValidator({
{
boundingBox: document.<portlet:namespace /><%=formName%>, boundingBox: document.<portlet:namespace /><%=formName%>,
rules: { rules: {
<portlet:namespace />provincia:{ <portlet:namespace />provincia:{
requiredSelect:'provincia' requiredSelect:'provincia',
}, },
<portlet:namespace />comune:{ <portlet:namespace />comune:{
requiredSelect:'comune' requiredSelect:'comune',
}, },
<portlet:namespace />tipoProcedura:{ <portlet:namespace />tipoProcedura:{
requiredSelect:'procedura' requiredSelect:'procedura',
} },
} },
} });
)
var getProvince = function(callback) { var getProvince = function (callback) {
A.io.request( A.io.request('<%= getProvinceURL %>', {
'<%= getProvinceURL %>',
{
dataType: 'json', dataType: 'json',
on: { on: {
success: function() { success: function () {
callback(this.get('responseData')); callback(this.get('responseData'));
} },
} },
} });
); };
};
var getComuni = function(callback, provinciaId) { var getComuni = function (callback, provinciaId) {
A.io.request( A.io.request('<%= getComuniURL %>', {
'<%= getComuniURL %>',
{
data: { data: {
<portlet:namespace />provinciaId: provinciaId <portlet:namespace />provinciaId: provinciaId
},dataType: 'json',
on: {
success: function() {
callback(this.get('responseData'));
}
}
}
);
};
var getZoneFasce = function(callback, comuneId) {
A.io.request(
'<%= getZoneFasceURL %>',
{
data: {
<portlet:namespace />comuneId: comuneId
}, },
dataType: 'json', dataType: 'json',
on: { on: {
success: function() { success: function () {
procedure = {}; callback(this.get('responseData'));
var rd = this.get('responseData'); },
for (var i = 0; i < rd.length; i++) },
procedure[rd[i].territorioId] = rd[i].procedura; });
callback(rd); };
if (rd.length) {
$('.add-new-project__fascia select')[0].selectedIndex = 1;
$('.add-new-project__fascia select').change();
}
}
}
}
);
};
new Liferay.DynamicSelect( new Liferay.DynamicSelect([
[
{ {
select: '<portlet:namespace />provincia', select: '<portlet:namespace />provincia',
selectData: getProvince, selectData: getProvince,
@ -173,29 +137,28 @@
selectId: 'comuneId', selectId: 'comuneId',
selectSort: true, selectSort: true,
selectVal: '0' selectVal: '0'
} },
] ]);
);
$('.add-new-project__provincia select').change(function(){ $('.add-new-project__provincia select').change(function (){
var val = $(this).val(); var val = $(this).val();
if (val == 0) { if (val == 0) {
$('.add-new-project__comune select').prop('disabled', 'disabled'); $('.add-new-project__comune select').prop('disabled', 'disabled');
$('.add-new-project__fascia select').prop('disabled', 'disabled'); $('.add-new-project__fascia select').prop('disabled', 'disabled');
$('.add-new-project__procedura input').prop('disabled', 'disabled').prop('checked', false); $('.add-new-project__procedura input').prop('disabled', 'disabled').prop('checked', false);
$('.add-new-project__procedura div').removeClass('success'); $('.add-new-project__procedura div').removeClass('success');
}else if(val !== 0) { } else if (val !== 0) {
$('.add-new-project__comune select').prop('disabled', false); $('.add-new-project__comune select').prop('disabled', false);
} }
}); });
$('.add-new-project__comune select').change(function(){ $('.add-new-project__comune select').change(function (){
var val = $(this).val(); var val = $(this).val();
if (val == 0) { if (val == 0) {
$('.add-new-project__procedura input').prop('disabled', 'disabled').prop('checked', false); $('.add-new-project__procedura input').prop('disabled', 'disabled').prop('checked', false);
$('.add-new-project__procedura div').removeClass('success'); $('.add-new-project__procedura div').removeClass('success');
}else if(val !== 0) { } else if (val !== 0) {
$('.add-new-project__procedura input').prop('disabled', false).removeClass('disabled').parent().css('display', 'block'); $('.add-new-project__procedura input').prop('disabled', false).removeClass('disabled').parent().css('display', 'block');
} }
}); });
</aui:script> </aui:script>

99
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_soggetti.jsp

@ -1,97 +1,78 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.ValidazionePraticaUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="com.liferay.portal.kernel.workflow.WorkflowConstants"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%>
<%@page import="it.tref.liferay.portos.bo.model.Soggetto"%>
<%@page import="it.tref.liferay.portos.bo.util.DelegheUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.DettPraticaServiceUtil"%>
<%@page import="com.liferay.portal.kernel.util.HttpUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.SoggettoServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%> <%@page import="it.tref.liferay.portos.bo.model.DettPratica"%>
<%@page import="it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.service.DettPraticaServiceUtil"%>
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> <%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%>
<%@page import="java.util.ArrayList"%> <%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="com.liferay.portal.kernel.util.KeyValuePair"%> <%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%>
<%@ include file="/html/fascicolofe/init.jsp" %> <%@ include file="/html/fascicolofe/init.jsp" %>
<% <%
DettPratica dettPratica = (DettPratica)request.getAttribute("bean.dettPratica"); DettPratica dettPratica = (DettPratica) request.getAttribute("bean.dettPratica");
if(dettPratica==null){ if (dettPratica == null) {
long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId"); long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId); dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId);
} }
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId());
String tipoIntegrazione = (String) request.getAttribute("bean.tipoIntegrazione");
String tipoIntegrazione = (String)request.getAttribute("bean.tipoIntegrazione"); boolean disabledInput = !DelegheUtil.hasDelegaCompilazioneDomanda(user.getUserId(), dettPratica.getDettPraticaId())
|| (TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione) && dettPratica.isCompleta());
boolean disabledInput = !DelegheUtil.hasDelegaCompilazioneDomanda(user.getUserId(),dettPratica.getDettPraticaId()) || ( Soggetto soggettoDelegato = DelegheUtil.getPersonaDelegaCompilazioneDomanda(dettPratica.getDettPraticaId());
TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione) && dettPratica.isCompleta() boolean inBO = ParamUtil.getBoolean(request, "inBO", false);
);
Soggetto soggettoDelegato = DelegheUtil.getPersonaDelegaCompilazioneDomanda(dettPratica.getDettPraticaId());
boolean inBO = ParamUtil.getBoolean(request,"inBO",false);
%> %>
<liferay-util:include page="/html/fascicolofe/navigator/header.jsp" servletContext="<%= application %>">
<liferay-util:include page="/html/fascicolofe/navigator/header.jsp" servletContext="<%=application %>"> <liferay-util:param name="disabledInput" value="<%= String.valueOf(disabledInput) %>"/>
<liferay-util:param name="disabledInput" value="<%=String.valueOf(disabledInput) %>"/> <liferay-util:param name="inBO" value="<%= String.valueOf(inBO) %>"/>
<liferay-util:param name="inBO" value="<%=String.valueOf(inBO) %>"/> <c:if test="<%= soggettoDelegato != null %>">
<c:if test="<%= soggettoDelegato!=null%>"> <liferay-util:param name="soggettoId" value="<%= String.valueOf(soggettoDelegato.getSoggettoId()) %>"/>
<liferay-util:param name="soggettoId" value="<%=String.valueOf(soggettoDelegato.getSoggettoId()) %>"/>
</c:if> </c:if>
</liferay-util:include> </liferay-util:include>
<aui:script use="aui-base"> <aui:script use="aui-base">
var soggettiEdit = false; var soggettiEdit = false;
Liferay.on('popupReady',function(event) {
Liferay.on('popupReady', function(event) {
var modalName = event._event.details[0].windowName; var modalName = event._event.details[0].windowName;
var modalWin = Liferay.Util.Window.getById(modalName); var modalWin = Liferay.Util.Window.getById(modalName);
modalWin.after('visibleChange', function(event) { modalWin.after('visibleChange', function(event) {
if(event.prevVal && soggettiEdit){ if (event.prevVal && soggettiEdit) {
Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.SOGGETTI%>_"); Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.SOGGETTI%>_");
} }
}); });
modalWin.after('hide', function(event) { modalWin.after('hide', function(event) {
if(soggettiEdit){ if (soggettiEdit) {
Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.SOGGETTI%>_"); Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.SOGGETTI%>_");
} }
}); });
modalWin.after('destroy', function(event) { modalWin.after('destroy', function(event) {
if(soggettiEdit){ if (soggettiEdit) {
Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.SOGGETTI%>_"); Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.SOGGETTI%>_");
} }
}); });
}); });
Liferay.on('soggetti-open',function(event) {
Liferay.on('soggetti-open', function(event) {
soggettiEdit=true; soggettiEdit=true;
}); });
Liferay.on('soggetti-close',function(event) {
Liferay.fire( Liferay.on('soggetti-close', function(event) {
'closeWindow', Liferay.fire('closeWindow', {
{
id: '<%=PortletKeys.SOGGETTI+"_dialogEditSoggetto"%>' id: '<%=PortletKeys.SOGGETTI+"_dialogEditSoggetto"%>'
}
);
}); });
});
Liferay.on('soggetti-ready',function(event) { Liferay.on('soggetti-ready', function(event) {
/*if(<%= !disabledInput %>){ /*if (<%= !disabledInput %>) {
var isCommittenteAndDitta = event.isCommittenteAndDitta; var isCommittenteAndDitta = event.isCommittenteAndDitta;
if(isCommittenteAndDitta){ if (isCommittenteAndDitta) {
A.one('#<portlet:namespace/>collaudoStaticoCheckbox').addClass('disabled'); A.one('#<portlet:namespace/>collaudoStaticoCheckbox').addClass('disabled');
} else { } else {
A.one('#<portlet:namespace/>collaudoStaticoCheckbox').removeClass('disabled'); A.one('#<portlet:namespace/>collaudoStaticoCheckbox').removeClass('disabled');
} }
A.one('#<portlet:namespace/>collaudoStatico').set('disabled', isCommittenteAndDitta); A.one('#<portlet:namespace/>collaudoStatico').set('disabled', isCommittenteAndDitta);
if(soggettiEdit){ if (soggettiEdit) {
document.location.hash = '_1_WAR_portosfeportlet_tab=_1_WAR_portosfeportlet_page_soggetti'; document.location.hash = '_1_WAR_portosfeportlet_tab=_1_WAR_portosfeportlet_page_soggetti';
soggettiEdit=false; soggettiEdit = false;
} }
}*/ }*/
}); });
</aui:script> </aui:script>
<%-- <liferay-portlet:runtime portletName="<%=PortletKeys.SOGGETTI %>" queryString='<%="dettPraticaId="+dettPratica.getDettPraticaId()+"&getCompleted="+String.valueOf(getCompleted)%>' ></liferay-portlet:runtime> --%> <liferay-portlet:runtime portletName="<%= PortletKeys.SOGGETTI %>"
<liferay-portlet:runtime portletName="<%=PortletKeys.SOGGETTI %>" queryString='<%="dettPraticaId="+dettPratica.getDettPraticaId()+"&disabledInput="+disabledInput%>' ></liferay-portlet:runtime> queryString='<%= "dettPraticaId=" + dettPratica.getDettPraticaId() + "&disabledInput=" + disabledInput %>' />

87
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/pareregeologo/actions.jsp

@ -10,84 +10,61 @@
<%@page import="com.liferay.portal.kernel.util.StringUtil"%> <%@page import="com.liferay.portal.kernel.util.StringUtil"%>
<%@ include file="/html/pareregeologo/init.jsp" %> <%@ include file="/html/pareregeologo/init.jsp" %>
<% <%
SearchContainer searchContainer = (SearchContainer) request SearchContainer searchContainer = (SearchContainer) request.getAttribute("liferay-ui:search:searchContainer");
.getAttribute("liferay-ui:search:searchContainer"); String redirect = ParamUtil.getString(request, "backUrl");
String redirect = ParamUtil.getString(request, "backUrl"); ParereGeologoBean parereGeologoBean = null;
//ADT BUG BO ID = 18 ParereGeologo parereGeologo = null;
ParereGeologoBean parereGeologoBean = null; boolean showExpanded = true;
ParereGeologo parereGeologo = null; if (searchContainer != null) {
boolean showExpanded = true;
if (searchContainer != null) {
redirect = searchContainer.getIteratorURL().toString(); redirect = searchContainer.getIteratorURL().toString();
ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
ResultRow row = (ResultRow) request
.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
//ADT BUG BO ID = 18
parereGeologoBean = (ParereGeologoBean) row.getObject(); parereGeologoBean = (ParereGeologoBean) row.getObject();
parereGeologo = ParereGeologoLocalServiceUtil.getParereGeologo(parereGeologoBean.getParereGeologoId()); parereGeologo = ParereGeologoLocalServiceUtil.getParereGeologo(parereGeologoBean.getParereGeologoId());
showExpanded = false; showExpanded = false;
} else { } else {
long parereGeologoId = ParamUtil.getLong(request, "parereGeologoId"); long parereGeologoId = ParamUtil.getLong(request, "parereGeologoId");
parereGeologo = ParereGeologoLocalServiceUtil.getParereGeologo(parereGeologoId); parereGeologo = ParereGeologoLocalServiceUtil.getParereGeologo(parereGeologoId);
} }
String buttonIdAddParere = "buttonIdAddParere_" + parereGeologo.getParereGeologoId();
String randomId = StringUtil.randomId();
String buttonIdAddParere = "buttonIdAddParere_"+randomId;
%> %>
<liferay-ui:icon-menu icon="" showWhenSingleIcon="true" showExpanded="true" cssClass="menu_button_activity"> <liferay-ui:icon-menu icon="" showWhenSingleIcon="true" showExpanded="true" cssClass="menu_button_activity">
<div title='<%= LanguageUtil.get(pageContext,"fascicolo-action-open-pratica") %>' class="tooltip-info">
<div title='<%=LanguageUtil.get(pageContext,"fascicolo-action-open-pratica") %>' class="tooltip-info"> <liferay-ui:icon iconCssClass="fa fa-eye" linkCssClass="btn btn-action" target="_blank" message="" label="true"
<liferay-ui:icon iconCssClass="fa fa-eye" linkCssClass="btn btn-action" url="<%= FascicoloURLUtil.getFascicoloViewURL(parereGeologo.getCompanyId(),
target="_blank" parereGeologo.getIntPraticaId()) %>" />
message=""
label="true"
url="<%=FascicoloURLUtil.getFascicoloViewURL(parereGeologo.getCompanyId(), parereGeologo.getIntPraticaId()) %>" />
</div> </div>
<c:if test="<%= Validator.isNull(parereGeologo.getParere()) %>">
<div title='<%= LanguageUtil.get(pageContext,"fascicolo-action-parere-geologo") %>' class="tooltip-info">
<c:if test="<%=Validator.isNull( parereGeologo.getParere()) %>"> <liferay-ui:icon linkCssClass="btn btn-action" id="<%=buttonIdAddParere%>" iconCssClass="fa fa-pencil"
<div title='<%=LanguageUtil.get(pageContext,"fascicolo-action-parere-geologo") %>' class="tooltip-info"> message="" url="#" />
<liferay-ui:icon linkCssClass="btn btn-action" id="<%=buttonIdAddParere%>" iconCssClass="fa fa-pencil" message="" url="#" />
</div> </div>
</c:if> </c:if>
<c:if test="<%= Validator.isNotNull( parereGeologo.getFileEntryId()) %>">
<c:if test="<%=Validator.isNotNull( parereGeologo.getFileEntryId()) %>">
<% <%
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(parereGeologo.getFileEntryId()); FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(parereGeologo.getFileEntryId());
String downloadUrl = DLUtil.getPreviewURL(fileEntry, fileEntry.getLatestFileVersion(), themeDisplay, "&download=true"); String downloadUrl = DLUtil.getPreviewURL(fileEntry, fileEntry.getLatestFileVersion(), themeDisplay,
"&download=true");
%> %>
<div class="tooltip-info" title="Download"> <div class="tooltip-info" title="Download">
<liferay-ui:icon linkCssClass="btn btn-action" iconCssClass="fa fa-download" message="" url="<%=downloadUrl%>" /> <liferay-ui:icon linkCssClass="btn btn-action" iconCssClass="fa fa-download" message=""
url="<%= downloadUrl %>" />
</div> </div>
</c:if> </c:if>
</liferay-ui:icon-menu> </liferay-ui:icon-menu>
<liferay-util:include page="/html/pareregeologo/actions/add_parere.jsp" servletContext="<%= application %>" > <liferay-util:include page="/html/pareregeologo/actions/add_parere.jsp" servletContext="<%= application %>" >
<liferay-util:param name="buttonIdAddParere" value="<%=buttonIdAddParere %>"></liferay-util:param> <liferay-util:param name="buttonIdAddParere" value="<%= buttonIdAddParere %>" />
<liferay-util:param name="parereGeologoId" value="<%=String.valueOf(parereGeologo.getParereGeologoId()) %>"></liferay-util:param> <liferay-util:param name="parereGeologoId" value="<%= String.valueOf(parereGeologo.getParereGeologoId()) %>" />
<liferay-util:param name="intPratica" value="<%= String.valueOf(parereGeologo.getIntPraticaId())%>"></liferay-util:param> <liferay-util:param name="intPratica" value="<%= String.valueOf(parereGeologo.getIntPraticaId())%>" />
<liferay-util:param name="noteRichiedente" value="<%= parereGeologo.getNoteRichiedente() %>" />
</liferay-util:include> </liferay-util:include>
<script type="text/javascript"> <script type="text/javascript">
YUI().use( YUI().use('aui-tooltip', function(Y) {
'aui-tooltip', new Y.TooltipDelegate({
function(Y) {
new Y.TooltipDelegate(
{
trigger: '.tooltip-info', trigger: '.tooltip-info',
position: 'top', position: 'top',
cssClass: 'tooltip-help', cssClass: 'tooltip-help',
html: true, html: true,
opacity: 1 opacity: 1,
} });
); });
}
);
</script> </script>

69
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/pareregeologo/actions/add_parere.jsp

@ -1,67 +1,64 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.util.HtmlUtil"%>
<%@include file="/html/pareregeologo/init.jsp"%> <%@include file="/html/pareregeologo/init.jsp"%>
<% <%
long intPraticaId = ParamUtil.getLong(request, "intPraticaId"); long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
long parereGeologoId = ParamUtil.getLong(request, "parereGeologoId"); long parereGeologoId = ParamUtil.getLong(request, "parereGeologoId");
String buttonIdAddParere = ParamUtil.getString(request, "buttonIdAddParere"); String noteRichiedente = ParamUtil.getString(request, "noteRichiedente");
String buttonIdAddParere = ParamUtil.getString(request, "buttonIdAddParere");
String randomId = StringUtil.randomId(); String formAggiornaParere = "formAggiornaParere_" + parereGeologoId;
String formAggiornaParere = "formAggiornaParere_"+randomId; String divIdAggiornaParere = "divIdAggiornaParere_" + parereGeologoId;
String divIdAggiornaParere = "divIdAggiornaParere_"+randomId;
%> %>
<liferay-portlet:actionURL name="aggiornaParere" var="aggiornaParereUrl"> <liferay-portlet:actionURL name="aggiornaParere" var="aggiornaParereUrl">
<portlet:param name="intPraticaId" value="<%=String.valueOf(intPraticaId)%>" /> <portlet:param name="intPraticaId" value="<%=String.valueOf(intPraticaId)%>" />
<portlet:param name="parereGeologoId" value="<%=String.valueOf(parereGeologoId)%>" /> <portlet:param name="parereGeologoId" value="<%=String.valueOf(parereGeologoId)%>" />
<portlet:param name="redirect" value="<%=currentURL%>" /> <portlet:param name="redirect" value="<%=currentURL%>" />
</liferay-portlet:actionURL> </liferay-portlet:actionURL>
<aui:form name="<%=formAggiornaParere %>" enctype="multipart/form-data" method="post"
<aui:form name="<%=formAggiornaParere %>" enctype="multipart/form-data" method="post" action="<%= aggiornaParereUrl %>" > action="<%= aggiornaParereUrl %>" >
<div id='<%= renderResponse.getNamespace() + divIdAggiornaParere %>' class="hide" > <div id='<%= renderResponse.getNamespace() + divIdAggiornaParere %>' class="hide" >
<aui:input name="parere" type="textarea" id="my-aui-textarea"/> <%
<!-- ADT BUG BO ID = 18 --> if (Validator.isNotNull(noteRichiedente)) {
<span style="float:right;">&nbsp Carattere/i rimanenti</span><span style="float:right;" id="<portlet:namespace />aui-char-count"></span> %>
<strong>Note del richiedente: </strong><span><%= HtmlUtil.escape(noteRichiedente) %></span><br/><br/>
<%
}
%>
<aui:input name="parere" type="textarea" id="my-aui-textarea">
<aui:validator name="required" />
</aui:input>
<span style="float:right;">&nbsp Carattere/i rimanenti</span>
<span style="float:right;" id="<portlet:namespace />aui-char-count"></span>
<aui:input type="file" name="docFile" label="File Allegato" /> <aui:input type="file" name="docFile" label="File Allegato" />
</div> </div>
<liferay-util:include page="/html/common/submit_window.jsp" servletContext="<%= application %>" > <liferay-util:include page="/html/common/submit_window.jsp" servletContext="<%= application %>" >
<liferay-util:param name="formName" value="<%=formAggiornaParere %>"></liferay-util:param> <liferay-util:param name="formName" value="<%= formAggiornaParere %>" />
<liferay-util:param name="titolo" value="Inserisci Parere"></liferay-util:param> <liferay-util:param name="titolo" value="Inserisci Parere" />
<liferay-util:param name="buttonId" value="<%=buttonIdAddParere %>"></liferay-util:param> <liferay-util:param name="buttonId" value="<%= buttonIdAddParere %>" />
<liferay-util:param name="buttonConferma" value="CONFERMA"></liferay-util:param> <liferay-util:param name="buttonConferma" value="CONFERMA" />
<liferay-util:param name="contentDiv" value="<%=divIdAggiornaParere %>"></liferay-util:param> <liferay-util:param name="contentDiv" value="<%= divIdAggiornaParere %>" />
<liferay-util:param name="width" value="500"></liferay-util:param> <liferay-util:param name="width" value="500" />
<liferay-util:param name="buttonBar" value="true"></liferay-util:param> <liferay-util:param name="buttonBar" value="true" />
</liferay-util:include> </liferay-util:include>
</aui:form> </aui:form>
<!-- ADT BUG BO ID = 18 -->
<aui:script use="aui-base"> <aui:script use="aui-base">
AUI().ready('node', 'aui-char-counter', function(A) { AUI().ready('node', 'aui-char-counter', function(A) {
var maxTextLength = 2000; var maxTextLength = 2000;
var auiTextAreaIDWithNSpace = '#<portlet:namespace />my-aui-textarea';
var auiTextAreaIDWithNSpace = '#' + '<portlet:namespace />' + 'my-aui-textarea'; var auiCountAreaIDWithNSpace = '#<portlet:namespace />aui-char-count';
var auiCountAreaIDWithNSpace = '#' + '<portlet:namespace />' + 'aui-char-count';
var auiTextAreaNode = new A.one(auiTextAreaIDWithNSpace); var auiTextAreaNode = new A.one(auiTextAreaIDWithNSpace);
if (auiTextAreaNode === null) { if (auiTextAreaNode === null) {
alert('From main.js\n' + 'AUI Text Area node not found.'); alert('From main.js\n' + 'AUI Text Area node not found.');
} }
var auiCountAreaNode = new A.one(auiCountAreaIDWithNSpace); var auiCountAreaNode = new A.one(auiCountAreaIDWithNSpace);
if (auiCountAreaNode === null) { if (auiCountAreaNode === null) {
alert('From main.js\n' + 'AUI Count Text node not found.'); alert('From main.js\n' + 'AUI Count Text node not found.');
} }
auiCountAreaNode.set('text', (maxTextLength - (auiTextAreaNode.get('text').length)));
auiCountAreaNode.set('text', var auiTextCounter = new A.CharCounter({
(maxTextLength - (auiTextAreaNode.get('text').length)));
var auiTextCounter = new A.CharCounter( {
input: auiTextAreaIDWithNSpace, input: auiTextAreaIDWithNSpace,
counter: auiCountAreaIDWithNSpace, counter: auiCountAreaIDWithNSpace,
maxLength: maxTextLength maxLength: maxTextLength,
}); });
}); });
</aui:script> </aui:script>

71
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/pareregeologo/parericompletati.jsp

@ -1,76 +1,55 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.Collections"%> <%@page import="com.liferay.portal.kernel.util.HtmlUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.bean.ParereGeologoBean"%>
<%@page import="it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.Provincia"%>
<%@page import="it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.Territorio"%>
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%>
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> <%@page import="com.liferay.portal.service.UserLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%>
<%@page import="it.tref.liferay.portos.bo.shared.bean.ParereGeologoBean"%>
<%@page import="java.util.Collections"%>
<%@ include file="/html/pareregeologo/init.jsp" %> <%@ include file="/html/pareregeologo/init.jsp" %>
<liferay-portlet:renderURL varImpl="searchURL"> <liferay-portlet:renderURL varImpl="searchURL">
<liferay-portlet:param name="tabs1" value="<%=StringUtil.split(tabNames)[1]%>" /> <liferay-portlet:param name="tabs1" value="<%=StringUtil.split(tabNames)[1]%>" />
</liferay-portlet:renderURL> </liferay-portlet:renderURL>
<liferay-ui:search-container emptyResultsMessage="no-entries-were-found" iteratorURL="<%= searchURL %>" >
<liferay-ui:search-container emptyResultsMessage="no-entries-were-found" iteratorURL="<%=searchURL %>" >
<% <%
List<ParereGeologo> lista = new ArrayList<ParereGeologo>(); List<ParereGeologo> lista = ParereGeologoLocalServiceUtil.findWithParereByGeologoId(user.getUserId(),
lista = ParereGeologoLocalServiceUtil.findWithParereByGeologoId(user.getUserId(), searchContainer.getStart(), searchContainer.getEnd()); searchContainer.getStart(), searchContainer.getEnd());
searchContainer.setTotal(ParereGeologoLocalServiceUtil.countFindWithParereByGeologoId(user.getUserId()));
int totale = ParereGeologoLocalServiceUtil.countFindWithParereByGeologoId(user.getUserId());
searchContainer.setTotal(totale);
//ADT BUG BO ID = 18
List<ParereGeologoBean> listaOrdinata = new ArrayList<ParereGeologoBean>(); List<ParereGeologoBean> listaOrdinata = new ArrayList<ParereGeologoBean>();
if(!lista.isEmpty()){ for (ParereGeologo parereGeologo : lista) {
for(ParereGeologo parereGeologo : lista){
ParereGeologoBean pb = new ParereGeologoBean(); ParereGeologoBean pb = new ParereGeologoBean();
pb.setParereGeologoId(parereGeologo.getParereGeologoId()); pb.setParereGeologoId(parereGeologo.getParereGeologoId());
pb.setIntPraticaId(parereGeologo.getIntPraticaId()); pb.setIntPraticaId(parereGeologo.getIntPraticaId());
pb.setDataCreazione(parereGeologo.getCreateDate()); pb.setDataCreazione(parereGeologo.getCreateDate());
pb.setUserId(parereGeologo.getUserId()); pb.setUserId(parereGeologo.getUserId());
pb.setNoteRichiedente(parereGeologo.getNoteRichiedente());
pb.setParere(parereGeologo.getParere()); pb.setParere(parereGeologo.getParere());
listaOrdinata.add(pb); listaOrdinata.add(pb);
} }
Collections.sort(listaOrdinata); Collections.sort(listaOrdinata);
Collections.reverse(listaOrdinata); Collections.reverse(listaOrdinata);
}
%> %>
<liferay-ui:search-container-results results="<%=listaOrdinata %>" /> <liferay-ui:search-container-results results="<%= listaOrdinata %>" />
<liferay-ui:search-container-row className="it.tref.liferay.portos.bo.shared.bean.ParereGeologoBean"
<liferay-ui:search-container-row modelVar="parereGeologo">
className="it.tref.liferay.portos.bo.shared.bean.ParereGeologoBean" <%
modelVar="parereGeologo" IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(parereGeologo.getIntPraticaId());
> %>
<liferay-ui:search-container-column-text name="progetto"> <liferay-ui:search-container-column-text name="progetto">
<%= IntPraticaLocalServiceUtil.getIntPratica(parereGeologo.getIntPraticaId()).getTitle(true)%> <%= intPratica.getTitle(true) %>
</liferay-ui:search-container-column-text> </liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Data di creazione"> <liferay-ui:search-container-column-text name="Data di creazione">
<%= dateFormatDateTime.format(parereGeologo.getDataCreazione())%> <%= dateFormatDateTime.format(parereGeologo.getDataCreazione()) %>
</liferay-ui:search-container-column-text> </liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Richiedente"> <liferay-ui:search-container-column-text name="Richiedente">
<%= UserLocalServiceUtil.getUser(parereGeologo.getUserId()).getFullName()%> <%= UserLocalServiceUtil.getUser(parereGeologo.getUserId()).getFullName() %>
</liferay-ui:search-container-column-text> </liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Localizzazione">
<liferay-ui:search-container-column-text name="Provincia"> <%= intPratica.getIndirizzo() %>
<% </liferay-ui:search-container-column-text>
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(parereGeologo.getIntPraticaId()); <liferay-ui:search-container-column-text name="Note del richiedente">
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); <%= HtmlUtil.escape(parereGeologo.getNoteRichiedente()) %>
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia());
%>
<%=provincia.getProvincia() %>
</liferay-ui:search-container-column-text> </liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Parere" property="parere" /> <liferay-ui:search-container-column-text name="Parere" property="parere" />
<liferay-ui:search-container-column-jsp path="/html/pareregeologo/actions.jsp" align="right" /> <liferay-ui:search-container-column-jsp path="/html/pareregeologo/actions.jsp" align="right" />
</liferay-ui:search-container-row> </liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="true" />
<liferay-ui:search-iterator paginate="<%= true %>" />
</liferay-ui:search-container> </liferay-ui:search-container>

40
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/pareregeologo/pareridacompletare.jsp

@ -1,14 +1,15 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.util.HtmlUtil"%>
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%> <%@page import="it.tref.liferay.portos.bo.model.DettPratica"%>
<%@page import="it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.model.IntPratica"%>
<%@page import="java.util.Collections"%>
<%@page import="it.tref.liferay.portos.bo.shared.bean.ParereGeologoBean"%>
<%@page import="it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.Provincia"%> <%@page import="it.tref.liferay.portos.bo.model.Provincia"%>
<%@page import="it.tref.liferay.portos.bo.model.Territorio"%> <%@page import="it.tref.liferay.portos.bo.model.Territorio"%>
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%> <%@page import="it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil"%>
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.bean.ParereGeologoBean"%>
<%@page import="java.util.Collections"%>
<%@ include file="/html/pareregeologo/init.jsp" %> <%@ include file="/html/pareregeologo/init.jsp" %>
<style> <style>
.width-40{ .width-40{
@ -23,9 +24,8 @@
</liferay-portlet:renderURL> </liferay-portlet:renderURL>
<liferay-ui:search-container delta="20" emptyResultsMessage="no-entries-were-found" iteratorURL="<%= searchURL %>" > <liferay-ui:search-container delta="20" emptyResultsMessage="no-entries-were-found" iteratorURL="<%= searchURL %>" >
<% <%
List<ParereGeologo> lista = new ArrayList<ParereGeologo>(); List<ParereGeologo> lista = ParereGeologoLocalServiceUtil.findNotParereByGeologoId(user.getUserId(),
lista = ParereGeologoLocalServiceUtil.findNotParereByGeologoId(user.getUserId(), searchContainer.getStart(), searchContainer.getStart(), searchContainer.getEnd());
searchContainer.getEnd());
int totale = ParereGeologoLocalServiceUtil.countFindNotParereByGeologoId(user.getUserId()); int totale = ParereGeologoLocalServiceUtil.countFindNotParereByGeologoId(user.getUserId());
searchContainer.setTotal(totale); searchContainer.setTotal(totale);
pageContext.setAttribute("results", lista); pageContext.setAttribute("results", lista);
@ -39,6 +39,7 @@
pb.setDettPraticaId(parereGeologo.getDettPraticaId()); pb.setDettPraticaId(parereGeologo.getDettPraticaId());
pb.setDataCreazione(parereGeologo.getCreateDate()); pb.setDataCreazione(parereGeologo.getCreateDate());
pb.setUserId(parereGeologo.getUserId()); pb.setUserId(parereGeologo.getUserId());
pb.setNoteRichiedente(parereGeologo.getNoteRichiedente());
listaOrdinata.add(pb); listaOrdinata.add(pb);
} }
Collections.sort(listaOrdinata); Collections.sort(listaOrdinata);
@ -48,20 +49,17 @@
<liferay-ui:search-container-row className="it.tref.liferay.portos.bo.shared.bean.ParereGeologoBean" <liferay-ui:search-container-row className="it.tref.liferay.portos.bo.shared.bean.ParereGeologoBean"
keyProperty="parereGeologoId" modelVar="parereGeologo"> keyProperty="parereGeologoId" modelVar="parereGeologo">
<% <%
DettPratica pratica = DettPraticaLocalServiceUtil.fetchDettPratica(parereGeologo.getDettPraticaId()); DettPratica dettPratica = DettPraticaLocalServiceUtil.fetchDettPratica(parereGeologo.getDettPraticaId());
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(parereGeologo.getIntPraticaId());
%> %>
<liferay-ui:search-container-column-text name="progetto" value="<%= pratica.getMiddleDescription() %>" <liferay-ui:search-container-column-text name="progetto" value="<%= dettPratica.getMiddleDescription() %>" />
cssClass="width-40" />
<liferay-ui:search-container-column-text name="Data di creazione" <liferay-ui:search-container-column-text name="Data di creazione"
value="<%= dateFormatDateTime.format(parereGeologo.getDataCreazione()) %>" cssClass="width-15" /> value="<%= dateFormatDateTime.format(parereGeologo.getDataCreazione()) %>" />
<liferay-ui:search-container-column-text name="Richiedente" <liferay-ui:search-container-column-text name="Richiedente"
value="<%= UserLocalServiceUtil.getUser(parereGeologo.getUserId()).getFullName()%>" cssClass="width-15" /> value="<%= UserLocalServiceUtil.getUser(parereGeologo.getUserId()).getFullName() %>" />
<% <liferay-ui:search-container-column-text name="Note del richiedente"
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(parereGeologo.getIntPraticaId()); value="<%= HtmlUtil.escape(parereGeologo.getNoteRichiedente()) %>" />
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); <liferay-ui:search-container-column-text name="Localizzazione" value="<%= intPratica.getIndirizzo() %>" />
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia());
%>
<liferay-ui:search-container-column-text name="Provincia" value="<%= provincia.getProvincia() %>" cssClass="width-15" />
<liferay-ui:search-container-column-jsp path="/html/pareregeologo/actions.jsp" /> <liferay-ui:search-container-column-jsp path="/html/pareregeologo/actions.jsp" />
</liferay-ui:search-container-row> </liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="true" /> <liferay-ui:search-iterator paginate="true" />

242
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/soggettipratica/edit_soggetto.jsp

@ -1,5 +1,3 @@
<%@page import="it.tref.liferay.portos.bo.util.SoggettiUtil"%>
<%@page import="java.util.Map.Entry"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.workflow.WorkflowConstants"%> <%@page import="com.liferay.portal.kernel.workflow.WorkflowConstants"%>
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%> <%@page import="it.tref.liferay.portos.bo.model.DettPratica"%>
@ -17,6 +15,7 @@
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil"%> <%@page import="it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.AzioniPraticheUtil"%> <%@page import="it.tref.liferay.portos.bo.util.AzioniPraticheUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.ValidazionePraticaUtil"%> <%@page import="it.tref.liferay.portos.bo.util.ValidazionePraticaUtil"%>
<%@page import="java.util.Map.Entry"%>
<%@include file="/html/soggettipratica/init.jsp"%> <%@include file="/html/soggettipratica/init.jsp"%>
<% <%
long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId"); long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId");
@ -75,7 +74,8 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
%> %>
<p>Il soggetto viene nominato in sostituzione di: <strong><%= replaceable.getDescrizioneCompleta() %></strong></p> <p>Il soggetto viene nominato in sostituzione di: <strong><%= replaceable.getDescrizioneCompleta() %></strong></p>
</c:if> </c:if>
<aui:form name="fm" onSubmit="preventDefault()" action='<%= disabledInput? StringPool.BLANK : updateSoggettoURL %>' <div id="<%= renderResponse.getNamespace() %>fmSoggettoContainer">
<aui:form name="fm" onSubmit="preventDefault()" action='<%= disabledInput? StringPool.BLANK : updateSoggettoURL %>'
method="post" enctype="multipart/form-data"> method="post" enctype="multipart/form-data">
<aui:model-context bean="<%= soggetto %>" model="<%= Soggetto.class %>" /> <aui:model-context bean="<%= soggetto %>" model="<%= Soggetto.class %>" />
<div class="container-fluid"> <div class="container-fluid">
@ -97,12 +97,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<div class="col-sm-12 container-allegato-variazione-soggetti"> <div class="col-sm-12 container-allegato-variazione-soggetti">
<div class="container-name-file"> <div class="container-name-file">
<% <%
String color = StringPool.BLANK; String color = soggetto.getTmp() ? "txt-orange" : "txt-green";
if (soggetto.getTmp()) {
color = "txt-orange";
} else {
color = "txt-green";
}
DocPratica docPratica = DocPraticaLocalServiceUtil.fetchDocPratica( DocPratica docPratica = DocPraticaLocalServiceUtil.fetchDocPratica(
soggetto.getFileVariazioneId()); soggetto.getFileVariazioneId());
long docPraticaId = docPratica.getDocPraticaId(); long docPraticaId = docPratica.getDocPraticaId();
@ -206,9 +201,10 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<div class="col-xs-4"> <div class="col-xs-4">
<c:if test="<%= disabledInput %>"> <c:if test="<%= disabledInput %>">
<aui:select disabled="true" name="tipologiaSoggetto"> <aui:select disabled="true" name="tipologiaSoggetto">
<aui:option value="00" selected="<%= soggetto == null %>">Tipologia</aui:option> <aui:option value="00" selected="<%= Validator.isNull(soggetto) %>"
label="Tipologia" />
<% <%
for (String tipo : dettPratica.getTipologieSoggetto().keySet()) { for (String tipo : SoggettoLocalServiceUtil.getTipologieSoggetti().keySet()) {
%> %>
<aui:option label='<%= "gc-soggetto-" + tipo %>' value="<%= tipo %>" <aui:option label='<%= "gc-soggetto-" + tipo %>' value="<%= tipo %>"
selected="<%= soggetto != null && soggetto.getTipologiaSoggetto() selected="<%= soggetto != null && soggetto.getTipologiaSoggetto()
@ -225,14 +221,15 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
</c:if> </c:if>
<aui:select disabled="<%= Validator.isNotNull(soggettoSostituitoId) %>" <aui:select disabled="<%= Validator.isNotNull(soggettoSostituitoId) %>"
name="tipologiaSoggetto"> name="tipologiaSoggetto">
<aui:option value="00" selected="<%= soggetto == null %>">Tipologia</aui:option> <aui:option value="00" selected="<%= Validator.isNull(soggetto) %>"
label="Tipologia" />
<% <%
for (String tipo : dettPratica.getTipologieSoggetto().keySet()) { for (String tipo : SoggettoLocalServiceUtil.getTipologieSoggetti().keySet()) {
%> %>
<c:if test="<%= AzioniPraticheUtil.canAddSoggetto(intPraticaId, tipo) %>"> <c:if test="<%= AzioniPraticheUtil.canAddSoggetto(intPraticaId, tipo) %>">
<aui:option label='<%= "gc-soggetto-" + tipo %>' value="<%= tipo %>" <aui:option label='<%= "gc-soggetto-" + tipo %>' value="<%= tipo %>"
selected="<%= soggetto != null && soggetto.getTipologiaSoggetto() selected="<%= Validator.isNotNull(soggetto)
.equals(tipo) %>" /> && soggetto.getTipologiaSoggetto().equals(tipo) %>" />
</c:if> </c:if>
<% <%
} }
@ -242,10 +239,10 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
</div> </div>
<div class="col-xs-4"> <div class="col-xs-4">
<div class="container-input_altrosoggetto" style="display: none"> <div class="container-input_altrosoggetto" style="display: none">
<aui:input disabled="<%= disabledInput %>" name="tipoAltroSoggetto" label="Professione" <aui:input disabled="<%= disabledInput %>" name="tipoAltroSoggetto"
class="input_altrosoggetto"> label="Professione" class="input_altrosoggetto">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
var vis = $('.container-input_altrosoggetto').is(':visible'); var vis = $('.container-input_altrosoggetto').is(':visible');
return fieldNode.get('disabled') || (val != null && val != '') || !vis; return fieldNode.get('disabled') || (val != null && val != '') || !vis;
} }
@ -255,7 +252,8 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
</div> </div>
<div class="col-xs-4"> <div class="col-xs-4">
<div class="container-select_committente" style="display: none;"> <div class="container-select_committente" style="display: none;">
<aui:select disabled="true" name="tipologiaCommittente" cssClass="select_committente"> <aui:select disabled="true" name="tipologiaCommittente"
cssClass="select_committente">
<aui:option label='Soggetto Fisico' value="soggetto_fisico" <aui:option label='Soggetto Fisico' value="soggetto_fisico"
selected="<%= soggetto != null selected="<%= soggetto != null
&& Validator.isNull(soggetto.getDenominazione()) %>" /> && Validator.isNull(soggetto.getDenominazione()) %>" />
@ -267,9 +265,11 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
</div> </div>
<div class="col-xs-4 button_container" style="display: none"> <div class="col-xs-4 button_container" style="display: none">
<aui:button-row cssClass="pull-right no_margin"> <aui:button-row cssClass="pull-right no_margin">
<aui:button id="<portlet:namespace />submitSoggetto_high" disabled="<%= disabledInput %>" <aui:button id="<portlet:namespace />submitSoggetto_high"
cssClass='<%= disabledInput ? "disabled btn btn-primary" : "btn btn-primary" %>' disabled="<%= disabledInput %>" value="<%= Constants.SAVE %>"
value="<%= Constants.SAVE %>" onClick="javascript:submitEditSoggetto()" /> cssClass='<%= disabledInput ? "disabled btn btn-primary"
: "btn btn-primary" %>'
onClick="javascript:submitEditSoggetto()" />
</aui:button-row> </aui:button-row>
</div> </div>
</div> </div>
@ -286,9 +286,10 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
for (Entry<String, String> ambito : SoggettoLocalServiceUtil for (Entry<String, String> ambito : SoggettoLocalServiceUtil
.getAmbitiProfessionali().entrySet()) { .getAmbitiProfessionali().entrySet()) {
%> %>
<aui:option value="<%= ambito.getKey() %>" label="<%= ambito.getValue() %>" <aui:option value="<%= ambito.getKey() %>"
selected='<%= soggetto.getAmbitoProfessione() label="<%= ambito.getValue() %>" selected='<%= soggetto
.equalsIgnoreCase(ambito.getKey()) %>' /> .getAmbitoProfessione().equalsIgnoreCase(ambito
.getKey()) %>' />
<% <%
} }
%> %>
@ -303,9 +304,10 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
for (Entry<String, String> ambito : SoggettoLocalServiceUtil for (Entry<String, String> ambito : SoggettoLocalServiceUtil
.getAmbitiProfessionali().entrySet()) { .getAmbitiProfessionali().entrySet()) {
%> %>
<aui:option value="<%= ambito.getKey() %>" label="<%= ambito.getValue() %>" <aui:option value="<%= ambito.getKey() %>"
selected='<%= soggetto.getAmbitoProfessione() label="<%= ambito.getValue() %>"
.equalsIgnoreCase(ambito.getKey()) %>' /> selected='<%= soggetto.getAmbitoProfessione().equalsIgnoreCase(
ambito.getKey()) %>' />
<% <%
} }
%> %>
@ -330,7 +332,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<div class="col-xs-12 col-sm-6 col-md-4"> <div class="col-xs-12 col-sm-6 col-md-4">
<aui:input disabled="<%= disabledInput %>" name="nome" label="Nome"> <aui:input disabled="<%= disabledInput %>" name="nome" label="Nome">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -339,22 +341,23 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<div class="col-xs-12 col-sm-6 col-md-4"> <div class="col-xs-12 col-sm-6 col-md-4">
<aui:input disabled="<%= disabledInput %>" name="cognome" label="Cognome"> <aui:input disabled="<%= disabledInput %>" name="cognome" label="Cognome">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
</aui:input> </aui:input>
</div> </div>
<div class="col-xs-12 col-sm-6 col-md-4"> <div class="col-xs-12 col-sm-6 col-md-4">
<aui:input disabled="<%= disabledInput %>" type="text" name="codiceFiscalePersone" <aui:input disabled="<%= disabledInput %>" type="text"
label="soggetto-codice-fiscale" value="<%= soggetto.getCodiceFiscale() %>"> name="codiceFiscalePersone" label="soggetto-codice-fiscale"
value="<%= soggetto.getCodiceFiscale() %>">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
<aui:validator name="custom" errorMessage="campo-non-valido"> <aui:validator name="custom" errorMessage="campo-non-valido">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
if (fieldNode.get('disabled')) { if (fieldNode.get('disabled')) {
return true; return true;
} }
@ -376,7 +379,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<aui:input disabled="<%= disabledInput %>" name="provinciaNascita" <aui:input disabled="<%= disabledInput %>" name="provinciaNascita"
label="Provincia di Nascita"> label="Provincia di Nascita">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -386,7 +389,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<aui:input disabled="<%= disabledInput %>" name="comuneNascita" <aui:input disabled="<%= disabledInput %>" name="comuneNascita"
label="Comune di Nascita"> label="Comune di Nascita">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -400,7 +403,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<liferay-util:param name="formName" value="fm" /> <liferay-util:param name="formName" value="fm" />
<liferay-util:param name="bean" value="bean.soggetto" /> <liferay-util:param name="bean" value="bean.soggetto" />
<liferay-util:param name="customValidator" <liferay-util:param name="customValidator"
value="function(val, fieldNode, ruleValue) { value="function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') return fieldNode.get('disabled')
|| (val != null && val != ''); || (val != null && val != '');
}" /> }" />
@ -426,7 +429,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<div class="col-xs-12 col-sm-4"> <div class="col-xs-12 col-sm-4">
<aui:input disabled="<%= disabledInput %>" name="cap" label="CAP"> <aui:input disabled="<%= disabledInput %>" name="cap" label="CAP">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -443,7 +446,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<div class="col-xs-11"> <div class="col-xs-11">
<aui:input disabled="<%= disabledInput %>" name="via" label="Via"> <aui:input disabled="<%= disabledInput %>" name="via" label="Via">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -452,7 +455,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<div class="col-xs-1"> <div class="col-xs-1">
<aui:input disabled="<%= disabledInput %>" name="numeroCivico" label="N."> <aui:input disabled="<%= disabledInput %>" name="numeroCivico" label="N.">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -464,7 +467,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<aui:input disabled="<%= disabledInput %>" name="telefonoResidenza" type="text" <aui:input disabled="<%= disabledInput %>" name="telefonoResidenza" type="text"
value="<%= soggetto.getTelefono() %>" label="Telefono"> value="<%= soggetto.getTelefono() %>" label="Telefono">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -475,12 +478,12 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
value="<%= soggetto.getEmail() %>" type="text" value="<%= soggetto.getEmail() %>" type="text"
label="Email per ricevimento comunicazioni/notifiche"> label="Email per ricevimento comunicazioni/notifiche">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
<aui:validator name="custom" errorMessage="campo-non-valido"> <aui:validator name="custom" errorMessage="campo-non-valido">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
if (fieldNode.get('disabled')) { if (fieldNode.get('disabled')) {
return true; return true;
} }
@ -512,12 +515,12 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
label="soggetto-codice-fiscale-legale" maxlenght="16" label="soggetto-codice-fiscale-legale" maxlenght="16"
value="<%= soggetto.getCodiceFiscale() %>"> value="<%= soggetto.getCodiceFiscale() %>">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
<aui:validator name="custom" errorMessage="campo-non-valido"> <aui:validator name="custom" errorMessage="campo-non-valido">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
if (fieldNode.get('disabled')) { if (fieldNode.get('disabled')) {
return true; return true;
} }
@ -540,7 +543,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<aui:input disabled="<%= disabledInput %>" name="denominazione" <aui:input disabled="<%= disabledInput %>" name="denominazione"
label="soggetto-denominazione"> label="soggetto-denominazione">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -554,7 +557,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<aui:input disabled="<%= disabledInput %>" name="legaleRap" <aui:input disabled="<%= disabledInput %>" name="legaleRap"
label="Rappresentante Legale"> label="Rappresentante Legale">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -564,7 +567,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<aui:input disabled="<%= disabledInput %>" name="provinciaNascitaRap" <aui:input disabled="<%= disabledInput %>" name="provinciaNascitaRap"
label="Provincia di Nascita"> label="Provincia di Nascita">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -574,7 +577,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<aui:input disabled="<%= disabledInput %>" name="comuneNascitaRap" <aui:input disabled="<%= disabledInput %>" name="comuneNascitaRap"
label="Comune di Nascita"> label="Comune di Nascita">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -588,7 +591,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<liferay-util:param name="formName" value="fm" /> <liferay-util:param name="formName" value="fm" />
<liferay-util:param name="bean" value="bean.soggetto" /> <liferay-util:param name="bean" value="bean.soggetto" />
<liferay-util:param name="customValidator" <liferay-util:param name="customValidator"
value="function(val, fieldNode, ruleValue) { value="function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') return fieldNode.get('disabled')
|| (val != null && val != ''); || (val != null && val != '');
}" /> }" />
@ -606,7 +609,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<div class="col-xs-12 col-sm-4"> <div class="col-xs-12 col-sm-4">
<aui:input disabled="<%= disabledInput %>" name="sedeLegale" label="Sede Legale"> <aui:input disabled="<%= disabledInput %>" name="sedeLegale" label="Sede Legale">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -615,7 +618,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<div class="col-xs-11 col-sm-7"> <div class="col-xs-11 col-sm-7">
<aui:input disabled="<%= disabledInput %>" name="viaRap" label="Via"> <aui:input disabled="<%= disabledInput %>" name="viaRap" label="Via">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -624,7 +627,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<div class="col-xs-1"> <div class="col-xs-1">
<aui:input disabled="<%= disabledInput %>" name="numeroCivicoRap" label="N."> <aui:input disabled="<%= disabledInput %>" name="numeroCivicoRap" label="N.">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -644,7 +647,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<div class="col-xs-12 col-sm-4"> <div class="col-xs-12 col-sm-4">
<aui:input disabled="<%= disabledInput %>" name="capRap" label="CAP"> <aui:input disabled="<%= disabledInput %>" name="capRap" label="CAP">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -662,7 +665,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<aui:input disabled="<%= disabledInput %>" name="telefonoGiuridico" type="text" <aui:input disabled="<%= disabledInput %>" name="telefonoGiuridico" type="text"
value="<%= soggetto.getTelefono() %>" label="Telefono"> value="<%= soggetto.getTelefono() %>" label="Telefono">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
@ -673,12 +676,12 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
value="<%= soggetto.getEmail() %>" value="<%= soggetto.getEmail() %>"
label="Email per ricevimento comunicazioni/notifiche"> label="Email per ricevimento comunicazioni/notifiche">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
return fieldNode.get('disabled') || (val != null && val != ''); return fieldNode.get('disabled') || (val != null && val != '');
} }
</aui:validator> </aui:validator>
<aui:validator name="custom" errorMessage="campo-non-valido"> <aui:validator name="custom" errorMessage="campo-non-valido">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
if (fieldNode.get('disabled')) { if (fieldNode.get('disabled')) {
return true; return true;
} }
@ -745,7 +748,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<aui:input disabled="<%= disabledInput %>" name="provinciaAlbo" <aui:input disabled="<%= disabledInput %>" name="provinciaAlbo"
label="Provincia Albo"> label="Provincia Albo">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
var altro_soggetto = "<%= TipoSoggettoUtil.ALTRO_SOGGETTO %>"; var altro_soggetto = "<%= TipoSoggettoUtil.ALTRO_SOGGETTO %>";
var archeologo = "<%= TipoSoggettoUtil.ARCHEOLOGO %>"; var archeologo = "<%= TipoSoggettoUtil.ARCHEOLOGO %>";
var value = $('#<portlet:namespace/>tipologiaSoggetto').val(); var value = $('#<portlet:namespace/>tipologiaSoggetto').val();
@ -760,7 +763,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<div class="col-xs-12 col-sm-4 regione_albo" style="display: none;"> <div class="col-xs-12 col-sm-4 regione_albo" style="display: none;">
<aui:input disabled="<%= disabledInput %>" name="regAlbo" label="Regione Albo"> <aui:input disabled="<%= disabledInput %>" name="regAlbo" label="Regione Albo">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
var altro_soggetto = "<%= TipoSoggettoUtil.ALTRO_SOGGETTO %>"; var altro_soggetto = "<%= TipoSoggettoUtil.ALTRO_SOGGETTO %>";
var archeologo = "<%= TipoSoggettoUtil.ARCHEOLOGO %>"; var archeologo = "<%= TipoSoggettoUtil.ARCHEOLOGO %>";
var value = $('#<portlet:namespace/>tipologiaSoggetto').val(); var value = $('#<portlet:namespace/>tipologiaSoggetto').val();
@ -776,7 +779,7 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
<aui:input disabled="<%= disabledInput %>" name="numIscrAlbo" <aui:input disabled="<%= disabledInput %>" name="numIscrAlbo"
label="Num. Iscrizione"> label="Num. Iscrizione">
<aui:validator name="custom" errorMessage="campo-richiesto"> <aui:validator name="custom" errorMessage="campo-richiesto">
function(val, fieldNode, ruleValue) { function (val, fieldNode, ruleValue) {
var altro_soggetto = "<%= TipoSoggettoUtil.ALTRO_SOGGETTO %>"; var altro_soggetto = "<%= TipoSoggettoUtil.ALTRO_SOGGETTO %>";
var archeologo = "<%= TipoSoggettoUtil.ARCHEOLOGO %>"; var archeologo = "<%= TipoSoggettoUtil.ARCHEOLOGO %>";
var value = $('#<portlet:namespace/>tipologiaSoggetto').val(); var value = $('#<portlet:namespace/>tipologiaSoggetto').val();
@ -849,14 +852,15 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
</div> </div>
</div> </div>
</div> </div>
</aui:form> </aui:form>
<script type="text/javascript"> </div>
<script>
Liferay.provide( Liferay.provide(
window, window,
'submitEditSoggetto', 'submitEditSoggetto',
function() { function () {
var isError = false; var isError = false;
AUI().all(".provinciaSelect:not(.notValidate):not(:disabled)").each(function(item) { AUI().all(".provinciaSelect:not(.notValidate):not(:disabled)").each(function (item) {
if (item.get('value') == "" || item.get('value') == "000") { if (item.get('value') == "" || item.get('value') == "000") {
item.ancestor('.control-group').addClass('error'); item.ancestor('.control-group').addClass('error');
isError = true; isError = true;
@ -870,7 +874,7 @@ Liferay.provide(
}) })
var dn = AUI().one('#<portlet:namespace />dataNascita'); var dn = AUI().one('#<portlet:namespace />dataNascita');
if (isError) { if (isError) {
AUI().all("input:not(:disabled)").each(function(node) { AUI().all("input:not(:disabled)").each(function (node) {
Liferay.Form.get('<portlet:namespace />fm').formValidator.validateField(node.get('name')); Liferay.Form.get('<portlet:namespace />fm').formValidator.validateField(node.get('name'));
}); });
} else { } else {
@ -884,7 +888,7 @@ Liferay.provide(
<liferay-portlet:resourceURL id="comuni" var="getComuniURL" /> <liferay-portlet:resourceURL id="comuni" var="getComuniURL" />
<liferay-portlet:resourceURL id="compilaSoggetti" var="compilaSoggettiURL" /> <liferay-portlet:resourceURL id="compilaSoggetti" var="compilaSoggettiURL" />
<aui:script use="aui-base,aui-io-request"> <aui:script use="aui-base,aui-io-request">
var getProvince = function(provinciaSelect) { var getProvince = function (provinciaSelect) {
var provinciaValue = ""; var provinciaValue = "";
if (provinciaSelect.attr("id").indexOf("Rap") > 0) { if (provinciaSelect.attr("id").indexOf("Rap") > 0) {
provinciaValue = "<%= soggetto.getProvinciaRap() %>"; provinciaValue = "<%= soggetto.getProvinciaRap() %>";
@ -899,9 +903,9 @@ var getProvince = function(provinciaSelect) {
provinciaValue = "000"; provinciaValue = "000";
} }
A.io.request('<%= getProvinceURL %>', { A.io.request('<%= getProvinceURL %>', {
dataType : 'json', dataType: 'json',
on : { on: {
success : function() { success: function () {
var response = this.get('responseData'); var response = this.get('responseData');
provinciaSelect.html("<option value='000' label=''></option>") provinciaSelect.html("<option value='000' label=''></option>")
for (index in response) { for (index in response) {
@ -918,7 +922,7 @@ var getProvince = function(provinciaSelect) {
}); });
}; };
var getComuni = function(provinciaId, comuneId, comuneValue) { var getComuni = function (provinciaId, comuneId, comuneValue) {
var comuneSelect = A.one("#" + comuneId); var comuneSelect = A.one("#" + comuneId);
var estero = A.one("#" + comuneId + "Estero"); var estero = A.one("#" + comuneId + "Estero");
if (provinciaId == "" || provinciaId == "000") { if (provinciaId == "" || provinciaId == "000") {
@ -933,12 +937,12 @@ var getComuni = function(provinciaId, comuneId, comuneValue) {
estero.set("disabled", false); estero.set("disabled", false);
} else { } else {
A.io.request('<%= getComuniURL %>', { A.io.request('<%= getComuniURL %>', {
data : { data: {
<portlet:namespace />provinciaId : provinciaId <portlet:namespace />provinciaId: provinciaId
}, },
dataType : 'json', dataType: 'json',
on : { on: {
success : function() { success: function () {
estero.ancestor('.container_estero').addClass('hidden'); estero.ancestor('.container_estero').addClass('hidden');
estero.set("disabled", true); estero.set("disabled", true);
var response = this.get('responseData'); var response = this.get('responseData');
@ -959,8 +963,8 @@ var getComuni = function(provinciaId, comuneId, comuneValue) {
} }
}; };
A.ready(function() { A.ready(function () {
A.all(".provinciaSelect").each(function(item) { A.all(".provinciaSelect").each(function (item) {
getProvince(item); getProvince(item);
var provinciaId = ""; var provinciaId = "";
var comuneId = item.attr("id").replace("provincia", "comune"); var comuneId = item.attr("id").replace("provincia", "comune");
@ -981,16 +985,16 @@ A.ready(function() {
}); });
}); });
A.all(".provinciaSelect").on('change', function(event) { A.all(".provinciaSelect").on('change', function (event) {
var provinciaId = event.currentTarget.get('value'); var provinciaId = event.currentTarget.get('value');
var comuneId = event.currentTarget.attr("id").replace("provincia", "comune"); var comuneId = event.currentTarget.attr("id").replace("provincia", "comune");
var comuneValue = "000"; var comuneValue = "000";
getComuni(provinciaId, comuneId, comuneValue); getComuni(provinciaId, comuneId, comuneValue);
}); });
A.all("#<portlet:namespace/>tipologiaSoggetto").on('change', function(event) { A.all("#<portlet:namespace/>tipologiaSoggetto").on('change', function (event) {
<portlet:namespace/>aggiornaForm(); <portlet:namespace/>aggiornaForm();
A.all(".provinciaSelect").each(function(item) { A.all(".provinciaSelect").each(function (item) {
getProvince(item); getProvince(item);
var provinciaId = ""; var provinciaId = "";
var comuneId = item.attr("id").replace("provincia","comune"), comuneValue = "000"; var comuneId = item.attr("id").replace("provincia","comune"), comuneValue = "000";
@ -1013,18 +1017,18 @@ A.all("#<portlet:namespace/>tipologiaSoggetto").on('change', function(event) {
Liferay.provide( Liferay.provide(
window, window,
'getDatiSoggetto', 'getDatiSoggetto',
function(id) { function (id) {
var tipologia_soggetto = A.one("#<portlet:namespace />tipologiaSoggetto").get("value"); var tipologia_soggetto = A.one("#<portlet:namespace />tipologiaSoggetto").get("value");
var codice_fiscale = A.one("#<portlet:namespace />" + id).get("value"); var codice_fiscale = A.one("#<portlet:namespace />" + id).get("value");
A.io.request('<%= compilaSoggettiURL %>', { A.io.request('<%= compilaSoggettiURL %>', {
data : { data: {
<portlet:namespace />userId : <%= user.getUserId() %>, <portlet:namespace />userId: <%= user.getUserId() %>,
<portlet:namespace />codiceFiscale : codice_fiscale, <portlet:namespace />codiceFiscale: codice_fiscale,
<portlet:namespace />tipologiaSoggetto : tipologia_soggetto <portlet:namespace />tipologiaSoggetto: tipologia_soggetto
}, },
dataType : 'json', dataType: 'json',
on : { on: {
success : function() { success: function () {
var response = this.get('responseData'); var response = this.get('responseData');
if (response[0] != undefined && response[0] != null) { if (response[0] != undefined && response[0] != null) {
var jsonData = JSON.parse(response[0]); var jsonData = JSON.parse(response[0]);
@ -1113,26 +1117,31 @@ Liferay.provide(
}); });
} }
); );
window.parent.Liferay.fire('soggetti-open');
if ((<%= closePopup %>)) {
window.parent.Liferay.fire('soggetti-close');
}
</aui:script> </aui:script>
<script type="text/javascript"> <script>
AUI().ready(function(A) { AUI().ready(function (A) {
$('#<portlet:namespace/>tipologiaCommittente').change(function() { $('#<portlet:namespace/>tipologiaCommittente').change(function () {
aggiornaFormCommit(); aggiornaFormCommit();
}); });
$('.select_ambito_altro, .select_ambito_ditta').change(function() { $('.select_ambito_altro, .select_ambito_ditta').change(function () {
activateAmbitoAltri(); activateAmbitoAltri();
}); });
$('.select_albo_altro').change(function() { $('.select_albo_altro').change(function () {
activateAlboAltro(); activateAlboAltro();
}); });
$('.select_ambito_ditta').change(function() { $('.select_ambito_ditta').change(function () {
activateAmbitoAltri(); activateAmbitoAltri();
}); });
disableInput(".tabella"); disableInput(".tabella");
<portlet:namespace/>aggiornaForm(); <portlet:namespace/>aggiornaForm();
}); });
Liferay.provide(window, 'aggiornaFormCommit', function() { Liferay.provide(window, 'aggiornaFormCommit', function () {
var fisico = "soggetto_fisico"; var fisico = "soggetto_fisico";
var giuridico = "soggetto_giuridico"; var giuridico = "soggetto_giuridico";
var valueCommittente = $('#<portlet:namespace/>tipologiaCommittente').val(); var valueCommittente = $('#<portlet:namespace/>tipologiaCommittente').val();
@ -1162,7 +1171,7 @@ Liferay.provide(window, 'aggiornaFormCommit', function() {
} }
}); });
Liferay.provide(window, '<portlet:namespace/>aggiornaForm', function() { Liferay.provide(window, '<portlet:namespace/>aggiornaForm', function () {
var vuoto = "00"; var vuoto = "00";
var committente = "<%= TipoSoggettoUtil.COMMITTENTE %>"; var committente = "<%= TipoSoggettoUtil.COMMITTENTE %>";
var progettista = "<%= TipoSoggettoUtil.PROGETTISTA %>"; var progettista = "<%= TipoSoggettoUtil.PROGETTISTA %>";
@ -1261,7 +1270,7 @@ Liferay.provide(window, '<portlet:namespace/>aggiornaForm', function() {
} }
}); });
Liferay.provide(window, 'activeDisableCommittente', function() { Liferay.provide(window, 'activeDisableCommittente', function () {
var committente = "<%= TipoSoggettoUtil.COMMITTENTE %>"; var committente = "<%= TipoSoggettoUtil.COMMITTENTE %>";
var value = $('#<portlet:namespace/>tipologiaSoggetto').val(); var value = $('#<portlet:namespace/>tipologiaSoggetto').val();
if (value == committente && ! <%= disabledInput %>) { if (value == committente && ! <%= disabledInput %>) {
@ -1273,7 +1282,7 @@ Liferay.provide(window, 'activeDisableCommittente', function() {
} }
}); });
Liferay.provide(window, 'activeDisableAltrosoggetto', function() { Liferay.provide(window, 'activeDisableAltrosoggetto', function () {
var altroSoggetto = "<%= TipoSoggettoUtil.ALTRO_SOGGETTO %>"; var altroSoggetto = "<%= TipoSoggettoUtil.ALTRO_SOGGETTO %>";
var value = $('#<portlet:namespace/>tipologiaSoggetto').val(); var value = $('#<portlet:namespace/>tipologiaSoggetto').val();
@ -1286,7 +1295,7 @@ Liferay.provide(window, 'activeDisableAltrosoggetto', function() {
} }
}); });
Liferay.provide(window, 'activateAmbitoAltri', function() { Liferay.provide(window, 'activateAmbitoAltri', function () {
var value_ditta = $('#<portlet:namespace/>ambitoProfessioneDitta').val(); var value_ditta = $('#<portlet:namespace/>ambitoProfessioneDitta').val();
var value_prof = $('#<portlet:namespace/>ambitoProfessioneAltro').val(); var value_prof = $('#<portlet:namespace/>ambitoProfessioneAltro').val();
var tipo_sog = $('#<portlet:namespace/>tipologiaSoggetto').val(); var tipo_sog = $('#<portlet:namespace/>tipologiaSoggetto').val();
@ -1302,7 +1311,7 @@ Liferay.provide(window, 'activateAmbitoAltri', function() {
} }
}); });
Liferay.provide(window, 'activateAlboAltro', function() { Liferay.provide(window, 'activateAlboAltro', function () {
var value_albo = $('#<portlet:namespace/>albo').val(); var value_albo = $('#<portlet:namespace/>albo').val();
if ((value_albo == "albo-altro") && ! <%= disabledInput %>) { if ((value_albo == "albo-altro") && ! <%= disabledInput %>) {
$('#<portlet:namespace/>alboAltroContainer').show(); $('#<portlet:namespace/>alboAltroContainer').show();
@ -1313,20 +1322,20 @@ Liferay.provide(window, 'activateAlboAltro', function() {
} }
}); });
Liferay.provide(window, 'clearInput', function() { Liferay.provide(window, 'clearInput', function () {
$('.tabella_soggetti_fisici input').val(""); $('.tabella_soggetti_fisici input').val("");
$('.tabella_soggetti_giuridici input').val(""); $('.tabella_soggetti_giuridici input').val("");
$('.tabella_albo input').val(""); $('.tabella_albo input').val("");
}); });
Liferay.provide(window, 'enableInput', function(elem) { Liferay.provide(window, 'enableInput', function (elem) {
AUI().all(elem + " input").each(function(item) { AUI().all(elem + " input").each(function (item) {
if (!<%= disabledInput %>) { if (!<%= disabledInput %>) {
item.set('disabled', false); item.set('disabled', false);
item.removeClass('disabled'); item.removeClass('disabled');
} }
}); });
AUI().all(elem + " select").each(function(item) { AUI().all(elem + " select").each(function (item) {
if (!<%= disabledInput %>) { if (!<%= disabledInput %>) {
if (!item.hasClass("comuneSelect") || (item.hasClass('comuneSelect') && item.get('value') != "000")) { if (!item.hasClass("comuneSelect") || (item.hasClass('comuneSelect') && item.get('value') != "000")) {
item.set('disabled', false); item.set('disabled', false);
@ -1336,27 +1345,20 @@ Liferay.provide(window, 'enableInput', function(elem) {
}); });
}); });
Liferay.provide(window, 'disableInput', function(elem) { Liferay.provide(window, 'disableInput', function (elem) {
AUI().all(elem + " input, " + elem + " select").each(function(item) { AUI().all(elem + " input, " + elem + " select").each(function (item) {
item.addClass('disabled'); item.addClass('disabled');
item.set('disabled', true); item.set('disabled', true);
}); });
}); });
</script>
<script type="text/javascript"> YUI().use('aui-tooltip', function (Y) {
YUI().use('aui-tooltip', function(Y) {
new Y.TooltipDelegate({ new Y.TooltipDelegate({
trigger : '.tooltip-info', trigger: '.tooltip-info',
position : 'top', position: 'top',
cssClass : 'tooltip-help', cssClass: 'tooltip-help',
html : true, html: true,
opacity : 1, opacity: 1,
}); });
}); });
</script> </script>
<aui:script use="aui-base">
window.parent.Liferay.fire('soggetti-open');
if ((<%= closePopup %>)) {
window.parent.Liferay.fire('soggetti-close');
}
</aui:script>

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.1.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_1_0.dtd"> <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.1.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_1_0.dtd">
<service-builder package-path="it.tref.liferay.portos.kaleo.controller"> <service-builder package-path="it.tref.liferay.portos.kaleo.controller">
<author>3FC</author> <author>3FC + Manifattura Web Group s.r.l.</author>
<namespace>portos_kaleo_controller</namespace> <namespace>portos_kaleo_controller</namespace>
<entity name="KaleoInstance" local-service="true" remote-service="false" table="kaleoinstance"> <entity name="KaleoInstance" local-service="true" remote-service="false" table="kaleoinstance">

40
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/NoSuchKaleoInstanceException.java

@ -0,0 +1,40 @@
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package it.tref.liferay.portos.kaleo.controller;
import com.liferay.portal.NoSuchModelException;
/**
* @author 3FC + Manifattura Web Group s.r.l.
*/
public class NoSuchKaleoInstanceException extends NoSuchModelException {
public NoSuchKaleoInstanceException() {
super();
}
public NoSuchKaleoInstanceException(String msg) {
super(msg);
}
public NoSuchKaleoInstanceException(String msg, Throwable cause) {
super(msg, cause);
}
public NoSuchKaleoInstanceException(Throwable cause) {
super(cause);
}
}

40
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/NoSuchKaleoInstanceTokenException.java

@ -0,0 +1,40 @@
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package it.tref.liferay.portos.kaleo.controller;
import com.liferay.portal.NoSuchModelException;
/**
* @author 3FC + Manifattura Web Group s.r.l.
*/
public class NoSuchKaleoInstanceTokenException extends NoSuchModelException {
public NoSuchKaleoInstanceTokenException() {
super();
}
public NoSuchKaleoInstanceTokenException(String msg) {
super(msg);
}
public NoSuchKaleoInstanceTokenException(String msg, Throwable cause) {
super(msg, cause);
}
public NoSuchKaleoInstanceTokenException(Throwable cause) {
super(cause);
}
}

40
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/NoSuchKaleoLogException.java

@ -0,0 +1,40 @@
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package it.tref.liferay.portos.kaleo.controller;
import com.liferay.portal.NoSuchModelException;
/**
* @author 3FC + Manifattura Web Group s.r.l.
*/
public class NoSuchKaleoLogException extends NoSuchModelException {
public NoSuchKaleoLogException() {
super();
}
public NoSuchKaleoLogException(String msg) {
super(msg);
}
public NoSuchKaleoLogException(String msg, Throwable cause) {
super(msg, cause);
}
public NoSuchKaleoLogException(Throwable cause) {
super(cause);
}
}

40
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/NoSuchKaleoNodeException.java

@ -0,0 +1,40 @@
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package it.tref.liferay.portos.kaleo.controller;
import com.liferay.portal.NoSuchModelException;
/**
* @author 3FC + Manifattura Web Group s.r.l.
*/
public class NoSuchKaleoNodeException extends NoSuchModelException {
public NoSuchKaleoNodeException() {
super();
}
public NoSuchKaleoNodeException(String msg) {
super(msg);
}
public NoSuchKaleoNodeException(String msg, Throwable cause) {
super(msg, cause);
}
public NoSuchKaleoNodeException(Throwable cause) {
super(cause);
}
}

40
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/NoSuchKaleoTaskAssignmentInstanceException.java

@ -0,0 +1,40 @@
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package it.tref.liferay.portos.kaleo.controller;
import com.liferay.portal.NoSuchModelException;
/**
* @author 3FC + Manifattura Web Group s.r.l.
*/
public class NoSuchKaleoTaskAssignmentInstanceException extends NoSuchModelException {
public NoSuchKaleoTaskAssignmentInstanceException() {
super();
}
public NoSuchKaleoTaskAssignmentInstanceException(String msg) {
super(msg);
}
public NoSuchKaleoTaskAssignmentInstanceException(String msg, Throwable cause) {
super(msg, cause);
}
public NoSuchKaleoTaskAssignmentInstanceException(Throwable cause) {
super(cause);
}
}

40
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/NoSuchKaleoTaskException.java

@ -0,0 +1,40 @@
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package it.tref.liferay.portos.kaleo.controller;
import com.liferay.portal.NoSuchModelException;
/**
* @author 3FC + Manifattura Web Group s.r.l.
*/
public class NoSuchKaleoTaskException extends NoSuchModelException {
public NoSuchKaleoTaskException() {
super();
}
public NoSuchKaleoTaskException(String msg) {
super(msg);
}
public NoSuchKaleoTaskException(String msg, Throwable cause) {
super(msg, cause);
}
public NoSuchKaleoTaskException(Throwable cause) {
super(cause);
}
}

40
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/NoSuchKaleoTaskInstanceTokenException.java

@ -0,0 +1,40 @@
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package it.tref.liferay.portos.kaleo.controller;
import com.liferay.portal.NoSuchModelException;
/**
* @author 3FC + Manifattura Web Group s.r.l.
*/
public class NoSuchKaleoTaskInstanceTokenException extends NoSuchModelException {
public NoSuchKaleoTaskInstanceTokenException() {
super();
}
public NoSuchKaleoTaskInstanceTokenException(String msg) {
super(msg);
}
public NoSuchKaleoTaskInstanceTokenException(String msg, Throwable cause) {
super(msg, cause);
}
public NoSuchKaleoTaskInstanceTokenException(Throwable cause) {
super(cause);
}
}

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstance.java

@ -19,7 +19,7 @@ import com.liferay.portal.model.PersistedModel;
/** /**
* The extended model interface for the KaleoInstance service. Represents a row in the &quot;kaleoinstance&quot; database table, with each column mapped to a property of this class. * The extended model interface for the KaleoInstance service. Represents a row in the &quot;kaleoinstance&quot; database table, with each column mapped to a property of this class.
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoInstanceModel * @see KaleoInstanceModel
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceImpl
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceModelImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceModelImpl

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceClp.java

@ -34,7 +34,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
*/ */
public class KaleoInstanceClp extends BaseModelImpl<KaleoInstance> public class KaleoInstanceClp extends BaseModelImpl<KaleoInstance>
implements KaleoInstance { implements KaleoInstance {

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceModel.java

@ -34,7 +34,7 @@ import java.util.Date;
* This interface and its corresponding implementation {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceImpl}. * This interface and its corresponding implementation {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceImpl}.
* </p> * </p>
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoInstance * @see KaleoInstance
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceImpl
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceModelImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceModelImpl

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceSoap.java

@ -23,7 +23,7 @@ import java.util.List;
/** /**
* This class is used by SOAP remote services. * This class is used by SOAP remote services.
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @generated * @generated
*/ */
public class KaleoInstanceSoap implements Serializable { public class KaleoInstanceSoap implements Serializable {

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceToken.java

@ -19,7 +19,7 @@ import com.liferay.portal.model.PersistedModel;
/** /**
* The extended model interface for the KaleoInstanceToken service. Represents a row in the &quot;kaleoinstancetoken&quot; database table, with each column mapped to a property of this class. * The extended model interface for the KaleoInstanceToken service. Represents a row in the &quot;kaleoinstancetoken&quot; database table, with each column mapped to a property of this class.
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoInstanceTokenModel * @see KaleoInstanceTokenModel
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenImpl
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenModelImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenModelImpl

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceTokenClp.java

@ -34,7 +34,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
*/ */
public class KaleoInstanceTokenClp extends BaseModelImpl<KaleoInstanceToken> public class KaleoInstanceTokenClp extends BaseModelImpl<KaleoInstanceToken>
implements KaleoInstanceToken { implements KaleoInstanceToken {

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceTokenModel.java

@ -34,7 +34,7 @@ import java.util.Date;
* This interface and its corresponding implementation {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenImpl}. * This interface and its corresponding implementation {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenImpl}.
* </p> * </p>
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoInstanceToken * @see KaleoInstanceToken
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenImpl
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenModelImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoInstanceTokenModelImpl

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceTokenSoap.java

@ -23,7 +23,7 @@ import java.util.List;
/** /**
* This class is used by SOAP remote services. * This class is used by SOAP remote services.
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @generated * @generated
*/ */
public class KaleoInstanceTokenSoap implements Serializable { public class KaleoInstanceTokenSoap implements Serializable {

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceTokenWrapper.java

@ -26,7 +26,7 @@ import java.util.Map;
* This class is a wrapper for {@link KaleoInstanceToken}. * This class is a wrapper for {@link KaleoInstanceToken}.
* </p> * </p>
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoInstanceToken * @see KaleoInstanceToken
* @generated * @generated
*/ */

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoInstanceWrapper.java

@ -26,7 +26,7 @@ import java.util.Map;
* This class is a wrapper for {@link KaleoInstance}. * This class is a wrapper for {@link KaleoInstance}.
* </p> * </p>
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoInstance * @see KaleoInstance
* @generated * @generated
*/ */

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoLog.java

@ -19,7 +19,7 @@ import com.liferay.portal.model.PersistedModel;
/** /**
* The extended model interface for the KaleoLog service. Represents a row in the &quot;kaleolog&quot; database table, with each column mapped to a property of this class. * The extended model interface for the KaleoLog service. Represents a row in the &quot;kaleolog&quot; database table, with each column mapped to a property of this class.
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoLogModel * @see KaleoLogModel
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogImpl
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogModelImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogModelImpl

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoLogClp.java

@ -34,7 +34,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
*/ */
public class KaleoLogClp extends BaseModelImpl<KaleoLog> implements KaleoLog { public class KaleoLogClp extends BaseModelImpl<KaleoLog> implements KaleoLog {
public KaleoLogClp() { public KaleoLogClp() {

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoLogModel.java

@ -34,7 +34,7 @@ import java.util.Date;
* This interface and its corresponding implementation {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogImpl}. * This interface and its corresponding implementation {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogImpl}.
* </p> * </p>
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoLog * @see KaleoLog
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogImpl
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogModelImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoLogModelImpl

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoLogSoap.java

@ -23,7 +23,7 @@ import java.util.List;
/** /**
* This class is used by SOAP remote services. * This class is used by SOAP remote services.
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @generated * @generated
*/ */
public class KaleoLogSoap implements Serializable { public class KaleoLogSoap implements Serializable {

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoLogWrapper.java

@ -26,7 +26,7 @@ import java.util.Map;
* This class is a wrapper for {@link KaleoLog}. * This class is a wrapper for {@link KaleoLog}.
* </p> * </p>
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoLog * @see KaleoLog
* @generated * @generated
*/ */

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoNode.java

@ -19,7 +19,7 @@ import com.liferay.portal.model.PersistedModel;
/** /**
* The extended model interface for the KaleoNode service. Represents a row in the &quot;kaleonode&quot; database table, with each column mapped to a property of this class. * The extended model interface for the KaleoNode service. Represents a row in the &quot;kaleonode&quot; database table, with each column mapped to a property of this class.
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoNodeModel * @see KaleoNodeModel
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeImpl
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeModelImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeModelImpl

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoNodeClp.java

@ -34,7 +34,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
*/ */
public class KaleoNodeClp extends BaseModelImpl<KaleoNode> implements KaleoNode { public class KaleoNodeClp extends BaseModelImpl<KaleoNode> implements KaleoNode {
public KaleoNodeClp() { public KaleoNodeClp() {

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoNodeModel.java

@ -34,7 +34,7 @@ import java.util.Date;
* This interface and its corresponding implementation {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeImpl}. * This interface and its corresponding implementation {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeImpl}.
* </p> * </p>
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoNode * @see KaleoNode
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeImpl
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeModelImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoNodeModelImpl

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoNodeSoap.java

@ -23,7 +23,7 @@ import java.util.List;
/** /**
* This class is used by SOAP remote services. * This class is used by SOAP remote services.
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @generated * @generated
*/ */
public class KaleoNodeSoap implements Serializable { public class KaleoNodeSoap implements Serializable {

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoNodeWrapper.java

@ -26,7 +26,7 @@ import java.util.Map;
* This class is a wrapper for {@link KaleoNode}. * This class is a wrapper for {@link KaleoNode}.
* </p> * </p>
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoNode * @see KaleoNode
* @generated * @generated
*/ */

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTask.java

@ -19,7 +19,7 @@ import com.liferay.portal.model.PersistedModel;
/** /**
* The extended model interface for the KaleoTask service. Represents a row in the &quot;kaleotask&quot; database table, with each column mapped to a property of this class. * The extended model interface for the KaleoTask service. Represents a row in the &quot;kaleotask&quot; database table, with each column mapped to a property of this class.
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoTaskModel * @see KaleoTaskModel
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskImpl
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskModelImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskModelImpl

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskAssignmentInstance.java

@ -19,7 +19,7 @@ import com.liferay.portal.model.PersistedModel;
/** /**
* The extended model interface for the KaleoTaskAssignmentInstance service. Represents a row in the &quot;kaleotaskassignmentinstance&quot; database table, with each column mapped to a property of this class. * The extended model interface for the KaleoTaskAssignmentInstance service. Represents a row in the &quot;kaleotaskassignmentinstance&quot; database table, with each column mapped to a property of this class.
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoTaskAssignmentInstanceModel * @see KaleoTaskAssignmentInstanceModel
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceImpl
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceModelImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceModelImpl

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskAssignmentInstanceClp.java

@ -34,7 +34,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
*/ */
public class KaleoTaskAssignmentInstanceClp extends BaseModelImpl<KaleoTaskAssignmentInstance> public class KaleoTaskAssignmentInstanceClp extends BaseModelImpl<KaleoTaskAssignmentInstance>
implements KaleoTaskAssignmentInstance { implements KaleoTaskAssignmentInstance {

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskAssignmentInstanceModel.java

@ -34,7 +34,7 @@ import java.util.Date;
* This interface and its corresponding implementation {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceImpl}. * This interface and its corresponding implementation {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceImpl}.
* </p> * </p>
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoTaskAssignmentInstance * @see KaleoTaskAssignmentInstance
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceImpl
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceModelImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskAssignmentInstanceModelImpl

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskAssignmentInstanceSoap.java

@ -23,7 +23,7 @@ import java.util.List;
/** /**
* This class is used by SOAP remote services. * This class is used by SOAP remote services.
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @generated * @generated
*/ */
public class KaleoTaskAssignmentInstanceSoap implements Serializable { public class KaleoTaskAssignmentInstanceSoap implements Serializable {

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskAssignmentInstanceWrapper.java

@ -26,7 +26,7 @@ import java.util.Map;
* This class is a wrapper for {@link KaleoTaskAssignmentInstance}. * This class is a wrapper for {@link KaleoTaskAssignmentInstance}.
* </p> * </p>
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoTaskAssignmentInstance * @see KaleoTaskAssignmentInstance
* @generated * @generated
*/ */

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskClp.java

@ -34,7 +34,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
*/ */
public class KaleoTaskClp extends BaseModelImpl<KaleoTask> implements KaleoTask { public class KaleoTaskClp extends BaseModelImpl<KaleoTask> implements KaleoTask {
public KaleoTaskClp() { public KaleoTaskClp() {

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskInstanceToken.java

@ -19,7 +19,7 @@ import com.liferay.portal.model.PersistedModel;
/** /**
* The extended model interface for the KaleoTaskInstanceToken service. Represents a row in the &quot;kaleotaskinstancetoken&quot; database table, with each column mapped to a property of this class. * The extended model interface for the KaleoTaskInstanceToken service. Represents a row in the &quot;kaleotaskinstancetoken&quot; database table, with each column mapped to a property of this class.
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoTaskInstanceTokenModel * @see KaleoTaskInstanceTokenModel
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenImpl
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenModelImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenModelImpl

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskInstanceTokenClp.java

@ -34,7 +34,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
*/ */
public class KaleoTaskInstanceTokenClp extends BaseModelImpl<KaleoTaskInstanceToken> public class KaleoTaskInstanceTokenClp extends BaseModelImpl<KaleoTaskInstanceToken>
implements KaleoTaskInstanceToken { implements KaleoTaskInstanceToken {

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskInstanceTokenModel.java

@ -34,7 +34,7 @@ import java.util.Date;
* This interface and its corresponding implementation {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenImpl}. * This interface and its corresponding implementation {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenImpl}.
* </p> * </p>
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoTaskInstanceToken * @see KaleoTaskInstanceToken
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenImpl
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenModelImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskInstanceTokenModelImpl

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskInstanceTokenSoap.java

@ -23,7 +23,7 @@ import java.util.List;
/** /**
* This class is used by SOAP remote services. * This class is used by SOAP remote services.
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @generated * @generated
*/ */
public class KaleoTaskInstanceTokenSoap implements Serializable { public class KaleoTaskInstanceTokenSoap implements Serializable {

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskInstanceTokenWrapper.java

@ -26,7 +26,7 @@ import java.util.Map;
* This class is a wrapper for {@link KaleoTaskInstanceToken}. * This class is a wrapper for {@link KaleoTaskInstanceToken}.
* </p> * </p>
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoTaskInstanceToken * @see KaleoTaskInstanceToken
* @generated * @generated
*/ */

2
liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/kaleo/controller/model/KaleoTaskModel.java

@ -34,7 +34,7 @@ import java.util.Date;
* This interface and its corresponding implementation {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskImpl}. * This interface and its corresponding implementation {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskImpl}.
* </p> * </p>
* *
* @author 3FC * @author 3FC + Manifattura Web Group s.r.l.
* @see KaleoTask * @see KaleoTask
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskImpl
* @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskModelImpl * @see it.tref.liferay.portos.kaleo.controller.model.impl.KaleoTaskModelImpl

Some files were not shown because too many files have changed in this diff Show More

Caricamento…
Annulla
Salva