diff --git a/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/.tern-project b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/.tern-project new file mode 100644 index 00000000..a185ba0d --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-audit-portlet/.tern-project @@ -0,0 +1 @@ +{"ide":{"scriptPaths":[]},"plugins":{"aui":{},"liferay":{},"yui":{}},"libs":["ecma5","browser"]} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml index 0589819b..71c7d22c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -70,153 +70,112 @@ it.tref.liferay.portos.bo.asset.ControlloPraticaAssetRendererFactory it.tref.liferay.portos.bo.workflow.ControlloPraticaWorkflowHandler - /css/main.css - - /js/main.js - + /css/main.css?v=1 + /js/main.js?v=2 fascicolo-portlet 2 /icon.png - - configuration - + configuration 1.5 - /css/main.css - - /js/main.js - - - tabelle-di-sistema-portlet - + /css/main.css?v=1 + /js/main.js?v=2 + tabelle-di-sistema-portlet 4 /icon.png 0 - /css/main.css - - /js/main.js - - - gestione-firme-portlet - + /css/main.css?v=1 + /js/main.js?v=2 + gestione-firme-portlet true 5 /icon.png - /css/main.css - - /js/main.js - - - doc-aggiuntiva-portlet - + /css/main.css?v=1 + /js/main.js?v=2 + doc-aggiuntiva-portlet 6 /icon.png 0 - /css/main.css - - /js/main.js - - - gestione-attivita - + /css/main.css?v=1 + /js/main.js?v=2 + gestione-attivita 7 /icon.png - /css/main.css - - /js/main.js - - - allegati-manuali-portlet - + /css/main.css?v=1 + /js/main.js?v=2 + allegati-manuali-portlet 8 /icon.png 0 - /css/main.css - - /js/main.js - - - gestione-attivita-istruttore-portlet - + /css/main.css?v=1 + /js/main.js?v=2 + gestione-attivita-istruttore-portlet 9 /icon.png - - carichi-di-lavoro-portlet - + carichi-di-lavoro-portlet true true 10 /icon.png - - tempistiche-portlet - + tempistiche-portlet true 11 /icon.png - - generate-protocollo-csv-portlet - + generate-protocollo-csv-portlet true 12 /icon.png - - configuration - + configuration 1.6 - - pending-pagamenti-portlet - + pending-pagamenti-portlet portos-administration /icon.png - - configuration - + configuration 1.6 - /css/main.css - - /js/main.js - - - portos-administration-portlet - + /css/main.css?v=1 + /js/main.js?v=2 + portos-administration-portlet + + + ricerca-posizione + /icon.png + /css/main.css?v=1 + /js/main.js?v=2 + ricerca-posizione-portlet 22 /icon.png - /css/main.css - - /js/main.js - + /css/main.css?v=1 + /js/main.js?v=2 22-portlet 13 /icon.png - /css/main.css - - /js/main.js - + /css/main.css?v=1 + /js/main.js?v=2 13-portlet diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml index 79593189..36cd5677 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml @@ -403,6 +403,38 @@ user + + ricerca-posizione + Ricerca per posizione + it.mwg.sismica.bo.portlet.RicercaPosizionePortlet + + view-template + /html/ricerca-posizione/view.jsp + + 0 + + text/html + view + + content.Language + + Ricerca per posizione + Ricerca posizione + + + + administrator + + + guest + + + power-user + + + user + + 22 Ricerca Protocollo diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml index be48a2c3..00a87b6e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml @@ -810,6 +810,10 @@ + + + + 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 new file mode 100644 index 00000000..d945b8ed --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/mwg/sismica/bo/util/MappeUtil.java @@ -0,0 +1,123 @@ +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.service.ConfigurazioneLocalServiceUtil; +import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants; + +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.Date; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.codec.digest.DigestUtils; +import org.apache.commons.lang.StringUtils; + +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.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, boolean readOnly) + throws UnsupportedEncodingException, PortalException, SystemException { + + 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, readOnly); + } + + public static String getUrlBo(HttpServletRequest request, DettPratica dettPratica, Comune comune, boolean readOnly) + throws UnsupportedEncodingException, PortalException, SystemException { + + 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, readOnly); + } + + private static String getUrlComune(HttpServletRequest request, + String baseUrl, DettPratica dettPratica, Comune comune, + boolean readOnly) throws UnsupportedEncodingException, + PortalException, SystemException { + + ThemeDisplay td = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); + long companyId = td.getCompanyId(); + + long intPraticaId = dettPratica.getIntPraticaId(); + IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); + + 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; + + 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}}", ""); + + String localizzazione = dettPratica.getLocalizzazioneGeografica(); + String lat = ""; + String lng = ""; + if(Validator.isNotNull(localizzazione)){ + String[] coordinate = StringUtils.split(localizzazione, "|"); + if(coordinate.length > 1){ + lat = coordinate[0]; + lng = coordinate[1]; + } + } + url = url.replace("{{LAT}}", lat); + url = url.replace("{{LNG}}", lng); + + url = url.replace("{{IDPRATICA}}", String.valueOf(intPraticaId)); + url = url.replace("{{NPRATICA}}", String.valueOf(intPratica.getNumeroProgetto())); + url = url.replace("{{READONLY}}", (readOnly ? "true" : "false")); + + String query = StringPool.BLANK; + String[] parti = StringUtils.split(url, StringPool.QUESTION); + if (parti.length > 1) { + query = parti[1]; + } + if (query == null) { + query = StringPool.BLANK; + } else if (!query.equals(StringPool.BLANK)) { + query += StringPool.AMPERSAND; + } + query += "date=" + date + "&auth=" + auth; + url = parti[0] + StringPool.QUESTION + query; + _log.info(url); + return url; + } + + private static String urlEncode(String str) { + String encoded; + try { + encoded = URLEncoder.encode(str, StringPool.UTF8); + } catch (UnsupportedEncodingException e) { + encoded = str; + } + return encoded; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPratica.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPratica.java index 08571e78..5f075c65 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPratica.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPratica.java @@ -41,4 +41,12 @@ public interface IntPratica extends IntPraticaModel, PersistedModel { throws com.liferay.portal.kernel.exception.SystemException; public int getTipoRichiesta(); + + public java.lang.String getIndirizzo() + throws com.liferay.portal.kernel.exception.SystemException; + + public java.lang.Integer calcolaDistanzaOrtodromica(double lat, double lng) + throws com.liferay.portal.kernel.exception.SystemException; + + public java.lang.Integer getDistanzaOrtodromica(); } \ 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/model/IntPraticaClp.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaClp.java index cf51a1fc..7d0d2895 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaClp.java @@ -87,6 +87,8 @@ public class IntPraticaClp extends BaseModelImpl attributes.put("tipoPratica", getTipoPratica()); attributes.put("territorioId", getTerritorioId()); attributes.put("tipoProcedura", getTipoProcedura()); + attributes.put("latitudine", getLatitudine()); + attributes.put("longitudine", getLongitudine()); attributes.put("dtAnnullamento", getDtAnnullamento()); attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId()); attributes.put("unitaOperativa", getUnitaOperativa()); @@ -182,6 +184,18 @@ public class IntPraticaClp extends BaseModelImpl setTipoProcedura(tipoProcedura); } + Double latitudine = (Double)attributes.get("latitudine"); + + if (latitudine != null) { + setLatitudine(latitudine); + } + + Double longitudine = (Double)attributes.get("longitudine"); + + if (longitudine != null) { + setLongitudine(longitudine); + } + Date dtAnnullamento = (Date)attributes.get("dtAnnullamento"); if (dtAnnullamento != null) { @@ -577,6 +591,52 @@ public class IntPraticaClp extends BaseModelImpl } } + @Override + public double getLatitudine() { + return _latitudine; + } + + @Override + public void setLatitudine(double latitudine) { + _latitudine = latitudine; + + if (_intPraticaRemoteModel != null) { + try { + Class clazz = _intPraticaRemoteModel.getClass(); + + Method method = clazz.getMethod("setLatitudine", double.class); + + method.invoke(_intPraticaRemoteModel, latitudine); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public double getLongitudine() { + return _longitudine; + } + + @Override + public void setLongitudine(double longitudine) { + _longitudine = longitudine; + + if (_intPraticaRemoteModel != null) { + try { + Class clazz = _intPraticaRemoteModel.getClass(); + + Method method = clazz.getMethod("setLongitudine", double.class); + + method.invoke(_intPraticaRemoteModel, longitudine); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + @Override public Date getDtAnnullamento() { return _dtAnnullamento; @@ -1125,6 +1185,25 @@ public class IntPraticaClp extends BaseModelImpl } } + @Override + public java.lang.String getIndirizzo() { + try { + String methodName = "getIndirizzo"; + + Class[] parameterTypes = new Class[] { }; + + Object[] parameterValues = new Object[] { }; + + java.lang.String returnObj = (java.lang.String)invokeOnRemoteModel(methodName, + parameterTypes, parameterValues); + + return returnObj; + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + @Override public java.lang.String getTitle(java.util.Locale locale, boolean completed) { try { @@ -1165,6 +1244,46 @@ public class IntPraticaClp extends BaseModelImpl } } + @Override + public java.lang.Integer getDistanzaOrtodromica() { + try { + String methodName = "getDistanzaOrtodromica"; + + Class[] parameterTypes = new Class[] { }; + + Object[] parameterValues = new Object[] { }; + + java.lang.Integer returnObj = (java.lang.Integer)invokeOnRemoteModel(methodName, + parameterTypes, parameterValues); + + return returnObj; + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + + @Override + public java.lang.Integer calcolaDistanzaOrtodromica(double lat, double lng) { + try { + String methodName = "calcolaDistanzaOrtodromica"; + + Class[] parameterTypes = new Class[] { + double.class, double.class + }; + + Object[] parameterValues = new Object[] { lat, lng }; + + java.lang.Integer returnObj = (java.lang.Integer)invokeOnRemoteModel(methodName, + parameterTypes, parameterValues); + + return returnObj; + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + @Override public int getTipoRichiesta() { try { @@ -1308,6 +1427,8 @@ public class IntPraticaClp extends BaseModelImpl clone.setTipoPratica(getTipoPratica()); clone.setTerritorioId(getTerritorioId()); clone.setTipoProcedura(getTipoProcedura()); + clone.setLatitudine(getLatitudine()); + clone.setLongitudine(getLongitudine()); clone.setDtAnnullamento(getDtAnnullamento()); clone.setDocPraticaAnnullamentoId(getDocPraticaAnnullamentoId()); clone.setUnitaOperativa(getUnitaOperativa()); @@ -1381,7 +1502,7 @@ public class IntPraticaClp extends BaseModelImpl @Override public String toString() { - StringBundler sb = new StringBundler(65); + StringBundler sb = new StringBundler(69); sb.append("{uuid="); sb.append(getUuid()); @@ -1405,6 +1526,10 @@ public class IntPraticaClp extends BaseModelImpl sb.append(getTerritorioId()); sb.append(", tipoProcedura="); sb.append(getTipoProcedura()); + sb.append(", latitudine="); + sb.append(getLatitudine()); + sb.append(", longitudine="); + sb.append(getLongitudine()); sb.append(", dtAnnullamento="); sb.append(getDtAnnullamento()); sb.append(", docPraticaAnnullamentoId="); @@ -1454,7 +1579,7 @@ public class IntPraticaClp extends BaseModelImpl @Override public String toXmlString() { - StringBundler sb = new StringBundler(100); + StringBundler sb = new StringBundler(106); sb.append(""); sb.append("it.tref.liferay.portos.bo.model.IntPratica"); @@ -1504,6 +1629,14 @@ public class IntPraticaClp extends BaseModelImpl "tipoProcedura"); + sb.append( + "latitudine"); + sb.append( + "longitudine"); sb.append( "dtAnnullamento private String _tipoPratica; private long _territorioId; private String _tipoProcedura; + private double _latitudine; + private double _longitudine; private Date _dtAnnullamento; private long _docPraticaAnnullamentoId; private int _unitaOperativa; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaModel.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaModel.java index 9fb60bc3..2301865a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaModel.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaModel.java @@ -251,6 +251,34 @@ public interface IntPraticaModel extends BaseModel, */ public void setTipoProcedura(String tipoProcedura); + /** + * Returns the latitudine of this int pratica. + * + * @return the latitudine of this int pratica + */ + public double getLatitudine(); + + /** + * Sets the latitudine of this int pratica. + * + * @param latitudine the latitudine of this int pratica + */ + public void setLatitudine(double latitudine); + + /** + * Returns the longitudine of this int pratica. + * + * @return the longitudine of this int pratica + */ + public double getLongitudine(); + + /** + * Sets the longitudine of this int pratica. + * + * @param longitudine the longitudine of this int pratica + */ + public void setLongitudine(double longitudine); + /** * Returns the dt annullamento of this int pratica. * diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaSoap.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaSoap.java index 9f134235..c5845650 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaSoap.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaSoap.java @@ -42,6 +42,8 @@ public class IntPraticaSoap implements Serializable { soapModel.setTipoPratica(model.getTipoPratica()); soapModel.setTerritorioId(model.getTerritorioId()); soapModel.setTipoProcedura(model.getTipoProcedura()); + soapModel.setLatitudine(model.getLatitudine()); + soapModel.setLongitudine(model.getLongitudine()); soapModel.setDtAnnullamento(model.getDtAnnullamento()); soapModel.setDocPraticaAnnullamentoId(model.getDocPraticaAnnullamentoId()); soapModel.setUnitaOperativa(model.getUnitaOperativa()); @@ -203,6 +205,22 @@ public class IntPraticaSoap implements Serializable { _tipoProcedura = tipoProcedura; } + public double getLatitudine() { + return _latitudine; + } + + public void setLatitudine(double latitudine) { + _latitudine = latitudine; + } + + public double getLongitudine() { + return _longitudine; + } + + public void setLongitudine(double longitudine) { + _longitudine = longitudine; + } + public Date getDtAnnullamento() { return _dtAnnullamento; } @@ -416,6 +434,8 @@ public class IntPraticaSoap implements Serializable { private String _tipoPratica; private long _territorioId; private String _tipoProcedura; + private double _latitudine; + private double _longitudine; private Date _dtAnnullamento; private long _docPraticaAnnullamentoId; private int _unitaOperativa; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaWrapper.java index ce896ef6..da3c0466 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaWrapper.java @@ -61,6 +61,8 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper { attributes.put("tipoPratica", getTipoPratica()); attributes.put("territorioId", getTerritorioId()); attributes.put("tipoProcedura", getTipoProcedura()); + attributes.put("latitudine", getLatitudine()); + attributes.put("longitudine", getLongitudine()); attributes.put("dtAnnullamento", getDtAnnullamento()); attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId()); attributes.put("unitaOperativa", getUnitaOperativa()); @@ -156,6 +158,18 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper { setTipoProcedura(tipoProcedura); } + Double latitudine = (Double)attributes.get("latitudine"); + + if (latitudine != null) { + setLatitudine(latitudine); + } + + Double longitudine = (Double)attributes.get("longitudine"); + + if (longitudine != null) { + setLongitudine(longitudine); + } + Date dtAnnullamento = (Date)attributes.get("dtAnnullamento"); if (dtAnnullamento != null) { @@ -550,6 +564,46 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper { _intPratica.setTipoProcedura(tipoProcedura); } + /** + * Returns the latitudine of this int pratica. + * + * @return the latitudine of this int pratica + */ + @Override + public double getLatitudine() { + return _intPratica.getLatitudine(); + } + + /** + * Sets the latitudine of this int pratica. + * + * @param latitudine the latitudine of this int pratica + */ + @Override + public void setLatitudine(double latitudine) { + _intPratica.setLatitudine(latitudine); + } + + /** + * Returns the longitudine of this int pratica. + * + * @return the longitudine of this int pratica + */ + @Override + public double getLongitudine() { + return _intPratica.getLongitudine(); + } + + /** + * Sets the longitudine of this int pratica. + * + * @param longitudine the longitudine of this int pratica + */ + @Override + public void setLongitudine(double longitudine) { + _intPratica.setLongitudine(longitudine); + } + /** * Returns the dt annullamento of this int pratica. * @@ -1204,6 +1258,23 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper { return _intPratica.getTipoRichiesta(); } + @Override + public java.lang.String getIndirizzo() + throws com.liferay.portal.kernel.exception.SystemException { + return _intPratica.getIndirizzo(); + } + + @Override + public java.lang.Integer calcolaDistanzaOrtodromica(double lat, double lng) + throws com.liferay.portal.kernel.exception.SystemException { + return _intPratica.calcolaDistanzaOrtodromica(lat, lng); + } + + @Override + public java.lang.Integer getDistanzaOrtodromica() { + return _intPratica.getDistanzaOrtodromica(); + } + @Override public boolean equals(Object obj) { if (this == obj) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java index 13a74e0c..d164e322 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java @@ -364,6 +364,17 @@ public interface IntPraticaLocalService extends BaseLocalService, public int countFascicoliNotProgetto() throws com.liferay.portal.kernel.exception.SystemException; + public int countByPosizione(double lat, double lng, int raggio) + throws com.liferay.portal.kernel.exception.SystemException; + + public java.util.List findByPosizione( + double lat, double lng, int raggio) + throws com.liferay.portal.kernel.exception.SystemException; + + public java.util.List findByPosizione( + double lat, double lng, int raggio, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) public it.tref.liferay.portos.bo.model.IntPratica addNumeroProgetto( long intPraticaId) @@ -400,6 +411,34 @@ public interface IntPraticaLocalService extends BaseLocalService, throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException; + public java.util.List findByCompanyIdSoggettoProgetti( + long companyId, long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + public int countByCompanyIdSoggettoProgetti(long companyId, long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + public java.util.List findByCompanyIdSoggettoArchivio( + long companyId, long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + public int countByCompanyIdSoggettoArchivio(long companyId, long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + public java.util.List findByCompanyIdSoggettoAltriProgetti( + long companyId, long soggettoId, int start, int end) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + public int countByCompanyIdSoggettoAltriProgetti(long companyId, + long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + public java.util.List findByCanAddFineLavori( long companyId, java.lang.String codiceFiscale, int start, int end) throws com.liferay.portal.kernel.exception.PortalException, diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java index 4555d530..a05b17c8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java @@ -177,212 +177,250 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { _methodParameterTypes30 = new String[] { }; - _methodName31 = "addNumeroProgetto"; + _methodName31 = "countByPosizione"; - _methodParameterTypes31 = new String[] { "long" }; + _methodParameterTypes31 = new String[] { "double", "double", "int" }; - _methodName32 = "sospendiPratica"; + _methodName32 = "findByPosizione"; - _methodParameterTypes32 = new String[] { "long", "boolean" }; + _methodParameterTypes32 = new String[] { "double", "double", "int" }; - _methodName33 = "cambiaTitolare"; + _methodName33 = "findByPosizione"; _methodParameterTypes33 = new String[] { + "double", "double", "int", "int", "int" + }; + + _methodName34 = "addNumeroProgetto"; + + _methodParameterTypes34 = new String[] { "long" }; + + _methodName35 = "sospendiPratica"; + + _methodParameterTypes35 = new String[] { "long", "boolean" }; + + _methodName36 = "cambiaTitolare"; + + _methodParameterTypes36 = new String[] { "long", "long", "com.liferay.portal.service.ServiceContext" }; - _methodName34 = "updateStatoPratica"; + _methodName37 = "updateStatoPratica"; + + _methodParameterTypes37 = new String[] { "long", "java.lang.String" }; + + _methodName38 = "findByC_UserId"; + + _methodParameterTypes38 = new String[] { "long", "long", "int", "int" }; + + _methodName39 = "countByC_UserId"; + + _methodParameterTypes39 = new String[] { "long", "long" }; + + _methodName40 = "updateStatus"; - _methodParameterTypes34 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes40 = new String[] { "long", "int" }; - _methodName35 = "findByC_UserId"; + _methodName41 = "findByCompanyIdSoggettoProgetti"; - _methodParameterTypes35 = new String[] { "long", "long", "int", "int" }; + _methodParameterTypes41 = new String[] { "long", "long" }; - _methodName36 = "countByC_UserId"; + _methodName42 = "countByCompanyIdSoggettoProgetti"; - _methodParameterTypes36 = new String[] { "long", "long" }; + _methodParameterTypes42 = new String[] { "long", "long" }; - _methodName37 = "updateStatus"; + _methodName43 = "findByCompanyIdSoggettoArchivio"; - _methodParameterTypes37 = new String[] { "long", "int" }; + _methodParameterTypes43 = new String[] { "long", "long" }; - _methodName38 = "findByCanAddFineLavori"; + _methodName44 = "countByCompanyIdSoggettoArchivio"; - _methodParameterTypes38 = new String[] { + _methodParameterTypes44 = new String[] { "long", "long" }; + + _methodName45 = "findByCompanyIdSoggettoAltriProgetti"; + + _methodParameterTypes45 = new String[] { "long", "long", "int", "int" }; + + _methodName46 = "countByCompanyIdSoggettoAltriProgetti"; + + _methodParameterTypes46 = new String[] { "long", "long" }; + + _methodName47 = "findByCanAddFineLavori"; + + _methodParameterTypes47 = new String[] { "long", "java.lang.String", "int", "int" }; - _methodName39 = "countByCanAddFineLavori"; + _methodName48 = "countByCanAddFineLavori"; - _methodParameterTypes39 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes48 = new String[] { "long", "java.lang.String" }; - _methodName40 = "findByCanAddCollaudo"; + _methodName49 = "findByCanAddCollaudo"; - _methodParameterTypes40 = new String[] { + _methodParameterTypes49 = new String[] { "long", "java.lang.String", "int", "int" }; - _methodName41 = "countByCanAddCollaudo"; + _methodName50 = "countByCanAddCollaudo"; - _methodParameterTypes41 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes50 = new String[] { "long", "java.lang.String" }; - _methodName42 = "search"; + _methodName51 = "search"; - _methodParameterTypes42 = new String[] { "java.util.List", "int", "int" }; + _methodParameterTypes51 = new String[] { "java.util.List", "int", "int" }; - _methodName43 = "countSearch"; + _methodName52 = "countSearch"; - _methodParameterTypes43 = new String[] { "java.util.List" }; + _methodParameterTypes52 = new String[] { "java.util.List" }; - _methodName44 = "searchWithIntPraticaId"; + _methodName53 = "searchWithIntPraticaId"; - _methodParameterTypes44 = new String[] { + _methodParameterTypes53 = new String[] { "java.util.List", "long", "int", "int" }; - _methodName45 = "allegaFileAnnullamento"; + _methodName54 = "allegaFileAnnullamento"; - _methodParameterTypes45 = new String[] { + _methodParameterTypes54 = new String[] { "long", "byte[][]", "java.lang.String", "java.lang.String", "com.liferay.portal.service.ServiceContext" }; - _methodName46 = "generateFileAnnullamento"; + _methodName55 = "generateFileAnnullamento"; - _methodParameterTypes46 = new String[] { + _methodParameterTypes55 = new String[] { "long", "com.liferay.portal.service.ServiceContext" }; - _methodName47 = "deleteFileAnnullamento"; + _methodName56 = "deleteFileAnnullamento"; - _methodParameterTypes47 = new String[] { "long" }; + _methodParameterTypes56 = new String[] { "long" }; - _methodName48 = "completeAnnullamento"; + _methodName57 = "completeAnnullamento"; - _methodParameterTypes48 = new String[] { "long" }; + _methodParameterTypes57 = new String[] { "long" }; - _methodName49 = "cambiaIstruttore"; + _methodName58 = "cambiaIstruttore"; - _methodParameterTypes49 = new String[] { "long", "long", "long" }; + _methodParameterTypes58 = new String[] { "long", "long", "long" }; - _methodName50 = "countCaricoLavoroCF"; + _methodName59 = "countCaricoLavoroCF"; - _methodParameterTypes50 = new String[] { + _methodParameterTypes59 = new String[] { "long", "java.lang.String", "java.lang.Long[][]" }; - _methodName51 = "countCaricoLavoroIstruttore"; + _methodName60 = "countCaricoLavoroIstruttore"; - _methodParameterTypes51 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes60 = new String[] { "long", "java.lang.String" }; - _methodName52 = "generateReportPratica"; + _methodName61 = "generateReportPratica"; - _methodParameterTypes52 = new String[] { + _methodParameterTypes61 = new String[] { "it.tref.liferay.portos.bo.model.IntPratica", "long" }; - _methodName53 = "updateModifiedDate"; + _methodName62 = "updateModifiedDate"; - _methodParameterTypes53 = new String[] { "long", "java.util.Date" }; + _methodParameterTypes62 = new String[] { "long", "java.util.Date" }; - _methodName54 = "countAutorizzazione"; + _methodName63 = "countAutorizzazione"; - _methodParameterTypes54 = new String[] { + _methodParameterTypes63 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName55 = "countSanatorie"; + _methodName64 = "countSanatorie"; - _methodParameterTypes55 = new String[] { + _methodParameterTypes64 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName56 = "countOpereMinoreImportanza"; + _methodName65 = "countOpereMinoreImportanza"; - _methodParameterTypes56 = new String[] { + _methodParameterTypes65 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName57 = "countDeposito"; + _methodName66 = "countDeposito"; - _methodParameterTypes57 = new String[] { + _methodParameterTypes66 = new String[] { "java.util.Date", "java.util.Date", "long", "boolean" }; - _methodName58 = "countVidimate"; + _methodName67 = "countVidimate"; - _methodParameterTypes58 = new String[] { + _methodParameterTypes67 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String", "boolean" }; - _methodName59 = "countControllo"; + _methodName68 = "countControllo"; - _methodParameterTypes59 = new String[] { + _methodParameterTypes68 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String", "boolean" }; - _methodName60 = "riparaWorkflow"; + _methodName69 = "riparaWorkflow"; - _methodParameterTypes60 = new String[] { }; + _methodParameterTypes69 = new String[] { }; - _methodName61 = "reIndexFascicolo"; + _methodName70 = "reIndexFascicolo"; - _methodParameterTypes61 = new String[] { + _methodParameterTypes70 = new String[] { "it.tref.liferay.portos.bo.model.IntPratica", "long" }; - _methodName62 = "reIndexFasciolo"; + _methodName71 = "reIndexFasciolo"; - _methodParameterTypes62 = new String[] { "java.lang.String", "long" }; + _methodParameterTypes71 = new String[] { "java.lang.String", "long" }; - _methodName63 = "reIndexFasciolo"; + _methodName72 = "reIndexFasciolo"; - _methodParameterTypes63 = new String[] { "long", "long" }; + _methodParameterTypes72 = new String[] { "long", "long" }; - _methodName64 = "findByNumeroProgetto"; + _methodName73 = "findByNumeroProgetto"; - _methodParameterTypes64 = new String[] { "java.lang.String" }; + _methodParameterTypes73 = new String[] { "java.lang.String" }; - _methodName65 = "findByTerritorioId"; + _methodName74 = "findByTerritorioId"; - _methodParameterTypes65 = new String[] { "long" }; + _methodParameterTypes74 = new String[] { "long" }; - _methodName66 = "reportTempisticheIstruttorieAvvisiAutorizzazioni"; + _methodName75 = "reportTempisticheIstruttorieAvvisiAutorizzazioni"; - _methodParameterTypes66 = new String[] { + _methodParameterTypes75 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String" }; - _methodName67 = "reportPraticheVidimate"; + _methodName76 = "reportPraticheVidimate"; - _methodParameterTypes67 = new String[] { + _methodParameterTypes76 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String" }; - _methodName68 = "countIngressiAutorizzazioni"; + _methodName77 = "countIngressiAutorizzazioni"; - _methodParameterTypes68 = new String[] { + _methodParameterTypes77 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName69 = "countIngressiDepositi"; + _methodName78 = "countIngressiDepositi"; - _methodParameterTypes69 = new String[] { + _methodParameterTypes78 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName70 = "countIngressiCO"; + _methodName79 = "countIngressiCO"; - _methodParameterTypes70 = new String[] { + _methodParameterTypes79 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName71 = "getOrganizationByIntPraticaId"; + _methodName80 = "getOrganizationByIntPraticaId"; - _methodParameterTypes71 = new String[] { "long" }; + _methodParameterTypes80 = new String[] { "long" }; } @Override @@ -1393,6 +1431,93 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { return ((Integer)returnObj).intValue(); } + @Override + public int countByPosizione(double lat, double lng, int raggio) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName31, + _methodParameterTypes31, new Object[] { lat, lng, raggio }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Integer)returnObj).intValue(); + } + + @Override + public java.util.List findByPosizione( + double lat, double lng, int raggio) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName32, + _methodParameterTypes32, new Object[] { lat, lng, raggio }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.util.List findByPosizione( + double lat, double lng, int raggio, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName33, + _methodParameterTypes33, + new Object[] { lat, lng, raggio, start, end }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + @Override public it.tref.liferay.portos.bo.model.IntPratica addNumeroProgetto( long intPraticaId) @@ -1401,8 +1526,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName31, - _methodParameterTypes31, new Object[] { intPraticaId }); + returnObj = _invokableLocalService.invokeMethod(_methodName34, + _methodParameterTypes34, new Object[] { intPraticaId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -1435,8 +1560,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName32, - _methodParameterTypes32, + returnObj = _invokableLocalService.invokeMethod(_methodName35, + _methodParameterTypes35, new Object[] { intPraticaId, sospesa }); } catch (Throwable t) { @@ -1471,8 +1596,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName33, - _methodParameterTypes33, + returnObj = _invokableLocalService.invokeMethod(_methodName36, + _methodParameterTypes36, new Object[] { intPraticaId, @@ -1512,8 +1637,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName34, - _methodParameterTypes34, + returnObj = _invokableLocalService.invokeMethod(_methodName37, + _methodParameterTypes37, new Object[] { intPraticaId, @@ -1550,8 +1675,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName35, - _methodParameterTypes35, + returnObj = _invokableLocalService.invokeMethod(_methodName38, + _methodParameterTypes38, new Object[] { companyId, userId, start, end }); } catch (Throwable t) { @@ -1579,8 +1704,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName36, - _methodParameterTypes36, new Object[] { companyId, userId }); + returnObj = _invokableLocalService.invokeMethod(_methodName39, + _methodParameterTypes39, new Object[] { companyId, userId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -1606,8 +1731,110 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { try { - _invokableLocalService.invokeMethod(_methodName37, - _methodParameterTypes37, new Object[] { intPraticaId, status }); + _invokableLocalService.invokeMethod(_methodName40, + _methodParameterTypes40, new Object[] { intPraticaId, status }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + } + + @Override + public java.util.List findByCompanyIdSoggettoProgetti( + long companyId, long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName41, + _methodParameterTypes41, + new Object[] { companyId, soggettoId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + public int countByCompanyIdSoggettoProgetti(long companyId, long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName42, + _methodParameterTypes42, + new Object[] { companyId, soggettoId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Integer)returnObj).intValue(); + } + + @Override + public java.util.List findByCompanyIdSoggettoArchivio( + long companyId, long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName43, + _methodParameterTypes43, + new Object[] { companyId, soggettoId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -1628,6 +1855,112 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { " is not a valid exception"); } } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + public int countByCompanyIdSoggettoArchivio(long companyId, long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName44, + _methodParameterTypes44, + new Object[] { companyId, soggettoId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Integer)returnObj).intValue(); + } + + @Override + public java.util.List findByCompanyIdSoggettoAltriProgetti( + long companyId, long soggettoId, int start, int end) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName45, + _methodParameterTypes45, + new Object[] { companyId, soggettoId, start, end }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + public int countByCompanyIdSoggettoAltriProgetti(long companyId, + long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName46, + _methodParameterTypes46, + new Object[] { companyId, soggettoId }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Integer)returnObj).intValue(); } @Override @@ -1638,8 +1971,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName38, - _methodParameterTypes38, + returnObj = _invokableLocalService.invokeMethod(_methodName47, + _methodParameterTypes47, new Object[] { companyId, @@ -1681,8 +2014,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName39, - _methodParameterTypes39, + returnObj = _invokableLocalService.invokeMethod(_methodName48, + _methodParameterTypes48, new Object[] { companyId, @@ -1720,8 +2053,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName40, - _methodParameterTypes40, + returnObj = _invokableLocalService.invokeMethod(_methodName49, + _methodParameterTypes49, new Object[] { companyId, @@ -1763,8 +2096,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName41, - _methodParameterTypes41, + returnObj = _invokableLocalService.invokeMethod(_methodName50, + _methodParameterTypes50, new Object[] { companyId, @@ -1801,8 +2134,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName42, - _methodParameterTypes42, + returnObj = _invokableLocalService.invokeMethod(_methodName51, + _methodParameterTypes51, new Object[] { ClpSerializer.translateInput(groupIds), @@ -1836,8 +2169,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName43, - _methodParameterTypes43, + returnObj = _invokableLocalService.invokeMethod(_methodName52, + _methodParameterTypes52, new Object[] { ClpSerializer.translateInput(groupIds) }); } catch (Throwable t) { @@ -1866,8 +2199,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName44, - _methodParameterTypes44, + returnObj = _invokableLocalService.invokeMethod(_methodName53, + _methodParameterTypes53, new Object[] { ClpSerializer.translateInput(groupIds), @@ -1908,8 +2241,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName45, - _methodParameterTypes45, + returnObj = _invokableLocalService.invokeMethod(_methodName54, + _methodParameterTypes54, new Object[] { intPraticaId, @@ -1959,8 +2292,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName46, - _methodParameterTypes46, + returnObj = _invokableLocalService.invokeMethod(_methodName55, + _methodParameterTypes55, new Object[] { intPraticaId, @@ -1999,8 +2332,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { try { - _invokableLocalService.invokeMethod(_methodName47, - _methodParameterTypes47, + _invokableLocalService.invokeMethod(_methodName56, + _methodParameterTypes56, new Object[] { docPraticaAnnullamentoId }); } catch (Throwable t) { @@ -2029,8 +2362,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { try { - _invokableLocalService.invokeMethod(_methodName48, - _methodParameterTypes48, new Object[] { intPraticaId }); + _invokableLocalService.invokeMethod(_methodName57, + _methodParameterTypes57, new Object[] { intPraticaId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -2059,8 +2392,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { try { - _invokableLocalService.invokeMethod(_methodName49, - _methodParameterTypes49, + _invokableLocalService.invokeMethod(_methodName58, + _methodParameterTypes58, new Object[] { intPraticaId, controlloPraticaId, istruttoreId }); } catch (Throwable t) { @@ -2092,8 +2425,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName50, - _methodParameterTypes50, + returnObj = _invokableLocalService.invokeMethod(_methodName59, + _methodParameterTypes59, new Object[] { ispettoreId, @@ -2132,8 +2465,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName51, - _methodParameterTypes51, + returnObj = _invokableLocalService.invokeMethod(_methodName60, + _methodParameterTypes60, new Object[] { ispettoreId, @@ -2167,8 +2500,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName52, - _methodParameterTypes52, + returnObj = _invokableLocalService.invokeMethod(_methodName61, + _methodParameterTypes61, new Object[] { ClpSerializer.translateInput(intPratica), @@ -2206,8 +2539,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName53, - _methodParameterTypes53, + returnObj = _invokableLocalService.invokeMethod(_methodName62, + _methodParameterTypes62, new Object[] { intPraticaId, @@ -2244,8 +2577,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName54, - _methodParameterTypes54, + returnObj = _invokableLocalService.invokeMethod(_methodName63, + _methodParameterTypes63, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2280,8 +2613,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName55, - _methodParameterTypes55, + returnObj = _invokableLocalService.invokeMethod(_methodName64, + _methodParameterTypes64, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2316,8 +2649,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName56, - _methodParameterTypes56, + returnObj = _invokableLocalService.invokeMethod(_methodName65, + _methodParameterTypes65, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2352,8 +2685,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName57, - _methodParameterTypes57, + returnObj = _invokableLocalService.invokeMethod(_methodName66, + _methodParameterTypes66, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2390,8 +2723,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName58, - _methodParameterTypes58, + returnObj = _invokableLocalService.invokeMethod(_methodName67, + _methodParameterTypes67, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2431,8 +2764,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName59, - _methodParameterTypes59, + returnObj = _invokableLocalService.invokeMethod(_methodName68, + _methodParameterTypes68, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2470,8 +2803,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName60, - _methodParameterTypes60, new Object[] { }); + returnObj = _invokableLocalService.invokeMethod(_methodName69, + _methodParameterTypes69, new Object[] { }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -2496,8 +2829,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { public void reIndexFascicolo( it.tref.liferay.portos.bo.model.IntPratica intPratica, long companyId) { try { - _invokableLocalService.invokeMethod(_methodName61, - _methodParameterTypes61, + _invokableLocalService.invokeMethod(_methodName70, + _methodParameterTypes70, new Object[] { ClpSerializer.translateInput(intPratica), companyId }); } catch (Throwable t) { @@ -2517,8 +2850,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { public void reIndexFasciolo(java.lang.String numeroProgetto, long companyId) throws com.liferay.portal.kernel.exception.SystemException { try { - _invokableLocalService.invokeMethod(_methodName62, - _methodParameterTypes62, + _invokableLocalService.invokeMethod(_methodName71, + _methodParameterTypes71, new Object[] { ClpSerializer.translateInput(numeroProgetto), @@ -2547,8 +2880,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { try { - _invokableLocalService.invokeMethod(_methodName63, - _methodParameterTypes63, + _invokableLocalService.invokeMethod(_methodName72, + _methodParameterTypes72, new Object[] { intPraticaId, companyId }); } catch (Throwable t) { @@ -2579,8 +2912,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName64, - _methodParameterTypes64, + returnObj = _invokableLocalService.invokeMethod(_methodName73, + _methodParameterTypes73, new Object[] { ClpSerializer.translateInput(numeroProgetto) }); } catch (Throwable t) { @@ -2609,8 +2942,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName65, - _methodParameterTypes65, new Object[] { territorioId }); + returnObj = _invokableLocalService.invokeMethod(_methodName74, + _methodParameterTypes74, new Object[] { territorioId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -2639,8 +2972,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName66, - _methodParameterTypes66, + returnObj = _invokableLocalService.invokeMethod(_methodName75, + _methodParameterTypes75, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2678,8 +3011,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName67, - _methodParameterTypes67, + returnObj = _invokableLocalService.invokeMethod(_methodName76, + _methodParameterTypes76, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2716,8 +3049,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName68, - _methodParameterTypes68, + returnObj = _invokableLocalService.invokeMethod(_methodName77, + _methodParameterTypes77, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2752,8 +3085,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName69, - _methodParameterTypes69, + returnObj = _invokableLocalService.invokeMethod(_methodName78, + _methodParameterTypes78, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2788,8 +3121,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName70, - _methodParameterTypes70, + returnObj = _invokableLocalService.invokeMethod(_methodName79, + _methodParameterTypes79, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2825,8 +3158,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName71, - _methodParameterTypes71, new Object[] { intPraticaId }); + returnObj = _invokableLocalService.invokeMethod(_methodName80, + _methodParameterTypes80, new Object[] { intPraticaId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -2994,4 +3327,22 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { private String[] _methodParameterTypes70; private String _methodName71; private String[] _methodParameterTypes71; + private String _methodName72; + private String[] _methodParameterTypes72; + private String _methodName73; + private String[] _methodParameterTypes73; + private String _methodName74; + private String[] _methodParameterTypes74; + private String _methodName75; + private String[] _methodParameterTypes75; + private String _methodName76; + private String[] _methodParameterTypes76; + private String _methodName77; + private String[] _methodParameterTypes77; + private String _methodName78; + private String[] _methodParameterTypes78; + private String _methodName79; + private String[] _methodParameterTypes79; + private String _methodName80; + private String[] _methodParameterTypes80; } \ 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/IntPraticaLocalServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceUtil.java index 5a03fa79..d2c0704a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceUtil.java @@ -407,6 +407,23 @@ public class IntPraticaLocalServiceUtil { return getService().countFascicoliNotProgetto(); } + public static int countByPosizione(double lat, double lng, int raggio) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().countByPosizione(lat, lng, raggio); + } + + public static java.util.List findByPosizione( + double lat, double lng, int raggio) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().findByPosizione(lat, lng, raggio); + } + + public static java.util.List findByPosizione( + double lat, double lng, int raggio, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().findByPosizione(lat, lng, raggio, start, end); + } + public static it.tref.liferay.portos.bo.model.IntPratica addNumeroProgetto( long intPraticaId) throws com.liferay.portal.kernel.exception.PortalException, @@ -454,6 +471,55 @@ public class IntPraticaLocalServiceUtil { getService().updateStatus(intPraticaId, status); } + public static java.util.List findByCompanyIdSoggettoProgetti( + long companyId, long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService() + .findByCompanyIdSoggettoProgetti(companyId, soggettoId); + } + + public static int countByCompanyIdSoggettoProgetti(long companyId, + long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService() + .countByCompanyIdSoggettoProgetti(companyId, soggettoId); + } + + public static java.util.List findByCompanyIdSoggettoArchivio( + long companyId, long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService() + .findByCompanyIdSoggettoArchivio(companyId, soggettoId); + } + + public static int countByCompanyIdSoggettoArchivio(long companyId, + long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService() + .countByCompanyIdSoggettoArchivio(companyId, soggettoId); + } + + public static java.util.List findByCompanyIdSoggettoAltriProgetti( + long companyId, long soggettoId, int start, int end) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService() + .findByCompanyIdSoggettoAltriProgetti(companyId, soggettoId, + start, end); + } + + public static int countByCompanyIdSoggettoAltriProgetti(long companyId, + long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService() + .countByCompanyIdSoggettoAltriProgetti(companyId, soggettoId); + } + public static java.util.List findByCanAddFineLavori( long companyId, java.lang.String codiceFiscale, int start, int end) throws com.liferay.portal.kernel.exception.PortalException, diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java index 35e0ea12..8615c84f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java @@ -434,6 +434,27 @@ public class IntPraticaLocalServiceWrapper implements IntPraticaLocalService, return _intPraticaLocalService.countFascicoliNotProgetto(); } + @Override + public int countByPosizione(double lat, double lng, int raggio) + throws com.liferay.portal.kernel.exception.SystemException { + return _intPraticaLocalService.countByPosizione(lat, lng, raggio); + } + + @Override + public java.util.List findByPosizione( + double lat, double lng, int raggio) + throws com.liferay.portal.kernel.exception.SystemException { + return _intPraticaLocalService.findByPosizione(lat, lng, raggio); + } + + @Override + public java.util.List findByPosizione( + double lat, double lng, int raggio, int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return _intPraticaLocalService.findByPosizione(lat, lng, raggio, start, + end); + } + @Override public it.tref.liferay.portos.bo.model.IntPratica addNumeroProgetto( long intPraticaId) @@ -490,6 +511,58 @@ public class IntPraticaLocalServiceWrapper implements IntPraticaLocalService, _intPraticaLocalService.updateStatus(intPraticaId, status); } + @Override + public java.util.List findByCompanyIdSoggettoProgetti( + long companyId, long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _intPraticaLocalService.findByCompanyIdSoggettoProgetti(companyId, + soggettoId); + } + + @Override + public int countByCompanyIdSoggettoProgetti(long companyId, long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _intPraticaLocalService.countByCompanyIdSoggettoProgetti(companyId, + soggettoId); + } + + @Override + public java.util.List findByCompanyIdSoggettoArchivio( + long companyId, long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _intPraticaLocalService.findByCompanyIdSoggettoArchivio(companyId, + soggettoId); + } + + @Override + public int countByCompanyIdSoggettoArchivio(long companyId, long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _intPraticaLocalService.countByCompanyIdSoggettoArchivio(companyId, + soggettoId); + } + + @Override + public java.util.List findByCompanyIdSoggettoAltriProgetti( + long companyId, long soggettoId, int start, int end) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _intPraticaLocalService.findByCompanyIdSoggettoAltriProgetti(companyId, + soggettoId, start, end); + } + + @Override + public int countByCompanyIdSoggettoAltriProgetti(long companyId, + long soggettoId) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _intPraticaLocalService.countByCompanyIdSoggettoAltriProgetti(companyId, + soggettoId); + } + @Override public java.util.List findByCanAddFineLavori( long companyId, java.lang.String codiceFiscale, int start, int end) 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 b0562ef7..bce79574 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,8 +452,8 @@ 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.getDcFoglio())) + notCompleted.add("Foglio mancante");*/ if (Validator.isNull(dettPratica.getDcParticelle()) || dettPratica.getLocalizzazioneGeografica().startsWith("||")) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/tables.sql b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/tables.sql index 7e955c69..925b805a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/tables.sql +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/tables.sql @@ -562,6 +562,8 @@ create table portos_bo_IntPratica ( tipoPratica VARCHAR(75) null, territorioId LONG, tipoProcedura VARCHAR(75) null, + latitudine DOUBLE, + longitudine DOUBLE, dtAnnullamento DATE null, docPraticaAnnullamentoId LONG, unitaOperativa INTEGER, diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml index 9fb2a03e..65863014 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml @@ -590,6 +590,8 @@ + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml index 9b6f27d9..5f26baa1 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml @@ -641,6 +641,8 @@ 2 + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml index b30b09c7..18a0be49 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml @@ -750,6 +750,8 @@ + + TIMESTAMP diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Language.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Language.properties index 9cf136f1..f177631a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Language.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Language.properties @@ -43,6 +43,8 @@ soggetto_title_recapiti = Recapiti n-progetto = Numero progetto titolare-digitale = Titolare tecnico-istruttore = Istruttore +distanza = Distanza [A] +distanza-tooltip = A: Distanza ortodromica espressa in metri #Portlet amministazione: il campo deve corrispondere al nome delle relative cartelle in html/tabs stato_tabelle = Stato delle Tabelle @@ -323,4 +325,8 @@ Approvato = Approvato NonApprovato = Non approvato label-integrazione-05 = Richiesta Integrazione -label-integrazione-13 = Variante \ No newline at end of file +label-integrazione-13 = Variante + +ricerca-posizione = Ricerca per posizione +ricerca-indirizzo = Ricerca per indirizzo +ricerca-progetto = Ricerca per progetto 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 85103afa..31b8375d 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 @@ -195,10 +195,10 @@ dp-variante = Dettagli Variante dp-variante-sostanziale = sostanziale dp-variante-non-sostanziale = non sostanziale +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 @@ -229,6 +229,7 @@ dp-allegato = Allegato dp-particelle = Particelle dp-lat= Latitudine dp-long= Longitudine +dp-raggio = Raggio di ricerca opera-conforme = Opera conforme @@ -308,9 +309,9 @@ cl-rischio-post-int-16 = G* interv-fin-pub = L'intervento è oggetto di Finanziamento Pubblico ai sensi del D.Lgs. 18/04/2016 n. 50 (obbligo documento A24 o asseverazione di esclusione/non assoggettabilità al procedimento di verifica preventiva dell’interesse archeologico) interv-fin-pub-desc = Descrizione intervento oggetto di Finanziamento Pubblico interv-no-viarch = I lavori in progetto, rientranti nell’ambito di applicazione del D.Lgs. 50/2016, sono esclusi e/o non assoggettati al procedimento di verifica preventiva dell’interesse archeologico, ex art. 25 del D.Lgs. 50/2016, poiché: -interv-in-area-di-interesse = L’area oggetto dell’intervento:
è già dichiarata di interesse archeologico, ai sensi degli artt. 10 e/o 142, comma 1 lettera m, del D.Lgs. 42/2004;
e/o è classificata come parco archeologico, ai sensi dell’art. 101 del D.Lgs. 42/2004;
e/o è di documentato interesse archeologico;
e/o è contigua alle suddette aree. -interv-non-modificante = Si tratta di intervento che non comporta:
mutamento nell’aspetto esteriore e/o nello stato e dei luoghi,
e/o movimentazioni di terreno (comprese scarificazioni e impianto e/o reimpianto di essenze vegetali);
e/o nuove edificazioni (anche se realizzate nell’ambito della ristrutturazione di manufatti esistenti);
e/o scavi a quote diverse da quelle già impegnate da manufatti esistenti. -interv-non-assoggettabile = le opere previste in progetto non sono assoggettabili al Codice dei Contratti (D.Lgs. 50/2016). +interv-in-area-di-interesse = L’area oggetto dell’intervento: è già dichiarata di interesse archeologico, ai sensi degli artt. 10 e/o 142, comma 1 lettera m, del D.Lgs. 42/2004; e/o è classificata come parco archeologico, ai sensi dell’art. 101 del D.Lgs. 42/2004; e/o è di documentato interesse archeologico; e/o è contigua alle suddette aree. +interv-non-modificante = Si tratta di intervento che non comporta: mutamento nell’aspetto esteriore e/o nello stato e dei luoghi, e/o movimentazioni di terreno (comprese scarificazioni e impianto e/o reimpianto di essenze vegetali); e/o nuove edificazioni (anche se realizzate nell’ambito della ristrutturazione di manufatti esistenti); e/o scavi a quote diverse da quelle già impegnate da manufatti esistenti. +interv-non-assoggettabile = Le opere previste in progetto non sono assoggettabili al Codice dei Contratti (D.Lgs. 50/2016). sanatorie-obbligatorie = Selezionare almeno una Sanatoria Edilizia ### DESTINAZIONE (RIFERIMENTO AL REGOLAMENTO N.36/R DEL 9/7/2009, ALL.A) @@ -1318,5 +1319,17 @@ tipo_procedura_Q9 = Accertamento di compatibilità paesaggistica per istanze di label_procedura_Q10 = 10 tipo_procedura_Q10 = Certificazione di sussistenza vincoli +mappe-bbcc = Mappe BBCC +mappe-openstreetmap = OpenStreetmap +#tipo_procedura_Q11 = 1) Autorizzazione per interventi su Beni Culturali mobili +#tipo_procedura_Q12 = 2) Autorizzazione per interventi su Beni Culturali immobili +#tipo_procedura_Q13 = 3) Verifica preventiva dell’interesse archeologico +#tipo_procedura_Q14 = 4) Autorizzazione prevista dagli strumenti urbanistici per interventi in aree e immobili non assoggettati a tutela ai sensi del D.Lgs. 42/2004 (c.d. centri storici) +#tipo_procedura_Q15 = 5) Autorizzazione per "Settori Speciali" +#tipo_procedura_Q16 = 6) Autorizzazione paesaggistica +#tipo_procedura_Q17 = 7) Autorizzazione paesaggistica per interventi di lieve entità +#tipo_procedura_Q18 = 8) Accertamento di compatibilità paesaggistica +#tipo_procedura_Q19 = 9) Condono Edilizio + sanatoria-edilizia = Sanatoria edilizia intervento-voce-p7 = L.R. 5/2019, art. 3, allegato B: intervento alla voce B 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 new file mode 100644 index 00000000..15f0c4a8 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/RicercaPosizionePortlet.java @@ -0,0 +1,133 @@ +package it.mwg.sismica.bo.portlet; + +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.DettPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.PortletException; +import javax.portlet.ResourceRequest; +import javax.portlet.ResourceResponse; + +import org.apache.commons.lang.StringUtils; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.json.JSONArray; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.ParamUtil; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.service.ServiceContext; +import com.liferay.portal.service.ServiceContextFactory; +import com.liferay.util.bridges.mvc.MVCPortlet; + +public class RicercaPosizionePortlet extends MVCPortlet { + private static final Log _log = LogFactoryUtil.getLog(RicercaPosizionePortlet.class); + + @SuppressWarnings("serial") + private static final List campi = new ArrayList() { + { + add("tabs1"); + add("numeroProgetto"); + add("provincia"); + add("comune"); + add("via"); + add("lat"); + add("long"); + add("raggio"); + } + }; + + 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); + } + } + + public void localizzaProgetto(ActionRequest actionRequest, ActionResponse actionResponse) + throws IOException, SystemException { + String numeroProgetto = ParamUtil.getString(actionRequest, "numeroProgetto"); + JSONObject object = JSONFactoryUtil.createJSONObject(); + if (Validator.isNotNull(numeroProgetto)) { + IntPratica pratica = IntPraticaLocalServiceUtil.findByNumeroProgetto(numeroProgetto); + if (Validator.isNotNull(pratica)) { + DettPratica dett = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(pratica + .getIntPraticaId()); + if (Validator.isNotNull(dett)) { + String localizzazione = dett.getLocalizzazioneGeografica(); + if (Validator.isNotNull(localizzazione)) { + String[] parti = StringUtils.split(localizzazione, '|'); + if (parti.length > 1) { + object.put("lat", Double.valueOf(parti[0])); + object.put("lng", Double.valueOf(parti[1])); + } + } + + } + } + } + writeJSON(actionRequest, actionResponse, object); + } + + @Override + public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) + throws IOException, PortletException { + String id = resourceRequest.getResourceID(); + ServiceContext serviceContext; + try { + serviceContext = ServiceContextFactory.getInstance(resourceRequest); + long companyId = serviceContext.getCompanyId(); + JSONArray array = JSONFactoryUtil.createJSONArray(); + switch (id) { + case "province": + for (String codice : TerritorioLocalServiceUtil.getActiveProvince()) { + JSONObject object = JSONFactoryUtil.createJSONObject(); + Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(companyId, codice); + object.put("id", provincia.getCodiceProvincia()); + object.put("nome", provincia.getProvincia()); + + array.put(object); + } + writeJSON(resourceRequest, resourceResponse, array); + break; + case "comuni": + String provinciaId = ParamUtil.getString(resourceRequest, "provinciaId"); + if (Validator.isNotNull(provinciaId)) { + List comuni = TerritorioLocalServiceUtil + .getActiveComuniByCodiceProvincia(provinciaId); + for (long comuneId : comuni) { + JSONObject object = JSONFactoryUtil.createJSONObject(); + Comune comune = ComuneLocalServiceUtil.getComune(comuneId); + object.put("id", comune.getComuneId()); + object.put("nome", comune.getDenominazione()); + + array.put(object); + } + } + writeJSON(resourceRequest, resourceResponse, array); + break; + default: + super.serveResource(resourceRequest, resourceResponse); + } + } catch (PortalException | SystemException e) { + e.printStackTrace(); + } + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java index 6e60362e..8175c8ae 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java @@ -15,6 +15,7 @@ import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DocAggiuntiva; import it.tref.liferay.portos.bo.model.DocPratica; import it.tref.liferay.portos.bo.model.FineLavori; +import it.tref.liferay.portos.bo.model.HistoryWorkflowAction; import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.ParereGeologo; @@ -32,6 +33,7 @@ import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DocAggiuntivaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.FineLavoriLocalServiceUtil; +import it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalServiceUtil; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil; import it.tref.liferay.portos.bo.service.ParereGeologoLocalServiceUtil; @@ -141,7 +143,9 @@ import com.liferay.portlet.messageboards.model.MBThread; import com.liferay.portlet.messageboards.service.MBDiscussionLocalServiceUtil; import com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil; import com.liferay.portlet.messageboards.service.MBThreadLocalServiceUtil; +import com.liferay.portlet.ratings.model.RatingsEntry; import com.liferay.portlet.ratings.model.RatingsStats; +import com.liferay.portlet.ratings.service.RatingsEntryLocalServiceUtil; import com.liferay.portlet.ratings.service.RatingsStatsLocalServiceUtil; import com.liferay.portlet.wiki.model.WikiNode; import com.liferay.portlet.wiki.service.WikiNodeLocalServiceUtil; @@ -232,8 +236,10 @@ public class ManutenzioneDatabase { .getWorkflowInstanceLink(companyId, groupId, ControlloPratica.class.getName(), controllo.getPrimaryKey()); long workflowInstanceId = workflowInstancelink.getWorkflowInstanceId(); - WorkflowInstance workflowInstance = WorkflowInstanceManagerUtil.getWorkflowInstance( - controllo.getCompanyId(), workflowInstanceId); + // WorkflowInstance workflowInstance = + // WorkflowInstanceManagerUtil + // .getWorkflowInstance(controllo.getCompanyId(), + // workflowInstanceId); List types = new ArrayList<>(); types.add(WorkflowLog.TASK_ASSIGN); logs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(companyId, @@ -296,11 +302,13 @@ public class ManutenzioneDatabase { esitoLog(esito, svuotaEmailAttachment()); esitoLog(esito, svuotaFineLavori()); esitoLog(esito, svuotaGroup(companyId)); + esitoLog(esito, svuotaHistoryWorkflowAction()); esitoLog(esito, svuotaMBDiscussion(companyId)); esitoLog(esito, svuotaMBMessage(companyId)); esitoLog(esito, svuotaMBThread()); esitoLog(esito, svuotaPagamento(companyId)); esitoLog(esito, svuotaParereGeologo()); + esitoLog(esito, svuotaRatingsEntry()); esitoLog(esito, svuotaRatingsStats(companyId)); esitoLog(esito, svuotaResourcePermission(companyId)); esitoLog(esito, svuotaSoggetto()); @@ -308,6 +316,7 @@ public class ManutenzioneDatabase { esitoLog(esito, svuotaSyncDLObject()); esitoLog(esito, svuotaSystemEvent(companyId)); esitoLog(esito, svuotaTempistica()); + esitoLog(esito, svuotaWorkflowInstance()); return esito; } @@ -409,7 +418,8 @@ public class ManutenzioneDatabase { int rimossi = 0; fileEntries = DLAppServiceUtil.getFileEntries(repositoryId, folderId, start, start + SLICE); for (FileEntry fileEntry : fileEntries) { - String[] parti = StringUtil.split(fileEntry.getTitle(), '_'); + String[] parti = StringUtil.split(fileEntry.getTitle() + .replaceAll("\\.p7m$", StringPool.BLANK), '_'); String strId1 = parti[0]; String tipo = StringPool.BLANK; String strId2 = StringPool.BLANK; @@ -422,6 +432,11 @@ public class ManutenzioneDatabase { tipo = parti[1] + StringPool.UNDERLINE + parti[2]; strId2 = parti[3]; break; + case 5: + if (parti[4].equals("protocollato")) { + tipo = parti[1] + StringPool.UNDERLINE + parti[2]; + strId2 = parti[3]; + } } if ((strId1.length() == 10) && (strId2.length() > 0) && SismicaUtil.isLong(strId1) && SismicaUtil.isLong(strId2)) { @@ -434,7 +449,11 @@ public class ManutenzioneDatabase { rimossi++; } break; + case "AI_B": case "CO_B": + case "IN_B": + case "IN_F": + case "MA_F": if (!avvisiFileEntries.contains(fileEntry.getFileEntryId())) { DLAppLocalServiceUtil.deleteFileEntry(fileEntry.getFileEntryId()); cancellati++; @@ -774,6 +793,26 @@ public class ManutenzioneDatabase { return "Cancellati " + cancellati + " Group"; } + private static String svuotaHistoryWorkflowAction() throws SystemException { + int start = 0; + int cancellati = 0; + List actions = null; + do { + int rimossi = 0; + actions = HistoryWorkflowActionLocalServiceUtil.getHistoryWorkflowActions(start, start + SLICE); + for (HistoryWorkflowAction action : actions) { + if (!esiste(INTPRATICA_CLASS_NAME, action.getIntPraticaId()) + || !esiste(DETTPRATICA_CLASS_NAME, action.getDettPraticaId())) { + HistoryWorkflowActionLocalServiceUtil.deleteHistoryWorkflowAction(action); + cancellati++; + rimossi++; + } + } + start += SLICE - rimossi; + } while (actions.size() > 0); + return "Cancellati " + cancellati + " HistoryWorkflowAction"; + } + private static String svuotaMBDiscussion(long companyId) throws SystemException { int start = 0; int cancellati = 0; @@ -878,6 +917,25 @@ public class ManutenzioneDatabase { return "Cancellati " + cancellati + " ParereGeologo"; } + private static String svuotaRatingsEntry() throws SystemException { + int start = 0; + int cancellati = 0; + List entries = null; + do { + int rimossi = 0; + entries = RatingsEntryLocalServiceUtil.getRatingsEntries(start, start + SLICE); + for (RatingsEntry entry : entries) { + if (!esiste(entry.getClassName(), entry.getClassPK())) { + RatingsEntryLocalServiceUtil.deleteRatingsEntry(entry); + cancellati++; + rimossi++; + } + } + start += SLICE - rimossi; + } while (entries.size() > 0); + return "Cancellati " + cancellati + " RatingsEntry"; + } + private static String svuotaRatingsStats(long companyId) throws SystemException { int start = 0; int cancellati = 0; @@ -1066,6 +1124,37 @@ public class ManutenzioneDatabase { return "Cancellati " + cancellati + " User"; } + private static String svuotaWorkflowInstance() throws SystemException, PortalException { + int start = 0; + int cancellati = 0; + List links = null; + do { + int rimossi = 0; + links = WorkflowInstanceLinkLocalServiceUtil.getWorkflowInstanceLinks(start, start + SLICE); + for (WorkflowInstanceLink link : links) { + if (!esiste(link.getClassName(), link.getClassPK())) { + _log.info("Manca " + link.getClassName() + " " + link.getClassPK()); + WorkflowInstance instance = null; + try { + instance = WorkflowInstanceManagerUtil.getWorkflowInstance(link.getCompanyId(), + link.getWorkflowInstanceId()); + } catch (PortalException e) { + } + if (Validator.isNull(instance)) { + WorkflowInstanceLinkLocalServiceUtil.deleteWorkflowInstanceLink(link); + } else { + WorkflowInstanceManagerUtil.deleteWorkflowInstance(link.getCompanyId(), + instance.getWorkflowInstanceId()); + } + cancellati++; + rimossi++; + } + } + start += SLICE - rimossi; + } while (links.size() > 0); + return "Cancellati " + cancellati + " WorkflowInstance"; + } + private static boolean esiste(String className, long classPK) throws SystemException { return esiste(className, classPK, 0); } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/CollaudoImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/CollaudoImpl.java index ec37c12f..0ddda0f1 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/CollaudoImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/CollaudoImpl.java @@ -43,9 +43,12 @@ public class CollaudoImpl extends CollaudoBaseImpl { /* * NOTE FOR DEVELOPERS: * - * Never reference this class directly. All methods that expect a collaudo model instance should use the {@link + * Never reference this class directly. All methods that expect a collaudo + * model instance should use the {@link * it.tref.liferay.portos.bo.model.Collaudo} interface instead. */ + public CollaudoImpl() { + } private static final Log _log = LogFactoryUtil.getLog(CollaudoImpl.class); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DelegaImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DelegaImpl.java index 8028ea06..f984bd1e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DelegaImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/DelegaImpl.java @@ -35,8 +35,11 @@ import com.liferay.portal.kernel.util.Validator; @SuppressWarnings("serial") public class DelegaImpl extends DelegaBaseImpl { /* - * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a delega model instance should - * use the {@link it.tref.liferay.portos.bo.model.Delega} interface instead. + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a delega + * model instance should use the {@link + * it.tref.liferay.portos.bo.model.Delega} interface instead. */ public DelegaImpl() { } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/FineLavoriImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/FineLavoriImpl.java index 6fcd916c..bb940a75 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/FineLavoriImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/FineLavoriImpl.java @@ -41,8 +41,11 @@ import com.liferay.portal.kernel.util.Validator; @SuppressWarnings("serial") public class FineLavoriImpl extends FineLavoriBaseImpl { /* - * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a fine lavori model instance - * should use the {@link it.tref.liferay.portos.bo.model.FineLavori} interface instead. + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a fine + * lavori model instance should use the {@link + * it.tref.liferay.portos.bo.model.FineLavori} interface instead. */ private static final Log _log = LogFactoryUtil.getLog(FineLavoriImpl.class); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaCacheModel.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaCacheModel.java index 8815bd5b..f6687c92 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaCacheModel.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaCacheModel.java @@ -38,7 +38,7 @@ public class IntPraticaCacheModel implements CacheModel, Externalizable { @Override public String toString() { - StringBundler sb = new StringBundler(65); + StringBundler sb = new StringBundler(69); sb.append("{uuid="); sb.append(uuid); @@ -62,6 +62,10 @@ public class IntPraticaCacheModel implements CacheModel, sb.append(territorioId); sb.append(", tipoProcedura="); sb.append(tipoProcedura); + sb.append(", latitudine="); + sb.append(latitudine); + sb.append(", longitudine="); + sb.append(longitudine); sb.append(", dtAnnullamento="); sb.append(dtAnnullamento); sb.append(", docPraticaAnnullamentoId="); @@ -163,6 +167,9 @@ public class IntPraticaCacheModel implements CacheModel, intPraticaImpl.setTipoProcedura(tipoProcedura); } + intPraticaImpl.setLatitudine(latitudine); + intPraticaImpl.setLongitudine(longitudine); + if (dtAnnullamento == Long.MIN_VALUE) { intPraticaImpl.setDtAnnullamento(null); } @@ -255,6 +262,8 @@ public class IntPraticaCacheModel implements CacheModel, tipoPratica = objectInput.readUTF(); territorioId = objectInput.readLong(); tipoProcedura = objectInput.readUTF(); + latitudine = objectInput.readDouble(); + longitudine = objectInput.readDouble(); dtAnnullamento = objectInput.readLong(); docPraticaAnnullamentoId = objectInput.readLong(); unitaOperativa = objectInput.readInt(); @@ -319,6 +328,8 @@ public class IntPraticaCacheModel implements CacheModel, objectOutput.writeUTF(tipoProcedura); } + objectOutput.writeDouble(latitudine); + objectOutput.writeDouble(longitudine); objectOutput.writeLong(dtAnnullamento); objectOutput.writeLong(docPraticaAnnullamentoId); objectOutput.writeInt(unitaOperativa); @@ -379,6 +390,8 @@ public class IntPraticaCacheModel implements CacheModel, public String tipoPratica; public long territorioId; public String tipoProcedura; + public double latitudine; + public double longitudine; public long dtAnnullamento; public long docPraticaAnnullamentoId; public int unitaOperativa; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java index 17103419..5cf0c8f3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java @@ -12,12 +12,27 @@ package it.tref.liferay.portos.bo.model.impl; +import static java.lang.Math.PI; +import static java.lang.Math.atan2; +import static java.lang.Math.cos; +import static java.lang.Math.pow; +import static java.lang.Math.round; +import static java.lang.Math.sin; +import static java.lang.Math.sqrt; +import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.DettPratica; +import it.tref.liferay.portos.bo.model.Provincia; +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.ProvinciaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; import it.tref.liferay.portos.bo.shared.util.Constants; import java.util.Locale; +import org.apache.commons.lang.StringUtils; + import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; @@ -44,6 +59,7 @@ public class IntPraticaImpl extends IntPraticaBaseImpl { */ private static final Log _log = LogFactoryUtil.getLog(IntPraticaImpl.class); + private Integer distanzaOrtodromica = null; public IntPraticaImpl() { } @@ -95,7 +111,6 @@ public class IntPraticaImpl extends IntPraticaBaseImpl { @Override public int getTipoRichiesta(){ - switch(getTipoProcedura()){ case Constants.PROCEDURA_P1: case Constants.PROCEDURA_Q1: @@ -137,9 +152,45 @@ public class IntPraticaImpl extends IntPraticaBaseImpl { default: return 0; + + } + } + + public String getIndirizzo() throws SystemException { + Territorio territorio = TerritorioLocalServiceUtil.fetchTerritorio(getTerritorioId()); + Comune comune = ComuneLocalServiceUtil.fetchComune(territorio.getComuneId()); + DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(getIntPraticaId()); + Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), + territorio.getCodiceProvincia()); + return comune.getDenominazione() + " (" + provincia.getSigla() + ")
" + dettPratica.getVia(); + } + @Override + public Integer calcolaDistanzaOrtodromica(double lat, double lng) throws SystemException { + String localizzazione = null; + distanzaOrtodromica = null; + DettPratica dett = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(getIntPraticaId()); + if (Validator.isNotNull(dett.getLocalizzazioneGeografica())) { + localizzazione = dett.getLocalizzazioneGeografica(); } + if (Validator.isNotNull(localizzazione)) { + String[] parti = StringUtils.split(localizzazione, '|'); + if (parti.length >= 2) { + double mylat = Double.valueOf(parti[0]); + double mylng = Double.valueOf(parti[1]); + double degRad = PI / 180; + double a = pow(sin((mylat - lat) * degRad / 2), 2) + cos(lat * degRad) * cos(mylat * degRad) + * pow(sin((mylng - lng) * degRad / 2), 2); + distanzaOrtodromica = (int) round((12742e3 * atan2(sqrt(a), sqrt(1 - a)))); + } + } + return distanzaOrtodromica; + } + + @Override + public Integer getDistanzaOrtodromica() { + return distanzaOrtodromica; } - + } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaModelImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaModelImpl.java index 7765a39e..4c9de190 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaModelImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaModelImpl.java @@ -78,6 +78,8 @@ public class IntPraticaModelImpl extends BaseModelImpl { "tipoPratica", Types.VARCHAR }, { "territorioId", Types.BIGINT }, { "tipoProcedura", Types.VARCHAR }, + { "latitudine", Types.DOUBLE }, + { "longitudine", Types.DOUBLE }, { "dtAnnullamento", Types.TIMESTAMP }, { "docPraticaAnnullamentoId", Types.BIGINT }, { "unitaOperativa", Types.INTEGER }, @@ -100,7 +102,7 @@ public class IntPraticaModelImpl extends BaseModelImpl { "controlloObbligatorio", Types.BOOLEAN }, { "inLavorazioneSue", Types.BOOLEAN } }; - public static final String TABLE_SQL_CREATE = "create table portos_bo_IntPratica (uuid_ VARCHAR(75) null,intPraticaId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,groupId LONG,tipoPratica VARCHAR(75) null,territorioId LONG,tipoProcedura VARCHAR(75) null,dtAnnullamento DATE null,docPraticaAnnullamentoId LONG,unitaOperativa INTEGER,statoPratica VARCHAR(10) null,numeroProgetto VARCHAR(75) null,validata BOOLEAN,status INTEGER,statusByUserId LONG,statusDate DATE null,esitoControllo INTEGER,dtPratica DATE null,sospesa BOOLEAN,dtSospensione DATE null,codiceFiscaleDelegatoFineLavori VARCHAR(75) null,codiceFiscaleDelegatoCollaudo VARCHAR(75) null,fineLavoriParziale BOOLEAN,fineLavoriTotale BOOLEAN,collaudoParziale BOOLEAN,collaudoTotale BOOLEAN,controlloObbligatorio BOOLEAN,inLavorazioneSue BOOLEAN)"; + public static final String TABLE_SQL_CREATE = "create table portos_bo_IntPratica (uuid_ VARCHAR(75) null,intPraticaId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,groupId LONG,tipoPratica VARCHAR(75) null,territorioId LONG,tipoProcedura VARCHAR(75) null,latitudine DOUBLE,longitudine DOUBLE,dtAnnullamento DATE null,docPraticaAnnullamentoId LONG,unitaOperativa INTEGER,statoPratica VARCHAR(10) null,numeroProgetto VARCHAR(75) null,validata BOOLEAN,status INTEGER,statusByUserId LONG,statusDate DATE null,esitoControllo INTEGER,dtPratica DATE null,sospesa BOOLEAN,dtSospensione DATE null,codiceFiscaleDelegatoFineLavori VARCHAR(75) null,codiceFiscaleDelegatoCollaudo VARCHAR(75) null,fineLavoriParziale BOOLEAN,fineLavoriTotale BOOLEAN,collaudoParziale BOOLEAN,collaudoTotale BOOLEAN,controlloObbligatorio BOOLEAN,inLavorazioneSue BOOLEAN)"; public static final String TABLE_SQL_DROP = "drop table portos_bo_IntPratica"; public static final String ORDER_BY_JPQL = " ORDER BY intPratica.intPraticaId ASC"; public static final String ORDER_BY_SQL = " ORDER BY portos_bo_IntPratica.intPraticaId ASC"; @@ -149,6 +151,8 @@ public class IntPraticaModelImpl extends BaseModelImpl model.setTipoPratica(soapModel.getTipoPratica()); model.setTerritorioId(soapModel.getTerritorioId()); model.setTipoProcedura(soapModel.getTipoProcedura()); + model.setLatitudine(soapModel.getLatitudine()); + model.setLongitudine(soapModel.getLongitudine()); model.setDtAnnullamento(soapModel.getDtAnnullamento()); model.setDocPraticaAnnullamentoId(soapModel.getDocPraticaAnnullamentoId()); model.setUnitaOperativa(soapModel.getUnitaOperativa()); @@ -245,6 +249,8 @@ public class IntPraticaModelImpl extends BaseModelImpl attributes.put("tipoPratica", getTipoPratica()); attributes.put("territorioId", getTerritorioId()); attributes.put("tipoProcedura", getTipoProcedura()); + attributes.put("latitudine", getLatitudine()); + attributes.put("longitudine", getLongitudine()); attributes.put("dtAnnullamento", getDtAnnullamento()); attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId()); attributes.put("unitaOperativa", getUnitaOperativa()); @@ -340,6 +346,18 @@ public class IntPraticaModelImpl extends BaseModelImpl setTipoProcedura(tipoProcedura); } + Double latitudine = (Double)attributes.get("latitudine"); + + if (latitudine != null) { + setLatitudine(latitudine); + } + + Double longitudine = (Double)attributes.get("longitudine"); + + if (longitudine != null) { + setLongitudine(longitudine); + } + Date dtAnnullamento = (Date)attributes.get("dtAnnullamento"); if (dtAnnullamento != null) { @@ -679,6 +697,28 @@ public class IntPraticaModelImpl extends BaseModelImpl _tipoProcedura = tipoProcedura; } + @JSON + @Override + public double getLatitudine() { + return _latitudine; + } + + @Override + public void setLatitudine(double latitudine) { + _latitudine = latitudine; + } + + @JSON + @Override + public double getLongitudine() { + return _longitudine; + } + + @Override + public void setLongitudine(double longitudine) { + _longitudine = longitudine; + } + @JSON @Override public Date getDtAnnullamento() { @@ -1053,6 +1093,8 @@ public class IntPraticaModelImpl extends BaseModelImpl intPraticaImpl.setTipoPratica(getTipoPratica()); intPraticaImpl.setTerritorioId(getTerritorioId()); intPraticaImpl.setTipoProcedura(getTipoProcedura()); + intPraticaImpl.setLatitudine(getLatitudine()); + intPraticaImpl.setLongitudine(getLongitudine()); intPraticaImpl.setDtAnnullamento(getDtAnnullamento()); intPraticaImpl.setDocPraticaAnnullamentoId(getDocPraticaAnnullamentoId()); intPraticaImpl.setUnitaOperativa(getUnitaOperativa()); @@ -1217,6 +1259,10 @@ public class IntPraticaModelImpl extends BaseModelImpl intPraticaCacheModel.tipoProcedura = null; } + intPraticaCacheModel.latitudine = getLatitudine(); + + intPraticaCacheModel.longitudine = getLongitudine(); + Date dtAnnullamento = getDtAnnullamento(); if (dtAnnullamento != null) { @@ -1318,7 +1364,7 @@ public class IntPraticaModelImpl extends BaseModelImpl @Override public String toString() { - StringBundler sb = new StringBundler(65); + StringBundler sb = new StringBundler(69); sb.append("{uuid="); sb.append(getUuid()); @@ -1342,6 +1388,10 @@ public class IntPraticaModelImpl extends BaseModelImpl sb.append(getTerritorioId()); sb.append(", tipoProcedura="); sb.append(getTipoProcedura()); + sb.append(", latitudine="); + sb.append(getLatitudine()); + sb.append(", longitudine="); + sb.append(getLongitudine()); sb.append(", dtAnnullamento="); sb.append(getDtAnnullamento()); sb.append(", docPraticaAnnullamentoId="); @@ -1391,7 +1441,7 @@ public class IntPraticaModelImpl extends BaseModelImpl @Override public String toXmlString() { - StringBundler sb = new StringBundler(100); + StringBundler sb = new StringBundler(106); sb.append(""); sb.append("it.tref.liferay.portos.bo.model.IntPratica"); @@ -1441,6 +1491,14 @@ public class IntPraticaModelImpl extends BaseModelImpl "tipoProcedura"); + sb.append( + "latitudine"); + sb.append( + "longitudine"); sb.append( "dtAnnullamento private long _originalTerritorioId; private boolean _setOriginalTerritorioId; private String _tipoProcedura; + private double _latitudine; + private double _longitudine; private Date _dtAnnullamento; private long _docPraticaAnnullamentoId; private int _unitaOperativa; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/PagamentoImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/PagamentoImpl.java index 38419998..9fbc87b7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/PagamentoImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/PagamentoImpl.java @@ -25,12 +25,14 @@ import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil; import com.liferay.portlet.documentlibrary.util.DLUtil; /** - * The extended model implementation for the Pagamento service. Represents a row in the "portos_bo_Pagamento" - * database table, with each column mapped to a property of this class. + * The extended model implementation for the Pagamento service. Represents a row + * in the "portos_bo_Pagamento" database table, with each column + * mapped to a property of this class. * *

- * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun - * ServiceBuilder to copy their definitions into the {@link it.tref.liferay.portos.bo.model.Pagamento} interface. + * Helper methods and all application logic should be put in this class. + * Whenever methods are added, rerun ServiceBuilder to copy their definitions + * into the {@link it.tref.liferay.portos.bo.model.Pagamento} interface. *

* * @author Davide Barbagallo, 3F Consulting @@ -38,15 +40,17 @@ import com.liferay.portlet.documentlibrary.util.DLUtil; @SuppressWarnings("serial") public class PagamentoImpl extends PagamentoBaseImpl { /* - * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a pagamento model instance - * should use the {@link it.tref.liferay.portos.bo.model.Pagamento} interface instead. + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a pagamento + * model instance should use the {@link + * it.tref.liferay.portos.bo.model.Pagamento} interface instead. */ public PagamentoImpl() { } @Override public String getDownloadUrl(ThemeDisplay themeDisplay) throws PortalException, SystemException { - if (Validator.isNull(getFileEntryId())) { return null; } @@ -56,7 +60,6 @@ public class PagamentoImpl extends PagamentoBaseImpl { @Override public String getImportoString() { - String importo = getImporto(); BigDecimal importoVal; if (Validator.isNotNull(importo)) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/SoggettoModelListener.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/SoggettoModelListener.java index a5d20e65..9735b73b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/SoggettoModelListener.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/listener/SoggettoModelListener.java @@ -27,6 +27,7 @@ public class SoggettoModelListener extends BaseModelListener { } catch (SearchException e) { _log.error(e, e); } + super.onAfterUpdate(model); } } 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 696c80ec..7861cf3f 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 @@ -2,7 +2,9 @@ package it.tref.liferay.portos.bo.portlet; import it.mwg.sismica.bo.util.ManutenzioneDatabase; import it.mwg.sismica.bo.util.SismicaUtil; +import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants; import java.sql.SQLException; import java.util.ArrayList; @@ -14,6 +16,8 @@ import javax.portlet.ActionResponse; 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.ParamUtil; import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.WebKeys; @@ -23,9 +27,26 @@ import com.liferay.portal.theme.ThemeDisplay; import com.liferay.util.bridges.mvc.MVCPortlet; public class PaesaggisticaAdministrationPortlet extends MVCPortlet { + private final static Log _log = LogFactoryUtil.getLog(PaesaggisticaAdministrationPortlet.class); - public void mostraConfigurazione(ActionRequest actionRequest, ActionResponse actionResponse) throws SystemException { + public void impostazioniMappe(ActionRequest actionRequest, ActionResponse actionResponse) + throws PortalException, SystemException { + String urlIframeFE = ParamUtil.getString(actionRequest, "urlIframeFE"); + String urlIframeBO = ParamUtil.getString(actionRequest, "urlIframeBO"); + String sharedSecret = ParamUtil.getString(actionRequest, "sharedSecret"); + + 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_SHARED_SECRET, sharedSecret, + serviceContext); + } + public void mostraConfigurazione(ActionRequest actionRequest, ActionResponse actionResponse) throws SystemException { List esito = new ArrayList(); esito.add("

Env:

"); for (Map.Entry entry : System.getenv().entrySet()) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java index 30807450..614755f5 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java @@ -186,212 +186,250 @@ public class IntPraticaLocalServiceClpInvoker { _methodParameterTypes189 = new String[] { }; - _methodName191 = "addNumeroProgetto"; + _methodName191 = "countByPosizione"; - _methodParameterTypes191 = new String[] { "long" }; + _methodParameterTypes191 = new String[] { "double", "double", "int" }; - _methodName192 = "sospendiPratica"; + _methodName192 = "findByPosizione"; - _methodParameterTypes192 = new String[] { "long", "boolean" }; + _methodParameterTypes192 = new String[] { "double", "double", "int" }; - _methodName193 = "cambiaTitolare"; + _methodName193 = "findByPosizione"; _methodParameterTypes193 = new String[] { + "double", "double", "int", "int", "int" + }; + + _methodName195 = "addNumeroProgetto"; + + _methodParameterTypes195 = new String[] { "long" }; + + _methodName196 = "sospendiPratica"; + + _methodParameterTypes196 = new String[] { "long", "boolean" }; + + _methodName197 = "cambiaTitolare"; + + _methodParameterTypes197 = new String[] { "long", "long", "com.liferay.portal.service.ServiceContext" }; - _methodName194 = "updateStatoPratica"; + _methodName198 = "updateStatoPratica"; + + _methodParameterTypes198 = new String[] { "long", "java.lang.String" }; + + _methodName199 = "findByC_UserId"; + + _methodParameterTypes199 = new String[] { "long", "long", "int", "int" }; + + _methodName200 = "countByC_UserId"; + + _methodParameterTypes200 = new String[] { "long", "long" }; + + _methodName201 = "updateStatus"; - _methodParameterTypes194 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes201 = new String[] { "long", "int" }; - _methodName195 = "findByC_UserId"; + _methodName202 = "findByCompanyIdSoggettoProgetti"; - _methodParameterTypes195 = new String[] { "long", "long", "int", "int" }; + _methodParameterTypes202 = new String[] { "long", "long" }; - _methodName196 = "countByC_UserId"; + _methodName203 = "countByCompanyIdSoggettoProgetti"; - _methodParameterTypes196 = new String[] { "long", "long" }; + _methodParameterTypes203 = new String[] { "long", "long" }; - _methodName197 = "updateStatus"; + _methodName205 = "findByCompanyIdSoggettoArchivio"; - _methodParameterTypes197 = new String[] { "long", "int" }; + _methodParameterTypes205 = new String[] { "long", "long" }; - _methodName198 = "findByCanAddFineLavori"; + _methodName206 = "countByCompanyIdSoggettoArchivio"; - _methodParameterTypes198 = new String[] { + _methodParameterTypes206 = new String[] { "long", "long" }; + + _methodName208 = "findByCompanyIdSoggettoAltriProgetti"; + + _methodParameterTypes208 = new String[] { "long", "long", "int", "int" }; + + _methodName209 = "countByCompanyIdSoggettoAltriProgetti"; + + _methodParameterTypes209 = new String[] { "long", "long" }; + + _methodName211 = "findByCanAddFineLavori"; + + _methodParameterTypes211 = new String[] { "long", "java.lang.String", "int", "int" }; - _methodName199 = "countByCanAddFineLavori"; + _methodName212 = "countByCanAddFineLavori"; - _methodParameterTypes199 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes212 = new String[] { "long", "java.lang.String" }; - _methodName201 = "findByCanAddCollaudo"; + _methodName214 = "findByCanAddCollaudo"; - _methodParameterTypes201 = new String[] { + _methodParameterTypes214 = new String[] { "long", "java.lang.String", "int", "int" }; - _methodName202 = "countByCanAddCollaudo"; + _methodName215 = "countByCanAddCollaudo"; - _methodParameterTypes202 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes215 = new String[] { "long", "java.lang.String" }; - _methodName203 = "search"; + _methodName216 = "search"; - _methodParameterTypes203 = new String[] { "java.util.List", "int", "int" }; + _methodParameterTypes216 = new String[] { "java.util.List", "int", "int" }; - _methodName204 = "countSearch"; + _methodName217 = "countSearch"; - _methodParameterTypes204 = new String[] { "java.util.List" }; + _methodParameterTypes217 = new String[] { "java.util.List" }; - _methodName205 = "searchWithIntPraticaId"; + _methodName218 = "searchWithIntPraticaId"; - _methodParameterTypes205 = new String[] { + _methodParameterTypes218 = new String[] { "java.util.List", "long", "int", "int" }; - _methodName206 = "allegaFileAnnullamento"; + _methodName219 = "allegaFileAnnullamento"; - _methodParameterTypes206 = new String[] { + _methodParameterTypes219 = new String[] { "long", "byte[][]", "java.lang.String", "java.lang.String", "com.liferay.portal.service.ServiceContext" }; - _methodName207 = "generateFileAnnullamento"; + _methodName220 = "generateFileAnnullamento"; - _methodParameterTypes207 = new String[] { + _methodParameterTypes220 = new String[] { "long", "com.liferay.portal.service.ServiceContext" }; - _methodName208 = "deleteFileAnnullamento"; + _methodName221 = "deleteFileAnnullamento"; - _methodParameterTypes208 = new String[] { "long" }; + _methodParameterTypes221 = new String[] { "long" }; - _methodName209 = "completeAnnullamento"; + _methodName222 = "completeAnnullamento"; - _methodParameterTypes209 = new String[] { "long" }; + _methodParameterTypes222 = new String[] { "long" }; - _methodName210 = "cambiaIstruttore"; + _methodName223 = "cambiaIstruttore"; - _methodParameterTypes210 = new String[] { "long", "long", "long" }; + _methodParameterTypes223 = new String[] { "long", "long", "long" }; - _methodName211 = "countCaricoLavoroCF"; + _methodName224 = "countCaricoLavoroCF"; - _methodParameterTypes211 = new String[] { + _methodParameterTypes224 = new String[] { "long", "java.lang.String", "java.lang.Long[][]" }; - _methodName212 = "countCaricoLavoroIstruttore"; + _methodName225 = "countCaricoLavoroIstruttore"; - _methodParameterTypes212 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes225 = new String[] { "long", "java.lang.String" }; - _methodName213 = "generateReportPratica"; + _methodName226 = "generateReportPratica"; - _methodParameterTypes213 = new String[] { + _methodParameterTypes226 = new String[] { "it.tref.liferay.portos.bo.model.IntPratica", "long" }; - _methodName214 = "updateModifiedDate"; + _methodName227 = "updateModifiedDate"; - _methodParameterTypes214 = new String[] { "long", "java.util.Date" }; + _methodParameterTypes227 = new String[] { "long", "java.util.Date" }; - _methodName215 = "countAutorizzazione"; + _methodName228 = "countAutorizzazione"; - _methodParameterTypes215 = new String[] { + _methodParameterTypes228 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName216 = "countSanatorie"; + _methodName229 = "countSanatorie"; - _methodParameterTypes216 = new String[] { + _methodParameterTypes229 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName217 = "countOpereMinoreImportanza"; + _methodName230 = "countOpereMinoreImportanza"; - _methodParameterTypes217 = new String[] { + _methodParameterTypes230 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName218 = "countDeposito"; + _methodName231 = "countDeposito"; - _methodParameterTypes218 = new String[] { + _methodParameterTypes231 = new String[] { "java.util.Date", "java.util.Date", "long", "boolean" }; - _methodName219 = "countVidimate"; + _methodName232 = "countVidimate"; - _methodParameterTypes219 = new String[] { + _methodParameterTypes232 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String", "boolean" }; - _methodName220 = "countControllo"; + _methodName233 = "countControllo"; - _methodParameterTypes220 = new String[] { + _methodParameterTypes233 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String", "boolean" }; - _methodName221 = "riparaWorkflow"; + _methodName234 = "riparaWorkflow"; - _methodParameterTypes221 = new String[] { }; + _methodParameterTypes234 = new String[] { }; - _methodName222 = "reIndexFascicolo"; + _methodName235 = "reIndexFascicolo"; - _methodParameterTypes222 = new String[] { + _methodParameterTypes235 = new String[] { "it.tref.liferay.portos.bo.model.IntPratica", "long" }; - _methodName223 = "reIndexFasciolo"; + _methodName236 = "reIndexFasciolo"; - _methodParameterTypes223 = new String[] { "java.lang.String", "long" }; + _methodParameterTypes236 = new String[] { "java.lang.String", "long" }; - _methodName224 = "reIndexFasciolo"; + _methodName237 = "reIndexFasciolo"; - _methodParameterTypes224 = new String[] { "long", "long" }; + _methodParameterTypes237 = new String[] { "long", "long" }; - _methodName225 = "findByNumeroProgetto"; + _methodName238 = "findByNumeroProgetto"; - _methodParameterTypes225 = new String[] { "java.lang.String" }; + _methodParameterTypes238 = new String[] { "java.lang.String" }; - _methodName226 = "findByTerritorioId"; + _methodName239 = "findByTerritorioId"; - _methodParameterTypes226 = new String[] { "long" }; + _methodParameterTypes239 = new String[] { "long" }; - _methodName227 = "reportTempisticheIstruttorieAvvisiAutorizzazioni"; + _methodName240 = "reportTempisticheIstruttorieAvvisiAutorizzazioni"; - _methodParameterTypes227 = new String[] { + _methodParameterTypes240 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String" }; - _methodName228 = "reportPraticheVidimate"; + _methodName241 = "reportPraticheVidimate"; - _methodParameterTypes228 = new String[] { + _methodParameterTypes241 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String" }; - _methodName229 = "countIngressiAutorizzazioni"; + _methodName242 = "countIngressiAutorizzazioni"; - _methodParameterTypes229 = new String[] { + _methodParameterTypes242 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName230 = "countIngressiDepositi"; + _methodName243 = "countIngressiDepositi"; - _methodParameterTypes230 = new String[] { + _methodParameterTypes243 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName231 = "countIngressiCO"; + _methodName244 = "countIngressiCO"; - _methodParameterTypes231 = new String[] { + _methodParameterTypes244 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName232 = "getOrganizationByIntPraticaId"; + _methodName245 = "getOrganizationByIntPraticaId"; - _methodParameterTypes232 = new String[] { "long" }; + _methodParameterTypes245 = new String[] { "long" }; } public Object invokeMethod(String name, String[] parameterTypes, @@ -586,128 +624,189 @@ public class IntPraticaLocalServiceClpInvoker { if (_methodName191.equals(name) && Arrays.deepEquals(_methodParameterTypes191, parameterTypes)) { - return IntPraticaLocalServiceUtil.addNumeroProgetto(((Long)arguments[0]).longValue()); + return IntPraticaLocalServiceUtil.countByPosizione(((Double)arguments[0]).doubleValue(), + ((Double)arguments[1]).doubleValue(), + ((Integer)arguments[2]).intValue()); } if (_methodName192.equals(name) && Arrays.deepEquals(_methodParameterTypes192, parameterTypes)) { - return IntPraticaLocalServiceUtil.sospendiPratica(((Long)arguments[0]).longValue(), - ((Boolean)arguments[1]).booleanValue()); + return IntPraticaLocalServiceUtil.findByPosizione(((Double)arguments[0]).doubleValue(), + ((Double)arguments[1]).doubleValue(), + ((Integer)arguments[2]).intValue()); } if (_methodName193.equals(name) && Arrays.deepEquals(_methodParameterTypes193, parameterTypes)) { + return IntPraticaLocalServiceUtil.findByPosizione(((Double)arguments[0]).doubleValue(), + ((Double)arguments[1]).doubleValue(), + ((Integer)arguments[2]).intValue(), + ((Integer)arguments[3]).intValue(), + ((Integer)arguments[4]).intValue()); + } + + if (_methodName195.equals(name) && + Arrays.deepEquals(_methodParameterTypes195, parameterTypes)) { + return IntPraticaLocalServiceUtil.addNumeroProgetto(((Long)arguments[0]).longValue()); + } + + if (_methodName196.equals(name) && + Arrays.deepEquals(_methodParameterTypes196, parameterTypes)) { + return IntPraticaLocalServiceUtil.sospendiPratica(((Long)arguments[0]).longValue(), + ((Boolean)arguments[1]).booleanValue()); + } + + if (_methodName197.equals(name) && + Arrays.deepEquals(_methodParameterTypes197, parameterTypes)) { return IntPraticaLocalServiceUtil.cambiaTitolare(((Long)arguments[0]).longValue(), ((Long)arguments[1]).longValue(), (com.liferay.portal.service.ServiceContext)arguments[2]); } - if (_methodName194.equals(name) && - Arrays.deepEquals(_methodParameterTypes194, parameterTypes)) { + if (_methodName198.equals(name) && + Arrays.deepEquals(_methodParameterTypes198, parameterTypes)) { return IntPraticaLocalServiceUtil.updateStatoPratica(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1]); } - if (_methodName195.equals(name) && - Arrays.deepEquals(_methodParameterTypes195, parameterTypes)) { + if (_methodName199.equals(name) && + Arrays.deepEquals(_methodParameterTypes199, parameterTypes)) { return IntPraticaLocalServiceUtil.findByC_UserId(((Long)arguments[0]).longValue(), ((Long)arguments[1]).longValue(), ((Integer)arguments[2]).intValue(), ((Integer)arguments[3]).intValue()); } - if (_methodName196.equals(name) && - Arrays.deepEquals(_methodParameterTypes196, parameterTypes)) { + if (_methodName200.equals(name) && + Arrays.deepEquals(_methodParameterTypes200, parameterTypes)) { return IntPraticaLocalServiceUtil.countByC_UserId(((Long)arguments[0]).longValue(), ((Long)arguments[1]).longValue()); } - if (_methodName197.equals(name) && - Arrays.deepEquals(_methodParameterTypes197, parameterTypes)) { + if (_methodName201.equals(name) && + Arrays.deepEquals(_methodParameterTypes201, parameterTypes)) { IntPraticaLocalServiceUtil.updateStatus(((Long)arguments[0]).longValue(), ((Integer)arguments[1]).intValue()); return null; } - if (_methodName198.equals(name) && - Arrays.deepEquals(_methodParameterTypes198, parameterTypes)) { + if (_methodName202.equals(name) && + Arrays.deepEquals(_methodParameterTypes202, parameterTypes)) { + return IntPraticaLocalServiceUtil.findByCompanyIdSoggettoProgetti(((Long)arguments[0]).longValue(), + ((Long)arguments[1]).longValue()); + } + + if (_methodName203.equals(name) && + Arrays.deepEquals(_methodParameterTypes203, parameterTypes)) { + return IntPraticaLocalServiceUtil.countByCompanyIdSoggettoProgetti(((Long)arguments[0]).longValue(), + ((Long)arguments[1]).longValue()); + } + + if (_methodName205.equals(name) && + Arrays.deepEquals(_methodParameterTypes205, parameterTypes)) { + return IntPraticaLocalServiceUtil.findByCompanyIdSoggettoArchivio(((Long)arguments[0]).longValue(), + ((Long)arguments[1]).longValue()); + } + + if (_methodName206.equals(name) && + Arrays.deepEquals(_methodParameterTypes206, parameterTypes)) { + return IntPraticaLocalServiceUtil.countByCompanyIdSoggettoArchivio(((Long)arguments[0]).longValue(), + ((Long)arguments[1]).longValue()); + } + + if (_methodName208.equals(name) && + Arrays.deepEquals(_methodParameterTypes208, parameterTypes)) { + return IntPraticaLocalServiceUtil.findByCompanyIdSoggettoAltriProgetti(((Long)arguments[0]).longValue(), + ((Long)arguments[1]).longValue(), + ((Integer)arguments[2]).intValue(), + ((Integer)arguments[3]).intValue()); + } + + if (_methodName209.equals(name) && + Arrays.deepEquals(_methodParameterTypes209, parameterTypes)) { + return IntPraticaLocalServiceUtil.countByCompanyIdSoggettoAltriProgetti(((Long)arguments[0]).longValue(), + ((Long)arguments[1]).longValue()); + } + + if (_methodName211.equals(name) && + Arrays.deepEquals(_methodParameterTypes211, parameterTypes)) { return IntPraticaLocalServiceUtil.findByCanAddFineLavori(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], ((Integer)arguments[2]).intValue(), ((Integer)arguments[3]).intValue()); } - if (_methodName199.equals(name) && - Arrays.deepEquals(_methodParameterTypes199, parameterTypes)) { + if (_methodName212.equals(name) && + Arrays.deepEquals(_methodParameterTypes212, parameterTypes)) { return IntPraticaLocalServiceUtil.countByCanAddFineLavori(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1]); } - if (_methodName201.equals(name) && - Arrays.deepEquals(_methodParameterTypes201, parameterTypes)) { + if (_methodName214.equals(name) && + Arrays.deepEquals(_methodParameterTypes214, parameterTypes)) { return IntPraticaLocalServiceUtil.findByCanAddCollaudo(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], ((Integer)arguments[2]).intValue(), ((Integer)arguments[3]).intValue()); } - if (_methodName202.equals(name) && - Arrays.deepEquals(_methodParameterTypes202, parameterTypes)) { + if (_methodName215.equals(name) && + Arrays.deepEquals(_methodParameterTypes215, parameterTypes)) { return IntPraticaLocalServiceUtil.countByCanAddCollaudo(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1]); } - if (_methodName203.equals(name) && - Arrays.deepEquals(_methodParameterTypes203, parameterTypes)) { + if (_methodName216.equals(name) && + Arrays.deepEquals(_methodParameterTypes216, parameterTypes)) { return IntPraticaLocalServiceUtil.search((java.util.List)arguments[0], ((Integer)arguments[1]).intValue(), ((Integer)arguments[2]).intValue()); } - if (_methodName204.equals(name) && - Arrays.deepEquals(_methodParameterTypes204, parameterTypes)) { + if (_methodName217.equals(name) && + Arrays.deepEquals(_methodParameterTypes217, parameterTypes)) { return IntPraticaLocalServiceUtil.countSearch((java.util.List)arguments[0]); } - if (_methodName205.equals(name) && - Arrays.deepEquals(_methodParameterTypes205, parameterTypes)) { + if (_methodName218.equals(name) && + Arrays.deepEquals(_methodParameterTypes218, parameterTypes)) { return IntPraticaLocalServiceUtil.searchWithIntPraticaId((java.util.List)arguments[0], ((Long)arguments[1]).longValue(), ((Integer)arguments[2]).intValue(), ((Integer)arguments[3]).intValue()); } - if (_methodName206.equals(name) && - Arrays.deepEquals(_methodParameterTypes206, parameterTypes)) { + if (_methodName219.equals(name) && + Arrays.deepEquals(_methodParameterTypes219, parameterTypes)) { return IntPraticaLocalServiceUtil.allegaFileAnnullamento(((Long)arguments[0]).longValue(), (byte[])arguments[1], (java.lang.String)arguments[2], (java.lang.String)arguments[3], (com.liferay.portal.service.ServiceContext)arguments[4]); } - if (_methodName207.equals(name) && - Arrays.deepEquals(_methodParameterTypes207, parameterTypes)) { + if (_methodName220.equals(name) && + Arrays.deepEquals(_methodParameterTypes220, parameterTypes)) { return IntPraticaLocalServiceUtil.generateFileAnnullamento(((Long)arguments[0]).longValue(), (com.liferay.portal.service.ServiceContext)arguments[1]); } - if (_methodName208.equals(name) && - Arrays.deepEquals(_methodParameterTypes208, parameterTypes)) { + if (_methodName221.equals(name) && + Arrays.deepEquals(_methodParameterTypes221, parameterTypes)) { IntPraticaLocalServiceUtil.deleteFileAnnullamento(((Long)arguments[0]).longValue()); return null; } - if (_methodName209.equals(name) && - Arrays.deepEquals(_methodParameterTypes209, parameterTypes)) { + if (_methodName222.equals(name) && + Arrays.deepEquals(_methodParameterTypes222, parameterTypes)) { IntPraticaLocalServiceUtil.completeAnnullamento(((Long)arguments[0]).longValue()); return null; } - if (_methodName210.equals(name) && - Arrays.deepEquals(_methodParameterTypes210, parameterTypes)) { + if (_methodName223.equals(name) && + Arrays.deepEquals(_methodParameterTypes223, parameterTypes)) { IntPraticaLocalServiceUtil.cambiaIstruttore(((Long)arguments[0]).longValue(), ((Long)arguments[1]).longValue(), ((Long)arguments[2]).longValue()); @@ -715,144 +814,144 @@ public class IntPraticaLocalServiceClpInvoker { return null; } - if (_methodName211.equals(name) && - Arrays.deepEquals(_methodParameterTypes211, parameterTypes)) { + if (_methodName224.equals(name) && + Arrays.deepEquals(_methodParameterTypes224, parameterTypes)) { return IntPraticaLocalServiceUtil.countCaricoLavoroCF(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (java.lang.Long[])arguments[2]); } - if (_methodName212.equals(name) && - Arrays.deepEquals(_methodParameterTypes212, parameterTypes)) { + if (_methodName225.equals(name) && + Arrays.deepEquals(_methodParameterTypes225, parameterTypes)) { return IntPraticaLocalServiceUtil.countCaricoLavoroIstruttore(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1]); } - if (_methodName213.equals(name) && - Arrays.deepEquals(_methodParameterTypes213, parameterTypes)) { + if (_methodName226.equals(name) && + Arrays.deepEquals(_methodParameterTypes226, parameterTypes)) { return IntPraticaLocalServiceUtil.generateReportPratica((it.tref.liferay.portos.bo.model.IntPratica)arguments[0], ((Long)arguments[1]).longValue()); } - if (_methodName214.equals(name) && - Arrays.deepEquals(_methodParameterTypes214, parameterTypes)) { + if (_methodName227.equals(name) && + Arrays.deepEquals(_methodParameterTypes227, parameterTypes)) { return IntPraticaLocalServiceUtil.updateModifiedDate(((Long)arguments[0]).longValue(), (java.util.Date)arguments[1]); } - if (_methodName215.equals(name) && - Arrays.deepEquals(_methodParameterTypes215, parameterTypes)) { + if (_methodName228.equals(name) && + Arrays.deepEquals(_methodParameterTypes228, parameterTypes)) { return IntPraticaLocalServiceUtil.countAutorizzazione((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); } - if (_methodName216.equals(name) && - Arrays.deepEquals(_methodParameterTypes216, parameterTypes)) { + if (_methodName229.equals(name) && + Arrays.deepEquals(_methodParameterTypes229, parameterTypes)) { return IntPraticaLocalServiceUtil.countSanatorie((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); } - if (_methodName217.equals(name) && - Arrays.deepEquals(_methodParameterTypes217, parameterTypes)) { + if (_methodName230.equals(name) && + Arrays.deepEquals(_methodParameterTypes230, parameterTypes)) { return IntPraticaLocalServiceUtil.countOpereMinoreImportanza((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); } - if (_methodName218.equals(name) && - Arrays.deepEquals(_methodParameterTypes218, parameterTypes)) { + if (_methodName231.equals(name) && + Arrays.deepEquals(_methodParameterTypes231, parameterTypes)) { return IntPraticaLocalServiceUtil.countDeposito((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), ((Boolean)arguments[3]).booleanValue()); } - if (_methodName219.equals(name) && - Arrays.deepEquals(_methodParameterTypes219, parameterTypes)) { + if (_methodName232.equals(name) && + Arrays.deepEquals(_methodParameterTypes232, parameterTypes)) { return IntPraticaLocalServiceUtil.countVidimate((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), (java.lang.String)arguments[3], ((Boolean)arguments[4]).booleanValue()); } - if (_methodName220.equals(name) && - Arrays.deepEquals(_methodParameterTypes220, parameterTypes)) { + if (_methodName233.equals(name) && + Arrays.deepEquals(_methodParameterTypes233, parameterTypes)) { return IntPraticaLocalServiceUtil.countControllo((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), (java.lang.String)arguments[3], ((Boolean)arguments[4]).booleanValue()); } - if (_methodName221.equals(name) && - Arrays.deepEquals(_methodParameterTypes221, parameterTypes)) { + if (_methodName234.equals(name) && + Arrays.deepEquals(_methodParameterTypes234, parameterTypes)) { return IntPraticaLocalServiceUtil.riparaWorkflow(); } - if (_methodName222.equals(name) && - Arrays.deepEquals(_methodParameterTypes222, parameterTypes)) { + if (_methodName235.equals(name) && + Arrays.deepEquals(_methodParameterTypes235, parameterTypes)) { IntPraticaLocalServiceUtil.reIndexFascicolo((it.tref.liferay.portos.bo.model.IntPratica)arguments[0], ((Long)arguments[1]).longValue()); return null; } - if (_methodName223.equals(name) && - Arrays.deepEquals(_methodParameterTypes223, parameterTypes)) { + if (_methodName236.equals(name) && + Arrays.deepEquals(_methodParameterTypes236, parameterTypes)) { IntPraticaLocalServiceUtil.reIndexFasciolo((java.lang.String)arguments[0], ((Long)arguments[1]).longValue()); return null; } - if (_methodName224.equals(name) && - Arrays.deepEquals(_methodParameterTypes224, parameterTypes)) { + if (_methodName237.equals(name) && + Arrays.deepEquals(_methodParameterTypes237, parameterTypes)) { IntPraticaLocalServiceUtil.reIndexFasciolo(((Long)arguments[0]).longValue(), ((Long)arguments[1]).longValue()); return null; } - if (_methodName225.equals(name) && - Arrays.deepEquals(_methodParameterTypes225, parameterTypes)) { + if (_methodName238.equals(name) && + Arrays.deepEquals(_methodParameterTypes238, parameterTypes)) { return IntPraticaLocalServiceUtil.findByNumeroProgetto((java.lang.String)arguments[0]); } - if (_methodName226.equals(name) && - Arrays.deepEquals(_methodParameterTypes226, parameterTypes)) { + if (_methodName239.equals(name) && + Arrays.deepEquals(_methodParameterTypes239, parameterTypes)) { return IntPraticaLocalServiceUtil.findByTerritorioId(((Long)arguments[0]).longValue()); } - if (_methodName227.equals(name) && - Arrays.deepEquals(_methodParameterTypes227, parameterTypes)) { + if (_methodName240.equals(name) && + Arrays.deepEquals(_methodParameterTypes240, parameterTypes)) { return IntPraticaLocalServiceUtil.reportTempisticheIstruttorieAvvisiAutorizzazioni((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), (java.lang.String)arguments[3]); } - if (_methodName228.equals(name) && - Arrays.deepEquals(_methodParameterTypes228, parameterTypes)) { + if (_methodName241.equals(name) && + Arrays.deepEquals(_methodParameterTypes241, parameterTypes)) { return IntPraticaLocalServiceUtil.reportPraticheVidimate((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), (java.lang.String)arguments[3]); } - if (_methodName229.equals(name) && - Arrays.deepEquals(_methodParameterTypes229, parameterTypes)) { + if (_methodName242.equals(name) && + Arrays.deepEquals(_methodParameterTypes242, parameterTypes)) { return IntPraticaLocalServiceUtil.countIngressiAutorizzazioni((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); } - if (_methodName230.equals(name) && - Arrays.deepEquals(_methodParameterTypes230, parameterTypes)) { + if (_methodName243.equals(name) && + Arrays.deepEquals(_methodParameterTypes243, parameterTypes)) { return IntPraticaLocalServiceUtil.countIngressiDepositi((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); } - if (_methodName231.equals(name) && - Arrays.deepEquals(_methodParameterTypes231, parameterTypes)) { + if (_methodName244.equals(name) && + Arrays.deepEquals(_methodParameterTypes244, parameterTypes)) { return IntPraticaLocalServiceUtil.countIngressiCO((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); } - if (_methodName232.equals(name) && - Arrays.deepEquals(_methodParameterTypes232, parameterTypes)) { + if (_methodName245.equals(name) && + Arrays.deepEquals(_methodParameterTypes245, parameterTypes)) { return IntPraticaLocalServiceUtil.getOrganizationByIntPraticaId(((Long)arguments[0]).longValue()); } @@ -929,8 +1028,6 @@ public class IntPraticaLocalServiceClpInvoker { private String[] _methodParameterTypes192; private String _methodName193; private String[] _methodParameterTypes193; - private String _methodName194; - private String[] _methodParameterTypes194; private String _methodName195; private String[] _methodParameterTypes195; private String _methodName196; @@ -941,32 +1038,26 @@ public class IntPraticaLocalServiceClpInvoker { private String[] _methodParameterTypes198; private String _methodName199; private String[] _methodParameterTypes199; + private String _methodName200; + private String[] _methodParameterTypes200; private String _methodName201; private String[] _methodParameterTypes201; private String _methodName202; private String[] _methodParameterTypes202; private String _methodName203; private String[] _methodParameterTypes203; - private String _methodName204; - private String[] _methodParameterTypes204; private String _methodName205; private String[] _methodParameterTypes205; private String _methodName206; private String[] _methodParameterTypes206; - private String _methodName207; - private String[] _methodParameterTypes207; private String _methodName208; private String[] _methodParameterTypes208; private String _methodName209; private String[] _methodParameterTypes209; - private String _methodName210; - private String[] _methodParameterTypes210; private String _methodName211; private String[] _methodParameterTypes211; private String _methodName212; private String[] _methodParameterTypes212; - private String _methodName213; - private String[] _methodParameterTypes213; private String _methodName214; private String[] _methodParameterTypes214; private String _methodName215; @@ -1005,4 +1096,30 @@ public class IntPraticaLocalServiceClpInvoker { private String[] _methodParameterTypes231; private String _methodName232; private String[] _methodParameterTypes232; + private String _methodName233; + private String[] _methodParameterTypes233; + private String _methodName234; + private String[] _methodParameterTypes234; + private String _methodName235; + private String[] _methodParameterTypes235; + private String _methodName236; + private String[] _methodParameterTypes236; + private String _methodName237; + private String[] _methodParameterTypes237; + private String _methodName238; + private String[] _methodParameterTypes238; + private String _methodName239; + private String[] _methodParameterTypes239; + private String _methodName240; + private String[] _methodParameterTypes240; + private String _methodName241; + private String[] _methodParameterTypes241; + private String _methodName242; + private String[] _methodParameterTypes242; + private String _methodName243; + private String[] _methodParameterTypes243; + private String _methodName244; + private String[] _methodParameterTypes244; + private String _methodName245; + private String[] _methodParameterTypes245; } \ 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/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 7cc9303a..764a3c98 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 @@ -56,7 +56,10 @@ import it.tref.liferay.portos.report.shared.util.ReportUtil; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.Calendar; +import java.util.Collections; +import java.util.Comparator; import java.util.Date; import java.util.HashMap; import java.util.LinkedHashMap; @@ -214,7 +217,6 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { @Override public IntPratica deleteIntPratica(IntPratica intPratica, boolean forced) throws SystemException, PortalException { - if (intPratica.getStatus() == WorkflowConstants.STATUS_ANY || forced) { if (Validator.isNotNull(intPratica.getDocPraticaAnnullamentoId())) { deleteFileAnnullamento(intPratica.getDocPraticaAnnullamentoId()); @@ -305,7 +307,6 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { @Indexable(type = IndexableType.REINDEX) public IntPratica cloneIntPratica(long intPraticaId, ServiceContext serviceContext) throws SystemException, PortalException { - IntPratica intPraticaToClone = getIntPratica(intPraticaId); IntPratica intPraticaCloned = addIntPratica(intPraticaToClone.getTerritorioId(), intPraticaToClone.getTipoProcedura(), serviceContext); @@ -344,6 +345,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { return intPratica; } + @Override public IntPratica fetchIntPratica(long intPraticaId) throws SystemException, PortalException { @@ -377,6 +379,44 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { return dynamicQuery; } + public int countByPosizione(double lat, double lng, int raggio) throws SystemException { + List lista = findByPosizione(lat, lng, raggio); + return lista.size(); + } + + public List findByPosizione(double lat, double lng, int raggio) throws SystemException { + return findByPosizione(lat, lng, raggio, QueryUtil.ALL_POS, QueryUtil.ALL_POS); + } + + public List findByPosizione(double lat, double lng, int raggio, int start, int end) + throws SystemException { + DynamicQuery query = queryPosizione(); + List trovate = new ArrayList<>(); + for (IntPratica pratica : (List) intPraticaPersistence.findWithDynamicQuery(query)) { + if (pratica.calcolaDistanzaOrtodromica(lat, lng) <= raggio) { + trovate.add(pratica); + } + } + Collections.sort(trovate, new Comparator() { + @Override + public int compare(IntPratica o1, IntPratica o2) { + return o1.getDistanzaOrtodromica().compareTo(o2.getDistanzaOrtodromica()); + } + }); + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS)) { + return trovate; + } else { + return trovate.subList(start, Math.min(end, trovate.size())); + } + } + + private DynamicQuery queryPosizione() { + DynamicQuery query = IntPraticaLocalServiceUtil.dynamicQuery(); + query.add(RestrictionsFactoryUtil.ne("numeroProgetto", StringPool.BLANK)); + query.add(RestrictionsFactoryUtil.isNotNull("numeroProgetto")); + return query; + } + @Override @Indexable(type = IndexableType.REINDEX) public IntPratica addNumeroProgetto(long intPraticaId) throws PortalException, SystemException { @@ -432,6 +472,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { } @Override + @Indexable(type = IndexableType.REINDEX) public IntPratica updateStatoPratica(long intPraticaId, String statoPratica) throws PortalException, SystemException { @@ -440,12 +481,12 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { IntPratica intPratica = getIntPratica(intPraticaId); intPratica.setModifiedDate(new Date()); intPratica.setStatoPratica(statoPratica); + return updateIntPratica(intPratica); } @Override public List findByC_UserId(long companyId, long userId, int start, int end) throws SystemException { - return intPraticaPersistence.findByC_UserId(companyId, userId, start, end); } @@ -493,6 +534,133 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { intPratica = updateIntPratica(intPratica); } + @Override + public List findByCompanyIdSoggettoProgetti(long companyId, long soggettoId) + throws SystemException, PortalException { + + DynamicQuery dynamicQuery = createQueryProgetti(companyId, soggettoId); + + return intPraticaPersistence.findWithDynamicQuery(dynamicQuery); + } + + @Override + public int countByCompanyIdSoggettoProgetti(long companyId, long soggettoId) throws SystemException, + PortalException { + + DynamicQuery dynamicQuery = createQueryProgetti(companyId, soggettoId); + + return (int) intPraticaPersistence.countWithDynamicQuery(dynamicQuery); + } + + private DynamicQuery createQueryProgetti(long companyId, long soggettoId) throws SystemException, + PortalException { + + DynamicQuery dynamicQuery = intPraticaLocalService.dynamicQuery(); + dynamicQuery.add(PropertyFactoryUtil.forName("companyId").eq(companyId)); + dynamicQuery.add(PropertyFactoryUtil.forName("userId").eq(soggettoId)); + dynamicQuery.add(RestrictionsFactoryUtil.ne("statoPratica", StatoPraticaConstants.ANNULLATA)); + Disjunction disjunction = RestrictionsFactoryUtil.disjunction(); + disjunction.add(RestrictionsFactoryUtil.eq("status", WorkflowConstants.STATUS_ANY)); + disjunction.add(RestrictionsFactoryUtil.eq("status", WorkflowConstants.STATUS_INCOMPLETE)); + // disjunction.add(RestrictionsFactoryUtil.eq("status", + // WorkflowConstants.STATUS_DRAFT)); + dynamicQuery.add(disjunction); + + return dynamicQuery; + } + + @Override + public List findByCompanyIdSoggettoArchivio(long companyId, long soggettoId) + throws SystemException, PortalException { + + List ids = soggettoLocalService.findIntPraticaBySoggettoId(soggettoId); + if (ids.isEmpty()) { + return Collections. emptyList(); + } + + DynamicQuery dynamicQuery = createQueryArchivio(companyId, soggettoId, ids); + + return intPraticaPersistence.findWithDynamicQuery(dynamicQuery); + } + + @Override + public int countByCompanyIdSoggettoArchivio(long companyId, long soggettoId) throws SystemException, + PortalException { + + List ids = soggettoLocalService.findIntPraticaBySoggettoId(soggettoId); + if (ids.isEmpty()) { + return 0; + } + + DynamicQuery dynamicQuery = createQueryArchivio(companyId, soggettoId, ids); + + return (int) intPraticaPersistence.countWithDynamicQuery(dynamicQuery); + } + + private DynamicQuery createQueryArchivio(long companyId, long soggettoId, List ids) + throws SystemException, PortalException { + + DynamicQuery dynamicQuery = intPraticaLocalService.dynamicQuery(); + dynamicQuery.add(PropertyFactoryUtil.forName("companyId").eq(companyId)); + + Disjunction disjunction = RestrictionsFactoryUtil.disjunction(); + disjunction.add(RestrictionsFactoryUtil.eq("status", WorkflowConstants.STATUS_EXPIRED)); + disjunction.add(RestrictionsFactoryUtil.eq("status", WorkflowConstants.STATUS_IN_TRASH)); + disjunction.add(RestrictionsFactoryUtil.eq("status", WorkflowConstants.STATUS_APPROVED)); + disjunction.add(RestrictionsFactoryUtil.eq("statoPratica", StatoPraticaConstants.ANNULLATA)); + dynamicQuery.add(disjunction); + + Disjunction disjunctionSoggetti = RestrictionsFactoryUtil.disjunction(); + disjunctionSoggetti.add(RestrictionsFactoryUtil.eq("userId", soggettoId)); + disjunctionSoggetti.add(RestrictionsFactoryUtil.in("intPraticaId", ids)); + dynamicQuery.add(disjunctionSoggetti); + + return dynamicQuery; + } + + @Override + public List findByCompanyIdSoggettoAltriProgetti(long companyId, long soggettoId, int start, + int end) throws SystemException, PortalException { + + List ids = soggettoLocalService.findIntPraticaBySoggettoId(soggettoId); + if (ids.isEmpty()) { + return Collections.EMPTY_LIST; + } + + DynamicQuery dynamicQuery = createQueryAltriProgetti(companyId, ids); + + return intPraticaPersistence.findWithDynamicQuery(dynamicQuery, start, end); + } + + @Override + public int countByCompanyIdSoggettoAltriProgetti(long companyId, long soggettoId) throws SystemException, + PortalException { + + List ids = soggettoLocalService.findIntPraticaBySoggettoId(soggettoId); + if (ids.isEmpty()) { + return 0; + } + + DynamicQuery dynamicQuery = createQueryAltriProgetti(companyId, ids); + + return (int) intPraticaPersistence.countWithDynamicQuery(dynamicQuery); + } + + private DynamicQuery createQueryAltriProgetti(long companyId, List ids) throws SystemException, + PortalException { + + DynamicQuery dynamicQuery = intPraticaLocalService.dynamicQuery(); + dynamicQuery.add(PropertyFactoryUtil.forName("companyId").eq(companyId)); + + dynamicQuery.add(RestrictionsFactoryUtil.ne("status", WorkflowConstants.STATUS_ANY)); + dynamicQuery.add(RestrictionsFactoryUtil.ne("status", WorkflowConstants.STATUS_INCOMPLETE)); + dynamicQuery.add(RestrictionsFactoryUtil.ne("statoPratica", StatoPraticaConstants.ANNULLATA)); + + dynamicQuery.add(RestrictionsFactoryUtil.in("intPraticaId", ids)); + + return dynamicQuery; + } + @SuppressWarnings("unchecked") @Override public List findByCanAddFineLavori(long companyId, String codiceFiscale, int start, int end) @@ -503,6 +671,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { } @Override + public int countByCanAddFineLavori(long companyId, String codiceFiscale) throws SystemException, PortalException { DynamicQuery dynamicQuery = createQueryFineLavori(companyId, codiceFiscale); @@ -568,6 +737,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { dynamicQuery.add(RestrictionsFactoryUtil.isNotNull("dtPratica")); dynamicQuery.add(RestrictionsFactoryUtil.ne("statoPratica", StatoPraticaConstants.ANNULLATA)); return intPraticaPersistence.findWithDynamicQuery(dynamicQuery, start, end); + } @Override @@ -1092,6 +1262,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { return intPraticaPersistence.findByTerritorioId(territorioId); } + // ADT: report tempistiche istruttorie @Override public List reportTempisticheIstruttorieAvvisiAutorizzazioni(Date dtMin, Date dtMax, long groupId, @@ -1104,7 +1275,6 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { @Override public List reportPraticheVidimate(Date dtMin, Date dtMax, long groupId, String type) throws SystemException { - return IntPraticaFinderUtil.reportPraticheVidimate(dtMin, dtMax, groupId, type); } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java index 3e5128f0..73a46094 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AllegatoManualePersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchAllegatoManualeException; import it.tref.liferay.portos.bo.model.AllegatoManuale; import it.tref.liferay.portos.bo.model.impl.AllegatoManualeImpl; import it.tref.liferay.portos.bo.model.impl.AllegatoManualeModelImpl; -import it.tref.liferay.portos.bo.service.persistence.AllegatoManualePersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java index 15633d6f..63caa01d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AsseverazionePersistenceImpl.java @@ -46,7 +46,6 @@ import it.tref.liferay.portos.bo.NoSuchAsseverazioneException; import it.tref.liferay.portos.bo.model.Asseverazione; import it.tref.liferay.portos.bo.model.impl.AsseverazioneImpl; import it.tref.liferay.portos.bo.model.impl.AsseverazioneModelImpl; -import it.tref.liferay.portos.bo.service.persistence.AsseverazionePersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java index d73613ab..8f8bd310 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/AvvisoPersistenceImpl.java @@ -46,7 +46,6 @@ import it.tref.liferay.portos.bo.NoSuchAvvisoException; import it.tref.liferay.portos.bo.model.Avviso; import it.tref.liferay.portos.bo.model.impl.AvvisoImpl; import it.tref.liferay.portos.bo.model.impl.AvvisoModelImpl; -import it.tref.liferay.portos.bo.service.persistence.AvvisoPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java index 02dcaba3..0b546e1a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/CollaudoPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchCollaudoException; import it.tref.liferay.portos.bo.model.Collaudo; import it.tref.liferay.portos.bo.model.impl.CollaudoImpl; import it.tref.liferay.portos.bo.model.impl.CollaudoModelImpl; -import it.tref.liferay.portos.bo.service.persistence.CollaudoPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java index 4a23bffd..b0b64b21 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunePersistenceImpl.java @@ -46,7 +46,6 @@ import it.tref.liferay.portos.bo.NoSuchComuneException; import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.impl.ComuneImpl; import it.tref.liferay.portos.bo.model.impl.ComuneModelImpl; -import it.tref.liferay.portos.bo.service.persistence.ComunePersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java index f5b8166f..0b7f9ee2 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ComunicazionePersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchComunicazioneException; import it.tref.liferay.portos.bo.model.Comunicazione; import it.tref.liferay.portos.bo.model.impl.ComunicazioneImpl; import it.tref.liferay.portos.bo.model.impl.ComunicazioneModelImpl; -import it.tref.liferay.portos.bo.service.persistence.ComunicazionePersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java index 32809343..66507dd0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ConfigurazionePersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchConfigurazioneException; import it.tref.liferay.portos.bo.model.Configurazione; import it.tref.liferay.portos.bo.model.impl.ConfigurazioneImpl; import it.tref.liferay.portos.bo.model.impl.ConfigurazioneModelImpl; -import it.tref.liferay.portos.bo.service.persistence.ConfigurazionePersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java index a4fa6f91..48cf51eb 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ControlloPraticaPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchControlloPraticaException; import it.tref.liferay.portos.bo.model.ControlloPratica; import it.tref.liferay.portos.bo.model.impl.ControlloPraticaImpl; import it.tref.liferay.portos.bo.model.impl.ControlloPraticaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.ControlloPraticaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java index 8c56fb32..402cecd0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DelegaPersistenceImpl.java @@ -46,7 +46,6 @@ import it.tref.liferay.portos.bo.NoSuchDelegaException; import it.tref.liferay.portos.bo.model.Delega; import it.tref.liferay.portos.bo.model.impl.DelegaImpl; import it.tref.liferay.portos.bo.model.impl.DelegaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.DelegaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java index 36e82c84..bef23f56 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DettPraticaPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchDettPraticaException; import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.impl.DettPraticaImpl; import it.tref.liferay.portos.bo.model.impl.DettPraticaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.DettPraticaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java index 3adff95b..689264dd 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocAggiuntivaPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchDocAggiuntivaException; import it.tref.liferay.portos.bo.model.DocAggiuntiva; import it.tref.liferay.portos.bo.model.impl.DocAggiuntivaImpl; import it.tref.liferay.portos.bo.model.impl.DocAggiuntivaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.DocAggiuntivaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java index 13bd7b4f..f4a4b84a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/DocPraticaPersistenceImpl.java @@ -46,7 +46,6 @@ import it.tref.liferay.portos.bo.NoSuchDocPraticaException; import it.tref.liferay.portos.bo.model.DocPratica; import it.tref.liferay.portos.bo.model.impl.DocPraticaImpl; import it.tref.liferay.portos.bo.model.impl.DocPraticaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.DocPraticaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java index 15f0504f..41c1b2be 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/FineLavoriPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchFineLavoriException; import it.tref.liferay.portos.bo.model.FineLavori; import it.tref.liferay.portos.bo.model.impl.FineLavoriImpl; import it.tref.liferay.portos.bo.model.impl.FineLavoriModelImpl; -import it.tref.liferay.portos.bo.service.persistence.FineLavoriPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java index f80406ab..ad50d7ea 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/HistoryWorkflowActionPersistenceImpl.java @@ -42,7 +42,6 @@ import it.tref.liferay.portos.bo.NoSuchHistoryWorkflowActionException; import it.tref.liferay.portos.bo.model.HistoryWorkflowAction; import it.tref.liferay.portos.bo.model.impl.HistoryWorkflowActionImpl; import it.tref.liferay.portos.bo.model.impl.HistoryWorkflowActionModelImpl; -import it.tref.liferay.portos.bo.service.persistence.HistoryWorkflowActionPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java index bda5c175..35a1b793 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java @@ -48,7 +48,6 @@ import it.tref.liferay.portos.bo.NoSuchIntPraticaException; import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.impl.IntPraticaImpl; import it.tref.liferay.portos.bo.model.impl.IntPraticaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.IntPraticaPersistence; import java.io.Serializable; @@ -4398,6 +4397,8 @@ public class IntPraticaPersistenceImpl extends BasePersistenceImpl intPraticaImpl.setTipoPratica(intPratica.getTipoPratica()); intPraticaImpl.setTerritorioId(intPratica.getTerritorioId()); intPraticaImpl.setTipoProcedura(intPratica.getTipoProcedura()); + intPraticaImpl.setLatitudine(intPratica.getLatitudine()); + intPraticaImpl.setLongitudine(intPratica.getLongitudine()); intPraticaImpl.setDtAnnullamento(intPratica.getDtAnnullamento()); intPraticaImpl.setDocPraticaAnnullamentoId(intPratica.getDocPraticaAnnullamentoId()); intPraticaImpl.setUnitaOperativa(intPratica.getUnitaOperativa()); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java index 863e32df..12fb36d2 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/PagamentoPersistenceImpl.java @@ -46,7 +46,6 @@ import it.tref.liferay.portos.bo.NoSuchPagamentoException; import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.impl.PagamentoImpl; import it.tref.liferay.portos.bo.model.impl.PagamentoModelImpl; -import it.tref.liferay.portos.bo.service.persistence.PagamentoPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java index e4133c60..c6ce3907 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ParereGeologoPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchParereGeologoException; import it.tref.liferay.portos.bo.model.ParereGeologo; import it.tref.liferay.portos.bo.model.impl.ParereGeologoImpl; import it.tref.liferay.portos.bo.model.impl.ParereGeologoModelImpl; -import it.tref.liferay.portos.bo.service.persistence.ParereGeologoPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java index 2c7a846f..daa33e1b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/ProvinciaPersistenceImpl.java @@ -43,7 +43,6 @@ import it.tref.liferay.portos.bo.NoSuchProvinciaException; import it.tref.liferay.portos.bo.model.Provincia; import it.tref.liferay.portos.bo.model.impl.ProvinciaImpl; import it.tref.liferay.portos.bo.model.impl.ProvinciaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.ProvinciaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java index 90251acb..35a48fdf 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/SoggettoPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchSoggettoException; import it.tref.liferay.portos.bo.model.Soggetto; import it.tref.liferay.portos.bo.model.impl.SoggettoImpl; import it.tref.liferay.portos.bo.model.impl.SoggettoModelImpl; -import it.tref.liferay.portos.bo.service.persistence.SoggettoPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java index 26f13dda..da5af496 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/StoricoSoggettoPraticaPersistenceImpl.java @@ -42,7 +42,6 @@ import it.tref.liferay.portos.bo.NoSuchStoricoSoggettoPraticaException; import it.tref.liferay.portos.bo.model.StoricoSoggettoPratica; import it.tref.liferay.portos.bo.model.impl.StoricoSoggettoPraticaImpl; import it.tref.liferay.portos.bo.model.impl.StoricoSoggettoPraticaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.StoricoSoggettoPraticaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java index de92727b..90d5b692 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TempisticaPersistenceImpl.java @@ -45,7 +45,6 @@ import it.tref.liferay.portos.bo.NoSuchTempisticaException; import it.tref.liferay.portos.bo.model.Tempistica; import it.tref.liferay.portos.bo.model.impl.TempisticaImpl; import it.tref.liferay.portos.bo.model.impl.TempisticaModelImpl; -import it.tref.liferay.portos.bo.service.persistence.TempisticaPersistence; import java.io.Serializable; diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java index 030778b4..6e60848d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/TerritorioPersistenceImpl.java @@ -44,7 +44,6 @@ import it.tref.liferay.portos.bo.NoSuchTerritorioException; import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.impl.TerritorioImpl; import it.tref.liferay.portos.bo.model.impl.TerritorioModelImpl; -import it.tref.liferay.portos.bo.service.persistence.TerritorioPersistence; import java.io.Serializable; 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 55efd0f2..148f9f19 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=3217 - build.date=1624968076399 + build.number=3159 + build.date=1625231374376 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 6a84959d..0cf6110a 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,2 +1,3 @@ - \ No newline at end of file + + \ No newline at end of file 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 ed23006b..6aa88f42 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 @@ -1,37 +1,37 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@page import="it.tref.liferay.portos.bo.util.Constants"%> +<%@page import="com.liferay.portal.kernel.bean.BeanPropertiesUtil"%> +<%@page import="it.mwg.sismica.bo.util.MappeUtil"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%> <%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%> <%@page import="it.tref.liferay.portos.bo.util.AzioniPraticheUtil"%> -<%@page import="java.util.regex.Pattern"%> +<%@page import="it.tref.liferay.portos.bo.util.Constants"%> <%@page import="java.util.ArrayList"%> -<%@page import="com.liferay.portal.kernel.util.KeyValuePair"%> -<%@page import="com.liferay.portal.kernel.bean.BeanPropertiesUtil"%> -<%@ include file="/html/fascicolo/init.jsp" %> +<%@page import="java.util.regex.Pattern"%> +<%@include file="/html/fascicolo/init.jsp"%> <% - long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId", 0l); - DettPratica dettPratica; - if(Validator.isNotNull(dettPraticaId)) { - dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId); - } else { - dettPratica = (DettPratica)request.getAttribute("bean.dettPratica.lastData"); - } - IntPratica intPratica = (IntPratica)request.getAttribute("bean.intPratica"); - if(intPratica == null){ - intPratica = IntPraticaServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); - } - Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); - Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId()); - Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia()); - boolean isDisabledMap = ParamUtil.getBoolean(request, "isDisabledMap", false); +long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId", 0L); +DettPratica dettPratica; +if (Validator.isNotNull(dettPraticaId)) { + dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId); +} else { + dettPratica = (DettPratica) request.getAttribute("bean.dettPratica.lastData"); +} +IntPratica intPratica = (IntPratica) request.getAttribute("bean.intPratica"); +if (Validator.isNull(intPratica)) { + intPratica = IntPraticaServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); +} +Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); +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, true); %> - + -
-
-
+
@@ -50,7 +50,7 @@
-
<%= LanguageUtil.get(pageContext, "sanatoria-edilizia") %>
+
<%= LanguageUtil.get(pageContext, "sanatoria-edilizia") %>
@@ -67,6 +67,11 @@ <%= LanguageUtil.get(pageContext, "sanatoria-edilizia-326") %>
+
+
+
+
+
@@ -76,13 +81,7 @@
- -
-
-
-
-
- +
@@ -94,6 +93,37 @@
<%=BeanPropertiesUtil.getString(dettPratica, "intervFinPubDesc") %>
+
+
+
+
+
+
+
+
+ <%= LanguageUtil.get(pageContext, "interv-no-viarch") %> +
+
+
+
+ + <%= LanguageUtil.get(pageContext, "interv-in-area-di-interesse") %> +
+
+ + <%= LanguageUtil.get(pageContext, "interv-non-modificante") %> +
+
+ + <%= LanguageUtil.get(pageContext, "interv-non-assoggettabile") %> +
+
+
+
+
+
+
+
<%= LanguageUtil.get(pageContext, "norm-esente-bollo") %> @@ -136,18 +166,14 @@ <%= LanguageUtil.get(pageContext, "nomina-collaudatore") %>
- - -
-
-
+
@@ -157,11 +183,9 @@
- -
-
+
@@ -211,48 +235,53 @@
<%= LanguageUtil.get(pageContext, "dc-particelle") %>
- <% - String[] particelle= dettPratica.getDcParticelle().split(Pattern.quote("|")); - %> + <% String[] particelle= dettPratica.getDcParticelle().split(Pattern.quote("|")); %>
-
+
<%= particelle.length > 0 ? particelle[0] : StringPool.BLANK %>
-
+
<%= particelle.length > 1 ? particelle[1] : StringPool.BLANK %>
-
+
<%= particelle.length > 2 ? particelle[2] : StringPool.BLANK %>
-
+
<%= particelle.length > 3 ? particelle[3] : StringPool.BLANK %>
- -
-
- <%= LanguageUtil.get(pageContext, "estremi-catastali") %> -
-
- <%= dettPratica.getEstremiCatastali() %> -
-
-
+
-
- <% - String[] geolocalization = dettPratica.getLocalizzazioneGeografica().split(Pattern.quote("|")); - %> - - - - - -
-
+
+ <% String[] geolocalization = dettPratica.getLocalizzazioneGeografica().split(Pattern.quote("|")); %> + + + + + + +
+ +
+
+
+
+ +
+
+
+
+
+
+ + + +
+
+
@@ -260,21 +289,21 @@
-
+
-
+
<%= LanguageUtil.get(pageContext, "livello-di-tutela") %>
-
+
<%= dettPratica.getLivelloDiTutela() %>
-
+
<%= LanguageUtil.get(pageContext, "paesaggio-locale") %>
-
+
<%= dettPratica.getPaesaggioLocale() %>
@@ -290,24 +319,23 @@
-
+
<% String label = dettPratica.getDestinazione(); - - String uso = ""; - String title = ""; - if (!label.equals("")) { + String uso = StringPool.BLANK; + String title = StringPool.BLANK; + if (!label.equals(StringPool.BLANK)) { String pref = label.substring(0, 1); if (label.length() > 1) { - title = label.substring(0, label.length()-1); - uso = title.substring(title.length()-1); - out.print(LanguageUtil.get(pageContext, "destinazione-uso-"+uso)+":"); + title = label.substring(0, label.length() - 1); + uso = title.substring(title.length() - 1); + out.print(LanguageUtil.get(pageContext, "destinazione-uso-" + uso) + StringPool.COLON); out.newLine(); - out.print(LanguageUtil.get(pageContext, "destinazione-"+title)+":"); + out.print(LanguageUtil.get(pageContext, "destinazione-" + title) + StringPool.COLON); } } %> - <%=LanguageUtil.get(pageContext, "destinazione-"+ label)%> + <%= LanguageUtil.get(pageContext, "destinazione-" + label) %>
@@ -316,22 +344,22 @@
-
+
- - <%=LanguageUtil.get(pageContext, "tc-nuova-costruzione") %> + + <%= LanguageUtil.get(pageContext, "tc-nuova-costruzione") %>
- - <%=LanguageUtil.get(pageContext, "tc-nuova-costruzione-pertinenza") %> + + <%= LanguageUtil.get(pageContext, "tc-nuova-costruzione-pertinenza") %>
- - <%=LanguageUtil.get(pageContext, "tc-costruzioni-esistenti") %> + + <%= LanguageUtil.get(pageContext, "tc-costruzioni-esistenti") %>
@@ -355,7 +383,7 @@
-
+
@@ -364,56 +392,56 @@ <%=LanguageUtil.get(pageContext, "tc-in-c-a") %>
-
- - <%=LanguageUtil.get(pageContext, "tc-in-opera") %> +
+ + <%= LanguageUtil.get(pageContext, "tc-in-opera") %>
-
- - <%=LanguageUtil.get(pageContext, "tc-prefabbricato") %> +
+ + <%= LanguageUtil.get(pageContext, "tc-prefabbricato") %>
-
- - <%=LanguageUtil.get(pageContext, "tc-in-acciaio") %> +
+ + <%= LanguageUtil.get(pageContext, "tc-in-acciaio") %>
-
- - <%=LanguageUtil.get(pageContext, "tc-mista") %> -
-
+
+ + <%= LanguageUtil.get(pageContext, "tc-mista") %> +
+
-
- - <%=LanguageUtil.get(pageContext, "tc-in-muratura") %> +
+ + <%= LanguageUtil.get(pageContext, "tc-in-muratura") %>
-
- - <%=LanguageUtil.get(pageContext, "tc-in-muratura-ordinaria") %> -
-
- - <%=LanguageUtil.get(pageContext, "tc-in-muratura-armata") %> +
+ + <%= LanguageUtil.get(pageContext, "tc-in-muratura-ordinaria") %>
-
- - <%=LanguageUtil.get(pageContext, "tc-in-muratura-mista") %> +
+ + <%= LanguageUtil.get(pageContext, "tc-in-muratura-armata") %> +
+
+ + <%= LanguageUtil.get(pageContext, "tc-in-muratura-mista") %>
-
- - <%=LanguageUtil.get(pageContext, "tc-in-legno") %> +
+ + <%= LanguageUtil.get(pageContext, "tc-in-legno") %>
-
- - <%=LanguageUtil.get(pageContext, "tc-altro") %> +
+ + <%= LanguageUtil.get(pageContext, "tc-altro") %>
-
- <%=BeanPropertiesUtil.getString(dettPratica, "tcAltroDescrizione") %> +
+ <%= BeanPropertiesUtil.getString(dettPratica, "tcAltroDescrizione") %>
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_riepilogo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_riepilogo.jsp index 40716e16..1a026c70 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_riepilogo.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_riepilogo.jsp @@ -155,6 +155,17 @@ List historyWorkflowActions = HistoryWorkflowActionLocalS <%= dettPratica.getVincoli() %>
+ + +
+
+ <%= LanguageUtil.get(pageContext, "estremi-catastali") %> +
+
+ <%= dettPratica.getEstremiCatastali() %> +
+
+
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp index 5ca96ec9..8c7d4759 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp @@ -196,7 +196,7 @@ String keywords = StringPool.BLANK; <% long intPraticaId = intPratica.getIntPraticaId(); DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId); - Log _log = LogFactoryUtil.getLog("fascicolo/view.jsp"); + Log _log = LogFactoryUtil.getLog("fascicolo_view_jsp"); if (lastDettPratica == null) { _log.info("intPraticaId=" + intPraticaId + ", lastDettPratica null"); } 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 dc201161..837ba538 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 @@ -2,6 +2,7 @@ <%@page import="it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants"%> <%@ include file="/html/fascicolo/init.jsp" %> <% + String[] pageRiepilogo = new String[] { "page_riepilogo", "page_dettagli_principali", "page_desc_edificio", "page_sez_geologica", "page_soggetti", "page_allegati", "page_asseverazioni", "page_pagamenti", "page_andamento", "page_avvisi", "page_storico_titolari", "page_versioning" }; @@ -25,6 +26,7 @@ DettPratica dettPraticaLastData = dettPraticaLast; request.setAttribute("bean.intPratica", intPratica); request.setAttribute("bean.dettPratica.last", dettPraticaLast); request.setAttribute("bean.dettPratica.lastData", dettPraticaLastData); + %> <%@ include file="/html/fascicolo/html_bottom.jspf" %> 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 0dda56b4..2971a610 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 @@ -1,13 +1,46 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@include file="/html/paesaggistica_administration/init.jsp"%> +<%@page import="org.apache.commons.lang.time.DateUtils"%> +<%@page import="java.util.Calendar"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants"%> +<%@page import="java.util.Date"%> +<%@page import="java.util.Map"%> +<%@ include file="/html/paesaggistica_administration/init.jsp"%> + +<% + +SimpleDateFormat simpleDateTimeFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); + +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 sharedSecret = ConfigurazioneServiceUtil.findByC_ChiaveString(companyId, ConfigurazioneConstants.MAPPE_SHARED_SECRET); +%> +
+ +
-
Form per reindicizzare un fascicolo
+
Impostazioni sistema mappe
+ Valore di test: https://test2.mwg.it/geoportal.php
+ +
+ + + + +
+
+
+
+
+
+
Form per reindicizzare un + fascicolo
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 new file mode 100644 index 00000000..4a06365a --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp @@ -0,0 +1,551 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/html/init.jsp" %> +<%@page import="com.liferay.portal.kernel.util.HtmlUtil"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil"%> +<%@page import="it.tref.liferay.portos.bo.util.PraticaUtil"%> +<%@page import="java.text.NumberFormat"%> +<%@page import="java.text.DecimalFormat"%> +<%@page import="java.util.ArrayList"%> +<%@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); + +%> + + +
+
+
+ +
+
+
+ + + +
+
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+
+ + <% 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") %> +
+
+
+
+
+ + + + +var getProvince = function(callback) { + A.io.request( + '<%= getProvinceURL %>', + { + dataType: 'json', + on: { + success: function() { + var data = this.get('responseData'); + province = {}; + for (var i = 0; i < data.length; i++) { + province[data[i].nome.replaceAll(' ', '-').toLowerCase()] = data[i].id; + } + callback(data); + } + } + } + ); +}; + +var getComuni = function(callback, provinciaId) { + A.io.request( + '<%= getComuniURL %>', + { + dataType: 'json', + data: { + provinciaId: provinciaId + }, + on: { + success: function() { + var data = this.get('responseData'); + callback(data); + if ('' !== comuneSelezionato) { + for (var i = 0; i < data.length; i++) { + if (data[i].nome.replaceAll(' ', '-').toLowerCase() === comuneSelezionato) { + A.one('#comune').set('value', data[i].id); + } + } + comuneSelezionato = ''; + } + } + } + } + ); +}; +new Liferay.DynamicSelect([ + { + select: 'provincia', + selectData: getProvince, + selectDesc: 'nome', + selectId: 'id', + selectSort: true, + selectVal: '<%= codiceProvincia %>', + }, + { + select: 'comune', + selectData: getComuni, + selectDesc: 'nome', + selectId: 'id', + selectSort: true, + selectDisableOnEmpty: true, + selectVal: '<%= idComune %>', + }, +]); + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/js/main.js b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/js/main.js index acb433cb..c07f0a7c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/js/main.js +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/js/main.js @@ -1,103 +1,13 @@ -/* -var versionamento = { - changes : [], - init : function(idPratica, lastVersion, currentVersion) { - var scope = this; - this.loadJsonVersion(idPratica, lastVersion, true); - if (currentVersion > 0) { - this.loadJsonVersion(idPratica, currentVersion, false); - setTimeout(function() { - scope.getChanges(idPratica, currentVersion); - }, 300) - } else { - $('#_1_WAR_portosboportlet_version_number .version_body').html( - "

Nessuna Versione precedente all'attuale

") - } - }, - sliderChange : function(idPratica, currentVersion) { - var scope = this; - this.loadJsonVersion(idPratica, currentVersion, false); - setTimeout(function() { - scope.getChanges(idPratica, currentVersion); - }, 300) - }, - loadJsonVersion : function(idPratica, versionNumber, last) { - var scope = this; - Liferay.Service('/portos-bo-portlet.dettpratica/get-json-version', { - intPraticaId : idPratica, - version : versionNumber - }, function(obj) { - var item = last ? "_1_WAR_portosboportlet_version_last" : "_1_WAR_portosboportlet_version_number"; - scope.updateHTML(JSON.parse(obj), item, last ? false : versionNumber); - }); - }, - getChanges : function(idPratica, versionNumber) { - var scope = this; - Liferay.Service('/portos-bo-portlet.dettpratica/call-for-changes', - { - intPraticaId : idPratica, - version : versionNumber - }, - function(obj) { - var arr = JSON.parse(obj); - $("#_1_WAR_portosboportlet_version_number .version_item").removeClass("background-red") - $("#_1_WAR_portosboportlet_version_last .version_item").removeClass("background-green") - for (index in arr) { - var key = arr[index]; - var left = $("#_1_WAR_portosboportlet_version_number .item_" + key), right = $("#_1_WAR_portosboportlet_version_last .item_" - + key); - left.addClass("background-red") - right.addClass("background-green") - var heights = [ left, right ].map(function(item) { - return $(item).outerHeight(); - }); - left.css('height', Math.max.apply(null, heights)); - right.css('height', Math.max.apply(null, heights)); - } - } - ); - }, - updateHTML : function(obj, containerId, versionNumber) { - var scope = this; - var version_container = $('#' + containerId); - if (versionNumber) { - version_container.find(".number").html(versionNumber); - } - for (item in obj) { - var item_value = obj[item].replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\""); - version_container.find('.item_' + item + " .item_value").html("" + item_value + "") - } - } +if ($('.cont_maps').length) { + $('.cont_maps ul li').click(function () { + var map = mapItMap.getInstance(); + setTimeout(function () { + map.updateSize(); + if (map.layers.length > 0) + map.layers[0].redraw(); + }, 100); + }); } -var sliderVersion = { - init : function(val, idPratica) { - var initialValue = val; - var min = 1; - var maxValue = (val - 1) > 0 ? val - 1 : 0; - versionamento.init(idPratica, val, maxValue); - $("#label-slider").text(maxValue); - if (maxValue <= 1) { - $("#label-slider").css("margin-left", '0'); - } - $(function() { - $("#slider").slider({ - value : val, - min : 1, - max : maxValue, - step : 1, - slide : function(event, ui) { - $("#label-slider").text(ui.value); - if (maxValue == 0) { - $("#label-slider").css("margin-left", '0'); - } else { - $("#label-slider").css("margin-left", (ui.value - min) / (maxValue - min) * 100 + '%'); - } - $("#label-slider").css("left", "-15px"); - versionamento.sliderChange(idPratica, ui.value); - } - }); - }); - }, -} -*/ \ No newline at end of file + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/.tern-project b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/.tern-project new file mode 100644 index 00000000..a185ba0d --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/.tern-project @@ -0,0 +1 @@ +{"ide":{"scriptPaths":[]},"plugins":{"aui":{},"liferay":{},"yui":{}},"libs":["ecma5","browser"]} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/commons-logging.jar b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/commons-logging.jar deleted file mode 100644 index 8758a96b..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/commons-logging.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/jstl-api.jar b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/jstl-api.jar deleted file mode 100644 index 80a5737f..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/jstl-api.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/jstl-impl.jar b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/jstl-impl.jar deleted file mode 100644 index e5a9342f..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/jstl-impl.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/log4j.jar b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/log4j.jar deleted file mode 100644 index 068867eb..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/log4j.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/util-bridges.jar b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/util-bridges.jar deleted file mode 100644 index 7d7435fe..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/util-bridges.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/util-taglib.jar b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/util-taglib.jar deleted file mode 100644 index fbba5f0a..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/util-taglib.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/liferay-portlet.xml index 66de82b1..00892f95 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -5,15 +5,11 @@ 1 /icon.png - - configuration - + configuration 1.5 it.tref.liferay.portos.deployalert.control.DeployAlertControl /css/main.css - - /js/main.js - + /js/main.js notificator-portlet diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/portlet.xml index 11f54260..ddb0f9f8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/portlet.xml @@ -1,12 +1,13 @@ - - + + 1 Deploy Alert - - it.tref.liferay.portos.deployalert.portlet.NotificatorPortlet - + it.tref.liferay.portos.deployalert.portlet.NotificatorPortlet view-template /html/notificator/view.jsp diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/service.properties index 559de9e9..4cba4298 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=DA - build.number=9 - build.date=1606299034524 + build.number=10 + build.date=1612446773513 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/tld/c.tld b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/tld/c.tld deleted file mode 100644 index 98efa6a6..00000000 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/tld/c.tld +++ /dev/null @@ -1,572 +0,0 @@ - - - - - JSTL 1.2 core library - JSTL core - 1.2 - c - http://java.sun.com/jsp/jstl/core - - - - Provides core validation features for JSTL tags. - - - org.apache.taglibs.standard.tlv.JstlCoreTLV - - - - - - Catches any Throwable that occurs in its body and optionally - exposes it. - - catch - org.apache.taglibs.standard.tag.common.core.CatchTag - JSP - - -Name of the exported scoped variable for the -exception thrown from a nested action. The type of the -scoped variable is the type of the exception thrown. - - var - false - false - - - - - - Simple conditional tag that establishes a context for - mutually exclusive conditional operations, marked by - <when> and <otherwise> - - choose - com.liferay.taglib.core.ChooseTag - JSP - - - - - Simple conditional tag, which evalutes its body if the - supplied condition is true and optionally exposes a Boolean - scripting variable representing the evaluation of this condition - - if - com.liferay.taglib.core.IfTag - JSP - - -The test condition that determines whether or -not the body content should be processed. - - test - true - true - boolean - - - -Name of the exported scoped variable for the -resulting value of the test condition. The type -of the scoped variable is Boolean. - - var - false - false - - - -Scope for var. - - scope - false - false - - - - - - Retrieves an absolute or relative URL and exposes its contents - to either the page, a String in 'var', or a Reader in 'varReader'. - - import - org.apache.taglibs.standard.tag.rt.core.ImportTag - org.apache.taglibs.standard.tei.ImportTEI - JSP - - -The URL of the resource to import. - - url - true - true - - - -Name of the exported scoped variable for the -resource's content. The type of the scoped -variable is String. - - var - false - false - - - -Scope for var. - - scope - false - false - - - -Name of the exported scoped variable for the -resource's content. The type of the scoped -variable is Reader. - - varReader - false - false - - - -Name of the context when accessing a relative -URL resource that belongs to a foreign -context. - - context - false - true - - - -Character encoding of the content at the input -resource. - - charEncoding - false - true - - - - - - The basic iteration tag, accepting many different - collection types and supporting subsetting and other - functionality - - forEach - org.apache.taglibs.standard.tag.rt.core.ForEachTag - org.apache.taglibs.standard.tei.ForEachTEI - JSP - - -Collection of items to iterate over. - - items - false - true - java.lang.Object - - java.lang.Object - - - - -If items specified: -Iteration begins at the item located at the -specified index. First item of the collection has -index 0. -If items not specified: -Iteration begins with index set at the value -specified. - - begin - false - true - int - - - -If items specified: -Iteration ends at the item located at the -specified index (inclusive). -If items not specified: -Iteration ends when index reaches the value -specified. - - end - false - true - int - - - -Iteration will only process every step items of -the collection, starting with the first one. - - step - false - true - int - - - -Name of the exported scoped variable for the -current item of the iteration. This scoped -variable has nested visibility. Its type depends -on the object of the underlying collection. - - var - false - false - - - -Name of the exported scoped variable for the -status of the iteration. Object exported is of type -javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested -visibility. - - varStatus - false - false - - - - - - Iterates over tokens, separated by the supplied delimeters - - forTokens - org.apache.taglibs.standard.tag.rt.core.ForTokensTag - JSP - - -String of tokens to iterate over. - - items - true - true - java.lang.String - - java.lang.String - - - - -The set of delimiters (the characters that -separate the tokens in the string). - - delims - true - true - java.lang.String - - - -Iteration begins at the token located at the -specified index. First token has index 0. - - begin - false - true - int - - - -Iteration ends at the token located at the -specified index (inclusive). - - end - false - true - int - - - -Iteration will only process every step tokens -of the string, starting with the first one. - - step - false - true - int - - - -Name of the exported scoped variable for the -current item of the iteration. This scoped -variable has nested visibility. - - var - false - false - - - -Name of the exported scoped variable for the -status of the iteration. Object exported is of -type -javax.servlet.jsp.jstl.core.LoopTag -Status. This scoped variable has nested -visibility. - - varStatus - false - false - - - - - - Like <%= ... >, but for expressions. - - out - org.apache.taglibs.standard.tag.rt.core.OutTag - JSP - - -Expression to be evaluated. - - value - true - true - - - -Default value if the resulting value is null. - - default - false - true - - - -Determines whether characters <,>,&,'," in the -resulting string should be converted to their -corresponding character entity codes. Default value is -true. - - escapeXml - false - true - - - - - - - Subtag of <choose> that follows <when> tags - and runs only if all of the prior conditions evaluated to - 'false' - - otherwise - com.liferay.taglib.core.OtherwiseTag - JSP - - - - - Adds a parameter to a containing 'import' tag's URL. - - param - org.apache.taglibs.standard.tag.rt.core.ParamTag - JSP - - -Name of the query string parameter. - - name - true - true - - - -Value of the parameter. - - value - false - true - - - - - - Redirects to a new URL. - - redirect - org.apache.taglibs.standard.tag.rt.core.RedirectTag - JSP - - -The URL of the resource to redirect to. - - url - false - true - - - -Name of the context when redirecting to a relative URL -resource that belongs to a foreign context. - - context - false - true - - - - - - Removes a scoped variable (from a particular scope, if specified). - - remove - org.apache.taglibs.standard.tag.common.core.RemoveTag - empty - - -Name of the scoped variable to be removed. - - var - true - false - - - -Scope for var. - - scope - false - false - - - - - - Sets the result of an expression evaluation in a 'scope' - - set - org.apache.taglibs.standard.tag.rt.core.SetTag - JSP - - -Name of the exported scoped variable to hold the value -specified in the action. The type of the scoped variable is -whatever type the value expression evaluates to. - - var - false - false - - - -Expression to be evaluated. - - value - false - true - - java.lang.Object - - - - -Target object whose property will be set. Must evaluate to -a JavaBeans object with setter property property, or to a -java.util.Map object. - - target - false - true - - - -Name of the property to be set in the target object. - - property - false - true - - - -Scope for var. - - scope - false - false - - - - - - Creates a URL with optional query parameters. - - url - org.apache.taglibs.standard.tag.rt.core.UrlTag - JSP - - -Name of the exported scoped variable for the -processed url. The type of the scoped variable is -String. - - var - false - false - - - -Scope for var. - - scope - false - false - - - -URL to be processed. - - value - false - true - - - -Name of the context when specifying a relative URL -resource that belongs to a foreign context. - - context - false - true - - - - - - Subtag of <choose> that includes its body if its - condition evalutes to 'true' - - when - com.liferay.taglib.core.WhenTag - JSP - - -The test condition that determines whether or not the -body content should be processed. - - test - true - true - boolean - - - - diff --git a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/ivy.xml.MD5 b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/ivy.xml.MD5 index eeb28191..0d659d7c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/ivy.xml.MD5 +++ b/liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/ivy.xml.MD5 @@ -1 +1 @@ -b2c2a2163a9e57f49e684a33bc7d0817 +5ae48f34ca95a715172797941f9c2717 diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/liferay-portlet.xml index f952966d..b928b1fe 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -10,18 +10,14 @@ com.liferay.portal.kernel.portlet.DefaultConfigurationAction /css/main.css - - /js/main.js - + /js/main.js?v=2 1-portlet 2 /icon.png /css/main.css - - /js/main.js - + /js/main.js?v=2 ricerca-pratiche-portlet @@ -31,9 +27,7 @@ /icon.png 0 /css/main.css - - /js/main.js - + /js/main.js?v=2 soggetti-pratica-portlet @@ -45,9 +39,7 @@ true 0 /css/main.css - - /js/main.js - + /js/main.js?v=2 alegati-pratica-portlet @@ -59,9 +51,7 @@ true 0 /css/main.css - - /js/main.js - + /js/main.js?v=2 parere-geologo-portlet diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/content/Language.properties b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/content/Language.properties index 49777e50..6b4b19cb 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/content/Language.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/content/Language.properties @@ -100,4 +100,4 @@ error.geniocivilefe.asseverazione.allegato.firma.valid=File non firmato dall'ass error.geniocivilefe.pagamento.allegato.ext.valid=Tipo di file errato (solo pdf o p7m) error.geniocivilefe.pagamento.allegato.length.valid=Nome del file troppo lungo (max 200 caratteri) -error.geniocivilefe.pagamento.allegato.is.request=Nessun allegato inviato \ No newline at end of file +error.geniocivilefe.pagamento.allegato.is.request=Nessun allegato inviato diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp index 90a3b037..d0f56ade 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp @@ -94,9 +94,6 @@ comune:{ requiredSelect:'comune' }, - /*territorioId:{ - requiredSelect:'zona - fascia' - },*/ tipoProcedura:{ requiredSelect:'procedura' } @@ -176,15 +173,7 @@ selectId: 'comuneId', selectSort: true, selectVal: '0' - }/*, - { - select: 'territorioId', - selectData: getZoneFasce, - selectDesc: 'descLong', - selectId: 'territorioId', - selectVal: '0' - }*/ - + } ] ); @@ -202,13 +191,6 @@ $('.add-new-project__comune select').change(function(){ var val = $(this).val(); - /*if (val == 0) { - $('.add-new-project__fascia select').prop('disabled', 'disabled'); - $('.add-new-project__procedura input').prop('disabled', 'disabled').prop('checked', false); - $('.add-new-project__procedura div').removeClass('success'); - }else if(val !== 0) { - $('.add-new-project__fascia select').prop('disabled', false); - }*/ if (val == 0) { $('.add-new-project__procedura input').prop('disabled', 'disabled').prop('checked', false); $('.add-new-project__procedura div').removeClass('success'); @@ -216,15 +198,4 @@ $('.add-new-project__procedura input').prop('disabled', false).removeClass('disabled').parent().css('display', 'block'); } }); - - /*$('.add-new-project__fascia select').change(function(){ - var val = $(this).val(); - if (val == 0) { - $('.add-new-project__procedura input').prop('disabled', 'disabled').prop('checked', false); - $('.add-new-project__procedura div').removeClass('success'); - }else if(val !== 0) { - $('.add-new-project__procedura input').prop('disabled', false).removeClass('disabled').parent().css('display', 'block'); - } - });*/ - \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp index 6072c22d..1c9683ab 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp @@ -1,4 +1,6 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants"%> +<%@page import="it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.util.AzioniPraticheUtil"%> <%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%> <%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%> @@ -19,10 +21,12 @@ <%@page import="it.tref.liferay.portos.bo.model.IntPratica"%> <%@page import="it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.model.DettPratica"%> +<%@page import="it.mwg.sismica.bo.util.MappeUtil" %> <%@page import="java.util.ArrayList"%> <%@page import="com.liferay.portal.kernel.util.KeyValuePair"%> <%@ include file="/html/fascicolofe/init.jsp" %> <% + DettPratica dettPratica = (DettPratica)request.getAttribute("bean.dettPratica"); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); @@ -38,6 +42,10 @@ boolean isGeoEditable = TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPrati || TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equalsIgnoreCase(dettPratica.getTipoIntegrazione()); boolean enabledByIntegrazione = DelegheUtil.hasDelegaCompilazioneDomanda(user.getUserId(), dettPratica.getDettPraticaId()) && TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equals(dettPratica.getTipoIntegrazione()); +boolean isDisabled = disabledInput && !enabledByIntegrazione; +boolean isNewVariante = ParamUtil.getBoolean(request, "isNewVariante"); +String urlIframeMappe = MappeUtil.getUrlFe(request, dettPratica, comune, (disabledInput || isGeoEditable)); + %> @@ -110,14 +118,12 @@ boolean enabledByIntegrazione = DelegheUtil.hasDelegaCompilazioneDomanda(user.ge
-

