Sfoglia il codice sorgente

Fix template Vidimazione

master
Salvatore La Manna 4 anni fa
parent
commit
df829f1289
  1. 39
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/mwg/sismica/bo/util/HttpServiceUtil.java
  2. 18
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalService.java
  3. 74
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceClp.java
  4. 19
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceUtil.java
  5. 18
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceWrapper.java
  6. 19
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaService.java
  7. 75
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaServiceClp.java
  8. 19
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaServiceUtil.java
  9. 19
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaServiceWrapper.java
  10. 16
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AvvisoUtil.java
  11. 94
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AzioniPraticheUtil.java
  12. 66
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ProtocolloUtil.java
  13. 5
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java
  14. 8
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerGeneraDocumento.java
  15. 13
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java
  16. 70
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java
  17. 52
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaServiceImpl.java
  18. 23
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/ProtocollazioneUtil.java
  19. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  20. BIN
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/lib/httpclient.jar
  21. 44
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp

39
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/mwg/sismica/bo/util/HttpPostUtil.java → liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/mwg/sismica/bo/util/HttpServiceUtil.java

@ -13,15 +13,21 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils; import org.apache.http.util.EntityUtils;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONFactoryUtil;
import com.liferay.portal.kernel.json.JSONObject; import com.liferay.portal.kernel.json.JSONObject;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.util.ContentTypes; import com.liferay.portal.kernel.util.ContentTypes;
import com.liferay.portal.kernel.util.HttpUtil;
import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Http.Options;
public class HttpPostUtil { public class HttpServiceUtil {
private static final Log _log = LogFactoryUtil.getLog(HttpServiceUtil.class);
public static JSONObject postProtocolloBean(long companyId, Protocollo protocolloBean) throws Exception { public static JSONObject postProtocolloBean(long companyId, Protocollo protocolloBean) throws Exception {
JSONObject risposta = null;
flexjson.JSONSerializer serializer = new flexjson.JSONSerializer(); flexjson.JSONSerializer serializer = new flexjson.JSONSerializer();
serializer.exclude("*.class"); serializer.exclude("*.class");
String json = serializer.serialize(protocolloBean); String json = serializer.serialize(protocolloBean);
@ -29,6 +35,11 @@ public class HttpPostUtil {
String url = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId, String url = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId,
ConfigurazioneConstants.PROTOCOLLAZIONE_SERVICE_URL); ConfigurazioneConstants.PROTOCOLLAZIONE_SERVICE_URL);
return postJson(url, json);
}
public static JSONObject postJson(String url, String json) throws Exception {
JSONObject risposta = null;
HttpPost request = new HttpPost(url); HttpPost request = new HttpPost(url);
request.setHeader("Content-type", ContentTypes.APPLICATION_JSON); request.setHeader("Content-type", ContentTypes.APPLICATION_JSON);
request.setEntity(new StringEntity(json)); request.setEntity(new StringEntity(json));
@ -39,15 +50,31 @@ public class HttpPostUtil {
String responseBody = EntityUtils.toString(response.getEntity(), StringPool.UTF8); String responseBody = EntityUtils.toString(response.getEntity(), StringPool.UTF8);
client.close(); client.close();
_log.info(url + " || " + json + " || " + risposta);
if (statusCode == HttpServletResponse.SC_OK || statusCode == HttpServletResponse.SC_CREATED) { if (statusCode == HttpServletResponse.SC_OK || statusCode == HttpServletResponse.SC_CREATED) {
risposta = JSONFactoryUtil.createJSONObject(responseBody); risposta = JSONFactoryUtil.createJSONObject(responseBody);
// retval = risposta.getString("anno") + String.format("%07d",
// risposta.getInt("numero"));
} else { } else {
throw new Exception(statusCode + StringPool.SPACE + responseBody); throw new PortalException(statusCode + StringPool.SPACE + responseBody);
} }
return risposta; return risposta;
} }
public static String getUrl(String url) throws Exception {
return getUrl(url, StringPool.BLANK);
}
public static String getUrl(String url, String defaultValue) throws Exception {
Options options = new Options();
options.setLocation(url);
options.setPost(false);
String responseBody = HttpUtil.URLtoString(options);
_log.info(url + " || " + responseBody);
if (options.getResponse().getResponseCode() != HttpServletResponse.SC_OK) {
throw new Exception(url + ": " + options.getResponse().getResponseCode());
// responseBody = defaultValue;
}
return responseBody;
}
} }

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

