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 8ceaa64a..effdcc05 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
@@ -19,35 +19,59 @@ 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.StringPool;
+import com.liferay.portal.kernel.util.Validator;
+import com.liferay.portal.kernel.util.WebKeys;
+import com.liferay.portal.theme.ThemeDisplay;
public class MappeUtil {
private final static Log _log = LogFactoryUtil.getLog(MappeUtil.class);
- public static String getUrlFe(HttpServletRequest request, DettPratica dettPratica, Comune comune)
+ public static String getUrlFe(HttpServletRequest request, DettPratica dettPratica, Comune comune, boolean readOnly)
throws UnsupportedEncodingException, PortalException, SystemException {
- String baseUrl = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(comune.getCompanyId(),
+
+ ThemeDisplay td = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
+ long companyId = td.getCompanyId();
+
+ String baseUrl = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId,
ConfigurazioneConstants.MAPPE_URL_IFRAME_FE);
- return getUrlComune(request, baseUrl, dettPratica, comune);
+ return getUrlComune(request, baseUrl, dettPratica, comune, readOnly);
}
- public static String getUrlBo(HttpServletRequest request, DettPratica dettPratica, Comune comune)
+ public static String getUrlBo(HttpServletRequest request, DettPratica dettPratica, Comune comune, boolean readOnly)
throws UnsupportedEncodingException, PortalException, SystemException {
- String baseUrl = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(comune.getCompanyId(),
+
+ ThemeDisplay td = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
+ long companyId = td.getCompanyId();
+
+ String baseUrl = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId,
ConfigurazioneConstants.MAPPE_URL_IFRAME_BO);
- return getUrlComune(request, baseUrl, dettPratica, comune);
+ return getUrlComune(request, baseUrl, dettPratica, comune, readOnly);
}
private static String getUrlComune(HttpServletRequest request, String baseUrl, DettPratica dettPratica,
- Comune comune) throws UnsupportedEncodingException, PortalException, SystemException {
- long companyId = comune.getCompanyId();
+ Comune comune, boolean readOnly) throws UnsupportedEncodingException, PortalException, SystemException {
+
+ ThemeDisplay td = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
+ long companyId = td.getCompanyId();
String sharedSecret = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId,
ConfigurazioneConstants.MAPPE_SHARED_SECRET);
long date = new Date().getTime() / 1000;
String auth = DigestUtils.sha256Hex(date + sharedSecret + request.getServerName());
- String url = baseUrl.replace("{{COD_BELFIORE}}", urlEncode(comune.getCodiceBelfiore())).replace(
- "{{ESTREMI_CAT}}", urlEncode(dettPratica.getEstremiCatastali()));
+ String url = baseUrl;
+
+ if(Validator.isNotNull(comune))
+ url = url.replace("{{COD_BELFIORE}}", urlEncode(comune.getCodiceBelfiore()));
+ else
+ url = url.replace("{{COD_BELFIORE}}", "");
+
+ if(Validator.isNotNull(dettPratica))
+ url = url.replace("{{ESTREMI_CAT}}", urlEncode(dettPratica.getEstremiCatastali()));
+ else
+ url = url.replace("{{ESTREMI_CAT}}", "");
+
+ url = url.replace("{{READONLY}}", (readOnly ? "true" : "false"));
String query = StringPool.BLANK;
String[] parti = StringUtils.split(url, StringPool.QUESTION);
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties
index 11e81bf2..4bf3e497 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties
@@ -199,7 +199,6 @@ dp-ppp = Piano paesaggistico provinciale
dett-principali = Dettagli principali
dp = Piano paesaggistico provinciale
piano-paesaggistico = Piano paesaggistico provinciale
-dp-zona-sismica = Livello di tutela
paesaggio-locale = Contesto paesaggistico
livello-di-tutela = Livello di tutela
vincoli = Vincoli
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 b906d2fa..f482e965 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=3148
- build.date=1621869003568
+ build.number=3150
+ build.date=1621937915972
build.auto.upgrade=true
##
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp
index 5e0dcd52..04e1393a 100644
--- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp
+++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp
@@ -24,7 +24,7 @@ Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getT
Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId());
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia());
boolean isDisabledMap = ParamUtil.getBoolean(request, "isDisabledMap", false);
-String urlIframeMappe = MappeUtil.getUrlBo(request, dettPratica, comune);
+String urlIframeMappe = MappeUtil.getUrlBo(request, dettPratica, comune, true);
%>