<%= LanguageUtil.get(pageContext, "interv-no-viarch") %>

-
- +
+

<%= LanguageUtil.get(pageContext, "interv-no-viarch") %>

-
+
+ -
-
@@ -198,7 +204,7 @@ boolean enabledByIntegrazione = DelegheUtil.hasDelegaCompilazioneDomanda(user.ge
-
+

<%= LanguageUtil.get(pageContext, "norm-art3com3") %>:

    @@ -216,14 +222,13 @@ boolean enabledByIntegrazione = DelegheUtil.hasDelegaCompilazioneDomanda(user.ge
-

<%=LanguageUtil.get(pageContext, "norm-art3com4") %>:

+

<%= LanguageUtil.get(pageContext, "norm-art3com4") %>:

-
@@ -231,6 +236,63 @@ boolean enabledByIntegrazione = DelegheUtil.hasDelegaCompilazioneDomanda(user.ge
+
+ + +
+ +
+
+
+ +
+
+
+ +
+ +
+ +
+ +
+
+
+
+
@@ -266,88 +328,58 @@ boolean enabledByIntegrazione = DelegheUtil.hasDelegaCompilazioneDomanda(user.ge disabled="<%= true %>" onClick="localize(true)" value="Localizza"/>
-
-
- -
-
- -
-
-
- <% - String[] particelle= BeanParamUtil.getString(dettPratica, request, "dcParticelle","").split(Pattern.quote("|")); - %> -
-
<%= LanguageUtil.get(pageContext, "dc-particelle") %>
-
-
- -
-
- -
-
- -
-
- -
-
- -
- -
- -
-
-
-
+
<% String[] geolocalization = BeanParamUtil.getString(dettPratica, request, "localizzazioneGeografica","").split(Pattern.quote("|")); %> - +
+ value='<%= geolocalization.length > 0 ? geolocalization[0] : StringPool.BLANK %>' /> + value='<%= geolocalization.length > 0 ? geolocalization[0] : StringPool.BLANK %>' label="dp-lat"/>
+ value='<%= geolocalization.length > 1 ? geolocalization[1] : StringPool.BLANK %>'/> + value='<%= geolocalization.length > 1 ? geolocalization[1] : StringPool.BLANK %>' label="dp-long"/>
- +
-
-
-
- -
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
-
+
@@ -653,15 +685,19 @@ boolean enabledByIntegrazione = DelegheUtil.hasDelegaCompilazioneDomanda(user.ge - + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_dettagli.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_dettagli.jsp index aa7b00d6..1f9d1c76 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_dettagli.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_dettagli.jsp @@ -38,6 +38,7 @@ <%@page import="java.util.ArrayList"%> <%@page import="com.liferay.portal.kernel.util.KeyValuePair"%> <%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> +<%@page import="it.mwg.sismica.bo.util.MappeUtil" %> <% @@ -62,6 +63,8 @@ Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId()); Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia()); + + String urlIframeMappe = MappeUtil.getUrlFe(request, dettPratica, comune, true); %> @@ -84,7 +87,7 @@
-
<%= LanguageUtil.get(pageContext, "sanatoria-edilizia") %>
+ <%= LanguageUtil.get(pageContext, "sanatoria-edilizia") %>
@@ -101,6 +104,12 @@ <%= LanguageUtil.get(pageContext, "sanatoria-edilizia-326") %>
+ +
+
+
+
+
@@ -109,13 +118,8 @@ <%= LanguageUtil.get(pageContext, "intervento-voce-p7") %> <%=dettPratica.getInterventoVoceP7()%>
- + -
-
-
-
-
@@ -127,6 +131,37 @@
<%=BeanPropertiesUtil.getString(dettPratica, "intervFinPubDesc") %>
+
+
+
+
+
+
+
+
+ <%= LanguageUtil.get(pageContext, "interv-no-viarch") %> +
+
+
+
+ + <%= LanguageUtil.get(pageContext, "interv-in-area-di-interesse") %> +
+
+ + <%= LanguageUtil.get(pageContext, "interv-non-modificante") %> +
+
+ + <%= LanguageUtil.get(pageContext, "interv-non-assoggettabile") %> +
+
+
+
+
+
+
+
<%= LanguageUtil.get(pageContext, "norm-esente-bollo") %> @@ -275,21 +310,12 @@
- -
-
- <%= LanguageUtil.get(pageContext, "estremi-catastali") %> -
-
- <%= BeanPropertiesUtil.getString(dettPratica, "estremiCatastali") %> -
-
-
+
-
+
<% String[] geolocalization = BeanPropertiesUtil.getString(dettPratica, "localizzazioneGeografica","").split(Pattern.quote("|")); %> @@ -303,8 +329,26 @@
- - + + +
+ +
+
+
+ +
+
+
+
+
+ + +
+ +
+
+
@@ -344,6 +388,16 @@ <%= BeanPropertiesUtil.getString(dettPratica, "vincoli") %>
+ +
+
+ <%= LanguageUtil.get(pageContext, "estremi-catastali") %> +
+
+ <%= BeanPropertiesUtil.getString(dettPratica, "estremiCatastali") %> +
+
+
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_riepilogo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_riepilogo.jsp index 018f8329..a472e268 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_riepilogo.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_riepilogo.jsp @@ -121,7 +121,7 @@
-
+
@@ -330,7 +330,7 @@
-
+
@@ -394,10 +394,10 @@
- <%= LanguageUtil.get(pageContext, "dc-foglio") %> + <%= LanguageUtil.get(pageContext, "estremi-catastali") %>
- <%=BeanPropertiesUtil.getString(dettPratica, "dcFoglio") %> + <%= BeanPropertiesUtil.getString(dettPratica, "estremiCatastali") %>
<%= LanguageUtil.get(pageContext, "dc-allegato") %> @@ -408,62 +408,13 @@
-
- <%= LanguageUtil.get(pageContext, "dc-particelle") %> -
-
- <% - String[] particelle= BeanPropertiesUtil.getString(dettPratica, "dcParticelle").split(Pattern.quote("|")); - %> -
- <%=particelle.length>0?particelle[0]:StringPool.BLANK %> -
-
- <%=particelle.length>1?particelle[1]:StringPool.BLANK %> -
-
- <%=particelle.length>2?particelle[2]:StringPool.BLANK %> -
-
- <%=particelle.length>3?particelle[3]:StringPool.BLANK %> -
-
-
+
<%= LanguageUtil.get(pageContext, "estremi-prat-com") %>
-
+
<%=BeanPropertiesUtil.getString(dettPratica, "estremiPratCom") %>
-
- -
-
- <%= LanguageUtil.get(pageContext, "estremi-catastali") %> -
-
- <%= BeanPropertiesUtil.getString(dettPratica, "estremiCatastali") %> -
-
-
-
-
-
- <% - String[] geolocalization = BeanPropertiesUtil.getString(dettPratica, "localizzazioneGeografica","").split(Pattern.quote("|")); - %> -
- -
-
- -
- - -
-
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/js/main.js b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/js/main.js index 4cf3e5e3..3b569292 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/js/main.js +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/js/main.js @@ -92,3 +92,14 @@ $('body').on('mouseup', 'label.radio', function(){ if(radio.length) uncheck_radio_before_click(radio); }) + +if($('.cont_maps').length){ + $('.cont_maps ul li').click(function(){ + var map = mapItMap.getInstance(); + setTimeout(function(){ + map.updateSize(); + if(map.layers.length > 0) + map.layers[0].redraw(); + }, 100); + }); +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/.tern-project b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/.tern-project new file mode 100644 index 00000000..a185ba0d --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-log-portlet/.tern-project @@ -0,0 +1 @@ +{"ide":{"scriptPaths":[]},"plugins":{"aui":{},"liferay":{},"yui":{}},"libs":["ecma5","browser"]} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/build.xml b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/build.xml index 9479e677..76de9c9c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/build.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/build.xml @@ -2,5 +2,6 @@ + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/WEB-INF/lib/tref-mapit-shared.jar b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/WEB-INF/lib/tref-mapit-shared.jar index 132e1a7d..39c715bb 100644 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/WEB-INF/lib/tref-mapit-shared.jar and b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/WEB-INF/lib/tref-mapit-shared.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/plugin/top.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/plugin/top.jsp index 5b6702c1..aa1f367c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/plugin/top.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/plugin/top.jsp @@ -6,27 +6,15 @@ <%@page import="com.liferay.portal.util.PortletKeys"%> <%@page import="com.liferay.portlet.PortletURLFactoryUtil"%> <%@include file="/html/plugin/init.jsp" %> - - <% - String contextName = getServletContext().getServletContextName(); - String portletNamespace = ParamUtil.getString(request, "mapitNamespace", "_1_WAR_portosfeportlet_"); +String contextName = getServletContext().getServletContextName(); +String portletNamespace = ParamUtil.getString(request, "mapitNamespace", "_1_WAR_portosfeportlet_"); +String verifyComune = ParamUtil.getString(request, "verifyComune", "true"); %> - + - -<% -/* PortletURL popupURL = PortletURLFactoryUtil.create(request, "1_WAR_portosmapitplugin", - plid, PortletRequest.RENDER_PHASE); */ - -/* popupURL.setParameter("mvcPath", "/html/move_asset/popup.jsp"); -popupURL.setWindowState(LiferayWindowState.POP_UP); -popupURL.setPortletMode(PortletMode.VIEW); */ -%> - -
- +
@@ -95,7 +81,7 @@ popupURL.setPortletMode(PortletMode.VIEW); */ var portletNamespace = "<%= portletNamespace %>", mapItMap; - +var verifyComune = <%= verifyComune %>; Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getServletContextName() %>', function(event) { AUI().use('liferay-mapit-map', 'aui-io-request', function(A) { @@ -107,106 +93,27 @@ Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getSer mapItMap = Liferay.MapItMap.get(portletId); var latitude = AUI().one("#"+portletNamespace+"lat"), - longitude = AUI().one("#"+portletNamespace+"long"), - isEditable = AUI().one("#"+portletNamespace+"geoIsEditable").val() == "true"; + longitude = AUI().one("#"+portletNamespace+"long"); + var isEditable = AUI().one("#"+portletNamespace+"geoIsEditable"); + isEditable = (undefined == isEditable) || (isEditable.val() == "true"); var editableLatitude = AUI().one("#"+portletNamespace+"lat_hidden"), editableLongitude = AUI().one("#"+portletNamespace+"long_hidden"), - editableZoom = AUI().one("#"+portletNamespace+"zoom"); + editableZoom = AUI().one("#"+portletNamespace+"zoom"); - var extent = new OpenLayers.Bounds(); - extent.extend(new OpenLayers.LonLat(9.6771486410157, 44.486291328126)); - extent.extend(new OpenLayers.LonLat(12.431970418358, 42.214181342774)); + var extent = new OpenLayers.Bounds(); + extent.extend(new OpenLayers.LonLat(9.6771486410157, 44.486291328126)); + extent.extend(new OpenLayers.LonLat(12.431970418358, 42.214181342774)); - var geographic = new OpenLayers.Projection("EPSG:4326"); + var geographic = new OpenLayers.Projection("EPSG:4326"); var mercator = new OpenLayers.Projection( "EPSG:3857"); extent.transform(geographic,mercator ); - //mapItMap.addOption({restrictedExtent: extent}); - - /* var boxes = new OpenLayers.Layer.Boxes("boxes"); - var box = new OpenLayers.Marker.Box(extent); - boxes.addMarker(box); - mapItMap.addWMSLayer(boxes); */ - - - var civici = new OpenLayers.Layer.WMS( - 'Numeri Civici', - 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsosm_d&map_resolution=91&', { - styles: 'etichette_blu', - layers: 'rt_osm.civici.point', transparent: true}, - {isBaseLayer: false, visibility : false} - ); - //mapItMap.addWMSLayer(civici); - - var comuni = new OpenLayers.Layer.WMS( - 'Comuni', - 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsambamm&map_resolution=91', { - styles: 'contorno_senza_etichette', - layers: 'rt_ambamm.idcomuni.rt.poly', transparent: true}, - {isBaseLayer: false} - ); - //mapItMap.addWMSLayer(comuni); - - var topografico = new OpenLayers.Layer.WMS( - 'Topografico', - 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscartoteca&map_resolution=91&', { - styles: 'senza_etichette', - layers: 'rt_cartoteca.dbt.2k', transparent: true}, - {isBaseLayer: false, visibility : false} - ); - //mapItMap.addWMSLayer(topografico); - - var rischio_bacini_regionali = new OpenLayers.Layer.WMS( - 'Rischio Idrogeologico', - 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsperidr&map_resolution=91&language=ita&', { - styles: 'default', - layers: 'rt_peridr.rischio_bacini_regionali', transparent: true}, - {isBaseLayer: false, visibility : false} - ); - //mapItMap.addWMSLayer(rischio_bacini_regionali); - - var catasto_strade = new OpenLayers.Layer.WMS( - 'Strade', - 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&map_resolution=91&language=ita&', { - styles: 'terra_di_siena_bruciata', - layers: 'rt_cat.idcatstrade.rt', transparent: true}, - {isBaseLayer: false, visibility : false} - ); - //mapItMap.addWMSLayer(catasto_strade); - - var catasto_fabbricati = new OpenLayers.Layer.WMS( - 'Fabbricati', - 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&map_resolution=91&language=ita&', { - styles: 'carminio_chiaro', - layers: 'rt_cat.idcatfabbr.rt', transparent: true}, - {isBaseLayer: false, visibility : false} - ); - //mapItMap.addWMSLayer(catasto_fabbricati); - - var catasto_fogli = new OpenLayers.Layer.WMS( - 'Fogli Catastali', - 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&map_resolution=91&language=ita&', { - styles: 'solo_contorno_viola_fine_con_etichette', - layers: 'rt_cat.idcatbdfog.rt', transparent: true}, - {isBaseLayer: false, visibility : false} - ); - //mapItMap.addWMSLayer(catasto_fogli); - - var catasto_particelle = new OpenLayers.Layer.WMS( - 'Particelle Catastali', - 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&map_resolution=91&language=ita&', { - styles: 'contorno_rosso_mattone_con_etichette', - layers: 'rt_cat.idcatpart.rt', transparent: true}, - {isBaseLayer: false, visibility : false} - ); - //mapItMap.addWMSLayer(catasto_particelle); - var markerStyle = { - graphicHeight: 29, - graphicWidth: 22, - externalGraphic: '<%= getServletContext().getContextPath() + "/images/marker.png" %>' - }; + graphicHeight: 29, + graphicWidth: 22, + externalGraphic: '<%= getServletContext().getContextPath() + "/images/marker.png" %>' + }; var layerName = ''; if(latitude.val()!="" && longitude.val()!=""){ @@ -216,7 +123,6 @@ Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getSer style: markerStyle }]; mapItMap.addLayerPoints(layerName, point, true, {selectable: true, displayInLayerSwitcher: false}); - /* mapItMap.moveMap(longitude , latitude , mapItMap.getCurrentZoom()); */ var secureZoom = "8"; if(editableZoom != undefined && editableZoom != null){ var secureZoom =editableZoom.val() @@ -225,54 +131,40 @@ Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getSer } - if(isEditable){ - + if (isEditable) { mapItMap.registerFunctionOnEvent("click", function (e) { - var position = mapItMap.getPositionOnClick(e); - var point_lat = position.lat; - var point_long = position.lon; - var zoom = mapItMap.getCurrentZoom(); - var newPoint = [ { - lat: point_lat, - lon: point_long, - style: markerStyle - }]; - - mapItMap.addLayerPoints(layerName, newPoint, true, {}); - if (confirm("Vuoi aggiornare automaticamente i dati della localizzazione?") == true) { - updateCoords(point_lat, point_long, zoom, true); - } - /* confirm("Vuoi aggiornare automaticamente i dati della localizzazione?", - {x : point_lat, y : point_long, z : true} - ) */ - - }); + var position = mapItMap.getPositionOnClick(e); + var point_lat = position.lat; + var point_long = position.lon; + var zoom = mapItMap.getCurrentZoom(); + var newPoint = [ { + lat: point_lat, + lon: point_long, + style: markerStyle + }]; + mapItMap.addLayerPoints(layerName, newPoint, true, {}); + if (confirm("Vuoi aggiornare automaticamente i dati della localizzazione?")) { + updateCoords(point_lat, point_long, zoom, true); + } + }); mapItMap.attachDrag(layerName, { on: { complete: function(event) { - /* console.log(mapItMap); - console.log(event); - console.log(mapItMap.getPositionOnClick(event)); */ + var point_lat = event.latitude; + var point_long = event.longitude; + var zoom = mapItMap.getCurrentZoom(); - var point_lat = event.latitude; - var point_long = event.longitude; - var zoom = mapItMap.getCurrentZoom(); - - - if (confirm("Vuoi aggiornare automaticamente i dati della localizzazione?") == true) { - updateCoords(point_lat, point_long, zoom, true); - } - /* confirm("Vuoi aggiornare automaticamente i dati della localizzazione?", - {x : point_lat, y : point_long, z : true} - ) */ + if (confirm("Vuoi aggiornare automaticamente i dati della localizzazione?")) { + updateCoords(point_lat, point_long, zoom, true); + } } } }); mapItMap.activateDrag("Pratica"); - var zoomEvent = function(){ - if(editableLatitude.val()!="" && editableLongitude.val()!=""){ + var zoomEvent = function() { + if (editableLatitude.val() != "" && editableLongitude.val() != "") { editableZoom.val(mapItMap.getCurrentZoom()); } }; @@ -281,63 +173,37 @@ Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getSer } Liferay.fire('mapIt-ready'); - - - /* featurePicker = new OpenLayers.Control.WMSGetFeatureInfo({ - url: 'http://www502.regione.toscana.it/wmsraster/com.rt.wms.RTmap/wms?map=wmscatasto&map_resolution=91&language=ita&', - title: 'Identify features by clicking', - layers: [catasto_particelle, catasto_fogli], - queryVisible: false, - output:'features', - eventListeners: { - getfeatureinfo: function(event) { - console.log(event); - console.log(event.features); - console.log(event.text); - }, - nogetfeatureinfo: function(event) { - console.err("No queriable layers found"); - } - - } - }); - - mapItMap.insertControl(featurePicker); - featurePicker.activate(); - console.log("Activated"); */ - - A.one("#map").append('
'); - var lockButton = A.one('#container_btn .bloccamap'), - lockLayer = A.one('#map .layermap'), - latValue = editableLatitude != null ? editableLatitude.val() : latitude.val(), - longValue = editableLongitude != null ? editableLongitude.val() : longitude.val(), - locked = latValue!="" && longValue!=""; - lockMap(lockButton, lockLayer, latValue, longValue, !locked) - - A.one('#container_btn .bloccamap').on('click', function(event){ - var nodeObject = event.currentTarget, - locked = event.currentTarget.hasClass('fa-lock'); - lockMap(lockButton, lockLayer, latValue, longValue, locked); - }); + A.one("#map").append('
'); + var lockButton = A.one('#container_btn .bloccamap'), + lockLayer = A.one('#map .layermap'), + latValue = editableLatitude != null ? editableLatitude.val() : latitude.val(), + longValue = editableLongitude != null ? editableLongitude.val() : longitude.val(), + locked = latValue != "" && longValue != ""; + lockMap(lockButton, lockLayer, latValue, longValue, !locked) + + A.one('#container_btn .bloccamap').on('click', function(event) { + var nodeObject = event.currentTarget, + locked = event.currentTarget.hasClass('fa-lock'); + lockMap(lockButton, lockLayer, latValue, longValue, locked); + }); } }); }); -function lockMap(lockButton, lockLayer, latitude, longitude, locked){ - if(locked){ +function lockMap(lockButton, lockLayer, latitude, longitude, locked) { + if (locked) { lockButton.replaceClass('fa-lock', 'fa-unlock'); lockLayer.removeClass('activelayer'); } else { lockButton.replaceClass('fa-unlock', 'fa-lock'); lockLayer.addClass('activelayer'); } - if(latitude!="" && longitude!=""){ + if (latitude != "" && longitude != "") { mapItMap.moveMap(longitude, latitude, mapItMap.getCurrentZoom()); - //updateCoords(latitude, longitude, mapItMap.getCurrentZoom(), false); var editableZoom = AUI().one("#"+portletNamespace+"zoom"); - if(editableZoom!=null){ + if (editableZoom != null) { editableZoom.val(mapItMap.getCurrentZoom()); } } @@ -351,16 +217,14 @@ Liferay.on('geolocation-ready',function(event) { longitude = event.longitude, full = event.fullAddress; - if(latitude!="" && longitude!=""){ + if (latitude != "" && longitude != "") { var zoom = mapItMap.getCurrentZoom() > 8 ? mapItMap.getCurrentZoom() : 12; - console.log(full); - if(full){ - //zoom = 14; + if (full) { var markerStyle = { - graphicHeight: 29, - graphicWidth: 22, - externalGraphic: '<%= getServletContext().getContextPath() + "/images/marker.png" %>' - }; + graphicHeight: 29, + graphicWidth: 22, + externalGraphic: '<%= getServletContext().getContextPath() + "/images/marker.png" %>' + }; var layerName = ''; var newlonLat = new OpenLayers.LonLat(longitude, latitude).transform( new OpenLayers.Projection("EPSG:3857") , new OpenLayers.Projection("EPSG:4326")); @@ -373,155 +237,118 @@ Liferay.on('geolocation-ready',function(event) { mapItMap.addLayerPoints(layerName, search_point, true, {}); updateCoords(latitude, longitude, zoom, false); } - mapItMap.moveMap(longitude, latitude, zoom); - } }); }); function updateCoords(lat_coord, long_coord, zoom_coord, fullUpdate, noTransform){ AUI().use('aui-io-request', function(A) { - var latitude = AUI().one("#"+portletNamespace+"lat"), - longitude = AUI().one("#"+portletNamespace+"long"), - editableLatitude = AUI().one("#"+portletNamespace+"lat_hidden"), - editableLongitude = AUI().one("#"+portletNamespace+"long_hidden"), - editableZoom = AUI().one("#"+portletNamespace+"zoom"), - city = AUI().one("#"+portletNamespace+"comune"); - address = AUI().one("#"+portletNamespace+"via"); + var latitude = AUI().one("#" + portletNamespace + "lat"), + longitude = AUI().one("#" + portletNamespace + "long"), + editableLatitude = AUI().one("#" + portletNamespace + "lat_hidden"), + editableLongitude = AUI().one("#" + portletNamespace + "long_hidden"), + editableZoom = AUI().one("#" + portletNamespace + "zoom"), + city = AUI().one("#" + portletNamespace + "comune"); + address = AUI().one("#" + portletNamespace + "via"); var newlonLat; - if(fullUpdate){ - if(!noTransform) + if (fullUpdate) { + if (!noTransform) { newlonLat = new OpenLayers.LonLat(long_coord, lat_coord).transform( new OpenLayers.Projection("EPSG:3857") , new OpenLayers.Projection("EPSG:4326")); - else + } else { newlonLat = new OpenLayers.LonLat(long_coord, lat_coord); + } var markerStyle = { - graphicHeight: 29, - graphicWidth: 22, - externalGraphic: '<%= getServletContext().getContextPath() + "/images/marker.png" %>' - }; - var layerName = ''; - - var search_point = [ { - lat: newlonLat.lat, - lon: newlonLat.lon, - style: markerStyle - }]; - mapItMap.addLayerPoints(layerName, search_point, true, {}); + graphicHeight: 29, + graphicWidth: 22, + externalGraphic: '<%= getServletContext().getContextPath() + "/images/marker.png" %>' + }; + var layerName = ''; - }else{ - newlonLat=new OpenLayers.LonLat(long_coord, lat_coord); + var search_point = [ { + lat: newlonLat.lat, + lon: newlonLat.lon, + style: markerStyle + }]; + mapItMap.addLayerPoints(layerName, search_point, true, {}); + } else { + newlonLat = new OpenLayers.LonLat(long_coord, lat_coord); } - + var url = "https://nominatim.openstreetmap.org/reverse?format=json&zoom=18&addressdetails=1" +"&lat="+(newlonLat.lat)+"&lon="+(newlonLat.lon); - if(fullUpdate){ + if (fullUpdate) { A.io.request(url, { - dataType: 'json', - on: { - success: function() { + dataType: 'json', + on: { + success: function() { + var response = this.get('responseData'), + town = response.address.city != undefined + ? response.address.city + : (response.address.town != undefined + ? response.address.town + : response.address.village) + .replaceAll(' ', '-') + .toLowerCase(); - var response = this.get('responseData'), - town = response.address.city!=undefined ? response.address.city : (response.address.town!=undefined ? response.address.town : response.address.village); - - if(city.val().toLowerCase().split(" ").join("_") != town.toLowerCase().split(" ").join("_")){ - alert("Attenzione!\nHai selezionato un punto esterno al comune di riferimento..."); - address.val(""); - } else { - - var fullAddress = ''; - if(response.address.road != undefined) - fullAddress += response.address.road; - else if(response.address.pedestrian != undefined) - fullAddress += response.address.pedestrian; - - if(fullAddress != '') - fullAddress += (response.address.house_number != undefined ? " " + response.address.house_number : ""); - - address.val(fullAddress); - + if (verifyComune && city.val().toLowerCase().split(" ").join("-") != town) { + alert("Attenzione!\nHai selezionato un punto esterno al comune di riferimento..."); + address.val(""); + } else { + var fullAddress = ''; + if(response.address.road != undefined) { + fullAddress += response.address.road; + } else if (response.address.pedestrian != undefined) { + fullAddress += response.address.pedestrian; + } + if (fullAddress != '') { + fullAddress += (response.address.house_number != undefined ? " " + response.address.house_number : ""); + } + address.val(fullAddress); + if (!verifyComune) { + var provincia = response.address.county.replaceAll(' ', '-').toLowerCase(); + var province = window[portletNamespace + 'province']; + if (undefined != province[provincia]) { + AUI().use('event', 'node-event-simulate', function(A) { + A.one('#' + portletNamespace + 'provincia') + .set('value', province[provincia]) + .simulate('change'); + window[portletNamespace + 'comuneSelezionato'] = town.replaceAll(' ', '-').toLowerCase(); + }); + } + } + } + } } - } - } }); } - - /*editableLatitude.val(lat_coord); - latitude.val(lat_coord); - editableLongitude.val(long_coord); - editableZoom.val(zoom_coord); - longitude.val(long_coord);*/ editableLatitude.val(newlonLat.lat); - latitude.val(newlonLat.lat); - editableLongitude.val(newlonLat.lon); - editableZoom.val(zoom_coord); - longitude.val(newlonLat.lon); - + latitude.val(newlonLat.lat); + editableLongitude.val(newlonLat.lon); + longitude.val(newlonLat.lon); + editableZoom.val(zoom_coord); }); } window.alert = function(msg){ - $('.customAlertMessage').text(msg); - $('.customAlert').css('animation', 'fadeIn 0.3s linear'); - $('.customAlert').css('display', 'inline'); - setTimeout(function(){ - $('.customAlert').css('animation', 'none'); - }, 100); + $('.customAlertMessage').text(msg); + $('.customAlert').css('animation', 'fadeIn 0.3s linear'); + $('.customAlert').css('display', 'inline'); + setTimeout(function(){ + $('.customAlert').css('animation', 'none'); + }, 100); }; -$(function(){ - $('.confirmButton').click(function(){ - $('.customAlert').css('animation', 'fadeOut 0.3s linear'); - setTimeout(function(){ - $('.customAlert').css('animation', 'none'); - $('.customAlert').css('display', 'none'); - }, 100); - }); -}); - -/* -var globalGeolocationParams; -window.confirm = function(msg, callback){ - $('.message').text(msg); - $('.customConfirm').css('animation', 'fadeIn 0.3s linear'); - $('.customConfirm').css('display', 'inline'); - setTimeout(function(){ - $('.customConfirm').css('animation', 'none'); - }, 100); - - globalGeolocationParams = callback; -}; - -$(function(){ - $('.confirmButton').click(function(){ - $('.customAlert').css('animation', 'fadeOut 0.3s linear'); - setTimeout(function(){ - $('.customAlert').css('animation', 'none'); +$(function() { + $('.confirmButton').click(function() { + $('.customAlert').css('animation', 'fadeOut 0.3s linear'); + setTimeout(function() { + $('.customAlert').css('animation', 'none'); $('.customAlert').css('display', 'none'); - }, 100); - }); - $('.agreeButton').click(function(){ - console.log('agree'); - $('.customConfirm').css('animation', 'fadeOut 0.3s linear'); - setTimeout(function(){ - $('.customConfirm').css('animation', 'none'); - $('.customConfirm').css('display', 'none'); - }, 100); - - updateCoords(globalGeolocationParams.x, globalGeolocationParams.y, globalGeolocationParams.z); - - }); - $('.refuseButton').click(function(){ - console.log('refused'); - $('.customConfirm').css('animation', 'fadeOut 0.3s linear'); - setTimeout(function(){ - $('.customConfirm').css('animation', 'none'); - $('.customConfirm').css('display', 'none'); - }, 100); - return; + }, 100); }); -}); */ +}); \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/images/marker.png b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/images/marker.png index cc9a4211..2f3946a6 100644 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/images/marker.png and b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/images/marker.png differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/images/result.png b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/images/result.png new file mode 100644 index 00000000..4101f2bd Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/images/result.png differ 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 29127700..58553aed 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 @@ -25,4 +25,9 @@ public class ConfigurazioneConstants { // nuove configurazioni public static final String SCHEDULER_VERSIONING = "conf.geniocivile.scheduler.versioning"; public static final String IMPORTO_BOLLO = "conf.geniocivile.scheduler.iris.importobollo"; -} \ No newline at end of file + + 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_SHARED_SECRET = "conf.sismica.mappe.secret"; + +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.classpath b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.classpath new file mode 100644 index 00000000..2ac08420 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.classpath @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.gitignore b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.gitignore new file mode 100644 index 00000000..840e7d31 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.gitignore @@ -0,0 +1 @@ +/classes/ diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.project b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.project new file mode 100644 index 00000000..3e309bb0 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.project @@ -0,0 +1,17 @@ + + + tref-mapit-shared + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/bin/.project b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/bin/.project new file mode 100644 index 00000000..3e309bb0 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/bin/.project @@ -0,0 +1,17 @@ + + + tref-mapit-shared + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/build.xml b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/build.xml new file mode 100644 index 00000000..1c7b3808 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/build.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/Constants.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/Constants.java new file mode 100644 index 00000000..95997559 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/Constants.java @@ -0,0 +1,47 @@ +package it.tref.liferay.mapit.constants; + +import java.math.BigDecimal; + +public interface Constants extends com.liferay.portal.kernel.util.Constants { + public static final int MAX_SEARCH_RESULT = 4000; + public static final String MIN_DECIMAL_INDEX = "000000000"; + public static final String MIN_INTERO_INDEX = "000"; + public static final String MAX_LAT_INDEX = "180"; + public static final String MIN_LAT_INDEX = "000"; + public static final String ZERO_LAT_INDEX = "090"; + public static final String MAX_LON_INDEX = "360"; + public static final String MIN_LON_INDEX = "000"; + public static final String ZERO_LON_INDEX = "180"; + public static final BigDecimal MAX_LON = (new BigDecimal(180)).setScale(0); + public static final BigDecimal MIN_LON = (new BigDecimal(-180)).setScale(0); + public static final BigDecimal MAX_LAT = (new BigDecimal(90)).setScale(0); + public static final BigDecimal MIN_LAT = (new BigDecimal(-90)).setScale(0); + public static final String COORDINATE_SEPARATOR = "."; + public static final String NULL_VALUE = "-1"; + public static final String EXPANDO_TABLE_NAME = "CUSTOM_FIELDS"; + public static final String EXPANDO_COLUMN_NAME_LAT = "MAPIT_LAT"; + public static final String EXPANDO_COLUMN_NAME_LAT_HIDDEN = "MAPIT_LAT_HIDDEN"; + public static final String EXPANDO_COLUMN_NAME_LON = "MAPIT_LON"; + public static final String EXPANDO_COLUMN_NAME_LON_HIDDEN = "MAPIT_LON_HIDDEN"; + + public static class MapTypeValue { + public static final String OPEN_STREET_MAP = "1"; + public static final String GOOGLE_MAP = "2"; + public static final String BING_MAP = "3"; + public static final String BASE_MAP = "4"; + public static final String BASE_MAP_LABEL = "5"; + public static final String IMAGE = "6"; + } + + public static class ZoomTypeValue { + public static final String SIMPLE = "0"; + public static final String COMPACT = "1"; + public static final String FULL = "2"; + } + + public static class ZoomType { + public static final String SIMPLE = "simple"; + public static final String COMPACT = "compact"; + public static final String FULL = "full"; + } +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/DestinationNames.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/DestinationNames.java new file mode 100644 index 00000000..ac8c1eaa --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/DestinationNames.java @@ -0,0 +1,6 @@ +package it.tref.liferay.mapit.constants; + +public interface DestinationNames extends com.liferay.portal.kernel.messaging.DestinationNames { + public static final String ASSET_RESOLVER_PREFIX = "liferay/mapit/assetresolver/"; + public static final String DESTINATION_RESOLVER = "liferay/mapit/destinationresolver"; +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/PortletConfiguration.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/PortletConfiguration.java new file mode 100644 index 00000000..b649462e --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/PortletConfiguration.java @@ -0,0 +1,28 @@ +package it.tref.liferay.mapit.constants; + +public class PortletConfiguration { + public static final String CENTER_LAT = "centerlat"; + public static final String CENTER_LON = "centerlon"; + public static final String GEO_BROWSER = "geobrowser"; + public static final String IGNORE_VIEW = "ignoreView"; + public static final String SAVE_LAST_POSITION = "savelastposition"; + public static final String SHOW_MAP_CODE = "showmapcode"; + public static final String HEIGHT = "height"; + public static final String ZOOM_FACTOR = "zoomfactor"; + public static final String MAP_TYPE = "maptype"; + public static final String API_KEY = "apikey"; + public static final String API_VERSION = "apiversion"; + public static final String MAP_STYLES = "mapStyles"; + public static final String CLASS_NAME_IDS = "classNameIds"; + public static final String PLUGIN_IDS = "pluginIds"; + public static final String IGNORE_BBOX = "ignoreBbox"; + public static final String LAYER_SWITCH = "controllayerswitch"; + public static final String ZOOM_TYPE = "controlzoomtype"; + public static final String FULL_SCREEN = "controlfullscreen"; + public static final String NAV_TOOLBAR = "controlnavtoolbar"; + public static final String MOUSE_POSITION = "controlmouseposition"; + public static final String SCALE = "controlscale"; + public static final String HOME = "controlhome"; + public static final String OVERVIEW_MAP = "controloverviewmap"; + public static final String NO_POPUP = "popunopopup"; +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/WebKeys.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/WebKeys.java new file mode 100644 index 00000000..09e0c1aa --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/WebKeys.java @@ -0,0 +1,5 @@ +package it.tref.liferay.mapit.constants; + +public interface WebKeys extends com.liferay.portal.kernel.util.WebKeys { + public static final String PLUGIN_PORTLET_PREFERENCES = "PLUGIN_PORTLET_PREFERENCES"; +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/messaging/AssetResolverMessageListener.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/messaging/AssetResolverMessageListener.java new file mode 100644 index 00000000..446feaaa --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/messaging/AssetResolverMessageListener.java @@ -0,0 +1,38 @@ +package it.tref.liferay.mapit.messaging; + +import com.liferay.portal.kernel.messaging.BaseMessageListener; +import com.liferay.portal.kernel.messaging.Message; +import com.liferay.portal.kernel.messaging.MessageBusUtil; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.model.BaseModel; +import com.liferay.portlet.documentlibrary.model.DLFileEntry; +import com.liferay.portlet.journal.model.JournalArticle; +import com.liferay.portlet.wiki.model.WikiPage; +import it.tref.liferay.mapit.resolver.BaseModelResolver; +import it.tref.liferay.mapit.resolver.asset.DLFileEntryResolver; +import it.tref.liferay.mapit.resolver.asset.JournalArticleResolver; +import it.tref.liferay.mapit.resolver.asset.WikiPageResolver; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +public class AssetResolverMessageListener extends BaseMessageListener { + public AssetResolverMessageListener() { + _baseModelResolverMap.put(DLFileEntry.class.getName(), new DLFileEntryResolver()); + _baseModelResolverMap.put(WikiPage.class.getName(), new WikiPageResolver()); + _baseModelResolverMap.put(JournalArticle.class.getName(), new JournalArticleResolver()); + } + + protected void doReceive(Message message) throws Exception { + long companyId = message.getLong("companyId"); + long classPK = message.getLong("entryClassPK"); + String className = StringUtil.extractLast(message.getDestinationName(), "/"); + BaseModelResolver baseModelResolver = _baseModelResolverMap.get(className); + BaseModel baseModel = null; + if (baseModelResolver != null) + baseModel = baseModelResolver.getBaseModel(companyId, classPK); + Message responseMessage = MessageBusUtil.createResponseMessage(message, baseModel); + MessageBusUtil.sendMessage(message.getResponseDestinationName(), responseMessage); + } + + private static Map> _baseModelResolverMap = new ConcurrentHashMap>(); +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/plugin/MapItPlugin.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/plugin/MapItPlugin.java new file mode 100644 index 00000000..a0088aa6 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/plugin/MapItPlugin.java @@ -0,0 +1,21 @@ +package it.tref.liferay.mapit.plugin; + +import it.tref.liferay.mapit.plugin.action.MapItPluginAction; +import it.tref.liferay.mapit.plugin.event.MapItPluginEvent; +import java.util.Set; + +public interface MapItPlugin { + String getPortalConfigurationPortletId(); + + String getSiteConfigurationPortletId(); + + String getPortletConfigurationJsp(); + + String getTopJspPage(); + + String getBottomJspPage(); + + Set> getMapItPluginActions(); + + Set> getMapItPluginEvents(); +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/plugin/action/MapItPluginAction.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/plugin/action/MapItPluginAction.java new file mode 100644 index 00000000..59b91b3f --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/plugin/action/MapItPluginAction.java @@ -0,0 +1,13 @@ +package it.tref.liferay.mapit.plugin.action; + +import javax.portlet.PortletException; +import javax.portlet.PortletPreferences; +import javax.portlet.ResourceRequest; +import javax.portlet.ResourceResponse; + +public interface MapItPluginAction { + String getResourceId(); + + void execute(ResourceRequest paramResourceRequest, ResourceResponse paramResourceResponse, + PortletPreferences paramPortletPreferences) throws PortletException; +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/plugin/event/MapItPluginEvent.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/plugin/event/MapItPluginEvent.java new file mode 100644 index 00000000..49be3321 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/plugin/event/MapItPluginEvent.java @@ -0,0 +1,34 @@ +package it.tref.liferay.mapit.plugin.event; + +public interface MapItPluginEvent { + MapItPluginEventType getEventType(); + + String getDestinationName(); + + public enum MapItPluginEventType { + ON_FEATURE_CLICK("onFeatureClick"), ON_ICON_DISPLAY("onIconDisplay"); + + private String _value; + + public static MapItPluginEventType parse(String value) { + if (ON_FEATURE_CLICK.getValue().equals(value)) + return ON_FEATURE_CLICK; + if (ON_ICON_DISPLAY.getValue().equals(value)) + return ON_ICON_DISPLAY; + throw new IllegalArgumentException("Invalid value " + value); + } + + public String getValue() { + return _value; + } + + MapItPluginEventType(String value) { + _value = value; + } + + @Override + public String toString() { + return _value; + } + } +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/BaseModelResolver.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/BaseModelResolver.java new file mode 100644 index 00000000..5ae1b909 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/BaseModelResolver.java @@ -0,0 +1,7 @@ +package it.tref.liferay.mapit.resolver; + +import com.liferay.portal.model.BaseModel; + +public interface BaseModelResolver { + BaseModel getBaseModel(long paramLong1, long paramLong2); +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/asset/DLFileEntryResolver.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/asset/DLFileEntryResolver.java new file mode 100644 index 00000000..787201a9 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/asset/DLFileEntryResolver.java @@ -0,0 +1,22 @@ +package it.tref.liferay.mapit.resolver.asset; + +import it.tref.liferay.mapit.resolver.BaseModelResolver; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.model.BaseModel; +import com.liferay.portlet.documentlibrary.model.DLFileEntry; +import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil; + +public class DLFileEntryResolver implements BaseModelResolver { + @Override + public BaseModel getBaseModel(long companyId, long classPK) { + try { + return DLFileEntryLocalServiceUtil.getDLFileEntry(classPK); + } catch (PortalException portalException) { + return null; + } catch (SystemException systemException) { + return null; + } + } +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/asset/JournalArticleResolver.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/asset/JournalArticleResolver.java new file mode 100644 index 00000000..d0d640b8 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/asset/JournalArticleResolver.java @@ -0,0 +1,27 @@ +package it.tref.liferay.mapit.resolver.asset; + +import it.tref.liferay.mapit.resolver.BaseModelResolver; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.model.BaseModel; +import com.liferay.portlet.journal.model.JournalArticle; +import com.liferay.portlet.journal.model.JournalArticleResource; +import com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil; +import com.liferay.portlet.journal.service.JournalArticleResourceLocalServiceUtil; + +public class JournalArticleResolver implements BaseModelResolver { + @Override + public BaseModel getBaseModel(long companyId, long classPK) { + try { + JournalArticleResource journalArticleResource = JournalArticleResourceLocalServiceUtil + .getJournalArticleResource(classPK); + return JournalArticleLocalServiceUtil.getArticle( + journalArticleResource.getGroupId(), journalArticleResource.getArticleId()); + } catch (PortalException portalException) { + return null; + } catch (SystemException systemException) { + return null; + } + } +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/asset/WikiPageResolver.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/asset/WikiPageResolver.java new file mode 100644 index 00000000..2353a325 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/asset/WikiPageResolver.java @@ -0,0 +1,26 @@ +package it.tref.liferay.mapit.resolver.asset; + +import it.tref.liferay.mapit.resolver.BaseModelResolver; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.model.BaseModel; +import com.liferay.portlet.wiki.model.WikiPage; +import com.liferay.portlet.wiki.model.WikiPageResource; +import com.liferay.portlet.wiki.service.WikiPageLocalServiceUtil; +import com.liferay.portlet.wiki.service.WikiPageResourceLocalServiceUtil; + +public class WikiPageResolver implements BaseModelResolver { + @Override + public BaseModel getBaseModel(long companyId, long classPK) { + try { + WikiPageResource wikiPageResource = WikiPageResourceLocalServiceUtil.getWikiPageResource(classPK); + return WikiPageLocalServiceUtil.getPage(wikiPageResource + .getResourcePrimKey()); + } catch (PortalException portalException) { + return null; + } catch (SystemException systemException) { + return null; + } + } +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/template/TemplateVariableUtil.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/template/TemplateVariableUtil.java new file mode 100644 index 00000000..66a51cf2 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/template/TemplateVariableUtil.java @@ -0,0 +1,43 @@ +package it.tref.liferay.mapit.template; + +import it.tref.liferay.mapit.util.MapitHelperUtil; + +import java.util.LinkedHashMap; +import java.util.Locale; +import java.util.Map; + +import javax.portlet.PortletRequest; +import javax.portlet.RenderRequest; +import javax.servlet.http.HttpServletRequest; + +import com.liferay.portal.kernel.template.TemplateVariableGroup; +import com.liferay.portal.theme.ThemeDisplay; +import com.liferay.taglib.util.VelocityTaglib; + +public class TemplateVariableUtil { + public static Map getTemplateVariableGroups(String language) { + Map templateVariableGroups = new LinkedHashMap(); + TemplateVariableGroup fieldsTemplateVariableGroup = new TemplateVariableGroup("fields"); + fieldsTemplateVariableGroup.addVariable("entry", null, "entry"); + templateVariableGroups.put("fields", fieldsTemplateVariableGroup); + TemplateVariableGroup generalVariablesTemplateVariableGroup = new TemplateVariableGroup( + "general-variables"); + generalVariablesTemplateVariableGroup.addVariable("current-url", String.class, "currentURL"); + generalVariablesTemplateVariableGroup.addVariable("locale", Locale.class, "locale"); + generalVariablesTemplateVariableGroup + .addVariable("theme-display", ThemeDisplay.class, "themeDisplay"); + templateVariableGroups.put("general-variables", generalVariablesTemplateVariableGroup); + TemplateVariableGroup utilTemplateVariableGroup = new TemplateVariableGroup("util"); + utilTemplateVariableGroup.addVariable("http-request", HttpServletRequest.class, "request"); + if (language.equals("vm")) + utilTemplateVariableGroup.addVariable("liferay-taglib", VelocityTaglib.class, "taglibLiferay"); + utilTemplateVariableGroup.addVariable("render-request", RenderRequest.class, "renderRequest"); + utilTemplateVariableGroup.addVariable("render-response", PortletRequest.class, "renderResponse"); + templateVariableGroups.put("util", utilTemplateVariableGroup); + TemplateVariableGroup utilMapItTemplateVariableGroup = new TemplateVariableGroup("mapit-util"); + utilMapItTemplateVariableGroup.addVariable("mapit-helper-util", MapitHelperUtil.class, + "mapItHelperUtil"); + templateVariableGroups.put("mapit-util", utilMapItTemplateVariableGroup); + return templateVariableGroups; + } +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/AssetUtil.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/AssetUtil.java new file mode 100644 index 00000000..4e719a0f --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/AssetUtil.java @@ -0,0 +1,162 @@ +package it.tref.liferay.mapit.util; + +import java.util.ArrayList; +import java.util.List; + +import javax.portlet.PortletMode; +import javax.portlet.PortletRequest; + +import com.liferay.portal.kernel.plugin.PluginPackage; +import com.liferay.portal.kernel.portlet.LiferayPortletRequest; +import com.liferay.portal.kernel.portlet.LiferayPortletURL; +import com.liferay.portal.kernel.portlet.LiferayWindowState; +import com.liferay.portal.kernel.search.BooleanClause; +import com.liferay.portal.kernel.search.BooleanClauseFactoryUtil; +import com.liferay.portal.kernel.search.BooleanClauseOccur; +import com.liferay.portal.kernel.search.BooleanQuery; +import com.liferay.portal.kernel.search.BooleanQueryFactoryUtil; +import com.liferay.portal.kernel.search.Hits; +import com.liferay.portal.kernel.search.Indexer; +import com.liferay.portal.kernel.search.IndexerRegistryUtil; +import com.liferay.portal.kernel.search.SearchContext; +import com.liferay.portal.kernel.search.SearchException; +import com.liferay.portal.kernel.util.ArrayUtil; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.model.Contact; +import com.liferay.portal.theme.ThemeDisplay; +import com.liferay.portal.util.PortalUtil; +import com.liferay.portlet.PortletURLFactoryUtil; +import com.liferay.portlet.asset.AssetRendererFactoryRegistryUtil; +import com.liferay.portlet.asset.model.AssetEntry; +import com.liferay.portlet.asset.model.AssetRenderer; +import com.liferay.portlet.asset.model.AssetRendererFactory; +import com.liferay.portlet.trash.model.TrashEntry; + +public class AssetUtil { + public static long[] getAvailableClassNameIds(long companyId) { + List classNameIds = new ArrayList(); + List assetRendererFactories = AssetRendererFactoryRegistryUtil + .getAssetRendererFactories(companyId); + for (AssetRendererFactory assetRendererFactory : assetRendererFactories) { + if (ExpandoUtil.hasCustomFields(companyId, assetRendererFactory.getClassNameId()) + && !ArrayUtil.contains(_EXCLUDED_CLASS_NAMES, + assetRendererFactory.getClassName())) + classNameIds.add(Long.valueOf(assetRendererFactory.getClassNameId())); + } + List indexers = IndexerRegistryUtil.getIndexers(); + for (Indexer indexer : indexers) { + if (indexer.getClassNames() != null) { + byte b; + int i; + String[] arrayOfString; + for (i = (arrayOfString = indexer.getClassNames()).length, b = 0; b < i;) { + String className = arrayOfString[b]; + if (!ArrayUtil.contains(_EXCLUDED_CLASS_NAMES, className)) { + long classNameId = PortalUtil.getClassNameId(className); + if (!classNameIds.contains(Long.valueOf(classNameId))) + classNameIds.add(Long.valueOf(classNameId)); + } + b++; + } + } + } + return toArray(classNameIds); + } + + public static long[] getAvailableIndexerClassNameIds(long companyId) { + return getAvailableIndexerClassNameIds(companyId, true); + } + + public static long[] getAvailableIndexerClassNameIds(long companyId, boolean indexer) { + List listClassNameIds = new ArrayList(); + long[] availableClassNameIds = getAvailableClassNameIds(companyId); + byte b; + int i; + long[] arrayOfLong1; + for (i = (arrayOfLong1 = availableClassNameIds).length, b = 0; b < i;) { + long classNameId = arrayOfLong1[b]; + boolean hasIndexer = hasIndexer(PortalUtil.getClassName(classNameId)); + if (hasIndexer && indexer) { + listClassNameIds.add(Long.valueOf(classNameId)); + } else if (!hasIndexer && !indexer) { + listClassNameIds.add(Long.valueOf(classNameId)); + } + b++; + } + return toArray(listClassNameIds); + } + + public static boolean hasIndexer(String className) { + Indexer indexer = IndexerRegistryUtil.getIndexer(className); + return (indexer != null); + } + + public static String getIconPath(PortletRequest request, String className) { + AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil + .getAssetRendererFactoryByClassName(className); + if (assetRendererFactory != null) + return assetRendererFactory.getIconPath(request); + ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute("LIFERAY_SHARED_THEME_DISPLAY"); + return String.valueOf(themeDisplay.getPathThemeImages()) + "/common/page.png"; + } + + public static String getAssetViewURL(LiferayPortletRequest liferayPortletRequest, + ThemeDisplay themeDisplay, AssetEntry assetEntry) throws Exception { + LiferayPortletURL liferayPortletURL = PortletURLFactoryUtil.create( + liferayPortletRequest, "101", themeDisplay.getPlid(), "RENDER_PHASE"); + liferayPortletURL.setParameter("struts_action", "/asset_publisher/view_content"); + liferayPortletURL.setParameter("assetEntryId", String.valueOf(assetEntry.getEntryId())); + liferayPortletURL.setParameter("redirect", ""); + AssetRendererFactory assetRendererFactory = assetEntry.getAssetRendererFactory(); + AssetRenderer assetRenderer = assetEntry.getAssetRenderer(); + liferayPortletURL.setParameter("type", assetRendererFactory.getType()); + if (Validator.isNotNull(assetRenderer.getUrlTitle())) + liferayPortletURL.setParameter("urlTitle", assetRenderer.getUrlTitle()); + liferayPortletURL.setParameter("redirect", "%23"); + liferayPortletURL.setWindowState(LiferayWindowState.POP_UP); + liferayPortletURL.setPortletMode(PortletMode.VIEW); + return liferayPortletURL.toString(); + } + + public static String render(LiferayPortletRequest liferayPortletRequest, ThemeDisplay themeDisplay, + long classNameId, long classPK) throws Exception { + LiferayPortletURL liferayPortletURL = PortletURLFactoryUtil.create( + liferayPortletRequest, themeDisplay.getPortletDisplay().getId(), + themeDisplay.getPlid(), "RENDER_PHASE"); + liferayPortletURL.setParameter("classNameId", String.valueOf(classNameId)); + liferayPortletURL.setParameter("classPK", String.valueOf(classPK)); + liferayPortletURL.setParameter("mvcPath", "/html/map/asset_popup.jsp"); + liferayPortletURL.setPortletMode(PortletMode.VIEW); + liferayPortletURL.setWindowState(LiferayWindowState.POP_UP); + return liferayPortletURL.toString(); + } + + public static String getTitleByIndexer(long companyId, String className, long classPK) + throws SearchException { + Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(className); + SearchContext searchContext = new SearchContext(); + searchContext.setCompanyId(companyId); + BooleanQuery booleanQueryDocument = BooleanQueryFactoryUtil.create(searchContext); + booleanQueryDocument.addRequiredTerm("entryClassName", className); + booleanQueryDocument.addRequiredTerm("entryClassPK", classPK); + BooleanClause booleanClause = BooleanClauseFactoryUtil.create(searchContext, + booleanQueryDocument, BooleanClauseOccur.SHOULD.getName()); + searchContext.setBooleanClauses(new BooleanClause[] { booleanClause }); + Hits hits = indexer.search(searchContext); + String title = hits.getDocs()[0].get("title"); + if (Validator.isNull(title)) + title = hits.getDocs()[0].get("name"); + return title; + } + + private static long[] toArray(List list) { + long[] ids = new long[list.size()]; + int index = 0; + for (Long id : list) + ids[index++] = id.longValue(); + return ids; + } + + private static final String[] _EXCLUDED_CLASS_NAMES = new String[] { Contact.class.getName(), + TrashEntry.class.getName(), PluginPackage.class.getName() }; +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/ExpandoUtil.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/ExpandoUtil.java new file mode 100644 index 00000000..76e1aad5 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/ExpandoUtil.java @@ -0,0 +1,124 @@ +package it.tref.liferay.mapit.util; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.util.UnicodeProperties; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portlet.expando.model.ExpandoColumn; +import com.liferay.portlet.expando.model.ExpandoTable; +import com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil; +import com.liferay.portlet.expando.service.ExpandoTableLocalServiceUtil; + +public class ExpandoUtil { + public static ExpandoColumn addExpandoIfNotExists(long companyId, long classNameId, String name, + boolean indexable, boolean hidden) throws SystemException { + ExpandoTable expandoTable = null; + try { + expandoTable = ExpandoTableLocalServiceUtil.getTable(companyId, classNameId, "CUSTOM_FIELDS"); + } catch (PortalException portalException) { + try { + expandoTable = ExpandoTableLocalServiceUtil.addTable(companyId, classNameId, "CUSTOM_FIELDS"); + } catch (PortalException portalException1) { + } + } + ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil + .getColumn(expandoTable.getTableId(), name); + if (expandoColumn == null) + try { + expandoColumn = ExpandoColumnLocalServiceUtil.addColumn(expandoTable.getTableId(), name, 15); + expandoColumn = updateExpando(expandoColumn, indexable, hidden); + } catch (PortalException portalException) { + } + return expandoColumn; + } + + public static ExpandoColumn updateExpando(long companyId, long classNameId, String name, + boolean indexable, boolean hidden) throws SystemException { + ExpandoColumn expandoColumn = null; + try { + ExpandoTable expandoTable = ExpandoTableLocalServiceUtil.getTable(companyId, classNameId, + "CUSTOM_FIELDS"); + expandoColumn = ExpandoColumnLocalServiceUtil.getColumn(expandoTable.getTableId(), name); + if (expandoColumn == null) + expandoColumn = updateExpando(expandoColumn, indexable, hidden); + } catch (PortalException portalException) { + } + return expandoColumn; + } + + public static void deleteExpando(long companyId, long classNameId, String name) throws SystemException { + try { + ExpandoTable expandoTable = ExpandoTableLocalServiceUtil.getTable(companyId, classNameId, + "CUSTOM_FIELDS"); + ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getColumn(expandoTable.getTableId(), + name); + ExpandoColumnLocalServiceUtil.deleteColumn(expandoColumn.getColumnId()); + } catch (PortalException portalException) { + } + } + + public static boolean exists(long companyId, long classNameId, String name) { + try { + ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getColumn(companyId, classNameId, + "CUSTOM_FIELDS", name); + return (expandoColumn != null); + } catch (SystemException systemException) { + return false; + } + } + + public static boolean isType(long companyId, long classNameId, String name) { + try { + ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getColumn(companyId, classNameId, + "CUSTOM_FIELDS", name); + return (expandoColumn != null && expandoColumn.getType() == 15); + } catch (SystemException systemException) { + return false; + } + } + + public static boolean isIndexed(long companyId, long classNameId, String name) { + try { + ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getColumn(companyId, classNameId, + "CUSTOM_FIELDS", name); + if (expandoColumn != null) { + UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); + String indexType = typeSettingsProperties.get("index-type"); + if (Validator.isNotNull(indexType) && indexType.equals(String.valueOf(1))) + return true; + return false; + } + } catch (SystemException systemException) { + return false; + } + return false; + } + + public static boolean hasCustomFields(long companyId, long classNameId) { + boolean existsLat = (exists(companyId, classNameId, "MAPIT_LAT") && exists(companyId, classNameId, + "MAPIT_LAT_HIDDEN")); + boolean existsLon = (exists(companyId, classNameId, "MAPIT_LON") && exists(companyId, classNameId, + "MAPIT_LON_HIDDEN")); + if (existsLat && existsLon) { + boolean isTypeLat = (isType(companyId, classNameId, "MAPIT_LAT") && isType(companyId, + classNameId, "MAPIT_LAT_HIDDEN")); + boolean isIndexedLat = isIndexed(companyId, classNameId, "MAPIT_LAT_HIDDEN"); + boolean isTypeLon = (isType(companyId, classNameId, "MAPIT_LON") && isType(companyId, + classNameId, "MAPIT_LON_HIDDEN")); + boolean isIndexedLon = isIndexed(companyId, classNameId, "MAPIT_LON_HIDDEN"); + return (existsLat && existsLon && isTypeLat && isTypeLon && isIndexedLat && isIndexedLon); + } + return false; + } + + private static ExpandoColumn updateExpando(ExpandoColumn expandoColumn, boolean indexable, boolean hidden) + throws SystemException { + UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); + if (indexable) + typeSettingsProperties.put("index-type", String.valueOf(1)); + if (hidden) + typeSettingsProperties.put("hidden", String.valueOf(true)); + expandoColumn.setTypeSettingsProperties(typeSettingsProperties); + return ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); + } +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/MapItUtil.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/MapItUtil.java new file mode 100644 index 00000000..55822659 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/MapItUtil.java @@ -0,0 +1,68 @@ +package it.tref.liferay.mapit.util; + +import it.tref.liferay.mapit.constants.Constants; + +import java.math.BigDecimal; +import java.math.RoundingMode; + +public class MapItUtil { + public static String encodeLat(String coordinate) { + return encodeCoordinate(coordinate, Constants.MAX_LAT); + } + + public static String encodeLon(String coordinate) { + return encodeCoordinate(coordinate, Constants.MAX_LON); + } + + private static String encodeCoordinate(String coordinate, BigDecimal max) { + try { + coordinate = coordinate.replaceAll(",", "."); + coordinate = coordinate.replaceAll("[.]", "."); + String[] part = coordinate.split("[.]"); + if (part[0].length() > "000".length() + 1) + part[0] = part[0].substring(0, "000".length() + 1); + BigDecimal fat = (new BigDecimal(String.valueOf(part[0]) + + ((part.length > 1) ? ("." + part[1]) : ".000000000"))).add(max); + String coordinateString = fat.setScale("000000000".length(), RoundingMode.HALF_DOWN) + .toPlainString(); + if (fat.compareTo(max.multiply(new BigDecimal(2))) == 1) { + fat = max.multiply(new BigDecimal(2)); + coordinateString = fat.setScale("000000000".length()).toPlainString(); + } else if (fat.compareTo(new BigDecimal(0)) == -1) { + fat = new BigDecimal(0); + coordinateString = "000.000000000"; + } + return leftPad(coordinateString, "000000000".length() + "000".length() + ".".length(), "0"); + } catch (NumberFormatException numberFormatException) { + return "-1"; + } + } + + public static String decodeLat(String coordinate) { + return decodeCoordinate(coordinate, Constants.MAX_LAT); + } + + public static String decodeLon(String coordinate) { + return decodeCoordinate(coordinate, Constants.MAX_LON); + } + + private static String decodeCoordinate(String coordinate, BigDecimal max) { + try { + if (coordinate.equals("-1")) + return ""; + String[] part = coordinate.split("[.]"); + BigDecimal current = new BigDecimal(String.valueOf(part[0]) + + ((part.length > 1) ? ("." + part[1]) : ".000000000")); + return current.subtract(max).setScale("000000000".length()).toPlainString().replace(".", "."); + } catch (NumberFormatException numberFormatException) { + return "-1"; + } + } + + private static String leftPad(String s, int size, String str) { + StringBuilder stringBuilder = new StringBuilder(s); + while (stringBuilder.length() < size) + stringBuilder.insert(0, str); + return stringBuilder.toString(); + } +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/MapitHelperUtil.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/MapitHelperUtil.java new file mode 100644 index 00000000..9909703f --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/MapitHelperUtil.java @@ -0,0 +1,30 @@ +package it.tref.liferay.mapit.util; + +import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; +import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; + +public class MapitHelperUtil { + public static Object findService(String serviceName) { + Object bean = null; + try { + bean = PortalBeanLocatorUtil.locate(serviceName); + } catch (Exception e) { + _log.error(e, e); + } + return bean; + } + + public static Object findService(String servletContextName, String serviceName) { + Object bean = null; + try { + bean = PortletBeanLocatorUtil.locate(servletContextName, serviceName); + } catch (Exception e) { + _log.error(e, e); + } + return bean; + } + + private static Log _log = LogFactoryUtil.getLog(MapitHelperUtil.class); +} diff --git a/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/SearchUtil.java b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/SearchUtil.java new file mode 100644 index 00000000..6175da21 --- /dev/null +++ b/liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/SearchUtil.java @@ -0,0 +1,190 @@ +package it.tref.liferay.mapit.util; + +import it.tref.liferay.mapit.constants.Constants; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; + +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.search.BooleanClause; +import com.liferay.portal.kernel.search.BooleanClauseFactoryUtil; +import com.liferay.portal.kernel.search.BooleanClauseOccur; +import com.liferay.portal.kernel.search.BooleanQuery; +import com.liferay.portal.kernel.search.BooleanQueryFactoryUtil; +import com.liferay.portal.kernel.search.Document; +import com.liferay.portal.kernel.search.Hits; +import com.liferay.portal.kernel.search.Indexer; +import com.liferay.portal.kernel.search.IndexerRegistryUtil; +import com.liferay.portal.kernel.search.ParseException; +import com.liferay.portal.kernel.search.Query; +import com.liferay.portal.kernel.search.QueryConfig; +import com.liferay.portal.kernel.search.SearchContext; +import com.liferay.portal.kernel.search.SearchEngineUtil; +import com.liferay.portal.kernel.search.Sort; +import com.liferay.portal.kernel.search.StringQueryFactoryUtil; +import com.liferay.portal.kernel.util.ClassResolverUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.PortalClassLoaderUtil; +import com.liferay.portal.kernel.util.ReflectionUtil; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.service.ServiceContext; +import com.liferay.portal.util.PortalUtil; +import com.liferay.portlet.asset.service.persistence.AssetEntryQuery; +import com.liferay.portlet.expando.util.ExpandoBridgeIndexerUtil; + +public class SearchUtil { + public static Hits search(String stringQuery, int start, int end, String orderByCol1, + String orderByType1, String orderByCol2, String orderByType2, double[] bbox, + boolean viewAllAssetts, ServiceContext serviceContext) throws Exception { + BooleanQuery booleanQuery = null; + SearchContext searchContext = new SearchContext(); + searchContext.setCompanyId(serviceContext.getCompanyId()); + if (start == 0 && end == 0) { + start = QueryUtil.ALL_POS; + end = QueryUtil.ALL_POS; + } + Query query = StringQueryFactoryUtil.create(stringQuery); + if (bbox == null) + bbox = new double[] { Constants.MIN_LON.doubleValue(), Constants.MIN_LAT.doubleValue(), + Constants.MAX_LON.doubleValue(), Constants.MAX_LAT.doubleValue() }; + if (viewAllAssetts) { + BooleanQuery booleanQuery1 = getBooleanQueryBbox(bbox, searchContext); + booleanQuery1.add(query, BooleanClauseOccur.MUST); + booleanQuery = booleanQuery1; + } else { + searchContext.setStart(start); + searchContext.setEnd(end); + } + if (Validator.isNotNull(orderByCol1) && Validator.isNotNull(orderByCol2)) { + AssetEntryQuery assetEntryQuery = new AssetEntryQuery(); + assetEntryQuery.setOrderByCol1(orderByCol1); + assetEntryQuery.setOrderByCol2(orderByCol2); + assetEntryQuery.setOrderByType1(orderByType1); + assetEntryQuery.setOrderByType2(orderByType2); + Class clazz = ClassResolverUtil.resolve("com.liferay.portlet.asset.util.AssetUtil", + PortalClassLoaderUtil.getClassLoader()); + searchContext.setSorts((Sort[]) ReflectionUtil.getDeclaredMethod(clazz, "getSorts", + new Class[] { AssetEntryQuery.class, Locale.class }).invoke(null, + new Object[] { assetEntryQuery, serviceContext.getLocale() })); + } + Hits hits = SearchEngineUtil.search(searchContext, booleanQuery); + if (!viewAllAssetts) + if (hits.getLength() > 0) { + searchContext.setStart(QueryUtil.ALL_POS); + searchContext.setEnd(QueryUtil.ALL_POS); + BooleanQuery booleanQuery1 = getBooleanQueryBbox(bbox, searchContext); + booleanQuery1.add(booleanQuery, BooleanClauseOccur.MUST); + BooleanQuery booleanQueryHits = BooleanQueryFactoryUtil.create(searchContext); + for (int i = 0; i < (hits.getDocs()).length; i++) { + Document document = hits.doc(i); + String className = document.get("entryClassName"); + long classPK = GetterUtil.getLong(document.get("entryClassPK")); + BooleanQuery booleanQueryDocument = BooleanQueryFactoryUtil.create(searchContext); + booleanQueryDocument.addRequiredTerm("entryClassName", className); + booleanQueryDocument.addRequiredTerm("entryClassPK", classPK); + booleanQueryHits.add(booleanQueryDocument, BooleanClauseOccur.SHOULD); + } + booleanQuery1.add(booleanQueryHits, BooleanClauseOccur.MUST); + hits = SearchEngineUtil.search(searchContext, booleanQuery1); + } + return hits; + } + + public static Hits search(long companyId, long groupId, long classNameId, + Map attributes, int start, int end, Sort sort, double[] bbox) + throws SystemException { + try { + String className = PortalUtil.getClassName(classNameId); + Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(className); + if (attributes != null) + attributes = new HashMap(); + if (start == 0 && end == 0) { + start = QueryUtil.ALL_POS; + end = QueryUtil.ALL_POS; + } + SearchContext searchContext = new SearchContext(); + searchContext.setAndSearch(true); + searchContext.setAttributes(attributes); + searchContext.setGroupIds(new long[] { groupId }); + if (bbox == null) + bbox = new double[] { Constants.MIN_LON.doubleValue(), Constants.MIN_LAT.doubleValue(), + Constants.MAX_LON.doubleValue(), Constants.MAX_LAT.doubleValue() }; + BooleanClause booleanClause = BooleanClauseFactoryUtil.create(searchContext, + getBooleanQueryBbox(bbox, searchContext), BooleanClauseOccur.MUST.getName()); + searchContext.setBooleanClauses(new BooleanClause[] { booleanClause }); + searchContext.setCompanyId(companyId); + searchContext.setStart(start); + searchContext.setEnd(end); + if (sort != null) + searchContext.setSorts(new Sort[] { sort }); + QueryConfig queryConfig = new QueryConfig(); + queryConfig.setHighlightEnabled(false); + queryConfig.setScoreEnabled(false); + searchContext.setQueryConfig(queryConfig); + return indexer.search(searchContext); + } catch (Exception e) { + throw new SystemException(e); + } + } + + private static BooleanQuery getBooleanQueryBbox(double[] bbox, SearchContext searchContext) + throws ParseException { + double minLon = bbox[0]; + double minLat = bbox[1]; + double maxLon = bbox[2]; + double maxLat = bbox[3]; + BooleanQuery booleanQuery = BooleanQueryFactoryUtil.create(searchContext); + BooleanQuery booleanQueryLat = createBooleanQueryRangeTerm( + ExpandoBridgeIndexerUtil.encodeFieldName("MAPIT_LAT_HIDDEN"), + MapItUtil.encodeLat(String.valueOf(minLat)), MapItUtil.encodeLat(String.valueOf(maxLat)), + searchContext); + booleanQuery.add(booleanQueryLat, BooleanClauseOccur.MUST); + if (minLon < GetterUtil.getDouble(Constants.MIN_LON) + || maxLon > GetterUtil.getDouble(Constants.MAX_LON)) { + BooleanQuery booleanQueryLon = null; + if (minLon < GetterUtil.getDouble(Constants.MIN_LON)) { + minLon -= GetterUtil.getDouble(String.valueOf(Constants.MIN_LON)) * 2.0D; + String[][] range = { + { MapItUtil.encodeLon(String.valueOf(minLon)), + MapItUtil.encodeLon(String.valueOf(Constants.MAX_LON)) }, + { "-" + MapItUtil.encodeLon(String.valueOf(Constants.MAX_LON)), + MapItUtil.encodeLon(String.valueOf(maxLon)) } }; + booleanQueryLon = createBooleanQueryRangeTerm( + ExpandoBridgeIndexerUtil.encodeFieldName("MAPIT_LON_HIDDEN"), range, searchContext); + } else { + maxLon -= GetterUtil.getDouble(String.valueOf(Constants.MAX_LON)) * 2.0D; + String[][] range = { + { MapItUtil.encodeLon(String.valueOf(minLon)), + MapItUtil.encodeLon(String.valueOf(Constants.MAX_LON)) }, + { "-" + MapItUtil.encodeLon(String.valueOf(Constants.MAX_LON)), + MapItUtil.encodeLon(String.valueOf(maxLon)) } }; + booleanQueryLon = createBooleanQueryRangeTerm( + ExpandoBridgeIndexerUtil.encodeFieldName("MAPIT_LON_HIDDEN"), range, searchContext); + } + booleanQuery.add(booleanQueryLon, BooleanClauseOccur.MUST); + } else { + BooleanQuery booleanQueryLon = createBooleanQueryRangeTerm( + ExpandoBridgeIndexerUtil.encodeFieldName("MAPIT_LON_HIDDEN"), + MapItUtil.encodeLon(String.valueOf(minLon)), MapItUtil.encodeLon(String.valueOf(maxLon)), + searchContext); + booleanQuery.add(booleanQueryLon, BooleanClauseOccur.MUST); + } + return booleanQuery; + } + + private static BooleanQuery createBooleanQueryRangeTerm(String field, String min, String max, + SearchContext searchContext) { + return createBooleanQueryRangeTerm(field, new String[][] { { min, max }, }, searchContext); + } + + private static BooleanQuery createBooleanQueryRangeTerm(String field, String[][] range, + SearchContext searchContext) { + BooleanQuery query = BooleanQueryFactoryUtil.create(searchContext); + for (int i = 0; i < range.length; i++) + query.addRangeTerm(field, range[i][0], range[i][1]); + return query; + } +}