diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/mwg/sismica/bo/util/MappeUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/mwg/sismica/bo/util/MappeUtil.java index 5514aa02..d21cb199 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/mwg/sismica/bo/util/MappeUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/mwg/sismica/bo/util/MappeUtil.java @@ -3,8 +3,11 @@ package it.mwg.sismica.bo.util; import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.IntPratica; +import it.tref.liferay.portos.bo.model.Provincia; +import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil; import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil; import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants; import java.io.UnsupportedEncodingException; @@ -20,6 +23,7 @@ import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.Http; import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.WebKeys; @@ -48,14 +52,50 @@ public class MappeUtil { return getUrlComune(request, baseUrl, dettPratica, comune, readOnly); } + public static String getUrlRicerca(HttpServletRequest request, String codiceProvincia, long comuneId) + throws SystemException, PortalException { + + String url = StringPool.BLANK; + if (Validator.isNotNull(codiceProvincia)) { + String siglaProvincia = StringPool.BLANK; + String codiceBelfiore = StringPool.BLANK; + ThemeDisplay td = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); + long companyId = td.getCompanyId(); + if (0 == comuneId) { + Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(companyId, codiceProvincia); + siglaProvincia = provincia.getSigla(); + } else { + Comune comune = ComuneLocalServiceUtil.getComune(comuneId); + codiceBelfiore = comune.getCodiceBelfiore(); + } + StringBuilder cb = new StringBuilder(); + cb.append(request.isSecure() ? Http.HTTPS_WITH_SLASH : Http.HTTP_WITH_SLASH) + .append(request.getServerName()); + if ((request.isSecure() && (request.getServerPort() != Http.HTTPS_PORT)) + || (!request.isSecure() && (request.getServerPort() != Http.HTTP_PORT))) { + cb.append(StringPool.COLON).append(request.getServerPort()); + } + cb.append(request.getContextPath()).append(request.getServletPath()).append("/mappe/list?"); + if (0 == comuneId) { + cb.append("p=").append(codiceProvincia); + } else { + cb.append("c=").append(comuneId); + } + _log.info("cb = " + cb); + url = ConfigurazioneLocalServiceUtil + .findByC_ChiaveString(companyId, ConfigurazioneConstants.MAPPE_URL_IFRAME_RICERCA) + .replace("{{PROVINCIA}}", siglaProvincia).replace("{{COD_BELFIORE}}", codiceBelfiore) + .replace("{{URL}}", urlEncode(cb.toString())) + + StringPool.AMPERSAND + getAuth(companyId, request.getServerName()); + } + return url; + } + private static String getUrlComune(HttpServletRequest request, String baseUrl, DettPratica dettPratica, Comune comune, boolean readOnly) throws UnsupportedEncodingException, PortalException, SystemException { - long date = new Date().getTime() / 1000; ThemeDisplay td = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); long companyId = td.getCompanyId(); - String sharedSecret = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId, - ConfigurazioneConstants.MAPPE_SHARED_SECRET); String intPraticaId = StringPool.BLANK; String estremiCatastali = StringPool.BLANK; String lat = StringPool.BLANK; @@ -75,7 +115,6 @@ public class MappeUtil { IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); numeroProgetto = intPratica.getNumeroProgetto(); } - String auth = DigestUtils.sha256Hex(date + sharedSecret + request.getServerName()); String url = baseUrl; url = url .replace("{{COD_BELFIORE}}", @@ -91,12 +130,21 @@ public class MappeUtil { if (!query.equals(StringPool.BLANK)) { query += StringPool.AMPERSAND; } - query += "date=" + date + "&auth=" + auth; + query += getAuth(companyId, request.getServerName()); url = parti[0] + StringPool.QUESTION + query; _log.info(url); return url; } + private static String getAuth(long companyId, String serverName) throws SystemException { + + long date = new Date().getTime() / 1000; + String sharedSecret = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId, + ConfigurazioneConstants.MAPPE_SHARED_SECRET); + String auth = DigestUtils.sha256Hex(date + sharedSecret + serverName); + return "date=" + date + "&auth=" + auth; + } + private static String urlEncode(String str) { String encoded; try { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalService.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalService.java index ac3d4583..9bb23d5f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalService.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalService.java @@ -802,4 +802,10 @@ public interface SoggettoLocalService extends BaseLocalService, public java.util.List getSoggettiByIntPraticaId_DtRimozioneNull( long intPraticaId) throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.Map getTipologieSoggetti(); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.Map getAmbitiProfessionali(); } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalServiceClp.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalServiceClp.java index a84cae28..fffc2a81 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalServiceClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalServiceClp.java @@ -577,6 +577,14 @@ public class SoggettoLocalServiceClp implements SoggettoLocalService { _methodName98 = "getSoggettiByIntPraticaId_DtRimozioneNull"; _methodParameterTypes98 = new String[] { "long" }; + + _methodName99 = "getTipologieSoggetti"; + + _methodParameterTypes99 = new String[] { }; + + _methodName100 = "getAmbitiProfessionali"; + + _methodParameterTypes100 = new String[] { }; } @Override @@ -4540,6 +4548,52 @@ public class SoggettoLocalServiceClp implements SoggettoLocalService { return (java.util.List)ClpSerializer.translateOutput(returnObj); } + @Override + public java.util.Map getTipologieSoggetti() { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName99, + _methodParameterTypes99, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.Map)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.util.Map getAmbitiProfessionali() { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName100, + _methodParameterTypes100, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.Map)ClpSerializer.translateOutput(returnObj); + } + private InvokableLocalService _invokableLocalService; private String _methodName0; private String[] _methodParameterTypes0; @@ -4737,4 +4791,8 @@ public class SoggettoLocalServiceClp implements SoggettoLocalService { private String[] _methodParameterTypes97; private String _methodName98; private String[] _methodParameterTypes98; + private String _methodName99; + private String[] _methodParameterTypes99; + private String _methodName100; + private String[] _methodParameterTypes100; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalServiceUtil.java index b20df9d4..5c2d86fa 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalServiceUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalServiceUtil.java @@ -1103,6 +1103,14 @@ public class SoggettoLocalServiceUtil { .getSoggettiByIntPraticaId_DtRimozioneNull(intPraticaId); } + public static java.util.Map getTipologieSoggetti() { + return getService().getTipologieSoggetti(); + } + + public static java.util.Map getAmbitiProfessionali() { + return getService().getAmbitiProfessionali(); + } + public static void clearService() { _service = null; } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalServiceWrapper.java index da02946b..13952136 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalServiceWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/SoggettoLocalServiceWrapper.java @@ -1153,6 +1153,16 @@ public class SoggettoLocalServiceWrapper implements SoggettoLocalService, return _soggettoLocalService.getSoggettiByIntPraticaId_DtRimozioneNull(intPraticaId); } + @Override + public java.util.Map getTipologieSoggetti() { + return _soggettoLocalService.getTipologieSoggetti(); + } + + @Override + public java.util.Map getAmbitiProfessionali() { + return _soggettoLocalService.getAmbitiProfessionali(); + } + /** * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} */ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java index bce79574..af3e3efe 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java @@ -452,13 +452,9 @@ public class ValidazionePraticaUtil { } if (!intPratica.getTipoProcedura().equals(Constants.PROCEDURA_P1) && !intPratica.getTipoProcedura().equals(Constants.PROCEDURA_Q1)) { - /*if (Validator.isNull(dettPratica.getDcFoglio())) - notCompleted.add("Foglio mancante");*/ - - if (Validator.isNull(dettPratica.getDcParticelle()) - || dettPratica.getLocalizzazioneGeografica().startsWith("||")) - notCompleted.add("Particelle mancanti"); - + if (Validator.isNull(dettPratica.getDcParticelle()) && Validator.isNull(dettPratica.getEstremiCatastali())) { + notCompleted.add("estremi-catastali"); + } } if (intPratica.getTipoProcedura().equals(Constants.PROCEDURA_P10) || intPratica.getTipoProcedura().equals(Constants.PROCEDURA_Q10)) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/indexes.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/indexes.properties index c7d795a0..315c6657 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/indexes.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/indexes.properties @@ -187,6 +187,7 @@ IX_24A66C6C=portos_bo_ParereGeo.Uuid IX_A5C9DC3C=portos_bo_ParereGeo.Uuid_C IX_360E605D=portos_bo_Provincia.C_C +IX_9F8E6530=portos_bo_Provincia.C_P IX_BDDB41C9=portos_bo_Provincia.C_S IX_A81834CD=portos_bo_Provincia.CompanyId diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/indexes.sql b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/indexes.sql index e608cba5..7c07f634 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/indexes.sql +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/indexes.sql @@ -183,6 +183,7 @@ create unique index IX_635441BE on portos_bo_ParereGeo (uuid_, groupId); create index IX_A81834CD on portos_bo_Provincia (companyId); create unique index IX_360E605D on portos_bo_Provincia (companyId, codiceProvincia); +create unique index IX_9F8E6530 on portos_bo_Provincia (companyId, provincia); create unique index IX_BDDB41C9 on portos_bo_Provincia (companyId, sigla); create index IX_2BCFDE38 on portos_bo_Soggetto (dettPraticaId); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/bean/MappeBean.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/bean/MappeBean.java new file mode 100644 index 00000000..c0bcbf81 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/bean/MappeBean.java @@ -0,0 +1,68 @@ +package it.mwg.sismica.bo.bean; + +public class MappeBean { + + private String comune; + private String numeroProgetto; + private String descrizione; + private String estremiCatastali; + private Double lat; + private Double lng; + private String url; + + public String getComune() { + return comune; + } + + public String getDescrizione() { + return descrizione; + } + + public String getEstremiCatastali() { + return estremiCatastali; + } + + public Double getLat() { + return lat; + } + + public Double getLng() { + return lng; + } + + public String getNumeroProgetto() { + return numeroProgetto; + } + + public String getUrl() { + return url; + } + + public void setComune(String comune) { + this.comune = comune; + } + + public void setDescrizione(String descrizione) { + this.descrizione = descrizione; + } + + public void setEstremiCatastali(String estremiCatastali) { + this.estremiCatastali = estremiCatastali; + } + + public void setLat(Double lat) { + this.lat = lat; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public void setNumeroProgetto(String numeroProgetto) { + this.numeroProgetto = numeroProgetto; + } + + public void setUrl(String url) { + this.url = url; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/RicercaPosizionePortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/RicercaPosizionePortlet.java index 15f0c4a8..c99a5145 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/RicercaPosizionePortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/RicercaPosizionePortlet.java @@ -54,7 +54,7 @@ public class RicercaPosizionePortlet extends MVCPortlet { }; public void ricerca(ActionRequest actionRequest, ActionResponse actionResponse) { - // PortalUtil.copyRequestParameters(actionRequest, actionResponse); + for (String campo : campi) { String val = ParamUtil.getString(actionRequest, campo, StringPool.BLANK); actionResponse.setRenderParameter(campo, val); @@ -63,6 +63,7 @@ public class RicercaPosizionePortlet extends MVCPortlet { public void localizzaProgetto(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, SystemException { + String numeroProgetto = ParamUtil.getString(actionRequest, "numeroProgetto"); JSONObject object = JSONFactoryUtil.createJSONObject(); if (Validator.isNotNull(numeroProgetto)) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/servlet/MappeServlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/servlet/MappeServlet.java new file mode 100644 index 00000000..6ad9af66 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/servlet/MappeServlet.java @@ -0,0 +1,133 @@ +package it.mwg.sismica.bo.servlet; + +import it.mwg.sismica.bo.bean.MappeBean; +import it.tref.liferay.portos.bo.model.Comune; +import it.tref.liferay.portos.bo.model.DettPratica; +import it.tref.liferay.portos.bo.model.IntPratica; +import it.tref.liferay.portos.bo.model.Territorio; +import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil; +import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; +import it.tref.liferay.portos.bo.shared.util.FascicoloURLUtil; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; + +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONSerializer; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.servlet.HttpHeaders; +import com.liferay.portal.kernel.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.util.ContentTypes; +import com.liferay.portal.kernel.util.ParamUtil; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.util.PortalUtil; + +@SuppressWarnings("serial") +public class MappeServlet extends HttpServlet { + + public static final String CODICE_PROVINCIA = "p"; + public static final String COMUNE_ID = "c"; + + private static final JSONSerializer serializer = JSONFactoryUtil.createJSONSerializer().exclude("*.class"); + private static final Log _log = LogFactoryUtil.getLog(MappeServlet.class); + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + switch (request.getPathInfo()) { + case "/list": + String codiceProvincia = ParamUtil.getString(request, CODICE_PROVINCIA); + long comuneId = ParamUtil.getLong(request, COMUNE_ID); + _log.info("p=" + codiceProvincia + "&c=" + comuneId); + if (Validator.isNull(codiceProvincia) && (0 == comuneId)) { + response.sendError(HttpServletResponse.SC_BAD_REQUEST, request.getRequestURI()); + } else { + long companyId = PortalUtil.getCompanyId(request); + response.setContentType(ContentTypes.APPLICATION_JSON); + response.setCharacterEncoding(StringPool.UTF8); + String filename = (0 == comuneId ? "P-" + codiceProvincia : "C-" + comuneId) + ".json"; + response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "inline; filename=\"" + filename + StringPool.QUOTE); + ServletResponseUtil.write(response, + serializer.serializeDeep(getPratiche(companyId, codiceProvincia, comuneId))); + } + break; + default: + response.sendError(HttpServletResponse.SC_NOT_FOUND, request.getRequestURI()); + } + } + + private static List getPratiche(long companyId, String codiceProvincia, long comuneId) { + + List result = new ArrayList<>(); + try { + Set territori = new HashSet<>(); + List comuni = Collections. emptyList(); + if (0 == comuneId) { + comuni = ComuneLocalServiceUtil.findByC_CP(companyId, codiceProvincia); + } else { + try { + comuni = Arrays. asList(ComuneLocalServiceUtil.getComune(comuneId)); + } catch (PortalException e) { + } + } + for (Comune comune : comuni) { + for (Territorio territorio : TerritorioLocalServiceUtil.findByComuneId(comune.getComuneId(), + QueryUtil.ALL_POS, QueryUtil.ALL_POS)) { + territori.add(territorio.getTerritorioId()); + } + } + DynamicQuery dq = IntPraticaLocalServiceUtil.dynamicQuery(); + dq.add(RestrictionsFactoryUtil.in("territorioId", territori)); + dq.add(RestrictionsFactoryUtil.ne("numeroProgetto", StringPool.BLANK)); + dq.add(RestrictionsFactoryUtil.isNotNull("numeroProgetto")); + @SuppressWarnings("unchecked") + List pratiche = IntPraticaLocalServiceUtil.dynamicQuery(dq); + for (IntPratica pratica : pratiche) { + DettPratica dett = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(pratica.getIntPraticaId()); + MappeBean bean = new MappeBean(); + try { + Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica.getTerritorioId()); + Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId()); + bean.setComune(comune.getCodiceBelfiore()); + bean.setNumeroProgetto(pratica.getNumeroProgetto()); + bean.setDescrizione(dett.getDescLongIntervento()); + bean.setEstremiCatastali(dett.getEstremiCatastali()); + String[] coordinate = StringUtils.split(dett.getLocalizzazioneGeografica(), '|'); + if (coordinate.length > 1) { + bean.setLat(Double.valueOf(coordinate[0])); + bean.setLng(Double.valueOf(coordinate[1])); + } + if (Validator.isNotNull(bean.getEstremiCatastali()) || Validator.isNotNull(bean.getLng())) { + bean.setUrl(FascicoloURLUtil.getFascicoloBOViewURL(companyId, pratica.getIntPraticaId())); + result.add(bean); + } + } catch (PortalException e) { + } + } + } catch (SystemException e) { + e.printStackTrace(); + } + return result; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/PaesaggisticaAdministrationPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/PaesaggisticaAdministrationPortlet.java index 7861cf3f..81b55666 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/PaesaggisticaAdministrationPortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/PaesaggisticaAdministrationPortlet.java @@ -29,19 +29,22 @@ import com.liferay.util.bridges.mvc.MVCPortlet; public class PaesaggisticaAdministrationPortlet extends MVCPortlet { private final static Log _log = LogFactoryUtil.getLog(PaesaggisticaAdministrationPortlet.class); - public void impostazioniMappe(ActionRequest actionRequest, ActionResponse actionResponse) - throws PortalException, SystemException { + public void impostazioniMappe(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException, + SystemException { String urlIframeFE = ParamUtil.getString(actionRequest, "urlIframeFE"); String urlIframeBO = ParamUtil.getString(actionRequest, "urlIframeBO"); + String urlIframeRicerca = ParamUtil.getString(actionRequest, "urlIframeRicerca"); String sharedSecret = ParamUtil.getString(actionRequest, "sharedSecret"); - ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY); + // ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY); // Company company = themeDisplay.getCompany(); ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest); ConfigurazioneLocalServiceUtil.storeConfig(ConfigurazioneConstants.MAPPE_URL_IFRAME_FE, urlIframeFE, serviceContext); ConfigurazioneLocalServiceUtil.storeConfig(ConfigurazioneConstants.MAPPE_URL_IFRAME_BO, urlIframeBO, serviceContext); + ConfigurazioneLocalServiceUtil.storeConfig(ConfigurazioneConstants.MAPPE_URL_IFRAME_RICERCA, urlIframeRicerca, + serviceContext); ConfigurazioneLocalServiceUtil.storeConfig(ConfigurazioneConstants.MAPPE_SHARED_SECRET, sharedSecret, serviceContext); } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/SoggettoLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/SoggettoLocalServiceClpInvoker.java index fee30c73..bd40a452 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/SoggettoLocalServiceClpInvoker.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/SoggettoLocalServiceClpInvoker.java @@ -587,6 +587,14 @@ public class SoggettoLocalServiceClpInvoker { _methodName264 = "getSoggettiByIntPraticaId_DtRimozioneNull"; _methodParameterTypes264 = new String[] { "long" }; + + _methodName265 = "getTipologieSoggetti"; + + _methodParameterTypes265 = new String[] { }; + + _methodName266 = "getAmbitiProfessionali"; + + _methodParameterTypes266 = new String[] { }; } public Object invokeMethod(String name, String[] parameterTypes, @@ -1432,6 +1440,16 @@ public class SoggettoLocalServiceClpInvoker { return SoggettoLocalServiceUtil.getSoggettiByIntPraticaId_DtRimozioneNull(((Long)arguments[0]).longValue()); } + if (_methodName265.equals(name) && + Arrays.deepEquals(_methodParameterTypes265, parameterTypes)) { + return SoggettoLocalServiceUtil.getTipologieSoggetti(); + } + + if (_methodName266.equals(name) && + Arrays.deepEquals(_methodParameterTypes266, parameterTypes)) { + return SoggettoLocalServiceUtil.getAmbitiProfessionali(); + } + throw new UnsupportedOperationException(); } @@ -1635,4 +1653,8 @@ public class SoggettoLocalServiceClpInvoker { private String[] _methodParameterTypes263; private String _methodName264; private String[] _methodParameterTypes264; + private String _methodName265; + private String[] _methodParameterTypes265; + private String _methodName266; + private String[] _methodParameterTypes266; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java index 493acbe8..0953f31b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java @@ -173,7 +173,6 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl { public List findByCompanyDenominazione(long companyId, String denominazione) throws SystemException { return comunePersistence.findByC_Denominazione(companyId, denominazione); - } @Override diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java index 764a3c98..af37e34f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java @@ -379,15 +379,18 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { return dynamicQuery; } + @Override public int countByPosizione(double lat, double lng, int raggio) throws SystemException { List lista = findByPosizione(lat, lng, raggio); return lista.size(); } + @Override public List findByPosizione(double lat, double lng, int raggio) throws SystemException { return findByPosizione(lat, lng, raggio, QueryUtil.ALL_POS, QueryUtil.ALL_POS); } + @Override public List findByPosizione(double lat, double lng, int raggio, int start, int end) throws SystemException { DynamicQuery query = queryPosizione(); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java index 285fabc3..5c0ea06d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/SoggettoLocalServiceImpl.java @@ -17,12 +17,16 @@ import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DocPratica; import it.tref.liferay.portos.bo.model.Soggetto; import it.tref.liferay.portos.bo.service.base.SoggettoLocalServiceBaseImpl; +import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil; import it.tref.liferay.portos.bo.util.DocumentiPraticaUtil; import it.tref.liferay.portos.bo.util.SoggettiUtil; import it.tref.liferay.portos.bo.util.WorkflowConstants; import java.util.Date; +import java.util.LinkedHashMap; import java.util.List; +import java.util.Locale; +import java.util.Map; import com.liferay.portal.NoSuchRepositoryEntryException; import com.liferay.portal.kernel.dao.orm.Disjunction; @@ -32,6 +36,7 @@ import com.liferay.portal.kernel.dao.orm.ProjectionFactoryUtil; import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.language.LanguageUtil; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.OrderByComparator; @@ -1227,4 +1232,52 @@ public class SoggettoLocalServiceImpl extends SoggettoLocalServiceBaseImpl { dynamicQuery.add(RestrictionsFactoryUtil.isNull("dtDataRimozione")); return dynamicQuery(dynamicQuery); } + + @SuppressWarnings("serial") + private static final Map TIPOLOGIE_SOGGETTI = new LinkedHashMap() { + { + put(TipoSoggettoUtil.COMMITTENTE, + LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.COMMITTENTE)); + put(TipoSoggettoUtil.PROGETTISTA, + LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.PROGETTISTA)); + put(TipoSoggettoUtil.DIRETTORE_LAVORI, + LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.DIRETTORE_LAVORI)); + put(TipoSoggettoUtil.DITTA, LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.DITTA)); + put(TipoSoggettoUtil.GEOLOGO, LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.GEOLOGO)); + put(TipoSoggettoUtil.COLLAUDATORE, + LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.COLLAUDATORE)); + put(TipoSoggettoUtil.ARCHEOLOGO, + LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.ARCHEOLOGO)); + put(TipoSoggettoUtil.ALTRO_SOGGETTO, + LanguageUtil.get(Locale.ITALIAN, "gc-soggetto-" + TipoSoggettoUtil.ALTRO_SOGGETTO)); + } + }; + + @Override + public Map getTipologieSoggetti() { + return TIPOLOGIE_SOGGETTI; + } + + @SuppressWarnings("serial") + private static final Map AMBITI_PROFESSIONALI = new LinkedHashMap() { + { + 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 + public Map getAmbitiProfessionali() { + return AMBITI_PROFESSIONALI; + } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties index f3a5da70..e2294cb9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_bo - build.number=3220 - build.date=1625646212446 + build.number=3230 + build.date=1627295280447 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/web.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/web.xml index 0cf6110a..3e33b7a8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/web.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/web.xml @@ -1,3 +1,11 @@ + + MappeServlet + it.mwg.sismica.bo.servlet.MappeServlet + + + MappeServlet + /mappe/* + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/header.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/header.jsp index 8769c6d5..aab5a68e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/header.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/header.jsp @@ -10,17 +10,13 @@ <% - String backURL = ParamUtil.getString(request, "backURL"); - DettPratica dettPratica = (DettPratica) request.getAttribute("bean.dettPratica.lastData"); - IntPratica intPratica = (IntPratica) request.getAttribute("bean.intPratica"); - - //bug id=3 - long groupId = GroupLocalServiceUtil.getGroup(intPratica.getCompanyId(), "Portos").getGroupId(); - long plidNew = PortalUtil.getPlidFromPortletId(groupId, true, PortletKeys.FASCICOLOFE); +String backURL = ParamUtil.getString(request, "backURL"); +DettPratica dettPratica = (DettPratica) request.getAttribute("bean.dettPratica.lastData"); +IntPratica intPratica = (IntPratica) request.getAttribute("bean.intPratica"); +long groupId = GroupLocalServiceUtil.getGroup(intPratica.getCompanyId(), "Portos").getGroupId(); +long plidNew = PortalUtil.getPlidFromPortletId(groupId, true, PortletKeys.FASCICOLOFE); %> - - +
@@ -82,26 +78,23 @@ PraticaUtil.getStatoPraticaLabel(intPratica.getStatoPratica(), intPratica.getTipoProcedura()))%>
-
- - \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view_fascicolo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view_fascicolo.jsp index 837ba538..1209af74 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view_fascicolo.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view_fascicolo.jsp @@ -34,5 +34,6 @@ request.setAttribute("bean.dettPratica.lastData", dettPraticaLastData); <%@ include file="/html/fascicolo/html_top.jspf" %> - \ No newline at end of file + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/paesaggistica_administration/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/paesaggistica_administration/view.jsp index 9ae8cd3b..93ae16f9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/paesaggistica_administration/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/paesaggistica_administration/view.jsp @@ -10,6 +10,7 @@ SimpleDateFormat simpleDateTimeFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:s long companyId = company.getCompanyId(); String urlIframeFE = ConfigurazioneServiceUtil.findByC_ChiaveString(companyId, ConfigurazioneConstants.MAPPE_URL_IFRAME_FE); String urlIframeBO = ConfigurazioneServiceUtil.findByC_ChiaveString(companyId, ConfigurazioneConstants.MAPPE_URL_IFRAME_BO); +String urlIframeRicerca = ConfigurazioneServiceUtil.findByC_ChiaveString(companyId, ConfigurazioneConstants.MAPPE_URL_IFRAME_RICERCA); String sharedSecret = ConfigurazioneServiceUtil.findByC_ChiaveString(companyId, ConfigurazioneConstants.MAPPE_SHARED_SECRET); %>
@@ -26,7 +27,8 @@ String sharedSecret = ConfigurazioneServiceUtil.findByC_ChiaveString(companyId, - + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp index 4a06365a..7ab9a202 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp @@ -11,464 +11,46 @@ <%@page import="java.util.Locale"%> <%@page import="javax.portlet.PortletURL"%> <%@page import="it.mwg.sismica.bo.util.MappeUtil"%> - <% - -String numeroProgetto = ParamUtil.getString(request, "numeroProgetto", StringPool.BLANK); String codiceProvincia = ParamUtil.getString(request, "provincia", StringPool.BLANK); -String idComune = ParamUtil.getString(request, "comune", StringPool.BLANK); -String via = ParamUtil.getString(request, "via", StringPool.BLANK); -String lat = ParamUtil.getString(request, "lat", StringPool.BLANK); -String lng = ParamUtil.getString(request, "long", StringPool.BLANK); -String raggio = ParamUtil.getString(request, "raggio", StringPool.BLANK); - -boolean targetBlank = ParamUtil.getBoolean(request, "blank", true); -String target = (targetBlank ? "_blank" : StringPool.BLANK); - -PortletURL iteratorURL = liferayPortletResponse.createRenderURL(); -if (Validator.isNotNull(numeroProgetto)) { - iteratorURL.setParameter("numeroProgetto", numeroProgetto); -} -if (Validator.isNotNull(codiceProvincia)) { - iteratorURL.setParameter("provincia", codiceProvincia); -} -if (Validator.isNotNull(idComune)) { - iteratorURL.setParameter("comune", idComune); -} -if (Validator.isNotNull(via)) { - iteratorURL.setParameter("via", via); -} -if (Validator.isNotNull(lat)) { - iteratorURL.setParameter("lat", lat); -} -if (Validator.isNotNull(lng)) { - iteratorURL.setParameter("long", lng); -} -if (Validator.isNotNull(raggio)) { - iteratorURL.setParameter("raggio", raggio); -} -iteratorURL.setParameter("blank", String.valueOf(targetBlank)); - -DecimalFormat fmt = (DecimalFormat) NumberFormat.getInstance(Locale.ITALY); -boolean showNotes = false; -int[] raggi = { 500, 1000, 2000, 3000, 5000, 10000 }; - -String urlIframeMappe = MappeUtil.getUrlBo(request, null, null, false); - +long idComune = ParamUtil.getLong(request, "comune", 0); +String urlIframeMappe = MappeUtil.getUrlRicerca(request, codiceProvincia, idComune); %> -
-
- - - -
-
-
- - -
-
- - -
-
-
-
- -
-
-
-
- -
-
-
- -
-
-
- -
-
-
-
- -
-
-
-
-
-
- -
-
- -
-
-
-
- - <% for (int i = 0; i < raggi.length; i++) { %> - <%= fmt.format(raggi[i] / 1000.0) %> Km - <% } %> - -
-
+ +
+ +
+
+ +
+
- -
-
- - - -
- -
-
-
-
- -
- -
-
-
-
-
- - - - - - - - - -
- - +
+
+
+
+
+ +
+ +
-
- - <% - int indice = searchContainer.getStart(); - double dlat = 0; - double dlng = 0; - List pratiche; - try { - dlat = Double.valueOf(lat); - dlng = Double.valueOf(lng); - int iraggio = Integer.valueOf(raggio); - pratiche = IntPraticaLocalServiceUtil.findByPosizione(dlat, dlng, iraggio, indice, - searchContainer.getEnd()); - searchContainer.setTotal(IntPraticaLocalServiceUtil.countByPosizione(dlat, dlng, iraggio)); - showNotes = pratiche.size() > 0; - } catch (Exception e) { - pratiche = new ArrayList(); - searchContainer.setTotal(0); - } - %> - - - <% - long intPraticaId = pratica.getIntPraticaId(); - DettPratica dettaglio = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica( - intPraticaId); - Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(pratica.getTerritorioId()); - Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId()); - Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(themeDisplay.getCompanyId(), - comune.getCodiceProvincia()); - - Soggetto titolare = null; - String committenti = StringPool.BLANK; - String esito = StringPool.BLANK; - - if (Validator.isNotNull(dettaglio)) { - List titolari = SoggettoLocalServiceUtil.getValidByIntPratica_CodiceFiscale( - intPraticaId, dettaglio.getCodiceFiscaleDelegatoCommittente()); - if (!titolari.isEmpty()) { - titolare = titolari.get(0); - } - StringBuilder builder = new StringBuilder(); - List soggetti = SoggettoLocalServiceUtil - .findByIntPratica_TipologiaSoggetto(intPraticaId, TipoSoggettoUtil.COMMITTENTE); - for (Soggetto soggetto : soggetti) { - if (builder.length() > 0) { - builder.append("
"); - } - builder.append(soggetto.getTitle()) - .append("
") - .append(soggetto.getCodiceFiscale()); - } - committenti = builder.toString(); - esito = LanguageUtil.get(pageContext, PraticaUtil.getStatoPraticaLabel( - pratica.getStatoPratica(), intPraticaId)); - } - List avvisi = AvvisoLocalServiceUtil.findByIntPratica(intPraticaId, - QueryUtil.ALL_POS, - QueryUtil.ALL_POS, - OrderByComparatorFactoryUtil.create("portos_bo_Avviso", "createDate", false)); - int variantiCount = DettPraticaLocalServiceUtil.countCompletedByIntPraticaAndTipoPratica( - intPraticaId, Arrays.asList(TipoIntegrazioneUtil.VARIANTE)); - int integrazioniCount = DettPraticaLocalServiceUtil.countCompletedByIntPraticaAndTipoPratica( - intPraticaId, Arrays.asList(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE)); - %> - - - - - - - - - <%= ++indice %> - - - - <%= numeroProgetto.equals(pratica.getNumeroProgetto()) ? "Riferimento
ricerca" : fmt.format(pratica.getDistanzaOrtodromica()) %> -
- - - <%= pratica.getTitle(locale, true) %> - - - - - <%= titolare.getTitle() %>
<%= titolare.getCodiceFiscale() %> -
-
- - - <%= committenti %> - - - - <%= LanguageUtil.get(pageContext, PraticaUtil.getStatoPraticaLabel(pratica.getStatoPratica(), intPraticaId)) %> - - <% - if (!avvisi.isEmpty()) { - StringBuilder sb = new StringBuilder(); - sb.append("
    "); - for (Avviso avviso : avvisi) { - sb.append("
  • "); - sb.append(LanguageUtil.get(pageContext, avviso.translateTipoDocumento())); - sb.append("
  • "); - } - sb.append("
"); - %> - - - - - " target="<%= target %>"> - - <%= avvisi.size() %> - - - <% - } - %> - - - - V - <%= variantiCount %> - - - - - - - I - <%= integrazioniCount %> - - - - - - - - P - - - - - - - T - - - - - - - - - P - - - - - - - T - - - - -
-
- - - Territorio: <%= comune.getDenominazione() %> - <%= (dettaglio == null || dettaglio.getLocalita().isEmpty()) ? - "" : - "(Loc. " + dettaglio.getLocalita() + ")" - %> - <%= provincia.getProvincia() %>
- Localizzazione: <%= dettaglio == null ? "" : dettaglio.getVia() %>
- <%= LanguageUtil.get(pageContext, "tipo_procedura_" + pratica.getTipoProcedura()) %>

- <%= dettaglio == null ? "" : dettaglio.getDescLongIntervento() %> -
-
- -
- -
-
- - Note:
- <%= LanguageUtil.get(pageContext, "distanza-tooltip") %> -
-
-
-
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/mwg/sismica/fe/servlet/SorgentiServlet.java b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/mwg/sismica/fe/servlet/SorgentiServlet.java index 32b1cffa..3c6b170d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/mwg/sismica/fe/servlet/SorgentiServlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/mwg/sismica/fe/servlet/SorgentiServlet.java @@ -57,8 +57,8 @@ public class SorgentiServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String pathInfo = request.getPathInfo(); + String pathInfo = request.getPathInfo(); if (Validator.isNull(pathInfo) || pathInfo.equals(StringPool.FORWARD_SLASH)) { request.getRequestDispatcher("/html/sorgenti/form.jsp").forward(request, response); } else { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/web.xml b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/web.xml index d6eb336f..4c63ef09 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/web.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/web.xml @@ -1,14 +1,12 @@ - SorgentiServlet it.mwg.sismica.fe.servlet.SorgentiServlet - SorgentiServlet - /sorgenti-sismica/* + /sorgenti-paesaggistica/* \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_soggetto.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_soggetto.jsp index 475d3585..c6e1ad8b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_soggetto.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_soggetto.jsp @@ -2,7 +2,6 @@ <%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.model.IntPratica"%> <%@ include file="/html/fascicolofe/init.jsp" %> - <% String formName = ParamUtil.getString(request, "formName","fm"); long intPraticaId = ParamUtil.getLong(request, "intPraticaId"); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/soggettipratica/edit_soggetto.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/soggettipratica/edit_soggetto.jsp index 33d5871a..139f36b7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/soggettipratica/edit_soggetto.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/soggettipratica/edit_soggetto.jsp @@ -1,3 +1,5 @@ +<%@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 import="com.liferay.portal.kernel.workflow.WorkflowConstants"%> <%@page import="it.tref.liferay.portos.bo.model.DettPratica"%> @@ -34,6 +36,7 @@ if (soggetto == null) { } } DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId); +long intPraticaId = dettPratica.getIntPraticaId(); request.setAttribute("bean.soggetto", soggetto); boolean requiredDoc = TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(dettPratica.getTipoIntegrazione()); boolean disabledInput = !ParamUtil.getBoolean(request, "isEditable"); @@ -48,12 +51,12 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO"); - + - + @@ -204,38 +207,15 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO"); Tipologia - - - - - - - - + <% + for (String tipo : SoggettoLocalServiceUtil.getTipologieSoggetti().keySet()) { + %> + + <% + } + %> @@ -246,62 +226,17 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO"); Tipologia - - - - - - - - - - - - - - - - - - - - - - - - + <% + for (String tipo : SoggettoLocalServiceUtil.getTipologieSoggetti().keySet()) { + %> + + + + <% + } + %>
@@ -347,42 +282,16 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
- - - - - - - - - - - - + <% + for (Entry ambito : SoggettoLocalServiceUtil + .getAmbitiProfessionali().entrySet()) { + %> + + <% + } + %>
@@ -390,42 +299,16 @@ boolean inBO = ParamUtil.getBoolean(request, "inBO");
- - ambito : SoggettoLocalServiceUtil + .getAmbitiProfessionali().entrySet()) { + %> + - - - - - - - - - - + .equalsIgnoreCase(ambito.getKey()) %>' /> + <% + } + %>
diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/lib/sicilia-sue-connector-portlet-service.jar b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/lib/sicilia-sue-connector-portlet-service.jar index 61dd47b5..695a1fc2 100644 Binary files a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/lib/sicilia-sue-connector-portlet-service.jar and b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/lib/sicilia-sue-connector-portlet-service.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/Sportello.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/Sportello.java index 31cd5faa..02bf801f 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/Sportello.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/Sportello.java @@ -35,6 +35,8 @@ public interface Sportello extends SportelloModel, PersistedModel { public boolean checkPassword(java.lang.String password); + public void setEncryptedPassword(java.lang.String password); + public void setEncryptedPassword(java.lang.String password, com.liferay.portal.model.User user); diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloClp.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloClp.java index 7db95aa9..0d1d0535 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloClp.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloClp.java @@ -636,6 +636,22 @@ public class SportelloClp extends BaseModelImpl implements Sportello } } + @Override + public void setEncryptedPassword(java.lang.String password) { + try { + String methodName = "setEncryptedPassword"; + + Class[] parameterTypes = new Class[] { java.lang.String.class }; + + Object[] parameterValues = new Object[] { password }; + + invokeOnRemoteModel(methodName, parameterTypes, parameterValues); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + @Override public java.lang.String encryptPassword(java.lang.String password) { try { diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloWrapper.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloWrapper.java index 12def0da..a0ef147e 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloWrapper.java @@ -729,6 +729,11 @@ public class SportelloWrapper implements Sportello, ModelWrapper { return _sportello.checkPassword(password); } + @Override + public void setEncryptedPassword(java.lang.String password) { + _sportello.setEncryptedPassword(password); + } + @Override public void setEncryptedPassword(java.lang.String password, com.liferay.portal.model.User user) { diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Parameters.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Parameters.java index a3d9960e..9f170214 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Parameters.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Parameters.java @@ -8,24 +8,43 @@ public class Parameters { public static final String APPLICATIONS = "applications"; public static final String ATTACHMENTS = "attachments"; public static final String ATTACHMENT_ID = "attachmentId"; + public static final String CITY_OF_BIRTH = "cityOfBirth"; + public static final String CITY_OF_RESIDENCE = "cityOfResidence"; public static final String CODE = "code"; public static final String CONTENT_BASE64 = "contentBase64"; + public static final String DATE_OF_BIRTH = "dateOfBirth"; public static final String DESCRIPTION = "description"; public static final String DESCRIPTIONS = "descriptions"; + public static final String EMAIL = "email"; + public static final String FAX_NUMBER = "faxNumber"; public static final String FIELDS = "fields"; public static final String FIRST_NAME = "firstName"; + public static final String IS_BUSINESS = "isBusiness"; public static final String LAST_NAME = "lastName"; public static final String NAME = "name"; public static final String NULLABLE = "nullable"; public static final String PASSWORD = "password"; + public static final String PERSON_ID = "personId"; + public static final String POSTCODE = "postcode"; + public static final String PROVINCE_OF_BIRTH = "provinceOfBirth"; + public static final String PROVINCE_OF_RESIDENCE = "provinceOfResidence"; + public static final String REGISTERED_OFFICE_CITY = "registeredOfficeCity"; + public static final String SCOPE = "scope"; + public static final String SCOPE_DESCRIPTION = "scopeDescription"; public static final String SHA256 = "sha256"; + public static final String STATE_OF_RESIDENCE = "stateOfResidence"; public static final String STATUS_CODE = "statusCode"; public static final String STATUS_MESSAGE = "statusMessage"; + public static final String STREET_ADDRESS_OF_RESIDENCE = "streetAddressOfResidence"; + public static final String STREET_NUMBER_OF_RESIDENCE = "streetNumberOfResidence"; public static final String SUE_ID = "sueId"; + public static final String TELEPHONE_NUMBER = "telephoneNumber"; public static final String TOKEN = "token"; public static final String TYPE = "type"; + public static final String TYPE_DESCRIPTION = "typeDescription"; public static final String USERNAME = "username"; public static final String USES = "uses"; + public static final String VALID = "valid"; public static final String VALUES = "values"; public static final String VALUE = "value"; public static final String VATIN = "vatin"; diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Description.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Description.java deleted file mode 100644 index 7f140181..00000000 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Description.java +++ /dev/null @@ -1,14 +0,0 @@ -package it.mwg.sicilia.sue.api.v1.bean; - -public class Description { - - private final String description; - - public Description(String description) { - this.description = description; - } - - public String getDescription() { - return description; - } -} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/Command.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/Command.java index 953d4fd5..9db703b3 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/Command.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/Command.java @@ -122,10 +122,8 @@ public abstract class Command { } if (request.getMethod().equals(HttpMethods.POST) && !input.isEmpty()) { try { - _log.info("Input = [" + input + "]"); parameters.putAll(deserializer.deserialize(input)); } catch (Exception e) { - e.printStackTrace(); } } String token = request.getHeader(Parameters.X_AUTH_TOKEN); @@ -184,10 +182,13 @@ public abstract class Command { } catch (PortalException | SystemException e) { Response.write(response, Status.INACTIVE_USER); } catch (Exception e) { - Response.write(response, Status.SERVER_ERROR); + List additionalInfo = new ArrayList<>(); + additionalInfo.add(e.getMessage()); + Response.write(response, Status.SERVER_ERROR, additionalInfo); } return true; } catch (IOException e) { + // Response.write ha fallito } } return false; diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/CommandList.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/CommandList.java index 98e57ab5..40232a2b 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/CommandList.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/CommandList.java @@ -1,6 +1,7 @@ package it.mwg.sicilia.sue.api.v1.command; import it.mwg.sicilia.sue.api.v1.command.impl.AddApplication; +import it.mwg.sicilia.sue.api.v1.command.impl.AddPerson; import it.mwg.sicilia.sue.api.v1.command.impl.DeleteApplication; import it.mwg.sicilia.sue.api.v1.command.impl.DeleteAttachment; import it.mwg.sicilia.sue.api.v1.command.impl.GetApplications; @@ -14,6 +15,7 @@ import it.mwg.sicilia.sue.api.v1.command.impl.Login; import it.mwg.sicilia.sue.api.v1.command.impl.Manual; import it.mwg.sicilia.sue.api.v1.command.impl.Nop; import it.mwg.sicilia.sue.api.v1.command.impl.SetFields; +import it.mwg.sicilia.sue.api.v1.command.impl.SetPassword; import it.mwg.sicilia.sue.api.v1.command.impl.UploadAttachment; import it.mwg.sicilia.sue.api.v1.command.impl.ValidateApplication; @@ -32,11 +34,12 @@ public class CommandList { private static final Map commands = new LinkedHashMap<>(); private static final Set verbs = new TreeSet<>(); static { - // Manuali + // Manuale addCommand(new Manual("Restituisce la documentazione dell'API generata automaticamente in versione HTML")); // Login addCommand(new Login("Esegue l'accesso con nome email e password e restituisce un token di accesso", HttpMethods.POST)); + addCommand(new SetPassword("Imposta una nuova password di accesso", HttpMethods.POST)); // Elenchi addCommand(new ListApplications("Elenco delle istanze presentabili sul portale")); addCommand(new ListAttachments("Elenco dei documenti riconosciuti dal portale")); @@ -51,6 +54,9 @@ public class CommandList { addCommand(new SetFields( "Imposta i valori dei dati dell'istanza, l'elenco dei campi valorizzabili è fornito dal comando " + Command.getCommandVerb(ListFields.class))); + // Soggetti + addCommand(new AddPerson( + "Censisce un soggetto collegato alla pratica. Se la stessa persona ricopre più ruoli è necessario censirla più volte")); // Allegati addCommand(new UploadAttachment("Allega un documento all'istanza", HttpMethods.POST)); addCommand(new GetAttachments("Elenca gli allegati dell'istanza")); diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/AddPerson.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/AddPerson.java new file mode 100644 index 00000000..32110679 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/AddPerson.java @@ -0,0 +1,333 @@ +package it.mwg.sicilia.sue.api.v1.command.impl; + +import it.mwg.sicilia.sue.api.v1.Parameters; +import it.mwg.sicilia.sue.api.v1.Response; +import it.mwg.sicilia.sue.api.v1.Status; +import it.mwg.sicilia.sue.api.v1.command.Command; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; +import it.mwg.sicilia.sue.api.v1.util.PortosBoUtil; +import it.tref.liferay.portos.bo.model.Comune; +import it.tref.liferay.portos.bo.model.DettPratica; +import it.tref.liferay.portos.bo.model.IntPratica; +import it.tref.liferay.portos.bo.model.Provincia; +import it.tref.liferay.portos.bo.model.Soggetto; +import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil; +import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil; +import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil; + +import java.io.Serializable; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.TreeMap; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.liferay.counter.service.CounterLocalServiceUtil; +import com.liferay.portal.kernel.util.MapUtil; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.model.Group; +import com.liferay.portal.model.Organization; +import com.liferay.portal.service.GroupLocalServiceUtil; +import com.liferay.portal.service.OrganizationLocalServiceUtil; + +public class AddPerson extends Command { + + @SuppressWarnings("serial") + private static final List INPUT_PARAMETERS = new ArrayList() { + { + Map tipologie = new TreeMap<>(); + tipologie.putAll(SoggettoLocalServiceUtil.getTipologieSoggetti()); + Map ambiti = SoggettoLocalServiceUtil.getAmbitiProfessionali(); + + add(new Parameter(Parameters.APPLICATION_ID, TYPES.INT, "Id dell'istanza")); + StringBuilder sb = new StringBuilder(); + sb.append("Ruolo ricoperto dal soggetto (1..").append(tipologie.size()) + .append(StringPool.CLOSE_PARENTHESIS); + for (Entry tipo : tipologie.entrySet()) { + sb.append("
").append(Long.valueOf(tipo.getKey())).append(" - ") + .append(tipo.getValue()).append(""); + } + add(new Parameter(Parameters.TYPE, TYPES.INT, sb.toString())); + add(new Parameter(Parameters.TYPE_DESCRIPTION, TYPES.STRING, + "Descrizione del ruolo ricoperto, obbligatoria se " + Parameters.TYPE + " = " + + Long.valueOf(TipoSoggettoUtil.ALTRO_SOGGETTO), false)); + sb.setLength(0); + sb.append("Ambito professionale (<NULL>,1..").append(ambiti.size()) + .append(StringPool.CLOSE_PARENTHESIS); + int n = 0; + for (String ambito : ambiti.values()) { + sb.append("
").append(++n).append(" - ").append(ambito) + .append(""); + } + add(new Parameter(Parameters.SCOPE, TYPES.INT, sb.toString(), false)); + add(new Parameter(Parameters.SCOPE_DESCRIPTION, TYPES.STRING, + "Descrizione dell'ambito professionale, obbligatoria se " + Parameters.SCOPE + " = " + n, false)); + add(new Parameter(Parameters.IS_BUSINESS, TYPES.BOOL, + "Se true il soggetto censito è un'azienda
deve essere true se " + Parameters.TYPE + " = " + + Long.valueOf(TipoSoggettoUtil.DITTA) + " (" + tipologie.get(TipoSoggettoUtil.DITTA) + + ")
può essere true se " + Parameters.TYPE + " = " + + Long.valueOf(TipoSoggettoUtil.COMMITTENTE) + " (" + + tipologie.get(TipoSoggettoUtil.COMMITTENTE) + + ")
deve essere false o non presente in tutti gli altri casi", false)); + add(new Parameter(Parameters.VATIN, TYPES.STRING, + "Codice fiscale del soggetto o del legale rappresentante se ditta")); + add(new Parameter(Parameters.FIRST_NAME, TYPES.STRING, + "Nome del soggetto o del legale rappresentante se ditta")); + add(new Parameter(Parameters.LAST_NAME, TYPES.STRING, + "Cognome del soggetto o del legale rappresentante se ditta")); + add(new Parameter(Parameters.PROVINCE_OF_BIRTH, TYPES.STRING, + "Nome della provincia o stato estero di nascita del soggetto o del legale rappresentante se ditta")); + add(new Parameter(Parameters.CITY_OF_BIRTH, TYPES.STRING, + "Nome del comune di nascita del soggetto o del legale rappresentante se ditta")); + add(new Parameter(Parameters.DATE_OF_BIRTH, TYPES.STRING, + "Data di nascita (AAAA-MM-GG) del soggetto o del legale rappresentante se ditta")); + add(new Parameter( + Parameters.PROVINCE_OF_RESIDENCE, + TYPES.STRING, + "Codice ISTAT, sigla o nome della provincia di nascita del soggetto o della sede legale se ditta. Può essere omesso se viene fornito il codice ISTAT o Belfiore per " + + Parameters.CITY_OF_RESIDENCE + + ", ignorato se viene valorizzato " + + Parameters.STATE_OF_RESIDENCE, false)); + add(new Parameter( + Parameters.CITY_OF_RESIDENCE, + TYPES.STRING, + "Codice ISTAT, codice Belfiore o nome del comune di residenza del soggetto o della sede legale se ditta, ignorato se viene valorizzato " + + Parameters.STATE_OF_RESIDENCE, false)); + add(new Parameter(Parameters.STATE_OF_RESIDENCE, TYPES.STRING, + "Stato estero di residenza del soggetto o della sede legale se ditta, in alternativa a " + + Parameters.PROVINCE_OF_RESIDENCE + " e " + Parameters.CITY_OF_RESIDENCE + + ". Se valorizzato i campi " + Parameters.PROVINCE_OF_RESIDENCE + " e " + + Parameters.CITY_OF_RESIDENCE + " saranno ignorati", false)); + add(new Parameter(Parameters.STREET_ADDRESS_OF_RESIDENCE, TYPES.STRING, + "Indirizzo di residenza del soggetto o della sede legale se ditta")); + add(new Parameter(Parameters.STREET_NUMBER_OF_RESIDENCE, TYPES.STRING, + "Numero civico di residenza del soggetto o della sede legale se ditta")); + add(new Parameter(Parameters.POSTCODE, TYPES.STRING, + "Codice di avviamento postale di residenza del soggetto o della sede legale se ditta")); + add(new Parameter(Parameters.EMAIL, TYPES.STRING, + "Email per ricevimento comunicazioni/notifiche (non inserire PEC)")); + add(new Parameter(Parameters.TELEPHONE_NUMBER, TYPES.STRING, "Numero di telefono")); + add(new Parameter(Parameters.FAX_NUMBER, TYPES.STRING, "Numero di fax", false)); + } + }; + + @SuppressWarnings("serial") + private static final List OUTPUT_PARAMETERS = new ArrayList() { + { + addAll(BASE_OUTPUT_PARAMETERS); + add(new Parameter(Parameters.PERSON_ID, TYPES.INT, "Identificatore del soggetto censito")); + add(new Parameter(Parameters.ADDITIONAL_INFO, TYPES.STRING, + "Eventuali informazioni aggiuntive sull'operazione o sugli errori incontrati", false)); + } + }; + + private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + + public AddPerson(String description, String... methods) { + super(description, methods); + } + + @Override + public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { + + if (verifyAccessToken(request, response)) { + IntPratica intPratica = getSecureIntPratica(response); + if (Validator.isNotNull(intPratica)) { + List additionalInfo = new ArrayList<>(); + long companyId = intPratica.getCompanyId(); + List tipologie = new ArrayList(new TreeMap( + SoggettoLocalServiceUtil.getTipologieSoggetti()).keySet()); + List ambiti = new ArrayList<>(SoggettoLocalServiceUtil.getAmbitiProfessionali().keySet()); + String tipologia = null; + String tipologiaAltro = null; + int type = MapUtil.getInteger(parameters, Parameters.TYPE); + if ((type > 0) && (type <= tipologie.size())) { + tipologia = tipologie.get(type - 1); + if (tipologia.equals(TipoSoggettoUtil.ALTRO_SOGGETTO)) { + tipologiaAltro = MapUtil.getString(parameters, Parameters.TYPE_DESCRIPTION); + if (Validator.isNull(tipologiaAltro)) { + additionalInfo.add("Il campo " + Parameters.TYPE_DESCRIPTION + " è obbligatorio quando " + + Parameters.TYPE + " = " + type); + } + } + } else { + additionalInfo.add("Valore non valido " + Parameters.TYPE + " = " + type); + } + String ambito = null; + String ambitoAltro = null; + int scope = MapUtil.getInteger(parameters, Parameters.SCOPE); + if ((scope > 0) && (scope <= ambiti.size())) { + ambito = ambiti.get(scope - 1); + if (ambito.equals("ambitoProf-altro")) { + ambitoAltro = MapUtil.getString(parameters, Parameters.SCOPE_DESCRIPTION); + if (Validator.isNull(ambitoAltro)) { + additionalInfo.add("Il campo " + Parameters.SCOPE_DESCRIPTION + " è obbligatorio quando " + + Parameters.SCOPE + " = " + scope); + } + } + } + boolean isBusiness = MapUtil.getBoolean(parameters, Parameters.IS_BUSINESS, false); + String codiceFiscale = getRequiredString(Parameters.VATIN, additionalInfo); + String nome = getRequiredString(Parameters.FIRST_NAME, additionalInfo); + String cognome = getRequiredString(Parameters.LAST_NAME, additionalInfo); + Date dataNascita = null; + try { + dataNascita = sdf.parse(MapUtil.getString(parameters, Parameters.DATE_OF_BIRTH)); + } catch (Exception e) { + additionalInfo.add("Il campo " + Parameters.DATE_OF_BIRTH + " manca o non è valido, " + + Parameters.DATE_OF_BIRTH + " = " + + MapUtil.getString(parameters, Parameters.DATE_OF_BIRTH)); + } + String provinciaNascita = getRequiredString(Parameters.PROVINCE_OF_BIRTH, additionalInfo); + String comuneNascita = getRequiredString(Parameters.CITY_OF_BIRTH, additionalInfo); + String comuneEstero = MapUtil.getString(parameters, Parameters.STATE_OF_RESIDENCE); + Comune comune = null; + if (Validator.isNull(comuneEstero)) { + String provinceOfResidence = MapUtil.getString(parameters, Parameters.PROVINCE_OF_RESIDENCE); + String cityOfResidence = MapUtil.getString(parameters, Parameters.CITY_OF_RESIDENCE); + comune = getComune(companyId, provinceOfResidence, cityOfResidence); + if (Validator.isNull(comune)) { + additionalInfo.add("Nessun comune trovato per " + Parameters.PROVINCE_OF_RESIDENCE + " = " + + provinceOfResidence + ", " + Parameters.CITY_OF_RESIDENCE + " = " + cityOfResidence); + } + } + String via = getRequiredString(Parameters.STREET_ADDRESS_OF_RESIDENCE, additionalInfo); + String numeroCivico = getRequiredString(Parameters.STREET_NUMBER_OF_RESIDENCE, additionalInfo); + if (additionalInfo.isEmpty()) { + try { + Group group = GroupLocalServiceUtil.getGroup(sportello.getGroupId()); + Organization organization = OrganizationLocalServiceUtil.getOrganization(group + .getOrganizationId()); + if (0 != organization.getParentOrganizationId()) { + organization = OrganizationLocalServiceUtil.getOrganization(organization + .getParentOrganizationId()); + group = organization.getGroup(); + } + + DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastEditableByIntPratica(intPratica + .getIntPraticaId()); + Date date = new Date(); + Soggetto soggetto = SoggettoLocalServiceUtil.createSoggetto(CounterLocalServiceUtil + .increment(Soggetto.class.getName())); + soggetto.setCompanyId(companyId); + soggetto.setUserId(intPratica.getUserId()); + soggetto.setUserName(intPratica.getUserName()); + soggetto.setCreateDate(date); + soggetto.setModifiedDate(date); + soggetto.setGroupId(group.getGroupId()); + soggetto.setDettPraticaId(dettPratica.getDettPraticaId()); + soggetto.setIntPraticaId(intPratica.getIntPraticaId()); + soggetto.setTipologiaSoggetto(tipologia); + soggetto.setTipoAltroSoggetto(tipologiaAltro); + soggetto.setAmbitoAttivita(ambito); + soggetto.setAmbitoProfessione(ambitoAltro); + if (isBusiness) { + soggetto.setLegaleRap(nome + StringPool.SPACE + cognome); + } else { + soggetto.setNome(nome); + soggetto.setCognome(cognome); + soggetto.setCodiceFiscale(codiceFiscale.toLowerCase()); + soggetto.setDataNascita(dataNascita); + soggetto.setProvinciaNascita(provinciaNascita); + soggetto.setComuneNascita(comuneNascita); + if (Validator.isNotNull(comune)) { + soggetto.setComune(String.valueOf(comune.getComuneId())); + soggetto.setProvincia(comune.getCodiceProvincia()); + } + if (Validator.isNotNull(comuneEstero)) { + soggetto.setComuneEstero(comuneEstero); + } + soggetto.setVia(via); + soggetto.setNumeroCivico(numeroCivico); + } + SoggettoLocalServiceUtil.updateSoggetto(soggetto); + Map result = new HashMap<>(); + result.put(Parameters.PERSON_ID, soggetto.getSoggettoId()); + Response.write(response, Status.OK, result, additionalInfo); + } catch (Exception e) { + additionalInfo.add("Errore durante la creazione del soggetto"); + Response.write(response, Status.SERVER_ERROR, additionalInfo); + } + } else { + Response.write(response, Status.INVALID_INPUT, additionalInfo); + } + } + } + } + + private String getRequiredString(String parameter, List additionalInfo) { + + String result = MapUtil.getString(parameters, parameter); + if (Validator.isNull(result)) { + additionalInfo.add("Il campo " + parameter + " è obbligatorio"); + } + return result; + } + + private static Comune getComune(long companyId, String nomeProvincia, String nomeComune) { + + Provincia provincia = null; + Comune comune = null; + if (Validator.isNotNull(nomeProvincia)) { + try { + switch (nomeProvincia.length()) { + case 2: + provincia = ProvinciaLocalServiceUtil.fetchByC_S(companyId, nomeProvincia.toUpperCase()); + break; + case 3: + provincia = ProvinciaLocalServiceUtil.fetchByC_C(companyId, nomeProvincia); + break; + } + if (Validator.isNull(provincia)) { + provincia = PortosBoUtil.findProvinciaByCompanyIdDenominazione(companyId, nomeProvincia); + } + switch (nomeComune.length()) { + case 4: + comune = ComuneLocalServiceUtil.fetchByC_CB(companyId, nomeComune.toUpperCase()); + break; + case 6: + comune = ComuneLocalServiceUtil.fetchByC_CI(companyId, nomeComune); + break; + } + if (Validator.isNull(comune)) { + List comuni = ComuneLocalServiceUtil.findByCompanyDenominazione(companyId, nomeComune); + if (comuni.size() == 1) { + comune = comuni.get(0); + } else { + if (Validator.isNotNull(provincia)) { + for (Comune c : comuni) { + if (c.getCodiceProvincia().equalsIgnoreCase(provincia.getCodiceProvincia())) { + comune = c; + break; + } + } + } + } + } + } catch (Exception e) { + } + } + return comune; + } + + @Override + public List getInputParameters() { + return INPUT_PARAMETERS; + } + + @Override + public List getOutputParameters() { + return OUTPUT_PARAMETERS; + } + +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/GetApplications.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/GetApplications.java index 441ca3c2..6243d67b 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/GetApplications.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/GetApplications.java @@ -52,12 +52,14 @@ public class GetApplications extends Command { public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { if (verifyAccessToken(request, response)) { + String code = parameters.containsKey(Parameters.CODE) ? String.valueOf(Parameters.CODE) : null; List applications = new ArrayList<>(); for (Territorio territorio : TerritorioLocalServiceUtil.findByComuneId(sportello.getComuneId(), QueryUtil.ALL_POS, QueryUtil.ALL_POS)) { for (IntPratica intPratica : IntPraticaLocalServiceUtil .findByTerritorioId(territorio.getTerritorioId())) { - if (intPratica.getInLavorazioneSue()) { + if (intPratica.getInLavorazioneSue() + && ((null == code) || intPratica.getTipoProcedura().equals(code))) { applications.add(new Application(intPratica.getIntPraticaId(), intPratica.getTipoProcedura(), intPratica.getUserName())); } diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/GetSourceCode.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/GetSourceCode.java index a62ffe3d..7d5f70b6 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/GetSourceCode.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/GetSourceCode.java @@ -128,10 +128,16 @@ public class GetSourceCode extends Command { sb.append(prefix).append("case '").append(verb).append("':\n"); List parameters = command.getInputParameters(); int nRequired = 0; + int nPar = 0; + List arrays = new ArrayList<>(); for (Parameter parameter : parameters) { if (parameter.isRequired()) { nRequired++; } + if (parameter.getType().equals(TYPES.ARRAY)) { + arrays.add(nPar); + } + nPar++; } if (nRequired > 0) { sb.append(prefix).append(INDENT).append("if (\\$argc < ").append(nRequired + 2).append(") {\n"); @@ -148,7 +154,13 @@ public class GetSourceCode extends Command { .append(ApiUtil.underscoreToCamelCase(verb)).append(StringPool.OPEN_PARENTHESIS); if (parameters.size() > 0) { for (int i = 0; i < nRequired; i++) { + if (arrays.contains(i)) { + sb.append("json_decode("); + } sb.append("\\$argv[").append(i + 2).append("], "); + if (arrays.contains(i)) { + sb.append("true), "); + } } for (int i = nRequired; i < parameters.size(); i++) { sb.append("\\$argv[").append(i + 2).append("] ?? null, "); diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListFields.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListFields.java index b9ca7b91..8d0e7bd0 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListFields.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListFields.java @@ -7,7 +7,7 @@ import it.mwg.sicilia.sue.api.v1.bean.Field; import it.mwg.sicilia.sue.api.v1.command.Command; import it.mwg.sicilia.sue.api.v1.parameter.Parameter; import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; -import it.mwg.sicilia.sue.api.v1.util.DettPraticaUtil; +import it.mwg.sicilia.sue.api.v1.util.PortosBoUtil; import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; import java.io.Serializable; @@ -37,7 +37,7 @@ public class ListFields extends Command { p.addSubParameter(new Parameter(Parameters.DESCRIPTION, TYPES.STRING, "Descrizione del parametro")); p.addSubParameter(new Parameter(Parameters.TYPE, TYPES.STRING, "Tipo del parametro (" + TYPES.STRING + ", " + TYPES.INT + ", ecc.)")); - p.addSubParameter(new Parameter(Parameters.NULLABLE, TYPES.BOOLEAN, + p.addSubParameter(new Parameter(Parameters.NULLABLE, TYPES.BOOL, "Se true il campo può essere impostato al valore NULL")); add(p); } @@ -92,7 +92,7 @@ public class ListFields extends Command { description += " diventa obbligatorio quando deInfAltro = true"; break; } - String values = DettPraticaUtil.getFieldValues(field); + String values = PortosBoUtil.getFieldValues(field); if (null != values) { description += ". Unici valori ammessi: " + values + StringPool.PERIOD; } @@ -105,7 +105,7 @@ public class ListFields extends Command { type = TYPES.INT; break; case Types.BOOLEAN: - type = TYPES.BOOLEAN; + type = TYPES.BOOL; break; case Types.DOUBLE: type = TYPES.FLOAT; diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListValues.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListValues.java index 2b662106..b78c9304 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListValues.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListValues.java @@ -7,7 +7,7 @@ import it.mwg.sicilia.sue.api.v1.bean.Value; import it.mwg.sicilia.sue.api.v1.command.Command; import it.mwg.sicilia.sue.api.v1.parameter.Parameter; import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; -import it.mwg.sicilia.sue.api.v1.util.DettPraticaUtil; +import it.mwg.sicilia.sue.api.v1.util.PortosBoUtil; import java.io.Serializable; import java.util.ArrayList; @@ -50,7 +50,7 @@ public class ListValues extends Command { readParameters(request); String fieldName = MapUtil.getString(parameters, Parameters.NAME); - List values = DettPraticaUtil.getFieldList(fieldName); + List values = PortosBoUtil.getFieldList(fieldName); if (null == values) { Response.write(response, Status.INVALID_INPUT); } else { diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Manual.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Manual.java index b3289c64..7c51cc78 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Manual.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Manual.java @@ -51,8 +51,8 @@ public class Manual extends Command { StringBuilder result = new StringBuilder(); result.append("") .append("") - .append("ManualManuale Sicilia SUE API v1") .append(""); @@ -122,10 +122,12 @@ public class Manual extends Command { for (int i = 0; i < level; i++) { result.append(">"); } - result.append(StringPool.SPACE).append(parameter.getName()).append("") - .append(parameter.isRequired() ? "No" : "Sì").append("") - .append(parameter.getType().toString()).append("").append(parameter.getDescription()) - .append(""); + result.append(StringPool.SPACE).append(parameter.getName()).append(""); + if (!parameter.isRequired()) { + result.append("✔"); + } + result.append("").append(parameter.getType().toString()).append("") + .append(parameter.getDescription()).append(""); if (parameter.getType().equals(TYPES.ARRAY)) { result.append(printTableParameters(parameter.getSubParameters(), level + 1)); } @@ -133,7 +135,7 @@ public class Manual extends Command { return result.toString(); } - protected String getCurlExample(Command command, String method, String baseUrl) { + private String getCurlExample(Command command, String method, String baseUrl) { return getCurlExample(command, method, baseUrl, StringPool.BLANK); } @@ -211,12 +213,17 @@ public class Manual extends Command { ret = value; } else if (parameter.getType().equals(TYPES.INT) || parameter.getType().equals(TYPES.VARYING)) { ret = (null == i ? 1 : i + 1) * 123; - } else if (parameter.getType().equals(TYPES.BOOLEAN)) { + } else if (parameter.getType().equals(TYPES.BOOL)) { ret = (null == i ? 1 : i) % 2 == 1; } return ret; } + @Override + public boolean isSecure() { + return false; + }; + @Override public List getInputParameters() { return EMPTY_PARAMETERS; diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/SetFields.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/SetFields.java index 7de5e866..06f470b8 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/SetFields.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/SetFields.java @@ -7,7 +7,7 @@ import it.mwg.sicilia.sue.api.v1.command.Command; import it.mwg.sicilia.sue.api.v1.parameter.Parameter; import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; import it.mwg.sicilia.sue.api.v1.util.ApiUtil; -import it.mwg.sicilia.sue.api.v1.util.DettPraticaUtil; +import it.mwg.sicilia.sue.api.v1.util.PortosBoUtil; import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.Territorio; @@ -98,13 +98,13 @@ public class SetFields extends Command { Response.write(response, Status.SERVER_ERROR, additionalInfo); return; } - List errors = DettPraticaUtil.checkValues(fields); + List errors = PortosBoUtil.checkValues(fields); if (!errors.isEmpty()) { additionalInfo.addAll(errors); Response.write(response, Status.INVALID_INPUT, additionalInfo); return; } - String field = DettPraticaUtil.setFields(dettPratica, fields); + String field = PortosBoUtil.setFields(dettPratica, fields); if (null != field) { additionalInfo.add("Il campo " + field + " non esiste o non è modificabile"); Response.write(response, Status.INVALID_INPUT, additionalInfo); diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/SetPassword.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/SetPassword.java new file mode 100644 index 00000000..65fcaa79 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/SetPassword.java @@ -0,0 +1,113 @@ +package it.mwg.sicilia.sue.api.v1.command.impl; + +import it.mwg.sicilia.sue.api.v1.Parameters; +import it.mwg.sicilia.sue.api.v1.Response; +import it.mwg.sicilia.sue.api.v1.Status; +import it.mwg.sicilia.sue.api.v1.command.Command; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; +import it.mwg.sicilia.sue.api.v1.util.ApiUtil; +import it.mwg.sicilia.sue.service.SportelloLocalServiceUtil; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class SetPassword extends Command { + + @SuppressWarnings("serial") + private static final List INPUT_PARAMETERS = new ArrayList() { + { + add(new Parameter(Parameters.PASSWORD, TYPES.STRING, "La nuova password")); + } + }; + + public SetPassword(String description, String... methods) { + super(description, methods); + } + + @Override + public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { + + if (verifyAccessToken(request, response)) { + List additionalInfo = new ArrayList<>(); + if (!parameters.containsKey(Parameters.PASSWORD)) { + additionalInfo.add("Parametro " + Parameters.PASSWORD + " mancante"); + Response.write(response, Status.MALFORMED_REQUEST, additionalInfo); + return; + } + String password = (String) parameters.get(Parameters.PASSWORD); + if (checkPassword(response, password)) { + sportello.setEncryptedPassword(password); + SportelloLocalServiceUtil.updateSportello(sportello); + Response.write(response, Status.OK); + } + } + } + + private boolean checkPassword(HttpServletResponse response, String password) throws IOException { + + final int MIN_LENGTH = ApiUtil.isDebug() ? 1 : 8; + final boolean SPECIAL = !ApiUtil.isDebug(); + final boolean DIGIT = !ApiUtil.isDebug(); + final boolean UPPERCASE = !ApiUtil.isDebug(); + final boolean LOWERCASE = !ApiUtil.isDebug(); + if ((null != password) && (password.length() >= MIN_LENGTH)) { + boolean special = SPECIAL; + boolean digit = DIGIT; + boolean uppercase = UPPERCASE; + boolean lowercase = LOWERCASE; + for (int i = 0; i < password.length(); i++) { + char c = password.charAt(i); + if (Character.isDigit(c)) { + digit = false; + } else if (Character.isUpperCase(c)) { + uppercase = false; + } else if (Character.isLowerCase(c)) { + lowercase = false; + } else { + special = false; + } + } + if (!(special || digit || uppercase || lowercase)) { + return true; + } + } + StringBuilder sb = new StringBuilder(); + sb.append("La password deve avere una lunghezza minima di ").append(MIN_LENGTH).append(" caratteri"); + if (SPECIAL || DIGIT || UPPERCASE || LOWERCASE) { + sb.append(" e deve contenere almeno "); + if (UPPERCASE) { + sb.append("una lettera maiuscola, "); + } + if (LOWERCASE) { + sb.append("una lettera minuscola, "); + } + if (DIGIT) { + sb.append("un numero, "); + } + if (SPECIAL) { + sb.append("un carattere speciale, "); + } + sb.setLength(sb.length() - 2); + } + List additionalInfo = new ArrayList<>(); + additionalInfo.add(sb.toString()); + Response.write(response, Status.INVALID_INPUT, additionalInfo); + return false; + } + + @Override + public List getInputParameters() { + return INPUT_PARAMETERS; + } + + @Override + public List getOutputParameters() { + return BASE_OUTPUT_PARAMETERS; + } + +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/UploadAttachment.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/UploadAttachment.java index 9c9a4de1..a0471ed8 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/UploadAttachment.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/UploadAttachment.java @@ -73,7 +73,7 @@ public class UploadAttachment extends Command { } String tipologia = MapUtil.getString(parameters, Parameters.CODE); if (!DocumentiPraticaUtil.getTipiDocDomanda().containsKey(tipologia)) { - additionalInfo.add("Valore non valido destinazione = \"" + tipologia + StringPool.QUOTE); + additionalInfo.add("Valore non valido " + Parameters.CODE + " = \"" + tipologia + StringPool.QUOTE); Response.write(response, Status.MALFORMED_REQUEST, additionalInfo); return; } @@ -125,7 +125,7 @@ public class UploadAttachment extends Command { intPraticaId, dlFileEntry, fileName, version, praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari, dettPraticaIdRimozione, dtDataRimozione, serviceContext); Map result = new HashMap<>(); - result.put(Parameters.APPLICATION_ID, docPratica.getDocPraticaId()); + result.put(Parameters.ATTACHMENT_ID, docPratica.getDocPraticaId()); Response.write(response, Status.OK, result, additionalInfo); } catch (Exception e) { additionalInfo.add("Errore durante l'esecuzione: " + e.getMessage()); diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ValidateApplication.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ValidateApplication.java index 36b1a4bd..f1fba0d8 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ValidateApplication.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ValidateApplication.java @@ -3,10 +3,10 @@ package it.mwg.sicilia.sue.api.v1.command.impl; import it.mwg.sicilia.sue.api.v1.Parameters; import it.mwg.sicilia.sue.api.v1.Response; import it.mwg.sicilia.sue.api.v1.Status; -import it.mwg.sicilia.sue.api.v1.bean.Description; import it.mwg.sicilia.sue.api.v1.command.Command; import it.mwg.sicilia.sue.api.v1.parameter.Parameter; import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; +import it.mwg.sicilia.sue.api.v1.util.PortosBoUtil; import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; @@ -17,13 +17,11 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import com.liferay.portal.kernel.language.LanguageUtil; import com.liferay.portal.kernel.util.Validator; public class ValidateApplication extends Command { @@ -39,10 +37,9 @@ public class ValidateApplication extends Command { private static final List OUTPUT_PARAMETERS = new ArrayList() { { addAll(BASE_OUTPUT_PARAMETERS); - Parameter p = new Parameter(Parameters.DESCRIPTIONS, TYPES.ARRAY, "Elenco di informazioni mancanti"); - p.addSubParameter(new Parameter(Parameters.DESCRIPTION, TYPES.STRING, - "Descrizione dell'informazione mancante")); - add(p); + add(new Parameter(Parameters.VALID, TYPES.BOOL, "Esito della verifica")); + add(new Parameter(Parameters.DESCRIPTIONS, TYPES.STRING_ARRAY, + "Elenco di nomi di campi obbligatori non ancora valorizzati", false)); add(new Parameter(Parameters.ADDITIONAL_INFO, TYPES.STRING, "Eventuali informazioni aggiuntive sull'operazione o sugli errori incontrati", false)); } @@ -59,22 +56,27 @@ public class ValidateApplication extends Command { IntPratica intPratica = getSecureIntPratica(response); if (Validator.isNotNull(intPratica)) { List additionalInfo = new ArrayList<>(); + boolean valid = true; try { DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastEditableByIntPratica(intPratica .getIntPraticaId()); - List notCompleted = new ArrayList<>(); + List fields = new ArrayList<>(); setAdministratorPermissions(); for (String section : new String[] { SezioniUtil.SEZIONE_DETTAGLI_PRINCIPALI, - SezioniUtil.SEZIONE_ANAGRAFE_SOGGETTI, SezioniUtil.SEZIONE_DESCRIZIONE_EDIFICIO, - SezioniUtil.SEZIONE_GEOLOGICA, SezioniUtil.SEZIONE_ALLEGATI }) { + SezioniUtil.SEZIONE_DESCRIZIONE_EDIFICIO }) { for (String nc : ValidazionePraticaUtil.notCompletedSection(section, dettPratica.getDettPraticaId())) { - nc = LanguageUtil.get(Locale.ITALIAN, nc); - notCompleted.add(new Description(nc)); + String field = PortosBoUtil.getFieldFromError(nc); + if (null != field) { + fields.add(PortosBoUtil.getFieldFromError(nc)); + } else { + fields.add("*** " + nc); + } } } Map result = new HashMap<>(); - result.put(Parameters.DESCRIPTIONS, (Serializable) notCompleted); + result.put(Parameters.VALID, valid); + result.put(Parameters.FIELDS, (Serializable) fields); Response.write(response, Status.OK, result, additionalInfo); } catch (Exception e) { additionalInfo.add("Errore durante l'esecuzione: " + e.getMessage()); diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/parameter/Parameter.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/parameter/Parameter.java index c60eb3f9..dd76fb8e 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/parameter/Parameter.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/parameter/Parameter.java @@ -56,6 +56,6 @@ public class Parameter { } public static enum TYPES { - APPLICATION_ZIP, ARRAY, BOOLEAN, FLOAT, INT, STRING, TIMESTAMP, TEXT_HTML, TEXT_PLAIN, UNKNOWN, VARYING + APPLICATION_ZIP, ARRAY, BOOL, FLOAT, INT, STRING, STRING_ARRAY, TIMESTAMP, TEXT_HTML, TEXT_PLAIN, UNKNOWN, VARYING } } diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/util/ApiUtil.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/util/ApiUtil.java index af06e52a..604fb19f 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/util/ApiUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/util/ApiUtil.java @@ -1,7 +1,6 @@ package it.mwg.sicilia.sue.api.v1.util; import java.io.Serializable; -import java.util.Arrays; import java.util.Map; import java.util.Map.Entry; @@ -51,10 +50,20 @@ public class ApiUtil { return sb.toString(); } + public static String hyphenToCamelCase(String hyphen) { + + return toCamelCase(hyphen, '-'); + } + public static String underscoreToCamelCase(String underscore) { + return toCamelCase(underscore, '_'); + } + + private static String toCamelCase(String input, char separator) { + StringBuilder sb = new StringBuilder(); - for (String part : Arrays.asList(StringUtils.split(underscore, '_'))) { + for (String part : StringUtils.split(input, separator)) { if (!part.isEmpty()) { if (sb.length() > 0) { sb.append(part.substring(0, 1).toUpperCase()).append(part.substring(1).toLowerCase()); diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/util/DettPraticaUtil.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/util/PortosBoUtil.java similarity index 82% rename from liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/util/DettPraticaUtil.java rename to liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/util/PortosBoUtil.java index 485923b2..49fbd8aa 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/util/DettPraticaUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/util/PortosBoUtil.java @@ -2,7 +2,9 @@ package it.mwg.sicilia.sue.api.v1.util; import it.mwg.sicilia.sue.api.v1.bean.Value; import it.tref.liferay.portos.bo.model.DettPratica; +import it.tref.liferay.portos.bo.model.Provincia; import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil; import java.io.Serializable; import java.lang.reflect.Method; @@ -15,9 +17,11 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.StringPool; -public class DettPraticaUtil { +public class PortosBoUtil { private static final String NA_STRING = "NA"; private static final long NA_LONG = -1L; @@ -149,6 +153,19 @@ public class DettPraticaUtil { return FIELD_VALUES.get(fieldName); } + public static String getFieldFromError(String error) { + + if (ERROR_TO_FIELD.containsKey(error)) { + return ERROR_TO_FIELD.get(error); + } else { + String field = ApiUtil.hyphenToCamelCase(error); + if (FIELDS.contains(field)) { + return field; + } + } + return null; + } + private static void listOfPairs(String field, Serializable... values) { List list = new ArrayList<>(); @@ -205,6 +222,7 @@ public class DettPraticaUtil { "geoEvidenzeGeomorfiche", "geoOperaRilevante", "geoOpereDiSostegno", "geoPresenzaPrescrizioni"); private static final List TO_DOUBLE = Arrays.asList("ag", "dePrivata", "dePubblica"); private static final List TO_LONG_LIST = new ArrayList<>(); + private static final Map ERROR_TO_FIELD = new HashMap<>(); static { FIELD_TYPES = DettPraticaLocalServiceUtil.getDettPraticaFieldsTypes(); @@ -247,5 +265,36 @@ public class DettPraticaUtil { "Turist.-ricett."); toLongList("deUtilizzazione", false, ">65%", "30÷65%", "<30%"); toLongList("dePosizioneEdificio", false, "Isolato", "Interno", "D'estremità", "D'angolo"); + ERROR_TO_FIELD.put("Localizzazione geografica mancante", "(latitudine&longitudine)"); + ERROR_TO_FIELD + .put("Tipologia Costruttiva Mancante", + "(NuovaCostruzione|tcNuovaCostruzionePertinenza|tcCostruzioniEsistenti|tcManutOrdStraord|tcAltriInterventi)"); + } + + /* + * L'entità provincia di portos_bo_portlet ha un campo che si chiama provincia e ne rappresenta la denominazione. + * Quanto segue è un workaround al fatto che service builder non riesce a generare un finder che ritorna una entità + * Provincia prendendo come input una String provincia. + * + * public Provincia findByC_P(long companyId, String provincia) throws NoSuchProvinciaException, SystemException { + * Provincia provincia = fetchByC_P(companyId, provincia); ^^^^^^^^^ Duplicate local variable provincia + */ + private static final Map> province = new HashMap<>(); + + public static Provincia findProvinciaByCompanyIdDenominazione(long companyId, String denominazione) { + + if (!province.containsKey(companyId)) { + Map map = new HashMap<>(); + try { + for (Provincia provincia : ProvinciaLocalServiceUtil.findByCompanyId(companyId, QueryUtil.ALL_POS, + QueryUtil.ALL_POS)) { + map.put(provincia.getProvincia().toUpperCase(), provincia); + } + } catch (SystemException e) { + e.printStackTrace(); + } + province.put(companyId, map); + } + return province.get(companyId).get(denominazione.toUpperCase()); } } diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloImpl.java index c29ccb3e..869360be 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloImpl.java @@ -76,6 +76,18 @@ public class SportelloImpl extends SportelloBaseImpl { return encryptPassword(password).equals(getPassword()); } + @Override + public void setEncryptedPassword(String password) { + + String encrypted = encryptPassword(password); + if (!encrypted.equals(getPassword())) { + setPassword(encrypted); + setPasswordModifiedDate(new Date()); + setPasswordModifiedUserId(0); + setPasswordModifiedUserName("API User: " + getUserName()); + } + } + @Override public void setEncryptedPassword(String password, User user) { @@ -106,6 +118,7 @@ public class SportelloImpl extends SportelloBaseImpl { return getProvincia().getProvincia(); } + @Override public synchronized Comune getComune() throws PortalException, SystemException { if (Validator.isNull(comune)) { diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/service.properties index 8bd746a5..7c6adf2f 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=sicilia_sue - build.number=63 - build.date=1624450843603 + build.number=64 + build.date=1625842467767 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/ConfigurazioneConstants.java b/liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/ConfigurazioneConstants.java index 58553aed..4b180260 100644 --- a/liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/ConfigurazioneConstants.java +++ b/liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/ConfigurazioneConstants.java @@ -28,6 +28,7 @@ public class ConfigurazioneConstants { public static final String MAPPE_URL_IFRAME_FE = "conf.sismica.mappe.iframe.url.fe"; public static final String MAPPE_URL_IFRAME_BO = "conf.sismica.mappe.iframe.url.bo"; + public static final String MAPPE_URL_IFRAME_RICERCA = "conf.sismica.mappe.iframe.url.ricerca"; public static final String MAPPE_SHARED_SECRET = "conf.sismica.mappe.secret"; }