@ -936,28 +936,18 @@ public interface DettPraticaLocalService extends BaseLocalService,
com.liferay.portal.kernel.exception.SystemException; com.liferay.portal.kernel.exception.SystemException;
public void sendToVersioning(long dettPraticaId, java.lang.String url) public void sendToVersioning(long dettPraticaId, java.lang.String url)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception;
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException, java.lang.NoSuchFieldException,
java.lang.SecurityException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true) @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getNumeroDiVersioni(java.lang.String url) public int getNumeroDiVersioni(java.lang.String url)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception, java.lang.NumberFormatException;
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true) @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.lang.String getVersionNumber(java.lang.String url, int version) public java.lang.String getVersionNumber(java.lang.String url, int version)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception;
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException;
public com.liferay.portal.kernel.json.JSONArray callForChanges( public com.liferay.portal.kernel.json.JSONArray callForChanges(
java.lang.String url) java.lang.String url) throws java.lang.Exception;
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true) @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public it.tref.liferay.portos.bo.model.DettPratica fetchByOldDettPraticaId( public it.tref.liferay.portos.bo.model.DettPratica fetchByOldDettPraticaId(

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

@ -4591,10 +4591,7 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
@Override @Override
public void sendToVersioning(long dettPraticaId, java.lang.String url) public void sendToVersioning(long dettPraticaId, java.lang.String url)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception {
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException, java.lang.NoSuchFieldException,
java.lang.SecurityException {
try { try {
_invokableLocalService.invokeMethod(_methodName78, _invokableLocalService.invokeMethod(_methodName78,
_methodParameterTypes78, _methodParameterTypes78,
@ -4603,24 +4600,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.PortalException) { if (t instanceof java.lang.Exception) {
throw (com.liferay.portal.kernel.exception.PortalException)t; throw (java.lang.Exception)t;
}
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
}
if (t instanceof java.lang.NoSuchFieldException) {
throw (java.lang.NoSuchFieldException)t;
}
if (t instanceof java.lang.SecurityException) {
throw (java.lang.SecurityException)t;
} }
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
@ -4635,9 +4616,7 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
@Override @Override
public int getNumeroDiVersioni(java.lang.String url) public int getNumeroDiVersioni(java.lang.String url)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception, java.lang.NumberFormatException {
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
Object returnObj = null; Object returnObj = null;
try { try {
@ -4648,16 +4627,12 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.PortalException) { if (t instanceof java.lang.Exception) {
throw (com.liferay.portal.kernel.exception.PortalException)t; throw (java.lang.Exception)t;
} }
if (t instanceof com.liferay.portal.kernel.exception.SystemException) { if (t instanceof java.lang.NumberFormatException) {
throw (com.liferay.portal.kernel.exception.SystemException)t; throw (java.lang.NumberFormatException)t;
}
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
} }
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
@ -4674,9 +4649,7 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
@Override @Override
public java.lang.String getVersionNumber(java.lang.String url, int version) public java.lang.String getVersionNumber(java.lang.String url, int version)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception {
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
Object returnObj = null; Object returnObj = null;
try { try {
@ -4687,16 +4660,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.PortalException) { if (t instanceof java.lang.Exception) {
throw (com.liferay.portal.kernel.exception.PortalException)t; throw (java.lang.Exception)t;
}
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
} }
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
@ -4713,10 +4678,7 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
@Override @Override
public com.liferay.portal.kernel.json.JSONArray callForChanges( public com.liferay.portal.kernel.json.JSONArray callForChanges(
java.lang.String url) java.lang.String url) throws java.lang.Exception {
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
Object returnObj = null; Object returnObj = null;
try { try {
@ -4727,16 +4689,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.PortalException) { if (t instanceof java.lang.Exception) {
throw (com.liferay.portal.kernel.exception.PortalException)t; throw (java.lang.Exception)t;
}
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
} }
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {

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

@ -1285,33 +1285,22 @@ public class DettPraticaLocalServiceUtil {
} }
public static void sendToVersioning(long dettPraticaId, java.lang.String url) public static void sendToVersioning(long dettPraticaId, java.lang.String url)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception {
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException, java.lang.NoSuchFieldException,
java.lang.SecurityException {
getService().sendToVersioning(dettPraticaId, url); getService().sendToVersioning(dettPraticaId, url);
} }
public static int getNumeroDiVersioni(java.lang.String url) public static int getNumeroDiVersioni(java.lang.String url)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception, java.lang.NumberFormatException {
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
return getService().getNumeroDiVersioni(url); return getService().getNumeroDiVersioni(url);
} }
public static java.lang.String getVersionNumber(java.lang.String url, public static java.lang.String getVersionNumber(java.lang.String url,
int version) int version) throws java.lang.Exception {
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
return getService().getVersionNumber(url, version); return getService().getVersionNumber(url, version);
} }
public static com.liferay.portal.kernel.json.JSONArray callForChanges( public static com.liferay.portal.kernel.json.JSONArray callForChanges(
java.lang.String url) java.lang.String url) throws java.lang.Exception {
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
return getService().callForChanges(url); return getService().callForChanges(url);
} }

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

@ -1354,35 +1354,25 @@ public class DettPraticaLocalServiceWrapper implements DettPraticaLocalService,
@Override @Override
public void sendToVersioning(long dettPraticaId, java.lang.String url) public void sendToVersioning(long dettPraticaId, java.lang.String url)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception {
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException, java.lang.NoSuchFieldException,
java.lang.SecurityException {
_dettPraticaLocalService.sendToVersioning(dettPraticaId, url); _dettPraticaLocalService.sendToVersioning(dettPraticaId, url);
} }
@Override @Override
public int getNumeroDiVersioni(java.lang.String url) public int getNumeroDiVersioni(java.lang.String url)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception, java.lang.NumberFormatException {
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
return _dettPraticaLocalService.getNumeroDiVersioni(url); return _dettPraticaLocalService.getNumeroDiVersioni(url);
} }
@Override @Override
public java.lang.String getVersionNumber(java.lang.String url, int version) public java.lang.String getVersionNumber(java.lang.String url, int version)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception {
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
return _dettPraticaLocalService.getVersionNumber(url, version); return _dettPraticaLocalService.getVersionNumber(url, version);
} }
@Override @Override
public com.liferay.portal.kernel.json.JSONArray callForChanges( public com.liferay.portal.kernel.json.JSONArray callForChanges(
java.lang.String url) java.lang.String url) throws java.lang.Exception {
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
return _dettPraticaLocalService.callForChanges(url); return _dettPraticaLocalService.callForChanges(url);
} }

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

@ -332,26 +332,15 @@ public interface DettPraticaService extends BaseService, InvokableService {
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true) @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getNumeroDiVersioni(long intPraticaId, long companyId) public int getNumeroDiVersioni(long intPraticaId, long companyId)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception;
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true) @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.lang.String getJsonVersion(long intPraticaId, long companyId, public java.lang.String getJsonVersion(long intPraticaId, long companyId,
int version) int version) throws java.lang.Exception;
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException;
public java.lang.String callForChanges(long intPraticaId, long companyId, public java.lang.String callForChanges(long intPraticaId, long companyId,
int version) int version) throws java.lang.Exception;
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException;
public void sendToVersioning(long dettPraticaId, long companyId) public void sendToVersioning(long dettPraticaId, long companyId)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception;
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException, java.lang.NoSuchFieldException,
java.lang.SecurityException;
} }

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

@ -1659,9 +1659,7 @@ public class DettPraticaServiceClp implements DettPraticaService {
@Override @Override
public int getNumeroDiVersioni(long intPraticaId, long companyId) public int getNumeroDiVersioni(long intPraticaId, long companyId)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception {
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
Object returnObj = null; Object returnObj = null;
try { try {
@ -1672,16 +1670,8 @@ public class DettPraticaServiceClp implements DettPraticaService {
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.PortalException) { if (t instanceof java.lang.Exception) {
throw (com.liferay.portal.kernel.exception.PortalException)t; throw (java.lang.Exception)t;
}
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
} }
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
@ -1698,10 +1688,7 @@ public class DettPraticaServiceClp implements DettPraticaService {
@Override @Override
public java.lang.String getJsonVersion(long intPraticaId, long companyId, public java.lang.String getJsonVersion(long intPraticaId, long companyId,
int version) int version) throws java.lang.Exception {
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
Object returnObj = null; Object returnObj = null;
try { try {
@ -1712,16 +1699,8 @@ public class DettPraticaServiceClp implements DettPraticaService {
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.PortalException) { if (t instanceof java.lang.Exception) {
throw (com.liferay.portal.kernel.exception.PortalException)t; throw (java.lang.Exception)t;
}
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
} }
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
@ -1738,10 +1717,7 @@ public class DettPraticaServiceClp implements DettPraticaService {
@Override @Override
public java.lang.String callForChanges(long intPraticaId, long companyId, public java.lang.String callForChanges(long intPraticaId, long companyId,
int version) int version) throws java.lang.Exception {
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
Object returnObj = null; Object returnObj = null;
try { try {
@ -1752,16 +1728,8 @@ public class DettPraticaServiceClp implements DettPraticaService {
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.PortalException) { if (t instanceof java.lang.Exception) {
throw (com.liferay.portal.kernel.exception.PortalException)t; throw (java.lang.Exception)t;
}
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
} }
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
@ -1778,10 +1746,7 @@ public class DettPraticaServiceClp implements DettPraticaService {
@Override @Override
public void sendToVersioning(long dettPraticaId, long companyId) public void sendToVersioning(long dettPraticaId, long companyId)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception {
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException, java.lang.NoSuchFieldException,
java.lang.SecurityException {
try { try {
_invokableService.invokeMethod(_methodName26, _invokableService.invokeMethod(_methodName26,
_methodParameterTypes26, _methodParameterTypes26,
@ -1790,24 +1755,8 @@ public class DettPraticaServiceClp implements DettPraticaService {
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.PortalException) { if (t instanceof java.lang.Exception) {
throw (com.liferay.portal.kernel.exception.PortalException)t; throw (java.lang.Exception)t;
}
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
}
if (t instanceof java.lang.NoSuchFieldException) {
throw (java.lang.NoSuchFieldException)t;
}
if (t instanceof java.lang.SecurityException) {
throw (java.lang.SecurityException)t;
} }
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {

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

@ -473,33 +473,22 @@ public class DettPraticaServiceUtil {
} }
public static int getNumeroDiVersioni(long intPraticaId, long companyId) public static int getNumeroDiVersioni(long intPraticaId, long companyId)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception {
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
return getService().getNumeroDiVersioni(intPraticaId, companyId); return getService().getNumeroDiVersioni(intPraticaId, companyId);
} }
public static java.lang.String getJsonVersion(long intPraticaId, public static java.lang.String getJsonVersion(long intPraticaId,
long companyId, int version) long companyId, int version) throws java.lang.Exception {
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
return getService().getJsonVersion(intPraticaId, companyId, version); return getService().getJsonVersion(intPraticaId, companyId, version);
} }
public static java.lang.String callForChanges(long intPraticaId, public static java.lang.String callForChanges(long intPraticaId,
long companyId, int version) long companyId, int version) throws java.lang.Exception {
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
return getService().callForChanges(intPraticaId, companyId, version); return getService().callForChanges(intPraticaId, companyId, version);
} }
public static void sendToVersioning(long dettPraticaId, long companyId) public static void sendToVersioning(long dettPraticaId, long companyId)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception {
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException, java.lang.NoSuchFieldException,
java.lang.SecurityException {
getService().sendToVersioning(dettPraticaId, companyId); getService().sendToVersioning(dettPraticaId, companyId);
} }

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

@ -478,38 +478,27 @@ public class DettPraticaServiceWrapper implements DettPraticaService,
@Override @Override
public int getNumeroDiVersioni(long intPraticaId, long companyId) public int getNumeroDiVersioni(long intPraticaId, long companyId)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception {
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
return _dettPraticaService.getNumeroDiVersioni(intPraticaId, companyId); return _dettPraticaService.getNumeroDiVersioni(intPraticaId, companyId);
} }
@Override @Override
public java.lang.String getJsonVersion(long intPraticaId, long companyId, public java.lang.String getJsonVersion(long intPraticaId, long companyId,
int version) int version) throws java.lang.Exception {
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
return _dettPraticaService.getJsonVersion(intPraticaId, companyId, return _dettPraticaService.getJsonVersion(intPraticaId, companyId,
version); version);
} }
@Override @Override
public java.lang.String callForChanges(long intPraticaId, long companyId, public java.lang.String callForChanges(long intPraticaId, long companyId,
int version) int version) throws java.lang.Exception {
throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException {
return _dettPraticaService.callForChanges(intPraticaId, companyId, return _dettPraticaService.callForChanges(intPraticaId, companyId,
version); version);
} }
@Override @Override
public void sendToVersioning(long dettPraticaId, long companyId) public void sendToVersioning(long dettPraticaId, long companyId)
throws com.liferay.portal.kernel.exception.PortalException, throws java.lang.Exception {
com.liferay.portal.kernel.exception.SystemException,
java.io.IOException, java.lang.NoSuchFieldException,
java.lang.SecurityException {
_dettPraticaService.sendToVersioning(dettPraticaId, companyId); _dettPraticaService.sendToVersioning(dettPraticaId, companyId);
} }

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

@ -174,12 +174,20 @@ public class AvvisoUtil {
allTipoDocumentoFileTemplateProps.put("PG", "conf.geniocivile.avviso.template.id.doc_pagamento"); allTipoDocumentoFileTemplateProps.put("PG", "conf.geniocivile.avviso.template.id.doc_pagamento");
allTipoDocumentoFileTemplateProps.put("DOM", "conf.geniocivile.avviso.template.id.domanda_pdf"); allTipoDocumentoFileTemplateProps.put("DOM", "conf.geniocivile.avviso.template.id.domanda_pdf");
allTipoDocumentoFileTemplateProps.put("DPA", "conf.geniocivile.avviso.template.id.deposito.A"); allTipoDocumentoFileTemplateProps.put("DPP0", "conf.geniocivile.avviso.template.id.deposito.A");
allTipoDocumentoFileTemplateProps.put("DPB", "conf.geniocivile.avviso.template.id.deposito.B"); allTipoDocumentoFileTemplateProps.put("DPP1", "conf.geniocivile.avviso.template.id.deposito.A");
allTipoDocumentoFileTemplateProps.put("DPB1", "conf.geniocivile.avviso.template.id.deposito.B1"); allTipoDocumentoFileTemplateProps.put("DPP2", "conf.geniocivile.avviso.template.id.deposito.A");
allTipoDocumentoFileTemplateProps.put("DPP3", "conf.geniocivile.avviso.template.id.deposito.A");
allTipoDocumentoFileTemplateProps.put("DPP4", "conf.geniocivile.avviso.template.id.deposito.A");
allTipoDocumentoFileTemplateProps.put("DPP5", "conf.geniocivile.avviso.template.id.deposito.A");
allTipoDocumentoFileTemplateProps.put("DPP6", "conf.geniocivile.avviso.template.id.deposito.A");
allTipoDocumentoFileTemplateProps.put("DPP7", "conf.geniocivile.avviso.template.id.deposito.A");
allTipoDocumentoFileTemplateProps.put("DPP8", "conf.geniocivile.avviso.template.id.deposito.A");
allTipoDocumentoFileTemplateProps.put("DPP9", "conf.geniocivile.avviso.template.id.deposito.A");
allTipoDocumentoFileTemplateProps.put("DPP10", "conf.geniocivile.avviso.template.id.deposito.A");
allTipoDocumentoFileTemplateProps.put("DPB2", "conf.geniocivile.avviso.template.id.deposito.B2"); allTipoDocumentoFileTemplateProps.put("DPB2", "conf.geniocivile.avviso.template.id.deposito.B2");
allTipoDocumentoFileTemplateProps.put("DPVNS", "conf.geniocivile.avviso.template.id.deposito.VNS"); allTipoDocumentoFileTemplateProps.put("DPVNS", "conf.geniocivile.avviso.template.id.deposito.VNS");
allTipoDocumentoFileTemplateProps.put("DPC", "conf.geniocivile.avviso.template.id.deposito.C");
allTipoDocumentoFileTemplateProps.put("DPPS", "conf.geniocivile.avviso.template.id.deposito.PS"); allTipoDocumentoFileTemplateProps.put("DPPS", "conf.geniocivile.avviso.template.id.deposito.PS");
allTipoDocumentoFileTemplateProps.put("DPS", "conf.geniocivile.avviso.template.id.deposito.S"); allTipoDocumentoFileTemplateProps.put("DPS", "conf.geniocivile.avviso.template.id.deposito.S");
/* /*

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

@ -49,7 +49,6 @@ 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";
public static List<String> ALL_ACTIONS = new UniqueList<String>() { public static List<String> ALL_ACTIONS = new UniqueList<String>() {
{ {
add(ACTION_AGGIUNGI_SOGGETTO); add(ACTION_AGGIUNGI_SOGGETTO);
@ -68,35 +67,39 @@ public class AzioniPraticheUtil {
{ {
put(STATE_VIDIMATO, ALL_ACTIONS); put(STATE_VIDIMATO, ALL_ACTIONS);
put(STATE_SOTTOPOSTO_A_PARERE_AUTORIZZAZIONE, put(STATE_SOTTOPOSTO_A_PARERE_AUTORIZZAZIONE,
ListUtil.toList(new String[] {ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, ACTION_VARIAZIONE_SOGGETTI, ListUtil.toList(new String[] { ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO,
ACTION_ANNULLA})); ACTION_VARIAZIONE_SOGGETTI, ACTION_ANNULLA }));
put(STATE_SOTTOPOSTO_A_PARERE_DEPOSITO, ALL_ACTIONS); put(STATE_SOTTOPOSTO_A_PARERE_DEPOSITO, ALL_ACTIONS);
put(STATE_ANNULLATO, new ArrayList<String>()); put(STATE_ANNULLATO, new ArrayList<String>());
put(STATE_NON_CONFORME, new ArrayList<String>()); put(STATE_NON_CONFORME, new ArrayList<String>());
put(NON_AUTORIZZATA, new ArrayList<String>()); put(NON_AUTORIZZATA, new ArrayList<String>());
put(STATE_INTEGRAZIONE_AUTORIZZAZIONE, put(STATE_INTEGRAZIONE_AUTORIZZAZIONE,
ListUtil.toList(new String[] {ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, ACTION_INTEGRAZIONE, ListUtil.toList(new String[] { ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO,
ACTION_ANNULLA})); ACTION_INTEGRAZIONE, ACTION_ANNULLA }));
put(STATE_INTEGRAZIONE_DEPOSITO, put(STATE_INTEGRAZIONE_DEPOSITO,
ListUtil.toList(new String[] {ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, ACTION_INTEGRAZIONE, ListUtil.toList(new String[] { ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO,
// ACTION_ANNULLA, ACTION_FL_PARZIALE, ACTION_FL_TOTALE, ACTION_CO_PARZIALE, ACTION_INTEGRAZIONE,
// ACTION_ANNULLA, ACTION_FL_PARZIALE,
// ACTION_FL_TOTALE, ACTION_CO_PARZIALE,
// ACTION_CO_TOTALE})); // ACTION_CO_TOTALE}));
ACTION_ANNULLA})); ACTION_ANNULLA }));
put(STATE_COMPILAZIONE, put(STATE_COMPILAZIONE,
ListUtil.toList(new String[] {ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, ACTION_ANNULLA})); ListUtil.toList(new String[] { ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO,
ACTION_ANNULLA }));
put(STATE_FINE_LAVORI_PARZIALE, put(STATE_FINE_LAVORI_PARZIALE,
ListUtil.toList(new String[] {ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, ACTION_VARIANTE, ListUtil.toList(new String[] { ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO,
ACTION_FL_PARZIALE, ACTION_FL_TOTALE, ACTION_CO_PARZIALE})); ACTION_VARIANTE, ACTION_FL_PARZIALE, ACTION_FL_TOTALE, ACTION_CO_PARZIALE }));
put(STATE_FINE_LAVORI_TOTALE, put(STATE_FINE_LAVORI_TOTALE,
ListUtil.toList(new String[] {ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, ACTION_CO_TOTALE , ACTION_CO_PARZIALE})); ListUtil.toList(new String[] { ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO,
ACTION_CO_TOTALE, ACTION_CO_PARZIALE }));
put(STATE_COLLAUDO_PARZIALE, put(STATE_COLLAUDO_PARZIALE,
ListUtil.toList(new String[] {ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO, ACTION_VARIANTE, ListUtil.toList(new String[] { ACTION_AGGIUNGI_SOGGETTO, ACTION_RIMUOVI_SOGGETTO,
ACTION_CO_PARZIALE, ACTION_CO_TOTALE})); ACTION_VARIANTE, ACTION_CO_PARZIALE, ACTION_CO_TOTALE }));
} }
}; };
public static boolean isAllowedAction(long intPraticaId, String action) throws PortalException, SystemException { public static boolean isAllowedAction(long intPraticaId, String action) throws PortalException,
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);
@ -182,7 +185,8 @@ public class AzioniPraticheUtil {
} }
if (action.equalsIgnoreCase(ACTION_ANNULLA) if (action.equalsIgnoreCase(ACTION_ANNULLA)
&& (intPratica.getFineLavoriTotale() || intPratica.getFineLavoriParziale() || intPratica.getCollaudoParziale())) { && (intPratica.getFineLavoriTotale() || intPratica.getFineLavoriParziale() || intPratica
.getCollaudoParziale())) {
return false; return false;
} }
@ -192,11 +196,11 @@ public class AzioniPraticheUtil {
return true; return true;
} }
public static boolean canPrintFascicolo(long intPraticaId) throws PortalException, SystemException {
public static boolean canPrintFascicolo(long intPraticaId) throws PortalException, SystemException{
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId); IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
//ADT BUG ID = 3 // ADT BUG ID = 3
if((!intPratica.getStatoPratica().equals("") || intPratica.isValidata()) && !intPratica.getNumeroProgetto().equals("")){ if ((!intPratica.getStatoPratica().equals("") || intPratica.isValidata())
&& !intPratica.getNumeroProgetto().equals("")) {
return true; return true;
} else { } else {
return false; return false;
@ -204,18 +208,21 @@ public class AzioniPraticheUtil {
} }
public static boolean canPrintFascicoloVariante(long intPraticaId) throws PortalException, SystemException{ public static boolean canPrintFascicoloVariante(long intPraticaId) throws PortalException,
SystemException {
int nVarianti = DettPraticaLocalServiceUtil.countCompletedByIntPraticaAndTipoPratica(intPraticaId, Arrays.asList(new String[]{TipoIntegrazioneUtil.VARIANTE})); int nVarianti = DettPraticaLocalServiceUtil.countCompletedByIntPraticaAndTipoPratica(intPraticaId,
Arrays.asList(new String[] { TipoIntegrazioneUtil.VARIANTE }));
if(nVarianti > 0){ if (nVarianti > 0) {
return true; return true;
} else { } else {
return false; return false;
} }
} }
public static boolean canAddSoggetto(long intPraticaId, String tipoSoggetto) throws PortalException, SystemException { public static boolean canAddSoggetto(long intPraticaId, String tipoSoggetto) throws PortalException,
SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
@ -223,12 +230,14 @@ public class AzioniPraticheUtil {
return false; return false;
} }
//ADT BUG FE ID = 11 // ADT BUG FE ID = 11
/* if ((!TipoSoggettoUtil.COMMITTENTE.equalsIgnoreCase(tipoSoggetto) && !TipoSoggettoUtil.COLLAUDATORE /*
.equalsIgnoreCase(tipoSoggetto)) && (intPratica.isFineLavoriTotale() || intPratica.getCollaudoParziale())) { * if ((!TipoSoggettoUtil.COMMITTENTE.equalsIgnoreCase(tipoSoggetto) &&
return false; * !TipoSoggettoUtil.COLLAUDATORE .equalsIgnoreCase(tipoSoggetto)) &&
}*/ * (intPratica.isFineLavoriTotale() ||
* intPratica.getCollaudoParziale())) { return false; }
*/
if ((!TipoSoggettoUtil.COMMITTENTE.equalsIgnoreCase(tipoSoggetto) && !TipoSoggettoUtil.COLLAUDATORE if ((!TipoSoggettoUtil.COMMITTENTE.equalsIgnoreCase(tipoSoggetto) && !TipoSoggettoUtil.COLLAUDATORE
.equalsIgnoreCase(tipoSoggetto)) && (intPratica.isFineLavoriTotale())) { .equalsIgnoreCase(tipoSoggetto)) && (intPratica.isFineLavoriTotale())) {
return false; return false;
@ -246,7 +255,8 @@ public class AzioniPraticheUtil {
} }
if ((!TipoSoggettoUtil.COMMITTENTE.equalsIgnoreCase(tipoSoggetto) && !TipoSoggettoUtil.COLLAUDATORE if ((!TipoSoggettoUtil.COMMITTENTE.equalsIgnoreCase(tipoSoggetto) && !TipoSoggettoUtil.COLLAUDATORE
.equalsIgnoreCase(tipoSoggetto)) && (intPratica.isFineLavoriTotale() || intPratica.getCollaudoParziale())) { .equalsIgnoreCase(tipoSoggetto))
&& (intPratica.isFineLavoriTotale() || intPratica.getCollaudoParziale())) {
return false; return false;
} }
if ((TipoSoggettoUtil.DIRETTORE_LAVORI.equalsIgnoreCase(tipoSoggetto) || TipoSoggettoUtil.DITTA if ((TipoSoggettoUtil.DIRETTORE_LAVORI.equalsIgnoreCase(tipoSoggetto) || TipoSoggettoUtil.DITTA
@ -260,25 +270,29 @@ public class AzioniPraticheUtil {
public static boolean isDeposito(long intPraticaId) throws PortalException, SystemException { public static boolean isDeposito(long intPraticaId) throws PortalException, SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
// Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); // Territorio territorio =
// return Constants.PRATICA_ZONE.get(territorio.getZona()).equalsIgnoreCase(Constants.TIPO_PRATICA_DEPOSITO); // TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
// Manifattura Web Group per Regione Siciliana // return
// Constants.PRATICA_ZONE.get(territorio.getZona()).equalsIgnoreCase(Constants.TIPO_PRATICA_DEPOSITO);
// Manifattura Web Group per Regione Siciliana
return intPratica.getTipoPratica().equalsIgnoreCase(Constants.TIPO_PRATICA_DEPOSITO); return intPratica.getTipoPratica().equalsIgnoreCase(Constants.TIPO_PRATICA_DEPOSITO);
} }
public static boolean isAutorizzazione(long intPraticaId) throws PortalException, SystemException { public static boolean isAutorizzazione(long intPraticaId) throws PortalException, SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
// Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); // Territorio territorio =
// return Constants.PRATICA_ZONE.get(territorio.getZona()).equalsIgnoreCase(Constants.TIPO_PRATICA_AUTORIZZAZIONE); // TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
// Manifattura Web Group per Regione Siciliana // return
// Constants.PRATICA_ZONE.get(territorio.getZona()).equalsIgnoreCase(Constants.TIPO_PRATICA_AUTORIZZAZIONE);
// Manifattura Web Group per Regione Siciliana
return intPratica.getTipoPratica().equalsIgnoreCase(Constants.TIPO_PRATICA_AUTORIZZAZIONE); return intPratica.getTipoPratica().equalsIgnoreCase(Constants.TIPO_PRATICA_AUTORIZZAZIONE);
} }
//ADT BUG ID = 7 // ADT BUG ID = 7
public static boolean canAddVariazioneSoggetti(long intPraticaId) throws PortalException, SystemException{ public static boolean canAddVariazioneSoggetti(long intPraticaId) throws PortalException, SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId); IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
if(!intPratica.getStatoPratica().equals("") && !intPratica.getNumeroProgetto().equals("")){ if (!intPratica.getStatoPratica().equals("") && !intPratica.getNumeroProgetto().equals("")) {
return true; return true;
} else { } else {
return false; return false;

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

@ -1,30 +1,20 @@
package it.tref.liferay.portos.bo.util; package it.tref.liferay.portos.bo.util;
import it.mwg.sismica.bo.util.HttpServiceUtil;
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.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.shared.protocollo.model.File; import it.tref.liferay.portos.bo.shared.protocollo.model.File;
import it.tref.liferay.portos.bo.shared.protocollo.model.Protocollo; import it.tref.liferay.portos.bo.shared.protocollo.model.Protocollo;
import it.tref.liferay.portos.bo.shared.protocollo.model.Protocollo.TipoProtocollo; import it.tref.liferay.portos.bo.shared.protocollo.model.Protocollo.TipoProtocollo;
import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.codec.digest.DigestUtils;
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.json.JSONFactoryUtil;
import com.liferay.portal.kernel.json.JSONObject; import com.liferay.portal.kernel.json.JSONObject;
import com.liferay.portal.kernel.util.ContentTypes;
import com.liferay.portal.kernel.util.Http.Body;
import com.liferay.portal.kernel.util.Http.Options;
import com.liferay.portal.kernel.util.HttpUtil;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
public class ProtocolloUtil { public class ProtocolloUtil {
@ -32,8 +22,6 @@ public class ProtocolloUtil {
public static String protocollaPartenzaAccessoAtti(long accessoAttiId, long intPraticaId, long groupId, public static String protocollaPartenzaAccessoAtti(long accessoAttiId, long intPraticaId, long groupId,
String className, long companyId, String screenName) throws Exception { String className, long companyId, String screenName) throws Exception {
String protocollo = null;
File allegato = new File(); File allegato = new File();
String doc = String.valueOf(accessoAttiId); String doc = String.valueOf(accessoAttiId);
@ -57,25 +45,13 @@ public class ProtocolloUtil {
protocolloBean.setUfficioId(String.valueOf(groupId)); protocolloBean.setUfficioId(String.valueOf(groupId));
protocolloBean.setPraticaId(String.valueOf(accessoAttiId)); protocolloBean.setPraticaId(String.valueOf(accessoAttiId));
protocolloBean.setFiles(Collections.singletonList(allegato)); protocolloBean.setFiles(Collections.singletonList(allegato));
Options options = createCall(companyId, protocolloBean, true); JSONObject risposta = HttpServiceUtil.postProtocolloBean(companyId, protocolloBean);
return risposta.getString("anno") + String.format("%07d", risposta.getInt("numero"));
String responseBody = HttpUtil.URLtoString(options);
if (options.getResponse().getResponseCode() == HttpServletResponse.SC_OK
|| options.getResponse().getResponseCode() == HttpServletResponse.SC_CREATED) {
JSONObject risposta = JSONFactoryUtil.createJSONObject(responseBody);
protocollo = risposta.getString("anno") + String.format("%07d", risposta.getInt("numero"));
} else {
throw new Exception(options.getResponse().getResponseCode() + StringPool.SPACE + responseBody);
}
return protocollo;
} }
public static String protocollaArrivoAccessoAtti(long groupId, long companyId, String userName, public static String protocollaArrivoAccessoAtti(long groupId, long companyId, String userName,
long accessoAttiId, String className) throws Exception { long accessoAttiId, String className) throws Exception {
String protocollo = null;
List<File> allegati = new ArrayList<File>(); List<File> allegati = new ArrayList<File>();
File allegato = new File(); File allegato = new File();
String doc = String.valueOf(accessoAttiId); String doc = String.valueOf(accessoAttiId);
@ -93,18 +69,8 @@ public class ProtocolloUtil {
protocolloBean.setPraticaId(String.valueOf(accessoAttiId)); protocolloBean.setPraticaId(String.valueOf(accessoAttiId));
protocolloBean.setFiles(allegati); protocolloBean.setFiles(allegati);
Options options = createCall(companyId, protocolloBean, true); JSONObject risposta = HttpServiceUtil.postProtocolloBean(companyId, protocolloBean);
return risposta.getString("anno") + String.format("%07d", risposta.getInt("numero"));
String responseBody = HttpUtil.URLtoString(options);
if (options.getResponse().getResponseCode() == HttpServletResponse.SC_OK
|| options.getResponse().getResponseCode() == HttpServletResponse.SC_CREATED) {
JSONObject risposta = JSONFactoryUtil.createJSONObject(responseBody);
protocollo = risposta.getString("anno") + String.format("%07d", risposta.getInt("numero"));
} else {
throw new Exception(options.getResponse().getResponseCode() + StringPool.SPACE + responseBody);
}
return protocollo;
} }
public static String generaOggettoProtocollo(String className, long classPk) { public static String generaOggettoProtocollo(String className, long classPk) {
@ -120,26 +86,4 @@ public class ProtocolloUtil {
return "Oggetto: " + className + " " + classPk; return "Oggetto: " + className + " " + classPk;
} }
private static Options createCall(long companyId, Protocollo protocolloBean, boolean post)
throws SystemException {
String url = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId,
ConfigurazioneConstants.PROTOCOLLAZIONE_SERVICE_URL);
Options options = new Options();
options.setLocation(url);
options.setPost(post);
flexjson.JSONSerializer serialize = new flexjson.JSONSerializer();
serialize.exclude("*.class");
String protocollo = serialize.serialize(protocolloBean);
Body body = new Body(protocollo, ContentTypes.APPLICATION_JSON, "UTF-8");
options.setBody(body);
return options;
}
} }

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

@ -18,8 +18,6 @@ import it.tref.liferay.portos.bo.service.IntPraticaServiceUtil;
import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil; import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
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.bean.FirmeDetail;
import it.tref.liferay.portos.bo.shared.util.Constants;
import it.tref.liferay.portos.bo.shared.util.FirmeUtil; import it.tref.liferay.portos.bo.shared.util.FirmeUtil;
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;
@ -55,9 +53,7 @@ import com.liferay.portal.kernel.util.UniqueList;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.workflow.WorkflowConstants; import com.liferay.portal.kernel.workflow.WorkflowConstants;
import com.liferay.portal.model.Company; import com.liferay.portal.model.Company;
import com.liferay.portal.model.User;
import com.liferay.portal.service.CompanyLocalServiceUtil; import com.liferay.portal.service.CompanyLocalServiceUtil;
import com.liferay.portal.service.UserLocalServiceUtil;
public class ValidazionePraticaUtil { public class ValidazionePraticaUtil {
@ -1338,7 +1334,6 @@ public class ValidazionePraticaUtil {
return firme; return firme;
} }
private static final List<String> vuota = new ArrayList<>();
private static final Map<String, List<String>> firmeObbligatorie = new HashMap<String, List<String>>() { private static final Map<String, List<String>> firmeObbligatorie = new HashMap<String, List<String>>() {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
{ {

8
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerGeneraDocumento.java

@ -156,8 +156,14 @@ public class SchedulerGeneraDocumento implements MessageListener {
String resourcePathDip = getClass().getName().replaceAll("\\w+\\.", "../") String resourcePathDip = getClass().getName().replaceAll("\\w+\\.", "../")
.replace(getClass().getSimpleName(), ReportConstants.PATH_LOGO_DIPARTIMENTO); .replace(getClass().getSimpleName(), ReportConstants.PATH_LOGO_DIPARTIMENTO);
_log.info("0 " + resourcePath);
_log.info("1 " + getClass());
_log.info("2 " + getClass().getResource(resourcePath));
_log.info("3 " + getClass().getResource(resourcePath).getPath());
parameters.put(ReportConstants.LOGO_REGIONE, getClass().getResource(resourcePath).getPath()); parameters.put(ReportConstants.LOGO_REGIONE, getClass().getResource(resourcePath).getPath());
parameters.put(ReportConstants.LOGO_DIPARTIMENTO, getClass().getResource(resourcePathDip).getPath()); parameters.put(ReportConstants.LOGO_DIPARTIMENTO, getClass().getResource(resourcePathDip)
.getPath());
// avviso = gestioneProtocollazione(avviso, dettPratica); // avviso = gestioneProtocollazione(avviso, dettPratica);

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

@ -18,7 +18,6 @@ import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil; import it.tref.liferay.portos.bo.service.AvvisoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil; 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.Constants;
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;
import it.tref.liferay.portos.bo.util.AvvisoUtil; import it.tref.liferay.portos.bo.util.AvvisoUtil;
@ -135,10 +134,16 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
long fileEntryIdTemplate = configurazioneLocalService.findByC_ChiaveLong( long fileEntryIdTemplate = configurazioneLocalService.findByC_ChiaveLong(
serviceContext.getCompanyId(), propertiesTemplate); serviceContext.getCompanyId(), propertiesTemplate);
_log.info("statoPratica=" + statoPratica + ", tipoProcedura=" + tipoProcedura
+ ", propertiesTemplate=" + propertiesTemplate + ", fileEntryIdTemplate="
+ fileEntryIdTemplate);
if (fileEntryIdTemplate != 0) {
return addAvviso(intPratica.getIntPraticaId(), StringPool.BLANK, new Date(), tipoAvviso, return addAvviso(intPratica.getIntPraticaId(), StringPool.BLANK, new Date(), tipoAvviso,
statoPratica, fileEntryIdTemplate, classPk, className, userCodiceFiscalePrimaFirma, statoPratica, fileEntryIdTemplate, classPk, className, userCodiceFiscalePrimaFirma,
jsonParameters, controlloPraticaId, serviceContext); jsonParameters, controlloPraticaId, serviceContext);
} }
}
return null; return null;
} }
@ -204,7 +209,11 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
_log.info("addAvviso: descLong=\"" + descLong + "\", tipoAvviso=\"" + tipoAvviso _log.info("addAvviso: descLong=\"" + descLong + "\", tipoAvviso=\"" + tipoAvviso
+ "\", tipoDocumento=\"" + tipoDocumento + "\", className=\"" + className + "\", tipoDocumento=\"" + tipoDocumento + "\", className=\"" + className
+ "\", jsonParameters=\"" + jsonParameters + "\""); + "\", jsonParameters=\"" + jsonParameters + "\", fileEntryIdTemplate=" + fileEntryIdTemplate);
if (0 == fileEntryIdTemplate) {
throw new PortalException("fileEntryIdTemplate=" + fileEntryIdTemplate);
}
User user = userPersistence.fetchByPrimaryKey(serviceContext.getUserId()); User user = userPersistence.fetchByPrimaryKey(serviceContext.getUserId());
Date now = new Date(); Date now = new Date();
Avviso avviso = createAvviso(counterLocalService.increment(Avviso.class.getName())); Avviso avviso = createAvviso(counterLocalService.increment(Avviso.class.getName()));

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

@ -12,6 +12,7 @@
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.mwg.sismica.bo.util.HttpServiceUtil;
import it.tref.liferay.portos.bo.NoSuchDettPraticaException; import it.tref.liferay.portos.bo.NoSuchDettPraticaException;
import it.tref.liferay.portos.bo.model.Asseverazione; import it.tref.liferay.portos.bo.model.Asseverazione;
import it.tref.liferay.portos.bo.model.ControlloPratica; import it.tref.liferay.portos.bo.model.ControlloPratica;
@ -41,14 +42,8 @@ import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import com.liferay.portal.kernel.dao.orm.Disjunction; import com.liferay.portal.kernel.dao.orm.Disjunction;
import com.liferay.portal.kernel.dao.orm.DynamicQuery; import com.liferay.portal.kernel.dao.orm.DynamicQuery;
@ -75,8 +70,6 @@ import com.liferay.portal.kernel.search.SearchContext;
import com.liferay.portal.kernel.util.ContentTypes; import com.liferay.portal.kernel.util.ContentTypes;
import com.liferay.portal.kernel.util.FastDateFormatFactoryUtil; import com.liferay.portal.kernel.util.FastDateFormatFactoryUtil;
import com.liferay.portal.kernel.util.GetterUtil; import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.Http.Options;
import com.liferay.portal.kernel.util.HttpUtil;
import com.liferay.portal.kernel.util.LocaleUtil; import com.liferay.portal.kernel.util.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;
@ -2445,54 +2438,23 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
return dettPratica; return dettPratica;
} }
public void sendToVersioning(long dettPraticaId, String url) throws PortalException, SystemException, public void sendToVersioning(long dettPraticaId, String url) throws Exception {
NoSuchFieldException, SecurityException, IOException {
DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId); DettPratica dettPratica = dettPraticaLocalService.getDettPratica(dettPraticaId);
String jsonToVersioning = dettPratica.serializeToVersioning(); String jsonToVersioning = dettPratica.serializeToVersioning();
HttpPost request = new HttpPost(url); JSONObject responseObj = HttpServiceUtil.postJson(url, jsonToVersioning);
request.setHeader("Content-type", ContentTypes.APPLICATION_JSON);
request.setEntity(new StringEntity(jsonToVersioning));
CloseableHttpClient client = HttpClientBuilder.create().build();
HttpResponse response = client.execute(request);
int statusCode = response.getStatusLine().getStatusCode();
String responseBody = EntityUtils.toString(response.getEntity(), StringPool.UTF8);
client.close();
if (statusCode == HttpServletResponse.SC_OK || statusCode == HttpServletResponse.SC_CREATED) {
JSONObject responseObj = JSONFactoryUtil.createJSONObject(responseBody);
int version = responseObj.getInt("version"); int version = responseObj.getInt("version");
dettPratica.setVersion(version); dettPratica.setVersion(version);
dettPratica.setVersionata(true); dettPratica.setVersionata(true);
dettPraticaLocalService.updateDettPratica(dettPratica); dettPraticaLocalService.updateDettPratica(dettPratica);
} else {
throw new PortalException(statusCode + StringPool.SPACE + responseBody);
}
}
public int getNumeroDiVersioni(String url) throws IOException, PortalException, SystemException {
Options options = new Options();
options.setLocation(url);
options.setPost(false);
String responseBody = HttpUtil.URLtoString(options);
if (options.getResponse().getResponseCode() == HttpServletResponse.SC_OK) {
return Integer.parseInt(responseBody);
} else {
_log.error(options.getLocation() + ": " + options.getResponse().getResponseCode());
} }
return 0; public int getNumeroDiVersioni(String url) throws NumberFormatException, Exception {
return Integer.parseInt(HttpServiceUtil.getUrl(url, "0"));
} }
public String getVersionNumber(String url, int version) throws IOException, PortalException, public String getVersionNumber(String url, int version) throws Exception {
SystemException {
String response = callToVersion(url); String response = callToVersion(url);
@ -2510,23 +2472,11 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
return jsonFields.toString(); return jsonFields.toString();
} }
private String callToVersion(String versioningURL) throws IOException { private String callToVersion(String versioningURL) throws Exception {
return HttpServiceUtil.getUrl(versioningURL);
Options options = new Options();
options.setLocation(versioningURL);
options.setPost(false);
String responseBody = HttpUtil.URLtoString(options);
if (options.getResponse().getResponseCode() == HttpServletResponse.SC_OK) {
return responseBody;
} else {
_log.error(options.getLocation() + ": " + options.getResponse().getResponseCode());
}
return StringPool.BLANK;
} }
public JSONArray callForChanges(String url) throws IOException, PortalException, SystemException { public JSONArray callForChanges(String url) throws Exception {
String response = callToVersion(url); String response = callToVersion(url);

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

@ -186,12 +186,12 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
boolean normArt3com4, boolean normOrd01, boolean normDm04, boolean normDm05, boolean normCI01, boolean normArt3com4, boolean normOrd01, boolean normDm04, boolean normDm05, boolean normCI01,
boolean normLTC01, boolean suap, boolean normSismaBonus, String clRischioPreInt, boolean normLTC01, boolean suap, boolean normSismaBonus, String clRischioPreInt,
String clRischioPostInt, boolean intervFinPub, String intervFinPubDesc, String clRischioPostInt, boolean intervFinPub, String intervFinPubDesc,
ServiceContext serviceContext, boolean bozza, boolean disabledSubmit, boolean geoDisabledSubmit, String paesaggioLocale, ServiceContext serviceContext, boolean bozza, boolean disabledSubmit, boolean geoDisabledSubmit,
String livelloDiTutela, String vincoli, String destinazioneAltroIntervento, Boolean tcCostruzioniEsistenti, Boolean tcManutOrdStraord, String paesaggioLocale, String livelloDiTutela, String vincoli,
String destinazioneAltroIntervento, Boolean tcCostruzioniEsistenti, Boolean tcManutOrdStraord,
Boolean tcAltriInterventi, String tcAltriInterventiDesc, boolean noCollaudo, Boolean tcAltriInterventi, String tcAltriInterventiDesc, boolean noCollaudo,
boolean tcNuovaCostruzionePertinenza, boolean tcInterventoOpereEscavazione, boolean tcNuovaCostruzionePertinenza, boolean tcInterventoOpereEscavazione, boolean tcViarch,
boolean tcViarch, boolean tcOperaA25) boolean tcOperaA25) throws PortalException, SystemException {
throws PortalException, SystemException {
DettPratica dettPratica = null; DettPratica dettPratica = null;
if (oldDettPraticaId == 0) { if (oldDettPraticaId == 0) {
@ -231,8 +231,8 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
tcAdeguamentoSismico, tcMiglioramentoSismico, tcRiparazioneInterventoLocale, tcAdeguamentoSismico, tcMiglioramentoSismico, tcRiparazioneInterventoLocale,
normLavoriInProprio, normEsenteBollo, normEsenteSpese, normDpr01Dep, normLavoriInProprio, normEsenteBollo, normEsenteSpese, normDpr01Dep,
normDpr02Dep, normDpr01Aut, normDpr02Aut, normArt3com3, normArt3com4, normDpr02Dep, normDpr01Aut, normDpr02Aut, normArt3com3, normArt3com4,
serviceContext, bozza, noCollaudo, tcNuovaCostruzionePertinenza, tcInterventoOpereEscavazione, serviceContext, bozza, noCollaudo, tcNuovaCostruzionePertinenza,
tcViarch, tcOperaA25); tcInterventoOpereEscavazione, tcViarch, tcOperaA25);
} else { } else {
@ -277,10 +277,10 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
normDm03, normDm2018, normDprg01, normDprg02, normAnr, normArt3com3, normDm03, normDm2018, normDprg01, normDprg02, normAnr, normArt3com3,
normArt3com4, normOrd01, normDm04, normDm05, normCI01, normLTC01, suap, normArt3com4, normOrd01, normDm04, normDm05, normCI01, normLTC01, suap,
normSismaBonus, clRischioPreInt, clRischioPostInt, intervFinPub, normSismaBonus, clRischioPreInt, clRischioPostInt, intervFinPub,
intervFinPubDesc, serviceContext, bozza, paesaggioLocale, intervFinPubDesc, serviceContext, bozza, paesaggioLocale, livelloDiTutela,
livelloDiTutela, vincoli, destinazioneAltroIntervento, tcCostruzioniEsistenti, tcManutOrdStraord, vincoli, destinazioneAltroIntervento, tcCostruzioniEsistenti, tcManutOrdStraord,
tcAltriInterventi, tcAltriInterventiDesc, noCollaudo, tcNuovaCostruzionePertinenza, tcInterventoOpereEscavazione, tcAltriInterventi, tcAltriInterventiDesc, noCollaudo,
tcViarch, tcOperaA25); tcNuovaCostruzionePertinenza, tcInterventoOpereEscavazione, tcViarch, tcOperaA25);
} }
@ -354,23 +354,20 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
normDpr02Dep, normDpr01Aut, normDpr02Aut, normDm01, normDm02, normDm03, normDm2018, normDpr02Dep, normDpr01Aut, normDpr02Aut, normDm01, normDm02, normDm03, normDm2018,
normDprg01, normDprg02, normAnr, normArt3com3, normArt3com4, normOrd01, normDm04, normDprg01, normDprg02, normAnr, normArt3com3, normArt3com4, normOrd01, normDm04,
normDm05, normCI01, normLTC01, suap, normSismaBonus, clRischioPreInt, clRischioPostInt, normDm05, normCI01, normLTC01, suap, normSismaBonus, clRischioPreInt, clRischioPostInt,
intervFinPub, intervFinPubDesc, serviceContext, bozza, paesaggioLocale, intervFinPub, intervFinPubDesc, serviceContext, bozza, paesaggioLocale, livelloDiTutela,
livelloDiTutela, vincoli, destinazioneAltroIntervento, tcCostruzioniEsistenti, tcManutOrdStraord, vincoli, destinazioneAltroIntervento, tcCostruzioniEsistenti, tcManutOrdStraord,
tcAltriInterventi, tcAltriInterventiDesc, noCollaudo, tcNuovaCostruzionePertinenza, tcInterventoOpereEscavazione, tcAltriInterventi, tcAltriInterventiDesc, noCollaudo, tcNuovaCostruzionePertinenza,
tcViarch, tcOperaA25); tcInterventoOpereEscavazione, tcViarch, tcOperaA25);
} }
return dettPratica; return dettPratica;
} }
public DettPratica fetchDettPratica(long dettPraticaId) throws SystemException { public DettPratica fetchDettPratica(long dettPraticaId) throws SystemException {
// TODO permessi
return dettPraticaLocalService.fetchDettPratica(dettPraticaId); return dettPraticaLocalService.fetchDettPratica(dettPraticaId);
} }
public DettPratica getLastCompletedByIntPratica(long intPraticaId) throws SystemException { public DettPratica getLastCompletedByIntPratica(long intPraticaId) throws SystemException {
return dettPraticaLocalService.getLastCompletedByIntPratica(intPraticaId); return dettPraticaLocalService.getLastCompletedByIntPratica(intPraticaId);
} }
@ -440,14 +437,15 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
return dettPraticaLocalService.updateCheckPagamenti(dettPraticaId, normEsenteSpese, normEsenteBollo); return dettPraticaLocalService.updateCheckPagamenti(dettPraticaId, normEsenteSpese, normEsenteBollo);
} }
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 = DettPraticaServiceUtil.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);
} }
public DettPratica updateEsitoIntegrazione(long dettPraticaId, int stato) throws IOException,SystemException, public DettPratica updateEsitoIntegrazione(long dettPraticaId, int stato) throws IOException,
PortalException { SystemException, PortalException {
DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId); DettPratica dettPratica = DettPraticaServiceUtil.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);
@ -477,8 +475,7 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
return dettPraticaLocalService.updatePrincipale(dettPraticaId, codiceFiscale, tipologiaSoggetto); return dettPraticaLocalService.updatePrincipale(dettPraticaId, codiceFiscale, tipologiaSoggetto);
} }
public int getNumeroDiVersioni(long intPraticaId, long companyId) throws IOException, PortalException, public int getNumeroDiVersioni(long intPraticaId, long companyId) throws Exception {
SystemException {
Company company = CompanyLocalServiceUtil.getCompany(companyId); Company company = CompanyLocalServiceUtil.getCompany(companyId);
String shapshotsCountURL = (String) company.getExpandoBridge().getAttribute( String shapshotsCountURL = (String) company.getExpandoBridge().getAttribute(
Constants.COMPANY_CUSTOM_FIELD_VERSIONING_SNAPSHOTS_COUNT, false); Constants.COMPANY_CUSTOM_FIELD_VERSIONING_SNAPSHOTS_COUNT, false);
@ -488,8 +485,7 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
return dettPraticaLocalService.getNumeroDiVersioni(shapshotsCountURL); return dettPraticaLocalService.getNumeroDiVersioni(shapshotsCountURL);
} }
public String getJsonVersion(long intPraticaId, long companyId, int version) throws PortalException, public String getJsonVersion(long intPraticaId, long companyId, int version) throws Exception {
SystemException, IOException {
Company company = CompanyLocalServiceUtil.getCompany(companyId); Company company = CompanyLocalServiceUtil.getCompany(companyId);
String shapshotsURL = (String) company.getExpandoBridge().getAttribute( String shapshotsURL = (String) company.getExpandoBridge().getAttribute(
@ -501,8 +497,7 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
} }
public String callForChanges(long intPraticaId, long companyId, int version) throws IOException, public String callForChanges(long intPraticaId, long companyId, int version) throws Exception {
PortalException, SystemException {
Company company = CompanyLocalServiceUtil.getCompany(companyId); Company company = CompanyLocalServiceUtil.getCompany(companyId);
String changesURL = (String) company.getExpandoBridge().getAttribute( String changesURL = (String) company.getExpandoBridge().getAttribute(
Constants.COMPANY_CUSTOM_FIELD_VERSIONING_CHANGES, false); Constants.COMPANY_CUSTOM_FIELD_VERSIONING_CHANGES, false);
@ -532,8 +527,7 @@ public class DettPraticaServiceImpl extends DettPraticaServiceBaseImpl {
} }
public void sendToVersioning(long dettPraticaId, long companyId) throws PortalException, SystemException, public void sendToVersioning(long dettPraticaId, long companyId) throws Exception {
NoSuchFieldException, SecurityException, IOException {
Company company = CompanyLocalServiceUtil.getCompany(companyId); Company company = CompanyLocalServiceUtil.getCompany(companyId);
String commitURL = (String) company.getExpandoBridge().getAttribute( String commitURL = (String) company.getExpandoBridge().getAttribute(

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

@ -1,6 +1,6 @@
package it.tref.liferay.portos.bo.util; package it.tref.liferay.portos.bo.util;
import it.mwg.sismica.bo.util.HttpPostUtil; import it.mwg.sismica.bo.util.HttpServiceUtil;
import it.tref.liferay.portos.bo.model.Avviso; import it.tref.liferay.portos.bo.model.Avviso;
import it.tref.liferay.portos.bo.model.Collaudo; import it.tref.liferay.portos.bo.model.Collaudo;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
@ -29,25 +29,14 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVRecord; import org.apache.commons.csv.CSVRecord;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import com.liferay.portal.kernel.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.json.JSONFactoryUtil;
import com.liferay.portal.kernel.json.JSONObject; import com.liferay.portal.kernel.json.JSONObject;
import com.liferay.portal.kernel.repository.model.FileEntry; import com.liferay.portal.kernel.repository.model.FileEntry;
import com.liferay.portal.kernel.util.ContentTypes;
import com.liferay.portal.kernel.util.GetterUtil; import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.ParamUtil; import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.portal.kernel.util.StreamUtil; import com.liferay.portal.kernel.util.StreamUtil;
@ -104,8 +93,8 @@ public class ProtocollazioneUtil {
protocolloBean.setUfficioId(String.valueOf(groupId)); protocolloBean.setUfficioId(String.valueOf(groupId));
protocolloBean.setPraticaId(String.valueOf(avviso.getClassPk())); protocolloBean.setPraticaId(String.valueOf(avviso.getClassPk()));
protocolloBean.setFiles(Collections.singletonList(allegato)); protocolloBean.setFiles(Collections.singletonList(allegato));
JSONObject risposta = HttpPostUtil.postProtocolloBean(avviso.getCompanyId(), protocolloBean); JSONObject risposta = HttpServiceUtil.postProtocolloBean(avviso.getCompanyId(), protocolloBean);
protocollo = call(avviso.getCompanyId(), protocolloBean); protocollo = risposta.getString("anno") + String.format("%07d", risposta.getInt("numero"));
} finally { } finally {
StreamUtil.cleanUp(inputStream); StreamUtil.cleanUp(inputStream);
} }
@ -181,7 +170,8 @@ public class ProtocollazioneUtil {
protocolloBean.setPraticaId(String.valueOf(praticaId)); protocolloBean.setPraticaId(String.valueOf(praticaId));
protocolloBean.setFiles(allegati); protocolloBean.setFiles(allegati);
return call(companyId, protocolloBean); JSONObject risposta = HttpServiceUtil.postProtocolloBean(companyId, protocolloBean);
return risposta.getString("anno") + String.format("%07d", risposta.getInt("numero"));
} }
public static String protocollaArrivoAccessoAtti(long groupId, long companyId, String userName, public static String protocollaArrivoAccessoAtti(long groupId, long companyId, String userName,
@ -204,7 +194,8 @@ public class ProtocollazioneUtil {
protocolloBean.setPraticaId(String.valueOf(accessoAttiId)); protocolloBean.setPraticaId(String.valueOf(accessoAttiId));
protocolloBean.setFiles(allegati); protocolloBean.setFiles(allegati);
return call(companyId, protocolloBean); JSONObject risposta = HttpServiceUtil.postProtocolloBean(companyId, protocolloBean);
return risposta.getString("anno") + String.format("%07d", risposta.getInt("numero"));
} }
public static String generaOggettoProtocollo(String className, long classPk) { public static String generaOggettoProtocollo(String className, long classPk) {

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=2574 build.number=2589
build.date=1599664865866 build.date=1599752942075
build.auto.upgrade=true build.auto.upgrade=true
## ##

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

File binario non mostrato.

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

@ -189,6 +189,13 @@
</div> </div>
</div> </div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
<aui:input disabled="<%=disabledInput %>" type="text" name="estremiPratCom"
label="estremi-prat-com"/>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="container-fluid"> <div class="container-fluid">
@ -291,10 +298,6 @@
</div> </div>
--> -->
<div class="row"> <div class="row">
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
<aui:input disabled="<%=disabledInput %>" type="text" name="estremiPratCom"
label="estremi-prat-com"/>
</div>
<c:if test='<%= Validator.isNotNull(dettPratica.getEstremiCatastali()) %>'> <c:if test='<%= Validator.isNotNull(dettPratica.getEstremiCatastali()) %>'>
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6"> <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
<aui:input disabled="<%=disabledInput %>" type="text" name="estremiCatastali" <aui:input disabled="<%=disabledInput %>" type="text" name="estremiCatastali"
@ -864,6 +867,39 @@ $('#destinazioneinazione input[type="radio"]').on('click', function(){
</script> </script>
<!-- ADT BUG FE ID = 23 --> <!-- ADT BUG FE ID = 23 -->
<script type="text/javascript" > <script type="text/javascript" >
$('#<portlet:namespace/>lavoriPubbliciCheckbox, #<portlet:namespace/>intervFinPubCheckbox').change(function () {
var _this = $(this);
var toDisable = [
'tc-nuova-costruzione-pertinenza',
'tc-costruzioni-esistenti',
'tc-manut-ord-rest-dem',
'tc-intervento-opere-escavazione',
'tcAltriInterventi'
];
if (_this.is(":checked")){
$.each(toDisable, function(index, val) {
$('#<portlet:namespace/>'+val+'Checkbox').attr('disabled', true).prop('disabled', true).prop('checked', false);
});
}else{
$.each(toDisable, function(index, val) {
$('#<portlet:namespace/>'+val+'Checkbox').removeAttr('disabled');
$('#<portlet:namespace/>'+val+'Checkbox').prop('disabled', false);
});
}
});
$('#<portlet:namespace/>tc-manut-ord-rest-demCheckbox').change(function () {
var _this = $(this);
if (_this.is(":checked")){
$('#<portlet:namespace/>tc-costruzioni-esistentiCheckbox').prop('checked', true).attr('checked', true);
}else{
$('#<portlet:namespace/>tc-costruzioni-esistentiCheckbox').prop('checked', false).attr('checked', false);
}
});
$('#<portlet:namespace/>collaudoStaticoCheckbox').change(function () { $('#<portlet:namespace/>collaudoStaticoCheckbox').change(function () {
var _this = $(this); var _this = $(this);
if (_this.is(":checked")){ if (_this.is(":checked")){

Caricamento…
Annulla
Salva