Sfoglia il codice sorgente

Ricerca per posizione geografica

master
Salvatore La Manna 4 anni fa
parent
commit
3a896e6e80
  1. BIN
      liferay-plugins-sdk-6.2/dist/tref-mapit-shared-6.2.0.1.jar
  2. 7
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml
  3. 32
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml
  4. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml
  5. 61
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/mwg/sismica/bo/util/MappeUtil.java
  6. 8
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPratica.java
  7. 139
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaClp.java
  8. 28
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaModel.java
  9. 20
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaSoap.java
  10. 71
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaWrapper.java
  11. 11
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java
  12. 549
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java
  13. 17
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceUtil.java
  14. 21
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java
  15. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/tables.sql
  16. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml
  17. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml
  18. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml
  19. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Language.properties
  20. 5
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties
  21. 100
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/portlet/RicercaPosizionePortlet.java
  22. 15
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaCacheModel.java
  23. 57
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaImpl.java
  24. 66
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaModelImpl.java
  25. 23
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/PaesaggisticaAdministrationPortlet.java
  26. 513
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java
  27. 110
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java
  28. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java
  29. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  30. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/web.xml
  31. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp
  32. 25
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/paesaggistica_administration/view.jsp
  33. 440
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp
  34. BIN
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/commons-logging.jar
  35. BIN
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/jstl-api.jar
  36. BIN
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/jstl-impl.jar
  37. BIN
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/log4j.jar
  38. BIN
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/util-bridges.jar
  39. BIN
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/util-taglib.jar
  40. 4
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/service.properties
  41. 572
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/tld/c.tld
  42. 2
      liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/ivy.xml.MD5
  43. 53
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp
  44. 128
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp
  45. 1
      liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/build.xml
  46. BIN
      liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/WEB-INF/lib/tref-mapit-shared.jar
  47. 244
      liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/html/plugin/top.jsp
  48. 3
      liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/ConfigurazioneConstants.java
  49. 18
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.classpath
  50. 1
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.gitignore
  51. 17
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.project
  52. 7
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/build.xml
  53. 47
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/Constants.java
  54. 6
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/DestinationNames.java
  55. 28
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/PortletConfiguration.java
  56. 5
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/constants/WebKeys.java
  57. 38
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/messaging/AssetResolverMessageListener.java
  58. 21
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/plugin/MapItPlugin.java
  59. 13
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/plugin/action/MapItPluginAction.java
  60. 34
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/plugin/event/MapItPluginEvent.java
  61. 7
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/BaseModelResolver.java
  62. 22
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/asset/DLFileEntryResolver.java
  63. 27
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/asset/JournalArticleResolver.java
  64. 26
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/resolver/asset/WikiPageResolver.java
  65. 43
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/template/TemplateVariableUtil.java
  66. 162
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/AssetUtil.java
  67. 124
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/ExpandoUtil.java
  68. 68
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/MapItUtil.java
  69. 30
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/MapitHelperUtil.java
  70. 190
      liferay-plugins-sdk-6.2/shared/tref-mapit-shared/src/it/tref/liferay/mapit/util/SearchUtil.java

BIN
liferay-plugins-sdk-6.2/dist/tref-mapit-shared-6.2.0.1.jar vendored

File binario non mostrato.

7
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml

@ -233,6 +233,13 @@
portos-administration-portlet portos-administration-portlet
</css-class-wrapper> </css-class-wrapper>
</portlet> </portlet>
<portlet>
<portlet-name>ricerca-posizione</portlet-name>
<icon>/icon.png</icon>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
<css-class-wrapper>ricerca-posizione-portlet</css-class-wrapper>
</portlet>
<portlet> <portlet>
<portlet-name>22</portlet-name> <portlet-name>22</portlet-name>
<icon>/icon.png</icon> <icon>/icon.png</icon>

32
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml

@ -435,6 +435,38 @@
<role-name>user</role-name> <role-name>user</role-name>
</security-role-ref> </security-role-ref>
</portlet> </portlet>
<portlet>
<portlet-name>ricerca-posizione</portlet-name>
<display-name>Ricerca per posizione</display-name>
<portlet-class>it.mwg.sismica.bo.portlet.RicercaPosizionePortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/html/ricerca-posizione/view.jsp</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<resource-bundle>content.Language</resource-bundle>
<portlet-info>
<title>Ricerca per posizione</title>
<short-title>Ricerca posizione</short-title>
<keywords></keywords>
</portlet-info>
<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>guest</role-name>
</security-role-ref>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>
<portlet> <portlet>
<portlet-name>22</portlet-name> <portlet-name>22</portlet-name>
<display-name>Ricerca Protocollo</display-name> <display-name>Ricerca Protocollo</display-name>

3
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml

@ -991,6 +991,9 @@
<column name="tipoPratica" type="String"></column> <column name="tipoPratica" type="String"></column>
<column name="territorioId" type="long" /> <column name="territorioId" type="long" />
<column name="tipoProcedura" type="String"></column> <column name="tipoProcedura" type="String"></column>
<column name="latitudine" type="double" convert-null="false"/>
<column name="longitudine" type="double" convert-null="false"/>
<!-- Annullamento fields --> <!-- Annullamento fields -->
<column name="dtAnnullamento" type="Date" /> <column name="dtAnnullamento" type="Date" />
<column name="docPraticaAnnullamentoId" type="long" /> <column name="docPraticaAnnullamentoId" type="long" />

61
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/mwg/sismica/bo/util/MappeUtil.java

@ -0,0 +1,61 @@
package it.mwg.sismica.bo.util;
import it.tref.liferay.portos.bo.model.Comune;
import it.tref.liferay.portos.bo.service.ConfigurazioneLocalServiceUtil;
import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Date;
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;
public class MappeUtil {
private final static Log _log = LogFactoryUtil.getLog(MappeUtil.class);
public static String getUrlComune(String serverName, Comune comune) throws UnsupportedEncodingException,
PortalException, SystemException {
long companyId = comune.getCompanyId();
String sharedSecret = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId,
ConfigurazioneConstants.MAPPE_SHARED_SECRET);
long date = new Date().getTime() / 1000;
String auth = DigestUtils.sha256Hex(date + sharedSecret + serverName);
String url = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId,
ConfigurazioneConstants.MAPPE_URL_IFRAME_FE).replace("{{COD_BELFIORE}}",
urlEncode(comune.getCodiceBelfiore()));
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;
}
}

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

@ -39,4 +39,12 @@ public interface IntPratica extends IntPraticaModel, PersistedModel {
public boolean isChiusa() public boolean isChiusa()
throws com.liferay.portal.kernel.exception.SystemException; throws com.liferay.portal.kernel.exception.SystemException;
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();
} }

139
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<IntPratica>
attributes.put("tipoPratica", getTipoPratica()); attributes.put("tipoPratica", getTipoPratica());
attributes.put("territorioId", getTerritorioId()); attributes.put("territorioId", getTerritorioId());
attributes.put("tipoProcedura", getTipoProcedura()); attributes.put("tipoProcedura", getTipoProcedura());
attributes.put("latitudine", getLatitudine());
attributes.put("longitudine", getLongitudine());
attributes.put("dtAnnullamento", getDtAnnullamento()); attributes.put("dtAnnullamento", getDtAnnullamento());
attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId()); attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId());
attributes.put("unitaOperativa", getUnitaOperativa()); attributes.put("unitaOperativa", getUnitaOperativa());
@ -183,6 +185,18 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
setTipoProcedura(tipoProcedura); 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"); Date dtAnnullamento = (Date)attributes.get("dtAnnullamento");
if (dtAnnullamento != null) { if (dtAnnullamento != null) {
@ -584,6 +598,52 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
} }
} }
@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 @Override
public Date getDtAnnullamento() { public Date getDtAnnullamento() {
return _dtAnnullamento; return _dtAnnullamento;
@ -1149,6 +1209,25 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
} }
} }
@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 @Override
public java.lang.String getTitle(java.util.Locale locale, boolean completed) { public java.lang.String getTitle(java.util.Locale locale, boolean completed) {
try { try {
@ -1189,6 +1268,46 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
} }
} }
@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 @Override
public java.lang.String getTitle(boolean completed) { public java.lang.String getTitle(boolean completed) {
try { try {
@ -1313,6 +1432,8 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
clone.setTipoPratica(getTipoPratica()); clone.setTipoPratica(getTipoPratica());
clone.setTerritorioId(getTerritorioId()); clone.setTerritorioId(getTerritorioId());
clone.setTipoProcedura(getTipoProcedura()); clone.setTipoProcedura(getTipoProcedura());
clone.setLatitudine(getLatitudine());
clone.setLongitudine(getLongitudine());
clone.setDtAnnullamento(getDtAnnullamento()); clone.setDtAnnullamento(getDtAnnullamento());
clone.setDocPraticaAnnullamentoId(getDocPraticaAnnullamentoId()); clone.setDocPraticaAnnullamentoId(getDocPraticaAnnullamentoId());
clone.setUnitaOperativa(getUnitaOperativa()); clone.setUnitaOperativa(getUnitaOperativa());
@ -1387,7 +1508,7 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
@Override @Override
public String toString() { public String toString() {
StringBundler sb = new StringBundler(67); StringBundler sb = new StringBundler(71);
sb.append("{uuid="); sb.append("{uuid=");
sb.append(getUuid()); sb.append(getUuid());
@ -1411,6 +1532,10 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
sb.append(getTerritorioId()); sb.append(getTerritorioId());
sb.append(", tipoProcedura="); sb.append(", tipoProcedura=");
sb.append(getTipoProcedura()); sb.append(getTipoProcedura());
sb.append(", latitudine=");
sb.append(getLatitudine());
sb.append(", longitudine=");
sb.append(getLongitudine());
sb.append(", dtAnnullamento="); sb.append(", dtAnnullamento=");
sb.append(getDtAnnullamento()); sb.append(getDtAnnullamento());
sb.append(", docPraticaAnnullamentoId="); sb.append(", docPraticaAnnullamentoId=");
@ -1462,7 +1587,7 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
@Override @Override
public String toXmlString() { public String toXmlString() {
StringBundler sb = new StringBundler(103); StringBundler sb = new StringBundler(109);
sb.append("<model><model-name>"); sb.append("<model><model-name>");
sb.append("it.tref.liferay.portos.bo.model.IntPratica"); sb.append("it.tref.liferay.portos.bo.model.IntPratica");
@ -1512,6 +1637,14 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
"<column><column-name>tipoProcedura</column-name><column-value><![CDATA["); "<column><column-name>tipoProcedura</column-name><column-value><![CDATA[");
sb.append(getTipoProcedura()); sb.append(getTipoProcedura());
sb.append("]]></column-value></column>"); sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>latitudine</column-name><column-value><![CDATA[");
sb.append(getLatitudine());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>longitudine</column-name><column-value><![CDATA[");
sb.append(getLongitudine());
sb.append("]]></column-value></column>");
sb.append( sb.append(
"<column><column-name>dtAnnullamento</column-name><column-value><![CDATA["); "<column><column-name>dtAnnullamento</column-name><column-value><![CDATA[");
sb.append(getDtAnnullamento()); sb.append(getDtAnnullamento());
@ -1618,6 +1751,8 @@ public class IntPraticaClp extends BaseModelImpl<IntPratica>
private String _tipoPratica; private String _tipoPratica;
private long _territorioId; private long _territorioId;
private String _tipoProcedura; private String _tipoProcedura;
private double _latitudine;
private double _longitudine;
private Date _dtAnnullamento; private Date _dtAnnullamento;
private long _docPraticaAnnullamentoId; private long _docPraticaAnnullamentoId;
private int _unitaOperativa; private int _unitaOperativa;

28
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<IntPratica>,
*/ */
public void setTipoProcedura(String tipoProcedura); 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. * Returns the dt annullamento of this int pratica.
* *

20
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.setTipoPratica(model.getTipoPratica());
soapModel.setTerritorioId(model.getTerritorioId()); soapModel.setTerritorioId(model.getTerritorioId());
soapModel.setTipoProcedura(model.getTipoProcedura()); soapModel.setTipoProcedura(model.getTipoProcedura());
soapModel.setLatitudine(model.getLatitudine());
soapModel.setLongitudine(model.getLongitudine());
soapModel.setDtAnnullamento(model.getDtAnnullamento()); soapModel.setDtAnnullamento(model.getDtAnnullamento());
soapModel.setDocPraticaAnnullamentoId(model.getDocPraticaAnnullamentoId()); soapModel.setDocPraticaAnnullamentoId(model.getDocPraticaAnnullamentoId());
soapModel.setUnitaOperativa(model.getUnitaOperativa()); soapModel.setUnitaOperativa(model.getUnitaOperativa());
@ -204,6 +206,22 @@ public class IntPraticaSoap implements Serializable {
_tipoProcedura = tipoProcedura; _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() { public Date getDtAnnullamento() {
return _dtAnnullamento; return _dtAnnullamento;
} }
@ -421,6 +439,8 @@ public class IntPraticaSoap implements Serializable {
private String _tipoPratica; private String _tipoPratica;
private long _territorioId; private long _territorioId;
private String _tipoProcedura; private String _tipoProcedura;
private double _latitudine;
private double _longitudine;
private Date _dtAnnullamento; private Date _dtAnnullamento;
private long _docPraticaAnnullamentoId; private long _docPraticaAnnullamentoId;
private int _unitaOperativa; private int _unitaOperativa;

71
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<IntPratica> {
attributes.put("tipoPratica", getTipoPratica()); attributes.put("tipoPratica", getTipoPratica());
attributes.put("territorioId", getTerritorioId()); attributes.put("territorioId", getTerritorioId());
attributes.put("tipoProcedura", getTipoProcedura()); attributes.put("tipoProcedura", getTipoProcedura());
attributes.put("latitudine", getLatitudine());
attributes.put("longitudine", getLongitudine());
attributes.put("dtAnnullamento", getDtAnnullamento()); attributes.put("dtAnnullamento", getDtAnnullamento());
attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId()); attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId());
attributes.put("unitaOperativa", getUnitaOperativa()); attributes.put("unitaOperativa", getUnitaOperativa());
@ -157,6 +159,18 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper<IntPratica> {
setTipoProcedura(tipoProcedura); 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"); Date dtAnnullamento = (Date)attributes.get("dtAnnullamento");
if (dtAnnullamento != null) { if (dtAnnullamento != null) {
@ -557,6 +571,46 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper<IntPratica> {
_intPratica.setTipoProcedura(tipoProcedura); _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. * Returns the dt annullamento of this int pratica.
* *
@ -1216,6 +1270,23 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper<IntPratica> {
return _intPratica.isChiusa(); return _intPratica.isChiusa();
} }
@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 @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) { if (this == obj) {

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

@ -363,6 +363,17 @@ public interface IntPraticaLocalService extends BaseLocalService,
public int countFascicoliNotProgetto() public int countFascicoliNotProgetto()
throws com.liferay.portal.kernel.exception.SystemException; 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<it.tref.liferay.portos.bo.model.IntPratica> findByPosizione(
double lat, double lng, int raggio)
throws com.liferay.portal.kernel.exception.SystemException;
public java.util.List<it.tref.liferay.portos.bo.model.IntPratica> findByPosizione(
double lat, double lng, int raggio, int start, int end)
throws com.liferay.portal.kernel.exception.SystemException;
public it.tref.liferay.portos.bo.model.IntPratica addNumeroProgetto( public it.tref.liferay.portos.bo.model.IntPratica addNumeroProgetto(
long intPraticaId) long intPraticaId)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,

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

File diff soppresso perché troppo grande Load Diff

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

@ -413,6 +413,23 @@ public class IntPraticaLocalServiceUtil {
return getService().countFascicoliNotProgetto(); 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<it.tref.liferay.portos.bo.model.IntPratica> 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<it.tref.liferay.portos.bo.model.IntPratica> 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( public static it.tref.liferay.portos.bo.model.IntPratica addNumeroProgetto(
long intPraticaId) long intPraticaId)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,

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

@ -442,6 +442,27 @@ public class IntPraticaLocalServiceWrapper implements IntPraticaLocalService,
return _intPraticaLocalService.countFascicoliNotProgetto(); 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<it.tref.liferay.portos.bo.model.IntPratica> 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<it.tref.liferay.portos.bo.model.IntPratica> 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 @Override
public it.tref.liferay.portos.bo.model.IntPratica addNumeroProgetto( public it.tref.liferay.portos.bo.model.IntPratica addNumeroProgetto(
long intPraticaId) long intPraticaId)

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/tables.sql

@ -599,6 +599,8 @@ create table portos_bo_IntPratica (
tipoPratica VARCHAR(75) null, tipoPratica VARCHAR(75) null,
territorioId LONG, territorioId LONG,
tipoProcedura VARCHAR(75) null, tipoProcedura VARCHAR(75) null,
latitudine DOUBLE,
longitudine DOUBLE,
dtAnnullamento DATE null, dtAnnullamento DATE null,
docPraticaAnnullamentoId LONG, docPraticaAnnullamentoId LONG,
unitaOperativa INTEGER, unitaOperativa INTEGER,

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml

@ -646,6 +646,8 @@
<property name="tipoPratica" type="com.liferay.portal.dao.orm.hibernate.StringType" /> <property name="tipoPratica" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="territorioId" type="com.liferay.portal.dao.orm.hibernate.LongType" /> <property name="territorioId" type="com.liferay.portal.dao.orm.hibernate.LongType" />
<property name="tipoProcedura" type="com.liferay.portal.dao.orm.hibernate.StringType" /> <property name="tipoProcedura" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="latitudine" type="com.liferay.portal.dao.orm.hibernate.DoubleType" />
<property name="longitudine" type="com.liferay.portal.dao.orm.hibernate.DoubleType" />
<property name="dtAnnullamento" type="org.hibernate.type.TimestampType" /> <property name="dtAnnullamento" type="org.hibernate.type.TimestampType" />
<property name="docPraticaAnnullamentoId" type="com.liferay.portal.dao.orm.hibernate.LongType" /> <property name="docPraticaAnnullamentoId" type="com.liferay.portal.dao.orm.hibernate.LongType" />
<property name="unitaOperativa" type="com.liferay.portal.dao.orm.hibernate.IntegerType" /> <property name="unitaOperativa" type="com.liferay.portal.dao.orm.hibernate.IntegerType" />

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml

@ -691,6 +691,8 @@
<field name="tipoProcedura" type="String"> <field name="tipoProcedura" type="String">
<hint name="max-lenght">2</hint> <hint name="max-lenght">2</hint>
</field> </field>
<field name="latitudine" type="double" />
<field name="longitudine" type="double" />
<field name="dtAnnullamento" type="Date" /> <field name="dtAnnullamento" type="Date" />
<field name="docPraticaAnnullamentoId" type="long" /> <field name="docPraticaAnnullamentoId" type="long" />
<field name="unitaOperativa" type="int" /> <field name="unitaOperativa" type="int" />

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml

@ -818,6 +818,8 @@
<basic name="tipoPratica" /> <basic name="tipoPratica" />
<basic name="territorioId" /> <basic name="territorioId" />
<basic name="tipoProcedura" /> <basic name="tipoProcedura" />
<basic name="latitudine" />
<basic name="longitudine" />
<basic name="dtAnnullamento"> <basic name="dtAnnullamento">
<temporal>TIMESTAMP</temporal> <temporal>TIMESTAMP</temporal>
</basic> </basic>

2
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 n-progetto = Numero progetto
titolare-digitale = Titolare titolare-digitale = Titolare
tecnico-istruttore = Istruttore tecnico-istruttore = Istruttore
distanza = Distanza <sup>[ 1 ]</sup>
distanza-tooltip = 1: Distanza ortodromica espressa in metri
#Portlet amministazione: il campo deve corrispondere al nome delle relative cartelle in html/tabs #Portlet amministazione: il campo deve corrispondere al nome delle relative cartelle in html/tabs
stato_tabelle = Stato delle Tabelle stato_tabelle = Stato delle Tabelle

5
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties

@ -192,7 +192,8 @@ dp-variante = Dettagli Variante
dp-variante-sostanziale = sostanziale dp-variante-sostanziale = sostanziale
dp-variante-non-sostanziale = non sostanziale dp-variante-non-sostanziale = non sostanziale
dp = Piano paesaggistico provinciale dp = Dettagli principali
dp-ppp = Piano paesaggistico provinciale
dp-zona-sismica = Livello di tutela dp-zona-sismica = Livello di tutela
dp-paesaggio-locale = Paesaggio locale dp-paesaggio-locale = Paesaggio locale
dp-livello-di-tutela = Livello di tutela dp-livello-di-tutela = Livello di tutela
@ -224,6 +225,7 @@ dp-allegato = Allegato
dp-particelle = Particelle dp-particelle = Particelle
dp-lat= Latitudine dp-lat= Latitudine
dp-long= Longitudine dp-long= Longitudine
dp-raggio = Raggio di ricerca
opera-conforme = Opera conforme opera-conforme = Opera conforme
@ -1278,3 +1280,4 @@ tipo_procedura_P9 = 8) Accertamento di compatibilità paesaggistica per Sanatori
tipo_procedura_P10 = 9) Certificazione di sussistenza vincoli tipo_procedura_P10 = 9) Certificazione di sussistenza vincoli
sanatoria-edilizia = Sanatoria edilizia sanatoria-edilizia = Sanatoria edilizia
ricerca-posizione = Ricerca per posizione

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

@ -0,0 +1,100 @@
package it.mwg.sismica.bo.portlet;
import it.tref.liferay.portos.bo.model.Comune;
import it.tref.liferay.portos.bo.model.Provincia;
import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil;
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 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<String> campi = new ArrayList<String>() {
{
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);
}
}
@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<Long> 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();
}
}
}

15
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<IntPratica>,
Externalizable { Externalizable {
@Override @Override
public String toString() { public String toString() {
StringBundler sb = new StringBundler(67); StringBundler sb = new StringBundler(71);
sb.append("{uuid="); sb.append("{uuid=");
sb.append(uuid); sb.append(uuid);
@ -62,6 +62,10 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
sb.append(territorioId); sb.append(territorioId);
sb.append(", tipoProcedura="); sb.append(", tipoProcedura=");
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(dtAnnullamento); sb.append(dtAnnullamento);
sb.append(", docPraticaAnnullamentoId="); sb.append(", docPraticaAnnullamentoId=");
@ -165,6 +169,9 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
intPraticaImpl.setTipoProcedura(tipoProcedura); intPraticaImpl.setTipoProcedura(tipoProcedura);
} }
intPraticaImpl.setLatitudine(latitudine);
intPraticaImpl.setLongitudine(longitudine);
if (dtAnnullamento == Long.MIN_VALUE) { if (dtAnnullamento == Long.MIN_VALUE) {
intPraticaImpl.setDtAnnullamento(null); intPraticaImpl.setDtAnnullamento(null);
} }
@ -264,6 +271,8 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
tipoPratica = objectInput.readUTF(); tipoPratica = objectInput.readUTF();
territorioId = objectInput.readLong(); territorioId = objectInput.readLong();
tipoProcedura = objectInput.readUTF(); tipoProcedura = objectInput.readUTF();
latitudine = objectInput.readDouble();
longitudine = objectInput.readDouble();
dtAnnullamento = objectInput.readLong(); dtAnnullamento = objectInput.readLong();
docPraticaAnnullamentoId = objectInput.readLong(); docPraticaAnnullamentoId = objectInput.readLong();
unitaOperativa = objectInput.readInt(); unitaOperativa = objectInput.readInt();
@ -329,6 +338,8 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
objectOutput.writeUTF(tipoProcedura); objectOutput.writeUTF(tipoProcedura);
} }
objectOutput.writeDouble(latitudine);
objectOutput.writeDouble(longitudine);
objectOutput.writeLong(dtAnnullamento); objectOutput.writeLong(dtAnnullamento);
objectOutput.writeLong(docPraticaAnnullamentoId); objectOutput.writeLong(docPraticaAnnullamentoId);
objectOutput.writeInt(unitaOperativa); objectOutput.writeInt(unitaOperativa);
@ -390,6 +401,8 @@ public class IntPraticaCacheModel implements CacheModel<IntPratica>,
public String tipoPratica; public String tipoPratica;
public long territorioId; public long territorioId;
public String tipoProcedura; public String tipoProcedura;
public double latitudine;
public double longitudine;
public long dtAnnullamento; public long dtAnnullamento;
public long docPraticaAnnullamentoId; public long docPraticaAnnullamentoId;
public int unitaOperativa; public int unitaOperativa;

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

@ -12,11 +12,26 @@
package it.tref.liferay.portos.bo.model.impl; 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.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.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import java.util.Locale; import java.util.Locale;
import org.apache.commons.lang.StringUtils;
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.log.LogFactoryUtil;
@ -45,11 +60,13 @@ public class IntPraticaImpl extends IntPraticaBaseImpl {
*/ */
private static final Log _log = LogFactoryUtil.getLog(IntPraticaImpl.class); private static final Log _log = LogFactoryUtil.getLog(IntPraticaImpl.class);
private Integer distanzaOrtodromica = null;
public IntPraticaImpl() { public IntPraticaImpl() {
} }
@Override
public String getTitle(Locale locale, boolean completed) { public String getTitle(Locale locale, boolean completed) {
DettPratica dettPratica = null; DettPratica dettPratica = null;
@ -71,16 +88,19 @@ public class IntPraticaImpl extends IntPraticaBaseImpl {
return Validator.isNotNull(dettPratica) ? dettPratica.getTitle(locale) : "-"; return Validator.isNotNull(dettPratica) ? dettPratica.getTitle(locale) : "-";
} }
@Override
public String getTitle(boolean completed) { public String getTitle(boolean completed) {
return getTitle(LocaleUtil.getSiteDefault(), completed); return getTitle(LocaleUtil.getSiteDefault(), completed);
} }
@Override
public boolean isAnnullata() { public boolean isAnnullata() {
return Validator.isNotNull(this.getDtAnnullamento()); return Validator.isNotNull(this.getDtAnnullamento());
} }
@Override
public boolean isChiusa() throws SystemException { public boolean isChiusa() throws SystemException {
boolean completata = false; boolean completata = false;
@ -97,4 +117,41 @@ public class IntPraticaImpl extends IntPraticaBaseImpl {
return completata; return completata;
} }
@Override
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() + ")<br/>" + 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;
}
} }

66
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<IntPratica>
{ "tipoPratica", Types.VARCHAR }, { "tipoPratica", Types.VARCHAR },
{ "territorioId", Types.BIGINT }, { "territorioId", Types.BIGINT },
{ "tipoProcedura", Types.VARCHAR }, { "tipoProcedura", Types.VARCHAR },
{ "latitudine", Types.DOUBLE },
{ "longitudine", Types.DOUBLE },
{ "dtAnnullamento", Types.TIMESTAMP }, { "dtAnnullamento", Types.TIMESTAMP },
{ "docPraticaAnnullamentoId", Types.BIGINT }, { "docPraticaAnnullamentoId", Types.BIGINT },
{ "unitaOperativa", Types.INTEGER }, { "unitaOperativa", Types.INTEGER },
@ -101,7 +103,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
{ "collaudoTotale", Types.BOOLEAN }, { "collaudoTotale", Types.BOOLEAN },
{ "controlloObbligatorio", Types.BOOLEAN } { "controlloObbligatorio", 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,dtSorteggio DATE null,statoPratica VARCHAR(10) null,numeroProgetto VARCHAR(75) null,validata BOOLEAN,status INTEGER,statusByUserId LONG,statusDate DATE null,esitoControllo INTEGER,dtPratica DATE null,oldIntPraticaId LONG,sospesa BOOLEAN,dtSospensione DATE null,codiceFiscaleDelegatoFineLavori VARCHAR(75) null,codiceFiscaleDelegatoCollaudo VARCHAR(75) null,fineLavoriParziale BOOLEAN,fineLavoriTotale BOOLEAN,collaudoParziale BOOLEAN,collaudoTotale BOOLEAN,controlloObbligatorio 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,dtSorteggio DATE null,statoPratica VARCHAR(10) null,numeroProgetto VARCHAR(75) null,validata BOOLEAN,status INTEGER,statusByUserId LONG,statusDate DATE null,esitoControllo INTEGER,dtPratica DATE null,oldIntPraticaId LONG,sospesa BOOLEAN,dtSospensione DATE null,codiceFiscaleDelegatoFineLavori VARCHAR(75) null,codiceFiscaleDelegatoCollaudo VARCHAR(75) null,fineLavoriParziale BOOLEAN,fineLavoriTotale BOOLEAN,collaudoParziale BOOLEAN,collaudoTotale BOOLEAN,controlloObbligatorio BOOLEAN)";
public static final String TABLE_SQL_DROP = "drop table portos_bo_IntPratica"; 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_JPQL = " ORDER BY intPratica.intPraticaId ASC";
public static final String ORDER_BY_SQL = " ORDER BY portos_bo_IntPratica.intPraticaId ASC"; public static final String ORDER_BY_SQL = " ORDER BY portos_bo_IntPratica.intPraticaId ASC";
@ -151,6 +153,8 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
model.setTipoPratica(soapModel.getTipoPratica()); model.setTipoPratica(soapModel.getTipoPratica());
model.setTerritorioId(soapModel.getTerritorioId()); model.setTerritorioId(soapModel.getTerritorioId());
model.setTipoProcedura(soapModel.getTipoProcedura()); model.setTipoProcedura(soapModel.getTipoProcedura());
model.setLatitudine(soapModel.getLatitudine());
model.setLongitudine(soapModel.getLongitudine());
model.setDtAnnullamento(soapModel.getDtAnnullamento()); model.setDtAnnullamento(soapModel.getDtAnnullamento());
model.setDocPraticaAnnullamentoId(soapModel.getDocPraticaAnnullamentoId()); model.setDocPraticaAnnullamentoId(soapModel.getDocPraticaAnnullamentoId());
model.setUnitaOperativa(soapModel.getUnitaOperativa()); model.setUnitaOperativa(soapModel.getUnitaOperativa());
@ -248,6 +252,8 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
attributes.put("tipoPratica", getTipoPratica()); attributes.put("tipoPratica", getTipoPratica());
attributes.put("territorioId", getTerritorioId()); attributes.put("territorioId", getTerritorioId());
attributes.put("tipoProcedura", getTipoProcedura()); attributes.put("tipoProcedura", getTipoProcedura());
attributes.put("latitudine", getLatitudine());
attributes.put("longitudine", getLongitudine());
attributes.put("dtAnnullamento", getDtAnnullamento()); attributes.put("dtAnnullamento", getDtAnnullamento());
attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId()); attributes.put("docPraticaAnnullamentoId", getDocPraticaAnnullamentoId());
attributes.put("unitaOperativa", getUnitaOperativa()); attributes.put("unitaOperativa", getUnitaOperativa());
@ -344,6 +350,18 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
setTipoProcedura(tipoProcedura); 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"); Date dtAnnullamento = (Date)attributes.get("dtAnnullamento");
if (dtAnnullamento != null) { if (dtAnnullamento != null) {
@ -689,6 +707,28 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
_tipoProcedura = tipoProcedura; _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 @JSON
@Override @Override
public Date getDtAnnullamento() { public Date getDtAnnullamento() {
@ -1081,6 +1121,8 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
intPraticaImpl.setTipoPratica(getTipoPratica()); intPraticaImpl.setTipoPratica(getTipoPratica());
intPraticaImpl.setTerritorioId(getTerritorioId()); intPraticaImpl.setTerritorioId(getTerritorioId());
intPraticaImpl.setTipoProcedura(getTipoProcedura()); intPraticaImpl.setTipoProcedura(getTipoProcedura());
intPraticaImpl.setLatitudine(getLatitudine());
intPraticaImpl.setLongitudine(getLongitudine());
intPraticaImpl.setDtAnnullamento(getDtAnnullamento()); intPraticaImpl.setDtAnnullamento(getDtAnnullamento());
intPraticaImpl.setDocPraticaAnnullamentoId(getDocPraticaAnnullamentoId()); intPraticaImpl.setDocPraticaAnnullamentoId(getDocPraticaAnnullamentoId());
intPraticaImpl.setUnitaOperativa(getUnitaOperativa()); intPraticaImpl.setUnitaOperativa(getUnitaOperativa());
@ -1250,6 +1292,10 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
intPraticaCacheModel.tipoProcedura = null; intPraticaCacheModel.tipoProcedura = null;
} }
intPraticaCacheModel.latitudine = getLatitudine();
intPraticaCacheModel.longitudine = getLongitudine();
Date dtAnnullamento = getDtAnnullamento(); Date dtAnnullamento = getDtAnnullamento();
if (dtAnnullamento != null) { if (dtAnnullamento != null) {
@ -1360,7 +1406,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
@Override @Override
public String toString() { public String toString() {
StringBundler sb = new StringBundler(67); StringBundler sb = new StringBundler(71);
sb.append("{uuid="); sb.append("{uuid=");
sb.append(getUuid()); sb.append(getUuid());
@ -1384,6 +1430,10 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
sb.append(getTerritorioId()); sb.append(getTerritorioId());
sb.append(", tipoProcedura="); sb.append(", tipoProcedura=");
sb.append(getTipoProcedura()); sb.append(getTipoProcedura());
sb.append(", latitudine=");
sb.append(getLatitudine());
sb.append(", longitudine=");
sb.append(getLongitudine());
sb.append(", dtAnnullamento="); sb.append(", dtAnnullamento=");
sb.append(getDtAnnullamento()); sb.append(getDtAnnullamento());
sb.append(", docPraticaAnnullamentoId="); sb.append(", docPraticaAnnullamentoId=");
@ -1435,7 +1485,7 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
@Override @Override
public String toXmlString() { public String toXmlString() {
StringBundler sb = new StringBundler(103); StringBundler sb = new StringBundler(109);
sb.append("<model><model-name>"); sb.append("<model><model-name>");
sb.append("it.tref.liferay.portos.bo.model.IntPratica"); sb.append("it.tref.liferay.portos.bo.model.IntPratica");
@ -1485,6 +1535,14 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
"<column><column-name>tipoProcedura</column-name><column-value><![CDATA["); "<column><column-name>tipoProcedura</column-name><column-value><![CDATA[");
sb.append(getTipoProcedura()); sb.append(getTipoProcedura());
sb.append("]]></column-value></column>"); sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>latitudine</column-name><column-value><![CDATA[");
sb.append(getLatitudine());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>longitudine</column-name><column-value><![CDATA[");
sb.append(getLongitudine());
sb.append("]]></column-value></column>");
sb.append( sb.append(
"<column><column-name>dtAnnullamento</column-name><column-value><![CDATA["); "<column><column-name>dtAnnullamento</column-name><column-value><![CDATA[");
sb.append(getDtAnnullamento()); sb.append(getDtAnnullamento());
@ -1604,6 +1662,8 @@ public class IntPraticaModelImpl extends BaseModelImpl<IntPratica>
private long _originalTerritorioId; private long _originalTerritorioId;
private boolean _setOriginalTerritorioId; private boolean _setOriginalTerritorioId;
private String _tipoProcedura; private String _tipoProcedura;
private double _latitudine;
private double _longitudine;
private Date _dtAnnullamento; private Date _dtAnnullamento;
private long _docPraticaAnnullamentoId; private long _docPraticaAnnullamentoId;
private int _unitaOperativa; private int _unitaOperativa;

23
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.ManutenzioneDatabase;
import it.mwg.sismica.bo.util.SismicaUtil; 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.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.shared.util.ConfigurazioneConstants;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -13,15 +15,36 @@ import javax.portlet.ActionResponse;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.util.ParamUtil; import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.util.WebKeys; import com.liferay.portal.kernel.util.WebKeys;
import com.liferay.portal.model.Company;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.ServiceContextFactory; import com.liferay.portal.service.ServiceContextFactory;
import com.liferay.portal.theme.ThemeDisplay; import com.liferay.portal.theme.ThemeDisplay;
import com.liferay.util.bridges.mvc.MVCPortlet; import com.liferay.util.bridges.mvc.MVCPortlet;
public class PaesaggisticaAdministrationPortlet extends MVCPortlet { public class PaesaggisticaAdministrationPortlet extends MVCPortlet {
private final static Log _log = LogFactoryUtil.getLog(PaesaggisticaAdministrationPortlet.class);
public void impostazioniMappe(ActionRequest actionRequest, ActionResponse actionResponse)
throws PortalException, SystemException {
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) public void mostraConfigurazione(ActionRequest actionRequest, ActionResponse actionResponse)
throws SystemException { throws SystemException {

513
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java

@ -192,281 +192,295 @@ public class IntPraticaLocalServiceClpInvoker {
_methodParameterTypes210 = new String[] { }; _methodParameterTypes210 = new String[] { };
_methodName212 = "addNumeroProgetto"; _methodName212 = "countByPosizione";
_methodParameterTypes212 = new String[] { "long" }; _methodParameterTypes212 = new String[] { "double", "double", "int" };
_methodName214 = "sospendiPratica"; _methodName213 = "findByPosizione";
_methodParameterTypes214 = new String[] { "long", "boolean" }; _methodParameterTypes213 = new String[] { "double", "double", "int" };
_methodName215 = "cambiaTitolare"; _methodName214 = "findByPosizione";
_methodParameterTypes215 = new String[] { _methodParameterTypes214 = new String[] {
"long", "long", "com.liferay.portal.service.ServiceContext" "double", "double", "int", "int", "int"
}; };
_methodName216 = "updateStatoPratica"; _methodName216 = "addNumeroProgetto";
_methodParameterTypes216 = new String[] { "long", "java.lang.String" }; _methodParameterTypes216 = new String[] { "long" };
_methodName217 = "updateIntPraticaSorteggio"; _methodName218 = "sospendiPratica";
_methodParameterTypes217 = new String[] { "long", "java.util.Date" }; _methodParameterTypes218 = new String[] { "long", "boolean" };
_methodName218 = "updateIntPraticaSorteggio"; _methodName219 = "cambiaTitolare";
_methodParameterTypes218 = new String[] { _methodParameterTypes219 = new String[] {
"long", "java.util.Date", "java.lang.String" "long", "long", "com.liferay.portal.service.ServiceContext"
}; };
_methodName219 = "findByC_UserId"; _methodName220 = "updateStatoPratica";
_methodParameterTypes219 = new String[] { "long", "long", "int", "int" }; _methodParameterTypes220 = new String[] { "long", "java.lang.String" };
_methodName220 = "countByC_UserId"; _methodName221 = "updateIntPraticaSorteggio";
_methodParameterTypes220 = new String[] { "long", "long" }; _methodParameterTypes221 = new String[] { "long", "java.util.Date" };
_methodName221 = "fetchByOldIntPraticaId"; _methodName222 = "updateIntPraticaSorteggio";
_methodParameterTypes221 = new String[] { "long" }; _methodParameterTypes222 = new String[] {
"long", "java.util.Date", "java.lang.String"
};
_methodName222 = "updateStatus"; _methodName223 = "findByC_UserId";
_methodParameterTypes222 = new String[] { "long", "int" }; _methodParameterTypes223 = new String[] { "long", "long", "int", "int" };
_methodName223 = "findByCompanyIdSoggettoProgetti"; _methodName224 = "countByC_UserId";
_methodParameterTypes223 = new String[] { "long", "long" }; _methodParameterTypes224 = new String[] { "long", "long" };
_methodName224 = "countByCompanyIdSoggettoProgetti"; _methodName225 = "fetchByOldIntPraticaId";
_methodParameterTypes224 = new String[] { "long", "long" }; _methodParameterTypes225 = new String[] { "long" };
_methodName226 = "findByCompanyIdSoggettoArchivio"; _methodName226 = "updateStatus";
_methodParameterTypes226 = new String[] { "long", "long" }; _methodParameterTypes226 = new String[] { "long", "int" };
_methodName227 = "countByCompanyIdSoggettoArchivio"; _methodName227 = "findByCompanyIdSoggettoProgetti";
_methodParameterTypes227 = new String[] { "long", "long" }; _methodParameterTypes227 = new String[] { "long", "long" };
_methodName229 = "findByCompanyIdSoggettoAltriProgetti"; _methodName228 = "countByCompanyIdSoggettoProgetti";
_methodParameterTypes229 = new String[] { "long", "long", "int", "int" }; _methodParameterTypes228 = new String[] { "long", "long" };
_methodName230 = "countByCompanyIdSoggettoAltriProgetti"; _methodName230 = "findByCompanyIdSoggettoArchivio";
_methodParameterTypes230 = new String[] { "long", "long" }; _methodParameterTypes230 = new String[] { "long", "long" };
_methodName232 = "findByCanAddFineLavori"; _methodName231 = "countByCompanyIdSoggettoArchivio";
_methodParameterTypes231 = new String[] { "long", "long" };
_methodParameterTypes232 = new String[] { _methodName233 = "findByCompanyIdSoggettoAltriProgetti";
_methodParameterTypes233 = new String[] { "long", "long", "int", "int" };
_methodName234 = "countByCompanyIdSoggettoAltriProgetti";
_methodParameterTypes234 = new String[] { "long", "long" };
_methodName236 = "findByCanAddFineLavori";
_methodParameterTypes236 = new String[] {
"long", "java.lang.String", "int", "int" "long", "java.lang.String", "int", "int"
}; };
_methodName233 = "countByCanAddFineLavori"; _methodName237 = "countByCanAddFineLavori";
_methodParameterTypes233 = new String[] { "long", "java.lang.String" }; _methodParameterTypes237 = new String[] { "long", "java.lang.String" };
_methodName235 = "findByCanAddCollaudo"; _methodName239 = "findByCanAddCollaudo";
_methodParameterTypes235 = new String[] { _methodParameterTypes239 = new String[] {
"long", "java.lang.String", "int", "int" "long", "java.lang.String", "int", "int"
}; };
_methodName236 = "countByCanAddCollaudo"; _methodName240 = "countByCanAddCollaudo";
_methodParameterTypes236 = new String[] { "long", "java.lang.String" }; _methodParameterTypes240 = new String[] { "long", "java.lang.String" };
_methodName238 = "search"; _methodName242 = "search";
_methodParameterTypes238 = new String[] { "java.util.List", "int", "int" }; _methodParameterTypes242 = new String[] { "java.util.List", "int", "int" };
_methodName239 = "countSearch"; _methodName243 = "countSearch";
_methodParameterTypes239 = new String[] { "java.util.List" }; _methodParameterTypes243 = new String[] { "java.util.List" };
_methodName240 = "searchWithIntPraticaId"; _methodName244 = "searchWithIntPraticaId";
_methodParameterTypes240 = new String[] { _methodParameterTypes244 = new String[] {
"java.util.List", "long", "int", "int" "java.util.List", "long", "int", "int"
}; };
_methodName241 = "countSearchWithIntPraticaId"; _methodName245 = "countSearchWithIntPraticaId";
_methodParameterTypes241 = new String[] { "java.util.List", "long" }; _methodParameterTypes245 = new String[] { "java.util.List", "long" };
_methodName242 = "allegaFileAnnullamento"; _methodName246 = "allegaFileAnnullamento";
_methodParameterTypes242 = new String[] { _methodParameterTypes246 = new String[] {
"long", "byte[][]", "java.lang.String", "java.lang.String", "long", "byte[][]", "java.lang.String", "java.lang.String",
"com.liferay.portal.service.ServiceContext" "com.liferay.portal.service.ServiceContext"
}; };
_methodName243 = "generateFileAnnullamento"; _methodName247 = "generateFileAnnullamento";
_methodParameterTypes243 = new String[] { _methodParameterTypes247 = new String[] {
"long", "com.liferay.portal.service.ServiceContext" "long", "com.liferay.portal.service.ServiceContext"
}; };
_methodName244 = "deleteFileAnnullamento"; _methodName248 = "deleteFileAnnullamento";
_methodParameterTypes244 = new String[] { "long" }; _methodParameterTypes248 = new String[] { "long" };
_methodName245 = "completeAnnullamento"; _methodName249 = "completeAnnullamento";
_methodParameterTypes245 = new String[] { "long" }; _methodParameterTypes249 = new String[] { "long" };
_methodName246 = "cambiaIstruttore"; _methodName250 = "cambiaIstruttore";
_methodParameterTypes246 = new String[] { "long", "long", "long" }; _methodParameterTypes250 = new String[] { "long", "long", "long" };
_methodName247 = "countCaricoLavoroCF"; _methodName251 = "countCaricoLavoroCF";
_methodParameterTypes247 = new String[] { _methodParameterTypes251 = new String[] {
"long", "java.lang.String", "java.lang.Boolean", "long", "java.lang.String", "java.lang.Boolean",
"java.lang.Long[][]" "java.lang.Long[][]"
}; };
_methodName248 = "countCaricoLavoroIstruttore"; _methodName252 = "countCaricoLavoroIstruttore";
_methodParameterTypes248 = new String[] { _methodParameterTypes252 = new String[] {
"long", "java.lang.String", "java.lang.Boolean" "long", "java.lang.String", "java.lang.Boolean"
}; };
_methodName249 = "generateReportPratica"; _methodName253 = "generateReportPratica";
_methodParameterTypes249 = new String[] { _methodParameterTypes253 = new String[] {
"it.tref.liferay.portos.bo.model.IntPratica", "long" "it.tref.liferay.portos.bo.model.IntPratica", "long"
}; };
_methodName250 = "updateModifiedDate"; _methodName254 = "updateModifiedDate";
_methodParameterTypes250 = new String[] { "long", "java.util.Date" }; _methodParameterTypes254 = new String[] { "long", "java.util.Date" };
_methodName251 = "countAutorizzazione"; _methodName255 = "countAutorizzazione";
_methodParameterTypes251 = new String[] { _methodParameterTypes255 = new String[] {
"java.util.Date", "java.util.Date", "long" "java.util.Date", "java.util.Date", "long"
}; };
_methodName252 = "countSanatorie"; _methodName256 = "countSanatorie";
_methodParameterTypes252 = new String[] { _methodParameterTypes256 = new String[] {
"java.util.Date", "java.util.Date", "long" "java.util.Date", "java.util.Date", "long"
}; };
_methodName253 = "countOpereMinoreImportanza"; _methodName257 = "countOpereMinoreImportanza";
_methodParameterTypes253 = new String[] { _methodParameterTypes257 = new String[] {
"java.util.Date", "java.util.Date", "long" "java.util.Date", "java.util.Date", "long"
}; };
_methodName254 = "countDeposito"; _methodName258 = "countDeposito";
_methodParameterTypes254 = new String[] { _methodParameterTypes258 = new String[] {
"java.util.Date", "java.util.Date", "long", "boolean" "java.util.Date", "java.util.Date", "long", "boolean"
}; };
_methodName255 = "countVidimate"; _methodName259 = "countVidimate";
_methodParameterTypes255 = new String[] { _methodParameterTypes259 = new String[] {
"java.util.Date", "java.util.Date", "long", "java.lang.String", "java.util.Date", "java.util.Date", "long", "java.lang.String",
"boolean" "boolean"
}; };
_methodName256 = "countControllo"; _methodName260 = "countControllo";
_methodParameterTypes256 = new String[] { _methodParameterTypes260 = new String[] {
"java.util.Date", "java.util.Date", "long", "java.lang.String", "java.util.Date", "java.util.Date", "long", "java.lang.String",
"boolean" "boolean"
}; };
_methodName257 = "importaVecchiFilesFascicolo"; _methodName261 = "importaVecchiFilesFascicolo";
_methodParameterTypes257 = new String[] { "long", "int", "int" }; _methodParameterTypes261 = new String[] { "long", "int", "int" };
_methodName258 = "findIntPraticaNotExist"; _methodName262 = "findIntPraticaNotExist";
_methodParameterTypes258 = new String[] { }; _methodParameterTypes262 = new String[] { };
_methodName259 = "riparaWorkflow"; _methodName263 = "riparaWorkflow";
_methodParameterTypes259 = new String[] { }; _methodParameterTypes263 = new String[] { };
_methodName260 = "reIndexFascicolo"; _methodName264 = "reIndexFascicolo";
_methodParameterTypes260 = new String[] { _methodParameterTypes264 = new String[] {
"it.tref.liferay.portos.bo.model.IntPratica", "long" "it.tref.liferay.portos.bo.model.IntPratica", "long"
}; };
_methodName261 = "reIndexFasciolo"; _methodName265 = "reIndexFasciolo";
_methodParameterTypes261 = new String[] { "java.lang.String", "long" }; _methodParameterTypes265 = new String[] { "java.lang.String", "long" };
_methodName262 = "reIndexFasciolo"; _methodName266 = "reIndexFasciolo";
_methodParameterTypes262 = new String[] { "long", "long" }; _methodParameterTypes266 = new String[] { "long", "long" };
_methodName263 = "trovaDoppioni"; _methodName267 = "trovaDoppioni";
_methodParameterTypes263 = new String[] { }; _methodParameterTypes267 = new String[] { };
_methodName264 = "findByNumeroProgetto"; _methodName268 = "findByNumeroProgetto";
_methodParameterTypes264 = new String[] { "java.lang.String" }; _methodParameterTypes268 = new String[] { "java.lang.String" };
_methodName265 = "findByTerritorioId"; _methodName269 = "findByTerritorioId";
_methodParameterTypes265 = new String[] { "long" }; _methodParameterTypes269 = new String[] { "long" };
_methodName266 = "reportTempisticheIstruttorieAvvisiAutorizzazioni"; _methodName270 = "reportTempisticheIstruttorieAvvisiAutorizzazioni";
_methodParameterTypes266 = new String[] { _methodParameterTypes270 = new String[] {
"java.util.Date", "java.util.Date", "long", "java.lang.String" "java.util.Date", "java.util.Date", "long", "java.lang.String"
}; };
_methodName267 = "reportTempisticheIstruttorieCalcolaDataSorteggio"; _methodName271 = "reportTempisticheIstruttorieCalcolaDataSorteggio";
_methodParameterTypes267 = new String[] { _methodParameterTypes271 = new String[] {
"java.util.Date", "java.util.Date", "long" "java.util.Date", "java.util.Date", "long"
}; };
_methodName268 = "reportPraticheVidimate"; _methodName272 = "reportPraticheVidimate";
_methodParameterTypes268 = new String[] { _methodParameterTypes272 = new String[] {
"java.util.Date", "java.util.Date", "long", "java.lang.String" "java.util.Date", "java.util.Date", "long", "java.lang.String"
}; };
_methodName269 = "reportPraticheVidimateCalcolaDataSorteggio"; _methodName273 = "reportPraticheVidimateCalcolaDataSorteggio";
_methodParameterTypes269 = new String[] { _methodParameterTypes273 = new String[] {
"java.util.Date", "java.util.Date", "long" "java.util.Date", "java.util.Date", "long"
}; };
_methodName270 = "countIngressiAutorizzazioni"; _methodName274 = "countIngressiAutorizzazioni";
_methodParameterTypes270 = new String[] { _methodParameterTypes274 = new String[] {
"java.util.Date", "java.util.Date", "long" "java.util.Date", "java.util.Date", "long"
}; };
_methodName271 = "countIngressiDepositi"; _methodName275 = "countIngressiDepositi";
_methodParameterTypes271 = new String[] { _methodParameterTypes275 = new String[] {
"java.util.Date", "java.util.Date", "long" "java.util.Date", "java.util.Date", "long"
}; };
_methodName272 = "countIngressiCO"; _methodName276 = "countIngressiCO";
_methodParameterTypes272 = new String[] { _methodParameterTypes276 = new String[] {
"java.util.Date", "java.util.Date", "long" "java.util.Date", "java.util.Date", "long"
}; };
_methodName273 = "getOrganizationByIntPraticaId"; _methodName277 = "getOrganizationByIntPraticaId";
_methodParameterTypes273 = new String[] { "long" }; _methodParameterTypes277 = new String[] { "long" };
} }
public Object invokeMethod(String name, String[] parameterTypes, public Object invokeMethod(String name, String[] parameterTypes,
@ -669,189 +683,212 @@ public class IntPraticaLocalServiceClpInvoker {
if (_methodName212.equals(name) && if (_methodName212.equals(name) &&
Arrays.deepEquals(_methodParameterTypes212, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes212, parameterTypes)) {
return IntPraticaLocalServiceUtil.addNumeroProgetto(((Long)arguments[0]).longValue()); return IntPraticaLocalServiceUtil.countByPosizione(((Double)arguments[0]).doubleValue(),
((Double)arguments[1]).doubleValue(),
((Integer)arguments[2]).intValue());
}
if (_methodName213.equals(name) &&
Arrays.deepEquals(_methodParameterTypes213, parameterTypes)) {
return IntPraticaLocalServiceUtil.findByPosizione(((Double)arguments[0]).doubleValue(),
((Double)arguments[1]).doubleValue(),
((Integer)arguments[2]).intValue());
} }
if (_methodName214.equals(name) && if (_methodName214.equals(name) &&
Arrays.deepEquals(_methodParameterTypes214, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes214, 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 (_methodName216.equals(name) &&
Arrays.deepEquals(_methodParameterTypes216, parameterTypes)) {
return IntPraticaLocalServiceUtil.addNumeroProgetto(((Long)arguments[0]).longValue());
}
if (_methodName218.equals(name) &&
Arrays.deepEquals(_methodParameterTypes218, parameterTypes)) {
return IntPraticaLocalServiceUtil.sospendiPratica(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.sospendiPratica(((Long)arguments[0]).longValue(),
((Boolean)arguments[1]).booleanValue()); ((Boolean)arguments[1]).booleanValue());
} }
if (_methodName215.equals(name) && if (_methodName219.equals(name) &&
Arrays.deepEquals(_methodParameterTypes215, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes219, parameterTypes)) {
return IntPraticaLocalServiceUtil.cambiaTitolare(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.cambiaTitolare(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue(), ((Long)arguments[1]).longValue(),
(com.liferay.portal.service.ServiceContext)arguments[2]); (com.liferay.portal.service.ServiceContext)arguments[2]);
} }
if (_methodName216.equals(name) && if (_methodName220.equals(name) &&
Arrays.deepEquals(_methodParameterTypes216, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes220, parameterTypes)) {
return IntPraticaLocalServiceUtil.updateStatoPratica(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.updateStatoPratica(((Long)arguments[0]).longValue(),
(java.lang.String)arguments[1]); (java.lang.String)arguments[1]);
} }
if (_methodName217.equals(name) && if (_methodName221.equals(name) &&
Arrays.deepEquals(_methodParameterTypes217, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes221, parameterTypes)) {
return IntPraticaLocalServiceUtil.updateIntPraticaSorteggio(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.updateIntPraticaSorteggio(((Long)arguments[0]).longValue(),
(java.util.Date)arguments[1]); (java.util.Date)arguments[1]);
} }
if (_methodName218.equals(name) && if (_methodName222.equals(name) &&
Arrays.deepEquals(_methodParameterTypes218, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes222, parameterTypes)) {
return IntPraticaLocalServiceUtil.updateIntPraticaSorteggio(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.updateIntPraticaSorteggio(((Long)arguments[0]).longValue(),
(java.util.Date)arguments[1], (java.lang.String)arguments[2]); (java.util.Date)arguments[1], (java.lang.String)arguments[2]);
} }
if (_methodName219.equals(name) && if (_methodName223.equals(name) &&
Arrays.deepEquals(_methodParameterTypes219, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes223, parameterTypes)) {
return IntPraticaLocalServiceUtil.findByC_UserId(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.findByC_UserId(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue(), ((Long)arguments[1]).longValue(),
((Integer)arguments[2]).intValue(), ((Integer)arguments[2]).intValue(),
((Integer)arguments[3]).intValue()); ((Integer)arguments[3]).intValue());
} }
if (_methodName220.equals(name) && if (_methodName224.equals(name) &&
Arrays.deepEquals(_methodParameterTypes220, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes224, parameterTypes)) {
return IntPraticaLocalServiceUtil.countByC_UserId(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.countByC_UserId(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue()); ((Long)arguments[1]).longValue());
} }
if (_methodName221.equals(name) && if (_methodName225.equals(name) &&
Arrays.deepEquals(_methodParameterTypes221, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes225, parameterTypes)) {
return IntPraticaLocalServiceUtil.fetchByOldIntPraticaId(((Long)arguments[0]).longValue()); return IntPraticaLocalServiceUtil.fetchByOldIntPraticaId(((Long)arguments[0]).longValue());
} }
if (_methodName222.equals(name) && if (_methodName226.equals(name) &&
Arrays.deepEquals(_methodParameterTypes222, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes226, parameterTypes)) {
IntPraticaLocalServiceUtil.updateStatus(((Long)arguments[0]).longValue(), IntPraticaLocalServiceUtil.updateStatus(((Long)arguments[0]).longValue(),
((Integer)arguments[1]).intValue()); ((Integer)arguments[1]).intValue());
return null; return null;
} }
if (_methodName223.equals(name) && if (_methodName227.equals(name) &&
Arrays.deepEquals(_methodParameterTypes223, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes227, parameterTypes)) {
return IntPraticaLocalServiceUtil.findByCompanyIdSoggettoProgetti(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.findByCompanyIdSoggettoProgetti(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue()); ((Long)arguments[1]).longValue());
} }
if (_methodName224.equals(name) && if (_methodName228.equals(name) &&
Arrays.deepEquals(_methodParameterTypes224, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes228, parameterTypes)) {
return IntPraticaLocalServiceUtil.countByCompanyIdSoggettoProgetti(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.countByCompanyIdSoggettoProgetti(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue()); ((Long)arguments[1]).longValue());
} }
if (_methodName226.equals(name) && if (_methodName230.equals(name) &&
Arrays.deepEquals(_methodParameterTypes226, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes230, parameterTypes)) {
return IntPraticaLocalServiceUtil.findByCompanyIdSoggettoArchivio(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.findByCompanyIdSoggettoArchivio(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue()); ((Long)arguments[1]).longValue());
} }
if (_methodName227.equals(name) && if (_methodName231.equals(name) &&
Arrays.deepEquals(_methodParameterTypes227, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes231, parameterTypes)) {
return IntPraticaLocalServiceUtil.countByCompanyIdSoggettoArchivio(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.countByCompanyIdSoggettoArchivio(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue()); ((Long)arguments[1]).longValue());
} }
if (_methodName229.equals(name) && if (_methodName233.equals(name) &&
Arrays.deepEquals(_methodParameterTypes229, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes233, parameterTypes)) {
return IntPraticaLocalServiceUtil.findByCompanyIdSoggettoAltriProgetti(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.findByCompanyIdSoggettoAltriProgetti(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue(), ((Long)arguments[1]).longValue(),
((Integer)arguments[2]).intValue(), ((Integer)arguments[2]).intValue(),
((Integer)arguments[3]).intValue()); ((Integer)arguments[3]).intValue());
} }
if (_methodName230.equals(name) && if (_methodName234.equals(name) &&
Arrays.deepEquals(_methodParameterTypes230, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes234, parameterTypes)) {
return IntPraticaLocalServiceUtil.countByCompanyIdSoggettoAltriProgetti(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.countByCompanyIdSoggettoAltriProgetti(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue()); ((Long)arguments[1]).longValue());
} }
if (_methodName232.equals(name) && if (_methodName236.equals(name) &&
Arrays.deepEquals(_methodParameterTypes232, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes236, parameterTypes)) {
return IntPraticaLocalServiceUtil.findByCanAddFineLavori(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.findByCanAddFineLavori(((Long)arguments[0]).longValue(),
(java.lang.String)arguments[1], (java.lang.String)arguments[1],
((Integer)arguments[2]).intValue(), ((Integer)arguments[2]).intValue(),
((Integer)arguments[3]).intValue()); ((Integer)arguments[3]).intValue());
} }
if (_methodName233.equals(name) && if (_methodName237.equals(name) &&
Arrays.deepEquals(_methodParameterTypes233, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes237, parameterTypes)) {
return IntPraticaLocalServiceUtil.countByCanAddFineLavori(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.countByCanAddFineLavori(((Long)arguments[0]).longValue(),
(java.lang.String)arguments[1]); (java.lang.String)arguments[1]);
} }
if (_methodName235.equals(name) && if (_methodName239.equals(name) &&
Arrays.deepEquals(_methodParameterTypes235, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes239, parameterTypes)) {
return IntPraticaLocalServiceUtil.findByCanAddCollaudo(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.findByCanAddCollaudo(((Long)arguments[0]).longValue(),
(java.lang.String)arguments[1], (java.lang.String)arguments[1],
((Integer)arguments[2]).intValue(), ((Integer)arguments[2]).intValue(),
((Integer)arguments[3]).intValue()); ((Integer)arguments[3]).intValue());
} }
if (_methodName236.equals(name) && if (_methodName240.equals(name) &&
Arrays.deepEquals(_methodParameterTypes236, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes240, parameterTypes)) {
return IntPraticaLocalServiceUtil.countByCanAddCollaudo(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.countByCanAddCollaudo(((Long)arguments[0]).longValue(),
(java.lang.String)arguments[1]); (java.lang.String)arguments[1]);
} }
if (_methodName238.equals(name) && if (_methodName242.equals(name) &&
Arrays.deepEquals(_methodParameterTypes238, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes242, parameterTypes)) {
return IntPraticaLocalServiceUtil.search((java.util.List<java.lang.Long>)arguments[0], return IntPraticaLocalServiceUtil.search((java.util.List<java.lang.Long>)arguments[0],
((Integer)arguments[1]).intValue(), ((Integer)arguments[1]).intValue(),
((Integer)arguments[2]).intValue()); ((Integer)arguments[2]).intValue());
} }
if (_methodName239.equals(name) && if (_methodName243.equals(name) &&
Arrays.deepEquals(_methodParameterTypes239, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes243, parameterTypes)) {
return IntPraticaLocalServiceUtil.countSearch((java.util.List<java.lang.Long>)arguments[0]); return IntPraticaLocalServiceUtil.countSearch((java.util.List<java.lang.Long>)arguments[0]);
} }
if (_methodName240.equals(name) && if (_methodName244.equals(name) &&
Arrays.deepEquals(_methodParameterTypes240, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes244, parameterTypes)) {
return IntPraticaLocalServiceUtil.searchWithIntPraticaId((java.util.List<java.lang.Long>)arguments[0], return IntPraticaLocalServiceUtil.searchWithIntPraticaId((java.util.List<java.lang.Long>)arguments[0],
((Long)arguments[1]).longValue(), ((Long)arguments[1]).longValue(),
((Integer)arguments[2]).intValue(), ((Integer)arguments[2]).intValue(),
((Integer)arguments[3]).intValue()); ((Integer)arguments[3]).intValue());
} }
if (_methodName241.equals(name) && if (_methodName245.equals(name) &&
Arrays.deepEquals(_methodParameterTypes241, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes245, parameterTypes)) {
return IntPraticaLocalServiceUtil.countSearchWithIntPraticaId((java.util.List<java.lang.Long>)arguments[0], return IntPraticaLocalServiceUtil.countSearchWithIntPraticaId((java.util.List<java.lang.Long>)arguments[0],
((Long)arguments[1]).longValue()); ((Long)arguments[1]).longValue());
} }
if (_methodName242.equals(name) && if (_methodName246.equals(name) &&
Arrays.deepEquals(_methodParameterTypes242, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes246, parameterTypes)) {
return IntPraticaLocalServiceUtil.allegaFileAnnullamento(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.allegaFileAnnullamento(((Long)arguments[0]).longValue(),
(byte[])arguments[1], (java.lang.String)arguments[2], (byte[])arguments[1], (java.lang.String)arguments[2],
(java.lang.String)arguments[3], (java.lang.String)arguments[3],
(com.liferay.portal.service.ServiceContext)arguments[4]); (com.liferay.portal.service.ServiceContext)arguments[4]);
} }
if (_methodName243.equals(name) && if (_methodName247.equals(name) &&
Arrays.deepEquals(_methodParameterTypes243, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes247, parameterTypes)) {
return IntPraticaLocalServiceUtil.generateFileAnnullamento(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.generateFileAnnullamento(((Long)arguments[0]).longValue(),
(com.liferay.portal.service.ServiceContext)arguments[1]); (com.liferay.portal.service.ServiceContext)arguments[1]);
} }
if (_methodName244.equals(name) && if (_methodName248.equals(name) &&
Arrays.deepEquals(_methodParameterTypes244, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes248, parameterTypes)) {
IntPraticaLocalServiceUtil.deleteFileAnnullamento(((Long)arguments[0]).longValue()); IntPraticaLocalServiceUtil.deleteFileAnnullamento(((Long)arguments[0]).longValue());
return null; return null;
} }
if (_methodName245.equals(name) && if (_methodName249.equals(name) &&
Arrays.deepEquals(_methodParameterTypes245, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes249, parameterTypes)) {
IntPraticaLocalServiceUtil.completeAnnullamento(((Long)arguments[0]).longValue()); IntPraticaLocalServiceUtil.completeAnnullamento(((Long)arguments[0]).longValue());
return null; return null;
} }
if (_methodName246.equals(name) && if (_methodName250.equals(name) &&
Arrays.deepEquals(_methodParameterTypes246, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes250, parameterTypes)) {
IntPraticaLocalServiceUtil.cambiaIstruttore(((Long)arguments[0]).longValue(), IntPraticaLocalServiceUtil.cambiaIstruttore(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue(), ((Long)arguments[1]).longValue(),
((Long)arguments[2]).longValue()); ((Long)arguments[2]).longValue());
@ -859,174 +896,174 @@ public class IntPraticaLocalServiceClpInvoker {
return null; return null;
} }
if (_methodName247.equals(name) && if (_methodName251.equals(name) &&
Arrays.deepEquals(_methodParameterTypes247, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes251, parameterTypes)) {
return IntPraticaLocalServiceUtil.countCaricoLavoroCF(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.countCaricoLavoroCF(((Long)arguments[0]).longValue(),
(java.lang.String)arguments[1], (java.lang.String)arguments[1],
(java.lang.Boolean)arguments[2], (java.lang.Long[])arguments[3]); (java.lang.Boolean)arguments[2], (java.lang.Long[])arguments[3]);
} }
if (_methodName248.equals(name) && if (_methodName252.equals(name) &&
Arrays.deepEquals(_methodParameterTypes248, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes252, parameterTypes)) {
return IntPraticaLocalServiceUtil.countCaricoLavoroIstruttore(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.countCaricoLavoroIstruttore(((Long)arguments[0]).longValue(),
(java.lang.String)arguments[1], (java.lang.Boolean)arguments[2]); (java.lang.String)arguments[1], (java.lang.Boolean)arguments[2]);
} }
if (_methodName249.equals(name) && if (_methodName253.equals(name) &&
Arrays.deepEquals(_methodParameterTypes249, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes253, parameterTypes)) {
return IntPraticaLocalServiceUtil.generateReportPratica((it.tref.liferay.portos.bo.model.IntPratica)arguments[0], return IntPraticaLocalServiceUtil.generateReportPratica((it.tref.liferay.portos.bo.model.IntPratica)arguments[0],
((Long)arguments[1]).longValue()); ((Long)arguments[1]).longValue());
} }
if (_methodName250.equals(name) && if (_methodName254.equals(name) &&
Arrays.deepEquals(_methodParameterTypes250, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes254, parameterTypes)) {
return IntPraticaLocalServiceUtil.updateModifiedDate(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.updateModifiedDate(((Long)arguments[0]).longValue(),
(java.util.Date)arguments[1]); (java.util.Date)arguments[1]);
} }
if (_methodName251.equals(name) && if (_methodName255.equals(name) &&
Arrays.deepEquals(_methodParameterTypes251, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes255, parameterTypes)) {
return IntPraticaLocalServiceUtil.countAutorizzazione((java.util.Date)arguments[0], return IntPraticaLocalServiceUtil.countAutorizzazione((java.util.Date)arguments[0],
(java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); (java.util.Date)arguments[1], ((Long)arguments[2]).longValue());
} }
if (_methodName252.equals(name) && if (_methodName256.equals(name) &&
Arrays.deepEquals(_methodParameterTypes252, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes256, parameterTypes)) {
return IntPraticaLocalServiceUtil.countSanatorie((java.util.Date)arguments[0], return IntPraticaLocalServiceUtil.countSanatorie((java.util.Date)arguments[0],
(java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); (java.util.Date)arguments[1], ((Long)arguments[2]).longValue());
} }
if (_methodName253.equals(name) && if (_methodName257.equals(name) &&
Arrays.deepEquals(_methodParameterTypes253, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes257, parameterTypes)) {
return IntPraticaLocalServiceUtil.countOpereMinoreImportanza((java.util.Date)arguments[0], return IntPraticaLocalServiceUtil.countOpereMinoreImportanza((java.util.Date)arguments[0],
(java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); (java.util.Date)arguments[1], ((Long)arguments[2]).longValue());
} }
if (_methodName254.equals(name) && if (_methodName258.equals(name) &&
Arrays.deepEquals(_methodParameterTypes254, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes258, parameterTypes)) {
return IntPraticaLocalServiceUtil.countDeposito((java.util.Date)arguments[0], return IntPraticaLocalServiceUtil.countDeposito((java.util.Date)arguments[0],
(java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(),
((Boolean)arguments[3]).booleanValue()); ((Boolean)arguments[3]).booleanValue());
} }
if (_methodName255.equals(name) && if (_methodName259.equals(name) &&
Arrays.deepEquals(_methodParameterTypes255, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes259, parameterTypes)) {
return IntPraticaLocalServiceUtil.countVidimate((java.util.Date)arguments[0], return IntPraticaLocalServiceUtil.countVidimate((java.util.Date)arguments[0],
(java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(),
(java.lang.String)arguments[3], (java.lang.String)arguments[3],
((Boolean)arguments[4]).booleanValue()); ((Boolean)arguments[4]).booleanValue());
} }
if (_methodName256.equals(name) && if (_methodName260.equals(name) &&
Arrays.deepEquals(_methodParameterTypes256, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes260, parameterTypes)) {
return IntPraticaLocalServiceUtil.countControllo((java.util.Date)arguments[0], return IntPraticaLocalServiceUtil.countControllo((java.util.Date)arguments[0],
(java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(),
(java.lang.String)arguments[3], (java.lang.String)arguments[3],
((Boolean)arguments[4]).booleanValue()); ((Boolean)arguments[4]).booleanValue());
} }
if (_methodName257.equals(name) && if (_methodName261.equals(name) &&
Arrays.deepEquals(_methodParameterTypes257, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes261, parameterTypes)) {
return IntPraticaLocalServiceUtil.importaVecchiFilesFascicolo(((Long)arguments[0]).longValue(), return IntPraticaLocalServiceUtil.importaVecchiFilesFascicolo(((Long)arguments[0]).longValue(),
((Integer)arguments[1]).intValue(), ((Integer)arguments[1]).intValue(),
((Integer)arguments[2]).intValue()); ((Integer)arguments[2]).intValue());
} }
if (_methodName258.equals(name) && if (_methodName262.equals(name) &&
Arrays.deepEquals(_methodParameterTypes258, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes262, parameterTypes)) {
return IntPraticaLocalServiceUtil.findIntPraticaNotExist(); return IntPraticaLocalServiceUtil.findIntPraticaNotExist();
} }
if (_methodName259.equals(name) && if (_methodName263.equals(name) &&
Arrays.deepEquals(_methodParameterTypes259, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes263, parameterTypes)) {
return IntPraticaLocalServiceUtil.riparaWorkflow(); return IntPraticaLocalServiceUtil.riparaWorkflow();
} }
if (_methodName260.equals(name) && if (_methodName264.equals(name) &&
Arrays.deepEquals(_methodParameterTypes260, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes264, parameterTypes)) {
IntPraticaLocalServiceUtil.reIndexFascicolo((it.tref.liferay.portos.bo.model.IntPratica)arguments[0], IntPraticaLocalServiceUtil.reIndexFascicolo((it.tref.liferay.portos.bo.model.IntPratica)arguments[0],
((Long)arguments[1]).longValue()); ((Long)arguments[1]).longValue());
return null; return null;
} }
if (_methodName261.equals(name) && if (_methodName265.equals(name) &&
Arrays.deepEquals(_methodParameterTypes261, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes265, parameterTypes)) {
IntPraticaLocalServiceUtil.reIndexFasciolo((java.lang.String)arguments[0], IntPraticaLocalServiceUtil.reIndexFasciolo((java.lang.String)arguments[0],
((Long)arguments[1]).longValue()); ((Long)arguments[1]).longValue());
return null; return null;
} }
if (_methodName262.equals(name) && if (_methodName266.equals(name) &&
Arrays.deepEquals(_methodParameterTypes262, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes266, parameterTypes)) {
IntPraticaLocalServiceUtil.reIndexFasciolo(((Long)arguments[0]).longValue(), IntPraticaLocalServiceUtil.reIndexFasciolo(((Long)arguments[0]).longValue(),
((Long)arguments[1]).longValue()); ((Long)arguments[1]).longValue());
return null; return null;
} }
if (_methodName263.equals(name) && if (_methodName267.equals(name) &&
Arrays.deepEquals(_methodParameterTypes263, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes267, parameterTypes)) {
return IntPraticaLocalServiceUtil.trovaDoppioni(); return IntPraticaLocalServiceUtil.trovaDoppioni();
} }
if (_methodName264.equals(name) && if (_methodName268.equals(name) &&
Arrays.deepEquals(_methodParameterTypes264, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes268, parameterTypes)) {
return IntPraticaLocalServiceUtil.findByNumeroProgetto((java.lang.String)arguments[0]); return IntPraticaLocalServiceUtil.findByNumeroProgetto((java.lang.String)arguments[0]);
} }
if (_methodName265.equals(name) && if (_methodName269.equals(name) &&
Arrays.deepEquals(_methodParameterTypes265, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes269, parameterTypes)) {
return IntPraticaLocalServiceUtil.findByTerritorioId(((Long)arguments[0]).longValue()); return IntPraticaLocalServiceUtil.findByTerritorioId(((Long)arguments[0]).longValue());
} }
if (_methodName266.equals(name) && if (_methodName270.equals(name) &&
Arrays.deepEquals(_methodParameterTypes266, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes270, parameterTypes)) {
return IntPraticaLocalServiceUtil.reportTempisticheIstruttorieAvvisiAutorizzazioni((java.util.Date)arguments[0], return IntPraticaLocalServiceUtil.reportTempisticheIstruttorieAvvisiAutorizzazioni((java.util.Date)arguments[0],
(java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(),
(java.lang.String)arguments[3]); (java.lang.String)arguments[3]);
} }
if (_methodName267.equals(name) && if (_methodName271.equals(name) &&
Arrays.deepEquals(_methodParameterTypes267, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes271, parameterTypes)) {
return IntPraticaLocalServiceUtil.reportTempisticheIstruttorieCalcolaDataSorteggio((java.util.Date)arguments[0], return IntPraticaLocalServiceUtil.reportTempisticheIstruttorieCalcolaDataSorteggio((java.util.Date)arguments[0],
(java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); (java.util.Date)arguments[1], ((Long)arguments[2]).longValue());
} }
if (_methodName268.equals(name) && if (_methodName272.equals(name) &&
Arrays.deepEquals(_methodParameterTypes268, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes272, parameterTypes)) {
return IntPraticaLocalServiceUtil.reportPraticheVidimate((java.util.Date)arguments[0], return IntPraticaLocalServiceUtil.reportPraticheVidimate((java.util.Date)arguments[0],
(java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(),
(java.lang.String)arguments[3]); (java.lang.String)arguments[3]);
} }
if (_methodName269.equals(name) && if (_methodName273.equals(name) &&
Arrays.deepEquals(_methodParameterTypes269, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes273, parameterTypes)) {
return IntPraticaLocalServiceUtil.reportPraticheVidimateCalcolaDataSorteggio((java.util.Date)arguments[0], return IntPraticaLocalServiceUtil.reportPraticheVidimateCalcolaDataSorteggio((java.util.Date)arguments[0],
(java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); (java.util.Date)arguments[1], ((Long)arguments[2]).longValue());
} }
if (_methodName270.equals(name) && if (_methodName274.equals(name) &&
Arrays.deepEquals(_methodParameterTypes270, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes274, parameterTypes)) {
return IntPraticaLocalServiceUtil.countIngressiAutorizzazioni((java.util.Date)arguments[0], return IntPraticaLocalServiceUtil.countIngressiAutorizzazioni((java.util.Date)arguments[0],
(java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); (java.util.Date)arguments[1], ((Long)arguments[2]).longValue());
} }
if (_methodName271.equals(name) && if (_methodName275.equals(name) &&
Arrays.deepEquals(_methodParameterTypes271, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes275, parameterTypes)) {
return IntPraticaLocalServiceUtil.countIngressiDepositi((java.util.Date)arguments[0], return IntPraticaLocalServiceUtil.countIngressiDepositi((java.util.Date)arguments[0],
(java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); (java.util.Date)arguments[1], ((Long)arguments[2]).longValue());
} }
if (_methodName272.equals(name) && if (_methodName276.equals(name) &&
Arrays.deepEquals(_methodParameterTypes272, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes276, parameterTypes)) {
return IntPraticaLocalServiceUtil.countIngressiCO((java.util.Date)arguments[0], return IntPraticaLocalServiceUtil.countIngressiCO((java.util.Date)arguments[0],
(java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); (java.util.Date)arguments[1], ((Long)arguments[2]).longValue());
} }
if (_methodName273.equals(name) && if (_methodName277.equals(name) &&
Arrays.deepEquals(_methodParameterTypes273, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes277, parameterTypes)) {
return IntPraticaLocalServiceUtil.getOrganizationByIntPraticaId(((Long)arguments[0]).longValue()); return IntPraticaLocalServiceUtil.getOrganizationByIntPraticaId(((Long)arguments[0]).longValue());
} }
@ -1101,14 +1138,12 @@ public class IntPraticaLocalServiceClpInvoker {
private String[] _methodParameterTypes210; private String[] _methodParameterTypes210;
private String _methodName212; private String _methodName212;
private String[] _methodParameterTypes212; private String[] _methodParameterTypes212;
private String _methodName213;
private String[] _methodParameterTypes213;
private String _methodName214; private String _methodName214;
private String[] _methodParameterTypes214; private String[] _methodParameterTypes214;
private String _methodName215;
private String[] _methodParameterTypes215;
private String _methodName216; private String _methodName216;
private String[] _methodParameterTypes216; private String[] _methodParameterTypes216;
private String _methodName217;
private String[] _methodParameterTypes217;
private String _methodName218; private String _methodName218;
private String[] _methodParameterTypes218; private String[] _methodParameterTypes218;
private String _methodName219; private String _methodName219;
@ -1123,30 +1158,30 @@ public class IntPraticaLocalServiceClpInvoker {
private String[] _methodParameterTypes223; private String[] _methodParameterTypes223;
private String _methodName224; private String _methodName224;
private String[] _methodParameterTypes224; private String[] _methodParameterTypes224;
private String _methodName225;
private String[] _methodParameterTypes225;
private String _methodName226; private String _methodName226;
private String[] _methodParameterTypes226; private String[] _methodParameterTypes226;
private String _methodName227; private String _methodName227;
private String[] _methodParameterTypes227; private String[] _methodParameterTypes227;
private String _methodName229; private String _methodName228;
private String[] _methodParameterTypes229; private String[] _methodParameterTypes228;
private String _methodName230; private String _methodName230;
private String[] _methodParameterTypes230; private String[] _methodParameterTypes230;
private String _methodName232; private String _methodName231;
private String[] _methodParameterTypes232; private String[] _methodParameterTypes231;
private String _methodName233; private String _methodName233;
private String[] _methodParameterTypes233; private String[] _methodParameterTypes233;
private String _methodName235; private String _methodName234;
private String[] _methodParameterTypes235; private String[] _methodParameterTypes234;
private String _methodName236; private String _methodName236;
private String[] _methodParameterTypes236; private String[] _methodParameterTypes236;
private String _methodName238; private String _methodName237;
private String[] _methodParameterTypes238; private String[] _methodParameterTypes237;
private String _methodName239; private String _methodName239;
private String[] _methodParameterTypes239; private String[] _methodParameterTypes239;
private String _methodName240; private String _methodName240;
private String[] _methodParameterTypes240; private String[] _methodParameterTypes240;
private String _methodName241;
private String[] _methodParameterTypes241;
private String _methodName242; private String _methodName242;
private String[] _methodParameterTypes242; private String[] _methodParameterTypes242;
private String _methodName243; private String _methodName243;
@ -1211,4 +1246,12 @@ public class IntPraticaLocalServiceClpInvoker {
private String[] _methodParameterTypes272; private String[] _methodParameterTypes272;
private String _methodName273; private String _methodName273;
private String[] _methodParameterTypes273; private String[] _methodParameterTypes273;
private String _methodName274;
private String[] _methodParameterTypes274;
private String _methodName275;
private String[] _methodParameterTypes275;
private String _methodName276;
private String[] _methodParameterTypes276;
private String _methodName277;
private String[] _methodParameterTypes277;
} }

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

@ -72,6 +72,7 @@ import java.sql.Statement;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -175,6 +176,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
private static Log _log = LogFactoryUtil.getLog(IntPraticaLocalServiceImpl.class); private static Log _log = LogFactoryUtil.getLog(IntPraticaLocalServiceImpl.class);
@Override
public IntPratica addIntPratica(long territorioId, String tipoProcedura, ServiceContext serviceContext) public IntPratica addIntPratica(long territorioId, String tipoProcedura, ServiceContext serviceContext)
throws SystemException, PortalException { throws SystemException, PortalException {
@ -208,6 +210,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
@Override
public IntPratica addIntPratica(long userId, String userName, String tipoPratica, long territorioId, public IntPratica addIntPratica(long userId, String userName, String tipoPratica, long territorioId,
String tipoProcedura, Date dtSorteggio, String statoPratica, String numeroProgetto, String tipoProcedura, Date dtSorteggio, String statoPratica, String numeroProgetto,
boolean validata, int esitoControllo, Date dtPratica, long oldIntPraticaId, boolean validata, int esitoControllo, Date dtPratica, long oldIntPraticaId,
@ -251,6 +254,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return intPratica; return intPratica;
} }
@Override
public List<String> svuotaDatabase2(ServiceContext serviceContext) { public List<String> svuotaDatabase2(ServiceContext serviceContext) {
List<String> esito = new ArrayList<>(); List<String> esito = new ArrayList<>();
try { try {
@ -530,6 +534,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
_log.info(msg); _log.info(msg);
} }
@Override
public void clearDb() throws Exception { public void clearDb() throws Exception {
User user = PermissionThreadLocal.getPermissionChecker().getUser(); User user = PermissionThreadLocal.getPermissionChecker().getUser();
@ -580,6 +585,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
} }
@Override
public IntPratica deleteIntPratica(IntPratica intPratica, boolean forced) throws SystemException, public IntPratica deleteIntPratica(IntPratica intPratica, boolean forced) throws SystemException,
PortalException { PortalException {
@ -706,12 +712,14 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
@Override
public IntPratica deleteIntPratica(IntPratica intPratica) throws SystemException, PortalException { public IntPratica deleteIntPratica(IntPratica intPratica) throws SystemException, PortalException {
return deleteIntPratica(intPratica, false); return deleteIntPratica(intPratica, false);
} }
@Override
public IntPratica cloneIntPratica(long intPraticaId, ServiceContext serviceContext) public IntPratica cloneIntPratica(long intPraticaId, ServiceContext serviceContext)
throws SystemException, PortalException { throws SystemException, PortalException {
@ -750,6 +758,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
@Override
public IntPratica updateDelegati(long intPraticaId, String codiceFiscaleDelegatoFineLavori, public IntPratica updateDelegati(long intPraticaId, String codiceFiscaleDelegatoFineLavori,
String codiceFiscaleDelegatoCollaudo, boolean isControlloObbligatorio) throws PortalException, String codiceFiscaleDelegatoCollaudo, boolean isControlloObbligatorio) throws PortalException,
SystemException { SystemException {
@ -800,11 +809,13 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
// return intPratica; // return intPratica;
// } // }
@Override
public IntPratica fetchIntPratica(long intPraticaId) throws SystemException, PortalException { public IntPratica fetchIntPratica(long intPraticaId) throws SystemException, PortalException {
return intPraticaPersistence.fetchByPrimaryKey(intPraticaId); return intPraticaPersistence.fetchByPrimaryKey(intPraticaId);
} }
@Override
public List<IntPratica> findFascicoliNotProgetto(int start, int end) throws SystemException { public List<IntPratica> findFascicoliNotProgetto(int start, int end) throws SystemException {
DynamicQuery dynamicQuery = getDynamicQueryFascicoliNotProgetto(); DynamicQuery dynamicQuery = getDynamicQueryFascicoliNotProgetto();
@ -812,6 +823,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return intPraticaPersistence.findWithDynamicQuery(dynamicQuery, start, end); return intPraticaPersistence.findWithDynamicQuery(dynamicQuery, start, end);
} }
@Override
public int countFascicoliNotProgetto() throws SystemException { public int countFascicoliNotProgetto() throws SystemException {
DynamicQuery dynamicQuery = getDynamicQueryFascicoliNotProgetto(); DynamicQuery dynamicQuery = getDynamicQueryFascicoliNotProgetto();
@ -831,6 +843,49 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return dynamicQuery; return dynamicQuery;
} }
@Override
public int countByPosizione(double lat, double lng, int raggio) throws SystemException {
List<IntPratica> lista = findByPosizione(lat, lng, raggio);
return lista.size();
}
@Override
public List<IntPratica> findByPosizione(double lat, double lng, int raggio) throws SystemException {
return findByPosizione(lat, lng, raggio, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
}
@Override
public List<IntPratica> findByPosizione(double lat, double lng, int raggio, int start, int end)
throws SystemException {
DynamicQuery query = queryPosizione();
List<IntPratica> trovate = new ArrayList<>();
for (IntPratica pratica : (List<IntPratica>) intPraticaPersistence.findWithDynamicQuery(query)) {
int distanza = pratica.calcolaDistanzaOrtodromica(lat, lng);
if (distanza <= raggio) {
trovate.add(pratica);
}
}
Collections.sort(trovate, new Comparator<IntPratica>() {
@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
public IntPratica addNumeroProgetto(long intPraticaId) throws PortalException, SystemException { public IntPratica addNumeroProgetto(long intPraticaId) throws PortalException, SystemException {
IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
@ -889,6 +944,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
serviceContext); serviceContext);
} }
@Override
public IntPratica sospendiPratica(long intPraticaId, boolean sospesa) throws SystemException, public IntPratica sospendiPratica(long intPraticaId, boolean sospesa) throws SystemException,
PortalException { PortalException {
@ -903,6 +959,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return intPraticaLocalService.updateIntPratica(intPratica); return intPraticaLocalService.updateIntPratica(intPratica);
} }
@Override
public IntPratica cambiaTitolare(long intPraticaId, long soggettoId, ServiceContext serviceContext) public IntPratica cambiaTitolare(long intPraticaId, long soggettoId, ServiceContext serviceContext)
throws PortalException, SystemException { throws PortalException, SystemException {
@ -944,6 +1001,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
@Override
public IntPratica updateStatoPratica(long intPraticaId, String statoPratica) throws PortalException, public IntPratica updateStatoPratica(long intPraticaId, String statoPratica) throws PortalException,
SystemException { SystemException {
_log.info("updateStatoPratica(" + intPraticaId + ", \"" + statoPratica + "\")"); _log.info("updateStatoPratica(" + intPraticaId + ", \"" + statoPratica + "\")");
@ -953,11 +1011,13 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return intPraticaLocalService.updateIntPratica(intPratica); return intPraticaLocalService.updateIntPratica(intPratica);
} }
@Override
public IntPratica updateIntPraticaSorteggio(long intPraticaId, Date dtSorteggio) throws SystemException { public IntPratica updateIntPraticaSorteggio(long intPraticaId, Date dtSorteggio) throws SystemException {
// TODO vedere se va cambiato lo stato // TODO vedere se va cambiato lo stato
return updateIntPraticaSorteggio(intPraticaId, dtSorteggio, null); return updateIntPraticaSorteggio(intPraticaId, dtSorteggio, null);
} }
@Override
public IntPratica updateIntPraticaSorteggio(long intPraticaId, Date dtSorteggio, String statoPratica) public IntPratica updateIntPraticaSorteggio(long intPraticaId, Date dtSorteggio, String statoPratica)
throws SystemException { throws SystemException {
IntPratica intPratica = intPraticaPersistence.fetchByPrimaryKey(intPraticaId); IntPratica intPratica = intPraticaPersistence.fetchByPrimaryKey(intPraticaId);
@ -968,22 +1028,26 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return intPraticaLocalService.updateIntPratica(intPratica); return intPraticaLocalService.updateIntPratica(intPratica);
} }
@Override
public List<IntPratica> findByC_UserId(long companyId, long userId, int start, int end) public List<IntPratica> findByC_UserId(long companyId, long userId, int start, int end)
throws SystemException { throws SystemException {
return intPraticaPersistence.findByC_UserId(companyId, userId, start, end); return intPraticaPersistence.findByC_UserId(companyId, userId, start, end);
} }
@Override
public int countByC_UserId(long companyId, long userId) throws SystemException { public int countByC_UserId(long companyId, long userId) throws SystemException {
return intPraticaPersistence.countByC_UserId(companyId, userId); return intPraticaPersistence.countByC_UserId(companyId, userId);
} }
@Override
public IntPratica fetchByOldIntPraticaId(long oldIntPraticaId) throws SystemException { public IntPratica fetchByOldIntPraticaId(long oldIntPraticaId) throws SystemException {
return intPraticaPersistence.fetchByOldIntPraticaId(oldIntPraticaId); return intPraticaPersistence.fetchByOldIntPraticaId(oldIntPraticaId);
} }
@Override
public void updateStatus(long intPraticaId, int status) throws PortalException, SystemException { public void updateStatus(long intPraticaId, int status) throws PortalException, SystemException {
IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
@ -1022,6 +1086,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
intPratica = updateIntPratica(intPratica); intPratica = updateIntPratica(intPratica);
} }
@Override
public List<IntPratica> findByCompanyIdSoggettoProgetti(long companyId, long soggettoId) public List<IntPratica> findByCompanyIdSoggettoProgetti(long companyId, long soggettoId)
throws SystemException, PortalException { throws SystemException, PortalException {
@ -1030,6 +1095,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return intPraticaPersistence.findWithDynamicQuery(dynamicQuery); return intPraticaPersistence.findWithDynamicQuery(dynamicQuery);
} }
@Override
public int countByCompanyIdSoggettoProgetti(long companyId, long soggettoId) throws SystemException, public int countByCompanyIdSoggettoProgetti(long companyId, long soggettoId) throws SystemException,
PortalException { PortalException {
@ -1055,6 +1121,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return dynamicQuery; return dynamicQuery;
} }
@Override
public List<IntPratica> findByCompanyIdSoggettoArchivio(long companyId, long soggettoId) public List<IntPratica> findByCompanyIdSoggettoArchivio(long companyId, long soggettoId)
throws SystemException, PortalException { throws SystemException, PortalException {
@ -1068,6 +1135,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return intPraticaPersistence.findWithDynamicQuery(dynamicQuery); return intPraticaPersistence.findWithDynamicQuery(dynamicQuery);
} }
@Override
public int countByCompanyIdSoggettoArchivio(long companyId, long soggettoId) throws SystemException, public int countByCompanyIdSoggettoArchivio(long companyId, long soggettoId) throws SystemException,
PortalException { PortalException {
@ -1102,6 +1170,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return dynamicQuery; return dynamicQuery;
} }
@Override
public List<IntPratica> findByCompanyIdSoggettoAltriProgetti(long companyId, long soggettoId, int start, public List<IntPratica> findByCompanyIdSoggettoAltriProgetti(long companyId, long soggettoId, int start,
int end) throws SystemException, PortalException { int end) throws SystemException, PortalException {
@ -1115,6 +1184,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return intPraticaPersistence.findWithDynamicQuery(dynamicQuery, start, end); return intPraticaPersistence.findWithDynamicQuery(dynamicQuery, start, end);
} }
@Override
public int countByCompanyIdSoggettoAltriProgetti(long companyId, long soggettoId) throws SystemException, public int countByCompanyIdSoggettoAltriProgetti(long companyId, long soggettoId) throws SystemException,
PortalException { PortalException {
@ -1143,6 +1213,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return dynamicQuery; return dynamicQuery;
} }
@Override
public List<IntPratica> findByCanAddFineLavori(long companyId, String codiceFiscale, int start, int end) public List<IntPratica> findByCanAddFineLavori(long companyId, String codiceFiscale, int start, int end)
throws SystemException, PortalException { throws SystemException, PortalException {
@ -1151,6 +1222,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
@Override
public int countByCanAddFineLavori(long companyId, String codiceFiscale) throws SystemException, public int countByCanAddFineLavori(long companyId, String codiceFiscale) throws SystemException,
PortalException { PortalException {
@ -1188,6 +1260,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return dynamicQuery; return dynamicQuery;
} }
@Override
public List<IntPratica> findByCanAddCollaudo(long companyId, String codiceFiscale, int start, int end) public List<IntPratica> findByCanAddCollaudo(long companyId, String codiceFiscale, int start, int end)
throws SystemException, PortalException { throws SystemException, PortalException {
@ -1195,6 +1268,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
@Override
public int countByCanAddCollaudo(long companyId, String codiceFiscale) throws SystemException, public int countByCanAddCollaudo(long companyId, String codiceFiscale) throws SystemException,
PortalException { PortalException {
@ -1237,6 +1311,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return dynamicQuery; return dynamicQuery;
} }
@Override
public List<IntPratica> search(List<Long> groupIds, int start, int end) throws SystemException { public List<IntPratica> search(List<Long> groupIds, int start, int end) throws SystemException {
// TODO Modificare tramite Indexer // TODO Modificare tramite Indexer
@ -1250,6 +1325,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
@Override
public int countSearch(List<Long> groupIds) throws SystemException { public int countSearch(List<Long> groupIds) throws SystemException {
// TODO Modificare tramite Indexer // TODO Modificare tramite Indexer
@ -1263,6 +1339,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
@Override
public List<IntPratica> searchWithIntPraticaId(List<Long> groupIds, long intPraticaId, int start, int end) public List<IntPratica> searchWithIntPraticaId(List<Long> groupIds, long intPraticaId, int start, int end)
throws SystemException { throws SystemException {
@ -1278,6 +1355,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
@Override
public int countSearchWithIntPraticaId(List<Long> groupIds, long intPraticaId) throws SystemException { public int countSearchWithIntPraticaId(List<Long> groupIds, long intPraticaId) throws SystemException {
// TODO Modificare tramite Indexer // TODO Modificare tramite Indexer
@ -1292,6 +1370,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
@Override
public FileEntry allegaFileAnnullamento(long intPraticaId, byte[] content, String sourceFileName, public FileEntry allegaFileAnnullamento(long intPraticaId, byte[] content, String sourceFileName,
String jsonFirmatari, ServiceContext serviceContext) throws SystemException, PortalException, String jsonFirmatari, ServiceContext serviceContext) throws SystemException, PortalException,
IOException { IOException {
@ -1354,6 +1433,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return fileEntry; return fileEntry;
} }
@Override
public IntPratica generateFileAnnullamento(long intPraticaId, ServiceContext serviceContext) public IntPratica generateFileAnnullamento(long intPraticaId, ServiceContext serviceContext)
throws SystemException, PortalException, IOException { throws SystemException, PortalException, IOException {
@ -1438,6 +1518,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return intPratica; return intPratica;
} }
@Override
public void deleteFileAnnullamento(long docPraticaAnnullamentoId) throws PortalException, SystemException { public void deleteFileAnnullamento(long docPraticaAnnullamentoId) throws PortalException, SystemException {
DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaAnnullamentoId); DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaAnnullamentoId);
@ -1452,6 +1533,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
intPratica = intPraticaPersistence.update(intPratica); intPratica = intPraticaPersistence.update(intPratica);
} }
@Override
public void completeAnnullamento(long intPraticaId) throws PortalException, SystemException { public void completeAnnullamento(long intPraticaId) throws PortalException, SystemException {
IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);
@ -1529,6 +1611,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
StringPool.BLANK, 0l, serviceContext); StringPool.BLANK, 0l, serviceContext);
} }
@Override
public void cambiaIstruttore(long intPraticaId, long controlloPraticaId, long istruttoreId) public void cambiaIstruttore(long intPraticaId, long controlloPraticaId, long istruttoreId)
throws PortalException, SystemException { throws PortalException, SystemException {
@ -1579,6 +1662,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
@Override
public int countCaricoLavoroCF(long ispettoreId, String tipoPratica, Boolean sorteggio, public int countCaricoLavoroCF(long ispettoreId, String tipoPratica, Boolean sorteggio,
Long[] intPraticaIds) throws SystemException, PortalException { Long[] intPraticaIds) throws SystemException, PortalException {
@ -1607,6 +1691,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return (int) intPraticaPersistence.countWithDynamicQuery(dynamicQuery); return (int) intPraticaPersistence.countWithDynamicQuery(dynamicQuery);
} }
@Override
public int countCaricoLavoroIstruttore(long ispettoreId, String tipoPratica, Boolean sorteggio) public int countCaricoLavoroIstruttore(long ispettoreId, String tipoPratica, Boolean sorteggio)
throws SystemException { throws SystemException {
@ -1642,6 +1727,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
@Override
public long generateReportPratica(IntPratica intPratica, long userId) throws SystemException, public long generateReportPratica(IntPratica intPratica, long userId) throws SystemException,
PortalException { PortalException {
@ -1864,6 +1950,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return result.getFileEntryIds()[0]; return result.getFileEntryIds()[0];
} }
@Override
public IntPratica updateModifiedDate(long intPraticaId, Date modifiedDate) public IntPratica updateModifiedDate(long intPraticaId, Date modifiedDate)
throws NoSuchIntPraticaException, SystemException { throws NoSuchIntPraticaException, SystemException {
@ -1873,21 +1960,25 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return intPratica; return intPratica;
} }
@Override
public int countAutorizzazione(Date dtMin, Date dtMax, long groupId) throws SystemException { public int countAutorizzazione(Date dtMin, Date dtMax, long groupId) throws SystemException {
return IntPraticaFinderUtil.countAutorizzazione(dtMin, dtMax, groupId); return IntPraticaFinderUtil.countAutorizzazione(dtMin, dtMax, groupId);
} }
@Override
public int countSanatorie(Date dtMin, Date dtMax, long groupId) throws SystemException { public int countSanatorie(Date dtMin, Date dtMax, long groupId) throws SystemException {
return IntPraticaFinderUtil.countSanatorie(dtMin, dtMax, groupId); return IntPraticaFinderUtil.countSanatorie(dtMin, dtMax, groupId);
} }
@Override
public int countOpereMinoreImportanza(Date dtMin, Date dtMax, long groupId) throws SystemException { public int countOpereMinoreImportanza(Date dtMin, Date dtMax, long groupId) throws SystemException {
return IntPraticaFinderUtil.countOpereMinoreImportanza(dtMin, dtMax, groupId); return IntPraticaFinderUtil.countOpereMinoreImportanza(dtMin, dtMax, groupId);
} }
@Override
public int countDeposito(Date dtMin, Date dtMax, long groupId, boolean controlloOblligatorio) public int countDeposito(Date dtMin, Date dtMax, long groupId, boolean controlloOblligatorio)
throws SystemException { throws SystemException {
@ -1895,6 +1986,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
// Bug 33463 // Bug 33463
@Override
public int countVidimate(Date dtMin, Date dtMax, long groupId, String type, public int countVidimate(Date dtMin, Date dtMax, long groupId, String type,
boolean isControlloObbligatorio) throws SystemException { boolean isControlloObbligatorio) throws SystemException {
@ -1902,26 +1994,31 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
// Bug 33463 // Bug 33463
@Override
public List<IntPratica> countControllo(Date dtMin, Date dtMax, long groupId, String type, public List<IntPratica> countControllo(Date dtMin, Date dtMax, long groupId, String type,
boolean isControlloObbligatorio) throws SystemException { boolean isControlloObbligatorio) throws SystemException {
return IntPraticaFinderUtil.countControllo(dtMin, dtMax, groupId, type, isControlloObbligatorio); return IntPraticaFinderUtil.countControllo(dtMin, dtMax, groupId, type, isControlloObbligatorio);
} }
@Override
public List<IntPratica> importaVecchiFilesFascicolo(long companyId, int start, int end) public List<IntPratica> importaVecchiFilesFascicolo(long companyId, int start, int end)
throws SystemException { throws SystemException {
return IntPraticaFinderUtil.importaVecchiFilesFascicolo(companyId, start, end); return IntPraticaFinderUtil.importaVecchiFilesFascicolo(companyId, start, end);
} }
@Override
public List<DettPratica> findIntPraticaNotExist() throws SystemException { public List<DettPratica> findIntPraticaNotExist() throws SystemException {
return IntPraticaFinderUtil.findIntPraticaNotExist(); return IntPraticaFinderUtil.findIntPraticaNotExist();
} }
@Override
public List<Object[]> riparaWorkflow() throws SystemException { public List<Object[]> riparaWorkflow() throws SystemException {
return IntPraticaFinderUtil.riparaWorkflow(); return IntPraticaFinderUtil.riparaWorkflow();
} }
@Override
public void reIndexFascicolo(IntPratica intPratica, long companyId) { public void reIndexFascicolo(IntPratica intPratica, long companyId) {
try { try {
@ -1953,23 +2050,27 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
} }
@Override
public void reIndexFasciolo(String numeroProgetto, long companyId) throws SystemException { public void reIndexFasciolo(String numeroProgetto, long companyId) throws SystemException {
IntPratica intPratica = null; IntPratica intPratica = null;
intPratica = IntPraticaLocalServiceUtil.findByNumeroProgetto(numeroProgetto); intPratica = IntPraticaLocalServiceUtil.findByNumeroProgetto(numeroProgetto);
reIndexFascicolo(intPratica, companyId); reIndexFascicolo(intPratica, companyId);
} }
@Override
public void reIndexFasciolo(long intPraticaId, long companyId) throws PortalException, SystemException { public void reIndexFasciolo(long intPraticaId, long companyId) throws PortalException, SystemException {
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId);
reIndexFascicolo(intPratica, companyId); reIndexFascicolo(intPratica, companyId);
} }
@Override
public List<String> trovaDoppioni() throws SystemException { public List<String> trovaDoppioni() throws SystemException {
return IntPraticaFinderUtil.trovaDoppioni(); return IntPraticaFinderUtil.trovaDoppioni();
} }
@Override
public IntPratica findByNumeroProgetto(String numeroProgetto) throws SystemException { public IntPratica findByNumeroProgetto(String numeroProgetto) throws SystemException {
DynamicQuery dq = intPraticaLocalService.dynamicQuery(); DynamicQuery dq = intPraticaLocalService.dynamicQuery();
@ -1983,6 +2084,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
return null; return null;
} }
@Override
public List<IntPratica> findByTerritorioId(long territorioId) throws SystemException { public List<IntPratica> findByTerritorioId(long territorioId) throws SystemException {
return intPraticaPersistence.findByTerritorioId(territorioId); return intPraticaPersistence.findByTerritorioId(territorioId);
} }
@ -1990,6 +2092,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
/** /**
* ADT: report tempistiche istruttorie * ADT: report tempistiche istruttorie
*/ */
@Override
public List<Object[]> reportTempisticheIstruttorieAvvisiAutorizzazioni(Date dtMin, Date dtMax, public List<Object[]> reportTempisticheIstruttorieAvvisiAutorizzazioni(Date dtMin, Date dtMax,
long groupId, String type) throws SystemException { long groupId, String type) throws SystemException {
return IntPraticaFinderUtil.reportTempisticheIstruttorieAvvisiAutorizzazioni(dtMin, dtMax, groupId, return IntPraticaFinderUtil.reportTempisticheIstruttorieAvvisiAutorizzazioni(dtMin, dtMax, groupId,
@ -2004,6 +2107,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
* @return * @return
* @throws SystemException * @throws SystemException
*/ */
@Override
public Map<Long, Date> reportTempisticheIstruttorieCalcolaDataSorteggio(Date dtMin, Date dtMax, public Map<Long, Date> reportTempisticheIstruttorieCalcolaDataSorteggio(Date dtMin, Date dtMax,
long groupId) throws SystemException { long groupId) throws SystemException {
return IntPraticaFinderUtil.reportTempisticheIstruttorieCalcolaDataSorteggio(dtMin, dtMax, groupId); return IntPraticaFinderUtil.reportTempisticheIstruttorieCalcolaDataSorteggio(dtMin, dtMax, groupId);
@ -2014,28 +2118,34 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
* ADT: report pratiche vidimate * ADT: report pratiche vidimate
* *
*/ */
@Override
public List<Object[]> reportPraticheVidimate(Date dtMin, Date dtMax, long groupId, String type) public List<Object[]> reportPraticheVidimate(Date dtMin, Date dtMax, long groupId, String type)
throws SystemException { throws SystemException {
return IntPraticaFinderUtil.reportPraticheVidimate(dtMin, dtMax, groupId, type); return IntPraticaFinderUtil.reportPraticheVidimate(dtMin, dtMax, groupId, type);
} }
@Override
public Map<Long, Date> reportPraticheVidimateCalcolaDataSorteggio(Date dtMin, Date dtMax, long groupId) public Map<Long, Date> reportPraticheVidimateCalcolaDataSorteggio(Date dtMin, Date dtMax, long groupId)
throws SystemException { throws SystemException {
return IntPraticaFinderUtil.reportPraticheVidimateCalcolaDataSorteggio(dtMin, dtMax, groupId); return IntPraticaFinderUtil.reportPraticheVidimateCalcolaDataSorteggio(dtMin, dtMax, groupId);
} }
@Override
public int countIngressiAutorizzazioni(Date dtMin, Date dtMax, long groupId) throws SystemException { public int countIngressiAutorizzazioni(Date dtMin, Date dtMax, long groupId) throws SystemException {
return IntPraticaFinderUtil.countIngressiAutorizzazioni(dtMin, dtMax, groupId); return IntPraticaFinderUtil.countIngressiAutorizzazioni(dtMin, dtMax, groupId);
} }
@Override
public int countIngressiDepositi(Date dtMin, Date dtMax, long groupId) throws SystemException { public int countIngressiDepositi(Date dtMin, Date dtMax, long groupId) throws SystemException {
return IntPraticaFinderUtil.countIngressiDepositi(dtMin, dtMax, groupId); return IntPraticaFinderUtil.countIngressiDepositi(dtMin, dtMax, groupId);
} }
@Override
public int countIngressiCO(Date dtMin, Date dtMax, long groupId) throws SystemException { public int countIngressiCO(Date dtMin, Date dtMax, long groupId) throws SystemException {
return IntPraticaFinderUtil.countIngressiCO(dtMin, dtMax, groupId); return IntPraticaFinderUtil.countIngressiCO(dtMin, dtMax, groupId);
} }
@Override
public Organization getOrganizationByIntPraticaId(long intPraticaId) throws PortalException, public Organization getOrganizationByIntPraticaId(long intPraticaId) throws PortalException,
SystemException { SystemException {
IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId); IntPratica intPratica = intPraticaLocalService.getIntPratica(intPraticaId);

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java

@ -4653,6 +4653,8 @@ public class IntPraticaPersistenceImpl extends BasePersistenceImpl<IntPratica>
intPraticaImpl.setTipoPratica(intPratica.getTipoPratica()); intPraticaImpl.setTipoPratica(intPratica.getTipoPratica());
intPraticaImpl.setTerritorioId(intPratica.getTerritorioId()); intPraticaImpl.setTerritorioId(intPratica.getTerritorioId());
intPraticaImpl.setTipoProcedura(intPratica.getTipoProcedura()); intPraticaImpl.setTipoProcedura(intPratica.getTipoProcedura());
intPraticaImpl.setLatitudine(intPratica.getLatitudine());
intPraticaImpl.setLongitudine(intPratica.getLongitudine());
intPraticaImpl.setDtAnnullamento(intPratica.getDtAnnullamento()); intPraticaImpl.setDtAnnullamento(intPratica.getDtAnnullamento());
intPraticaImpl.setDocPraticaAnnullamentoId(intPratica.getDocPraticaAnnullamentoId()); intPraticaImpl.setDocPraticaAnnullamentoId(intPratica.getDocPraticaAnnullamentoId());
intPraticaImpl.setUnitaOperativa(intPratica.getUnitaOperativa()); intPraticaImpl.setUnitaOperativa(intPratica.getUnitaOperativa());

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=portos_bo build.namespace=portos_bo
build.number=2862 build.number=2888
build.date=1611762214556 build.date=1613383377126
build.auto.upgrade=true build.auto.upgrade=true
## ##

3
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/web.xml

@ -1,2 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"/> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
</web-app>

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp

@ -195,7 +195,7 @@ String keywords = StringPool.BLANK;
<% <%
long intPraticaId = intPratica.getIntPraticaId(); long intPraticaId = intPratica.getIntPraticaId();
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId); DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId);
Log _log = LogFactoryUtil.getLog("fascicolo/view.jsp"); Log _log = LogFactoryUtil.getLog("fascicolo_view_jsp");
if (lastDettPratica == null) { if (lastDettPratica == null) {
_log.info("intPraticaId=" + intPraticaId + ", lastDettPratica null"); _log.info("intPraticaId=" + intPraticaId + ", lastDettPratica null");
} }

25
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/paesaggistica_administration/view.jsp

@ -7,22 +7,43 @@
<%@ include file="/html/paesaggistica_administration/init.jsp"%> <%@ include file="/html/paesaggistica_administration/init.jsp"%>
<% <%
SimpleDateFormat simpleDateTimeFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); SimpleDateFormat simpleDateTimeFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
long companyId = company.getCompanyId();
String dataUltimoSorteggioString = String dataUltimoSorteggioString =
ConfigurazioneLocalServiceUtil.findByC_ChiaveString(themeDisplay.getCompanyId(), ConfigurazioneConstants.DATE_ULTIMO_SORTEGGIO); ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId, ConfigurazioneConstants.DATE_ULTIMO_SORTEGGIO);
String dataProssimoSorteggio = String dataProssimoSorteggio =
ConfigurazioneServiceUtil.findByC_ChiaveString(company.getCompanyId(), "conf.geniocivile.sorteggio.data.prossimo.sorteggio"); ConfigurazioneServiceUtil.findByC_ChiaveString(companyId, "conf.geniocivile.sorteggio.data.prossimo.sorteggio");
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);
%> %>
<hr style="margin: 0" /> <hr style="margin: 0" />
<liferay-portlet:actionURL name="impostazioniMappe" var="impostazioniMappeURL" />
<liferay-portlet:actionURL name="reIndexFasciolo" var="reIndexFascioloURL" /> <liferay-portlet:actionURL name="reIndexFasciolo" var="reIndexFascioloURL" />
<liferay-portlet:actionURL name="reIndexFascicoli" var="reIndexFascicoliURL" /> <liferay-portlet:actionURL name="reIndexFascicoli" var="reIndexFascicoliURL" />
<liferay-portlet:actionURL name="mostraConfigurazione" var="mostraConfigurazioneUrl" /> <liferay-portlet:actionURL name="mostraConfigurazione" var="mostraConfigurazioneUrl" />
<liferay-portlet:actionURL name="manutenzioneDatabase" var="manutenzioneDatabaseURL" /> <liferay-portlet:actionURL name="manutenzioneDatabase" var="manutenzioneDatabaseURL" />
<div class="row-fluid" style="margin-top: 10px">
<div class="span6">
<div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Impostazioni sistema mappe<br>
Valore di test: https://test2.mwg.it/geoportal.php</div>
<aui:form action="<%=impostazioniMappeURL%>" method="post" name="fmImpostazioniMappe">
<div>
<aui:input type="text" cssClass="span12" name="sharedSecret" label="Segreto condiviso" value="<%= sharedSecret %>"/>
<aui:input type="text" cssClass="span12" name="urlIframeFE" label="Url iframe Front End" value="<%= urlIframeFE %>"/>
<aui:input type="text" cssClass="span12" name="urlIframeBO" label="Url iframe Back Office" value="<%= urlIframeBO %>"/>
<aui:button type="submit" value="Salva" />
</div>
</aui:form>
</div>
</div>
<div class="row-fluid" style="margin-top: 10px"> <div class="row-fluid" style="margin-top: 10px">
<div class="span6"> <div class="span6">
<div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Form per reindicizzare un <div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Form per reindicizzare un

440
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp

@ -0,0 +1,440 @@
<%@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"%>
<%
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);
PortletURL iteratorURL = liferayPortletResponse.createRenderURL();
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);
}
DecimalFormat fmt = (DecimalFormat) NumberFormat.getInstance(Locale.ITALY);
boolean showNotes = false;
int[] raggi = { 1, 2, 3, 5, 10 };
%>
<div class="container-fluid">
<div class="row">
<div class="module-group">
<liferay-ui:panel extended="false" defaultState="open" collapsible="false" title="ricerca-posizione">
<div class="container-fluid">
<div class="row">
<div class="col-xs-6">
<liferay-portlet:actionURL name="ricerca" var="ricercaURL" />
<aui:form method="POST" name="ricerca" action="<%= ricercaURL %>">
<div class="row">
<div class="col-xs-12 col-md-6">
<aui:select name="provincia" label="dp-dc-prov" showEmptyOption="true">
</aui:select>
</div>
<div class="col-xs-12 col-md-6">
<aui:select name="comune" label="dp-dc-comune" showEmptyOption="true">
</aui:select>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<aui:input name="via" label="dp-dc-via" />
</div>
</div>
<div class="row">
<div class="col-xs-12">
<aui:button name="localizzaBtn" cssClass="btn btn-primary pull-right" onClick="localize(true)" value="Localizza"/>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<aui:input name="lat" label="dp-lat"/>
</div>
<div class="col-xs-12 col-md-6">
<aui:input name="long" label="dp-long"/>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-6">
<aui:select name="raggio" label="dp-raggio">
<% for (int i = 0; i < raggi.length; i++) { %>
<aui:option value="<%= raggi[i] * 1000 %>"><%= raggi[i] %> Km</aui:option>
<% } %>
</aui:select>
</div>
</div>
<aui:button type="submit" value="search" />
</aui:form>
</div>
<div class="col-xs-6">
<c:set var="mapitNamespace" scope="request" value="<%= renderResponse.getNamespace() %>" />
<liferay-portlet:runtime portletName="<%= PortletKeys.MAPIT %>"
queryString="&mapitNamespace=${mapitNamespace}&verifyComune=false" />
<aui:input type="hidden" name="geoIsEditable" value="true" />
<aui:input type="hidden" name="lat_hidden" value="" />
<aui:input type="hidden" name="long_hidden" value="" />
<aui:input type="hidden" name="zoom" value="12" />
</div>
</div>
</div>
</liferay-ui:panel>
</div>
</div>
<div class="row">
<liferay-ui:search-container emptyResultsMessage="no-entries-were-found" iteratorURL="<%= iteratorURL %>" >
<%
int indice = searchContainer.getStart();
double dlat = 0;
double dlng = 0;
List<IntPratica> 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<IntPratica>();
searchContainer.setTotal(0);
}
%>
<liferay-ui:search-container-results results="<%= pratiche %>" />
<liferay-ui:search-container-row className="it.tref.liferay.portos.bo.model.IntPratica" modelVar="pratica">
<%
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<Soggetto> titolari = SoggettoLocalServiceUtil.getValidByIntPratica_CodiceFiscale(
intPraticaId, dettaglio.getCodiceFiscaleDelegatoCommittente());
if (!titolari.isEmpty()) {
titolare = titolari.get(0);
}
StringBuilder builder = new StringBuilder();
List<Soggetto> soggetti = SoggettoLocalServiceUtil
.findByIntPratica_TipologiaSoggetto(intPraticaId, TipoSoggettoUtil.COMMITTENTE);
for (Soggetto soggetto : soggetti) {
if (builder.length() > 0) {
builder.append("<hr/>");
}
builder.append(soggetto.getTitle())
.append("<br/>")
.append(soggetto.getCodiceFiscale());
}
committenti = builder.toString();
esito = LanguageUtil.get(pageContext, PraticaUtil.getStatoPraticaLabel(
pratica.getStatoPratica(), intPraticaId));
}
List<Avviso> 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));
%>
<liferay-portlet:renderURL var="viewURL" >
<liferay-portlet:param name="mvcPath" value="/html/fascicolo/view_fascicolo.jsp"/>
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>" />
<liferay-portlet:param name="backURL" value="<%= iteratorURL.toString() %>" />
</liferay-portlet:renderURL>
<liferay-ui:search-container-column-text name="#" cssClass="text-center">
<%= ++indice %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="distanza" title="distanza-tooltip" cssClass="text-center">
<%= fmt.format(pratica.getDistanzaOrtodromica()) %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="n-progetto" cssClass="text-nowrap">
<%= pratica.getTitle(locale, true) %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="titolare-digitale" href="<%= viewURL %>" cssClass="text-nowrap">
<c:if test="<%= Validator.isNotNull(titolare) %>">
<%= titolare.getTitle() %><br/><%= titolare.getCodiceFiscale() %>
</c:if>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="committenti" href="<%=viewURL %>">
<%= committenti %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="esito" href="<%=viewURL %>" cssClass="text-nowrap text-center middle-aligned">
<strong><%= LanguageUtil.get(pageContext, PraticaUtil.getStatoPraticaLabel(pratica.getStatoPratica(), intPraticaId)) %></strong>
<span class="text-center display-block" style="margin-top:5px">
<%
if (!avvisi.isEmpty()) {
StringBuilder sb = new StringBuilder();
sb.append("<ul class='avvisi-tooltip'>");
for (Avviso avviso : avvisi) {
sb.append("<li class='avviso-tooltip'>");
sb.append(LanguageUtil.get(pageContext, avviso.translateTipoDocumento()));
sb.append("</li>");
}
sb.append("</ul>");
%>
<liferay-portlet:renderURL var="fascicoloAvvisiURL">
<liferay-portlet:param name="mvcPath" value="/html/fascicolo/view_fascicolo.jsp" />
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>" />
</liferay-portlet:renderURL>
<a class="btn status-icon tooltip-info btn-action"
title="<%= HtmlUtil.escapeAttribute(sb.toString()) %>"
href="<%= fascicoloAvvisiURL.toString() + "#_" + PortletKeys.FASCICOLO
+ "_tab=_" + PortletKeys.FASCICOLO + "_page_avvisi" %>">
<i class="fa fa-envelope relative">
<span class="fa-hover fa-top-right txt-bold"><%= avvisi.size() %></span>
</i>
</a>
<%
}
%>
<c:if test="<%= variantiCount > 0 %>">
<span class="btn status-icon tooltip-info btn-action" title="Varianti Presentate">
<span class="relative txt-bold status-icon-text">
V
<span class="sup top-right txt-bold"><%= variantiCount %></span>
</span>
</span>
</c:if>
<c:if test="<%= integrazioniCount > 0 %>">
<span class="btn status-icon tooltip-info btn-action txt-bold" title="Integrazioni Presentate">
<span class="relative txt-bold status-icon-text">
I
<span class="sup top-right txt-bold"><%= integrazioniCount %></span>
</span>
</span>
</c:if>
<c:if test="<%= pratica.isFineLavoriParziale() || pratica.isFineLavoriTotale() %>">
<c:if test="<%= !pratica.isFineLavoriTotale()%>">
<span class="btn status-icon tooltip-info btn-action" title="Fine Lavori Parziale presente">
<i class="fa fa-gavel relative">
<span class="fa-hover fa-top-right txt-orange txt-bold">P</span>
</i>
</span>
</c:if>
<c:if test="<%= pratica.isFineLavoriTotale()%>">
<span class="btn status-icon tooltip-info btn-action" title="Fine Lavori Totale presente">
<i class="fa fa-gavel relative">
<span class="fa-hover fa-top-right txt-green txt-bold">T</span>
</i>
</span>
</c:if>
</c:if>
<c:if test="<%= pratica.isCollaudoParziale() || pratica.isCollaudoTotale() %>">
<c:if test="<%= !pratica.isCollaudoTotale() %>">
<span class="btn status-icon tooltip-info btn-action" title="Collaudo Parziale presente">
<i class="fa fa-briefcase relative">
<span class="fa-hover fa-top-right txt-orange txt-bold">P</span>
</i>
</span>
</c:if>
<c:if test="<%= pratica.isCollaudoTotale() %>">
<span class="btn status-icon tooltip-info btn-action" title="Collaudo Totale presente">
<i class="fa fa-briefcase relative">
<span class="fa-hover fa-top-right txt-green txt-bold">T</span>
</i>
</span>
</c:if>
</c:if>
</span>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="col-desc-interv">
Territorio: <strong><%= comune.getDenominazione() %>
<%= (dettaglio == null || dettaglio.getLocalita().isEmpty()) ?
"" :
"(Loc. " + dettaglio.getLocalita() + ")"
%> - <%= provincia.getProvincia() %></strong><br/>
Localizzazione: <strong><%= dettaglio == null ? "" : dettaglio.getVia() %></strong><br/>
<strong><%= LanguageUtil.get(pageContext, "tipo_procedura_" + pratica.getTipoProcedura()) %></strong><br/><br/>
<%= dettaglio == null ? "" : dettaglio.getDescLongIntervento() %>
</liferay-ui:search-container-column-text>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="true" />
</liferay-ui:search-container>
<c:if test="<%= showNotes %>">
<div class="col-xs-12">
<br/>
<small>
Note:<br/>
<%= LanguageUtil.get(pageContext, "distanza-tooltip") %>
</small>
</div>
</c:if>
</div>
</div>
<script>
var <portlet:namespace/>comuneSelezionato = '';
Liferay.on('mapIt-ready',function(event) {
AUI().one('#_<%= PortletKeys.MAPIT %>_container_btn .bloccamap').set('disabled', false).removeClass('disabled');
});
function localize(showAlert) {
AUI().use('aui-io-request', function(A) {
var indirizzo = AUI().one('#<portlet:namespace/>via').val().trim()
var comune = AUI().one('#<portlet:namespace/>comune option:selected');
if (undefined == comune) {
comune = '';
} else {
comune = comune.text().trim();
}
var provincia = AUI().one('#<portlet:namespace/>provincia option:selected');
if (undefined == provincia) {
provincia = '';
} else {
provincia = provincia.text().trim();
}
var localization = [indirizzo, comune, provincia];
var url = 'https://nominatim.openstreetmap.org/search?format=json&addressdetails=0&q='
+ encodeURIComponent(localization.join(' '));
A.io.request(url, {
dataType: 'json',
on: {
success: function() {
var response = this.get('responseData');
if (response.length == 0) {
if (showAlert) {
alert('Nessun risultato per i dati immessi');
}
} else if (response && response[0]) {
Liferay.fire(
'geolocation-ready',
{
latitude: response[0].lat,
longitude : response[0].lon,
fullAddress : indirizzo !== ''
}
);
}
},
}
});
});
}
YUI().use(
'aui-tooltip',
function(Y) {
new Y.TooltipDelegate({
trigger: '.tooltip-info',
position: 'top',
cssClass: 'tooltip-help',
html: true,
opacity: 1,
});
}
);
</script>
<liferay-portlet:resourceURL id="province" var="getProvinceURL" />
<liferay-portlet:resourceURL id="comuni" var="getComuniURL" />
<aui:script use="aui-io-request,liferay-dynamic-select">
var getProvince = function(callback) {
A.io.request(
'<%= getProvinceURL %>',
{
dataType: 'json',
on: {
success: function() {
var data = this.get('responseData');
<portlet:namespace/>province = {};
for (var i = 0; i < data.length; i++) {
<portlet:namespace/>province[data[i].nome.replaceAll(' ', '-').toLowerCase()] = data[i].id;
}
callback(data);
}
}
}
);
};
var getComuni = function(callback, provinciaId) {
A.io.request(
'<%= getComuniURL %>',
{
dataType: 'json',
data: {
<portlet:namespace />provinciaId: provinciaId
},
on: {
success: function() {
var data = this.get('responseData');
callback(data);
if ('' !== <portlet:namespace/>comuneSelezionato) {
for (var i = 0; i < data.length; i++) {
if (data[i].nome.replaceAll(' ', '-').toLowerCase() === <portlet:namespace/>comuneSelezionato) {
A.one('#<portlet:namespace/>comune').set('value', data[i].id);
}
}
<portlet:namespace/>comuneSelezionato = '';
}
}
}
}
);
};
new Liferay.DynamicSelect([
{
select: '<portlet:namespace />provincia',
selectData: getProvince,
selectDesc: 'nome',
selectId: 'id',
selectSort: true,
selectVal: '<%= codiceProvincia %>',
},
{
select: '<portlet:namespace />comune',
selectData: getComuni,
selectDesc: 'nome',
selectId: 'id',
selectSort: true,
selectDisableOnEmpty: true,
selectVal: '<%= idComune %>',
},
]);
</aui:script>

BIN
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/commons-logging.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/jstl-api.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/jstl-impl.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/log4j.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/util-bridges.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

4
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=DA build.namespace=DA
build.number=9 build.number=10
build.date=1606299034524 build.date=1612446773513
build.auto.upgrade=true build.auto.upgrade=true
## ##

572
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/docroot/WEB-INF/tld/c.tld

@ -1,572 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<taglib xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
version="2.1">
<description>JSTL 1.2 core library</description>
<display-name>JSTL core</display-name>
<tlib-version>1.2</tlib-version>
<short-name>c</short-name>
<uri>http://java.sun.com/jsp/jstl/core</uri>
<validator>
<description>
Provides core validation features for JSTL tags.
</description>
<validator-class>
org.apache.taglibs.standard.tlv.JstlCoreTLV
</validator-class>
</validator>
<tag>
<description>
Catches any Throwable that occurs in its body and optionally
exposes it.
</description>
<name>catch</name>
<tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>
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.
</description>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
<tag>
<description>
Simple conditional tag that establishes a context for
mutually exclusive conditional operations, marked by
&lt;when&gt; and &lt;otherwise&gt;
</description>
<name>choose</name>
<tag-class>com.liferay.taglib.core.ChooseTag</tag-class>
<body-content>JSP</body-content>
</tag>
<tag>
<description>
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
</description>
<name>if</name>
<tag-class>com.liferay.taglib.core.IfTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>
The test condition that determines whether or
not the body content should be processed.
</description>
<name>test</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>boolean</type>
</attribute>
<attribute>
<description>
Name of the exported scoped variable for the
resulting value of the test condition. The type
of the scoped variable is Boolean.
</description>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<description>
Scope for var.
</description>
<name>scope</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
<tag>
<description>
Retrieves an absolute or relative URL and exposes its contents
to either the page, a String in 'var', or a Reader in 'varReader'.
</description>
<name>import</name>
<tag-class>org.apache.taglibs.standard.tag.rt.core.ImportTag</tag-class>
<tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class>
<body-content>JSP</body-content>
<attribute>
<description>
The URL of the resource to import.
</description>
<name>url</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Name of the exported scoped variable for the
resource's content. The type of the scoped
variable is String.
</description>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<description>
Scope for var.
</description>
<name>scope</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<description>
Name of the exported scoped variable for the
resource's content. The type of the scoped
variable is Reader.
</description>
<name>varReader</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<description>
Name of the context when accessing a relative
URL resource that belongs to a foreign
context.
</description>
<name>context</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Character encoding of the content at the input
resource.
</description>
<name>charEncoding</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<description>
The basic iteration tag, accepting many different
collection types and supporting subsetting and other
functionality
</description>
<name>forEach</name>
<tag-class>org.apache.taglibs.standard.tag.rt.core.ForEachTag</tag-class>
<tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class>
<body-content>JSP</body-content>
<attribute>
<description>
Collection of items to iterate over.
</description>
<name>items</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.Object</type>
<deferred-value>
<type>java.lang.Object</type>
</deferred-value>
</attribute>
<attribute>
<description>
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.
</description>
<name>begin</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>int</type>
</attribute>
<attribute>
<description>
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.
</description>
<name>end</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>int</type>
</attribute>
<attribute>
<description>
Iteration will only process every step items of
the collection, starting with the first one.
</description>
<name>step</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>int</type>
</attribute>
<attribute>
<description>
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.
</description>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<description>
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.
</description>
<name>varStatus</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
<tag>
<description>
Iterates over tokens, separated by the supplied delimeters
</description>
<name>forTokens</name>
<tag-class>org.apache.taglibs.standard.tag.rt.core.ForTokensTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>
String of tokens to iterate over.
</description>
<name>items</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
<deferred-value>
<type>java.lang.String</type>
</deferred-value>
</attribute>
<attribute>
<description>
The set of delimiters (the characters that
separate the tokens in the string).
</description>
<name>delims</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<attribute>
<description>
Iteration begins at the token located at the
specified index. First token has index 0.
</description>
<name>begin</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>int</type>
</attribute>
<attribute>
<description>
Iteration ends at the token located at the
specified index (inclusive).
</description>
<name>end</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>int</type>
</attribute>
<attribute>
<description>
Iteration will only process every step tokens
of the string, starting with the first one.
</description>
<name>step</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>int</type>
</attribute>
<attribute>
<description>
Name of the exported scoped variable for the
current item of the iteration. This scoped
variable has nested visibility.
</description>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<description>
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.
</description>
<name>varStatus</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
<tag>
<description>
Like &lt;%= ... &gt;, but for expressions.
</description>
<name>out</name>
<tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>
Expression to be evaluated.
</description>
<name>value</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Default value if the resulting value is null.
</description>
<name>default</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Determines whether characters &lt;,&gt;,&amp;,'," in the
resulting string should be converted to their
corresponding character entity codes. Default value is
true.
</description>
<name>escapeXml</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<description>
Subtag of &lt;choose&gt; that follows &lt;when&gt; tags
and runs only if all of the prior conditions evaluated to
'false'
</description>
<name>otherwise</name>
<tag-class>com.liferay.taglib.core.OtherwiseTag</tag-class>
<body-content>JSP</body-content>
</tag>
<tag>
<description>
Adds a parameter to a containing 'import' tag's URL.
</description>
<name>param</name>
<tag-class>org.apache.taglibs.standard.tag.rt.core.ParamTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>
Name of the query string parameter.
</description>
<name>name</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Value of the parameter.
</description>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<description>
Redirects to a new URL.
</description>
<name>redirect</name>
<tag-class>org.apache.taglibs.standard.tag.rt.core.RedirectTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>
The URL of the resource to redirect to.
</description>
<name>url</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Name of the context when redirecting to a relative URL
resource that belongs to a foreign context.
</description>
<name>context</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<description>
Removes a scoped variable (from a particular scope, if specified).
</description>
<name>remove</name>
<tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class>
<body-content>empty</body-content>
<attribute>
<description>
Name of the scoped variable to be removed.
</description>
<name>var</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<description>
Scope for var.
</description>
<name>scope</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
<tag>
<description>
Sets the result of an expression evaluation in a 'scope'
</description>
<name>set</name>
<tag-class>org.apache.taglibs.standard.tag.rt.core.SetTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>
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.
</description>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<description>
Expression to be evaluated.
</description>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<deferred-value>
<type>java.lang.Object</type>
</deferred-value>
</attribute>
<attribute>
<description>
Target object whose property will be set. Must evaluate to
a JavaBeans object with setter property property, or to a
java.util.Map object.
</description>
<name>target</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Name of the property to be set in the target object.
</description>
<name>property</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Scope for var.
</description>
<name>scope</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
<tag>
<description>
Creates a URL with optional query parameters.
</description>
<name>url</name>
<tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>
Name of the exported scoped variable for the
processed url. The type of the scoped variable is
String.
</description>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<description>
Scope for var.
</description>
<name>scope</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<description>
URL to be processed.
</description>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>
Name of the context when specifying a relative URL
resource that belongs to a foreign context.
</description>
<name>context</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<description>
Subtag of &lt;choose&gt; that includes its body if its
condition evalutes to 'true'
</description>
<name>when</name>
<tag-class>com.liferay.taglib.core.WhenTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>
The test condition that determines whether or not the
body content should be processed.
</description>
<name>test</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>boolean</type>
</attribute>
</tag>
</taglib>

2
liferay-plugins-sdk-6.2/portlets/portos-deploy-alert-portlet/ivy.xml.MD5

@ -1 +1 @@
b2c2a2163a9e57f49e684a33bc7d0817 5ae48f34ca95a715172797941f9c2717

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

@ -26,18 +26,18 @@
<div class="row"> <div class="row">
<strong><%= LanguageUtil.get(pageContext, "tipo_procedura_P0") %></strong> <strong><%= LanguageUtil.get(pageContext, "tipo_procedura_P0") %></strong>
</div> </div>
<aui:input label="tipo_procedura_P1" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P1 %>" type="radio" value="<%= Constants.PROCEDURA_P1 %>" showRequiredLabel="true" disabled="<%=true%>" > <aui:input label="tipo_procedura_P1" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P1 %>" type="radio" value="<%= Constants.PROCEDURA_P1 %>" showRequiredLabel="true" disabled="true" >
<aui:validator name="required"></aui:validator> <aui:validator name="required"></aui:validator>
</aui:input> </aui:input>
<aui:input label="tipo_procedura_P2" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P2 %>" type="radio" value="<%= Constants.PROCEDURA_P2 %>" showRequiredLabel="true" disabled="<%=true%>" /> <aui:input label="tipo_procedura_P2" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P2 %>" type="radio" value="<%= Constants.PROCEDURA_P2 %>" showRequiredLabel="true" disabled="true" />
<aui:input label="tipo_procedura_P3" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P3 %>" type="radio" value="<%= Constants.PROCEDURA_P3 %>" showRequiredLabel="true" disabled="<%=true%>" /> <aui:input label="tipo_procedura_P3" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P3 %>" type="radio" value="<%= Constants.PROCEDURA_P3 %>" showRequiredLabel="true" disabled="true" />
<aui:input label="tipo_procedura_P4" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P4 %>" type="radio" value="<%= Constants.PROCEDURA_P4 %>" showRequiredLabel="true" disabled="<%=true%>" /> <aui:input label="tipo_procedura_P4" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P4 %>" type="radio" value="<%= Constants.PROCEDURA_P4 %>" showRequiredLabel="true" disabled="true" />
<aui:input label="tipo_procedura_P5" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P5 %>" type="radio" value="<%= Constants.PROCEDURA_P5 %>" showRequiredLabel="true" disabled="<%=true%>" /> <aui:input label="tipo_procedura_P5" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P5 %>" type="radio" value="<%= Constants.PROCEDURA_P5 %>" showRequiredLabel="true" disabled="true" />
<aui:input label="tipo_procedura_P6" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P6 %>" type="radio" value="<%= Constants.PROCEDURA_P6 %>" showRequiredLabel="true" disabled="<%=true%>" /> <aui:input label="tipo_procedura_P6" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P6 %>" type="radio" value="<%= Constants.PROCEDURA_P6 %>" showRequiredLabel="true" disabled="true" />
<aui:input label="tipo_procedura_P7" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P7 %>" type="radio" value="<%= Constants.PROCEDURA_P7 %>" showRequiredLabel="true" disabled="<%=true%>" /> <aui:input label="tipo_procedura_P7" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P7 %>" type="radio" value="<%= Constants.PROCEDURA_P7 %>" showRequiredLabel="true" disabled="true" />
<aui:input label="tipo_procedura_P8" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P8 %>" type="radio" value="<%= Constants.PROCEDURA_P8 %>" showRequiredLabel="true" disabled="<%=true%>" /> <aui:input label="tipo_procedura_P8" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P8 %>" type="radio" value="<%= Constants.PROCEDURA_P8 %>" showRequiredLabel="true" disabled="true" />
<aui:input label="tipo_procedura_P9" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P9 %>" type="radio" value="<%= Constants.PROCEDURA_P9 %>" showRequiredLabel="true" disabled="<%=true%>" /> <aui:input label="tipo_procedura_P9" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P9 %>" type="radio" value="<%= Constants.PROCEDURA_P9 %>" showRequiredLabel="true" disabled="true" />
<aui:input label="tipo_procedura_P10" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P10 %>" type="radio" value="<%= Constants.PROCEDURA_P10 %>" showRequiredLabel="true" disabled="<%=true%>" /> <aui:input label="tipo_procedura_P10" name="tipoProcedura" id="<%= \"tipo_procedura_\" + Constants.PROCEDURA_P10 %>" type="radio" value="<%= Constants.PROCEDURA_P10 %>" showRequiredLabel="true" disabled="true" />
</aui:field-wrapper> </aui:field-wrapper>
</div> </div>
</div> </div>
@ -93,9 +93,6 @@
<portlet:namespace />comune:{ <portlet:namespace />comune:{
requiredSelect:'comune' requiredSelect:'comune'
}, },
/*<portlet:namespace />territorioId:{
requiredSelect:'zona - fascia'
},*/
<portlet:namespace />tipoProcedura:{ <portlet:namespace />tipoProcedura:{
requiredSelect:'procedura' requiredSelect:'procedura'
} }
@ -167,7 +164,6 @@
selectId: 'provinciaId', selectId: 'provinciaId',
selectSort: true, selectSort: true,
selectVal: '0' selectVal: '0'
}, },
{ {
select: '<portlet:namespace />comune', select: '<portlet:namespace />comune',
@ -176,16 +172,7 @@
selectId: 'comuneId', selectId: 'comuneId',
selectSort: true, selectSort: true,
selectVal: '0' selectVal: '0'
}
}/*,
{
select: '<portlet:namespace />territorioId',
selectData: getZoneFasce,
selectDesc: 'descLong',
selectId: 'territorioId',
selectVal: '0'
}*/
] ]
); );
@ -203,13 +190,6 @@
$('.add-new-project__comune select').change(function(){ $('.add-new-project__comune select').change(function(){
var val = $(this).val(); var val = $(this).val();
/*if (val == 0) {
$('.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) { if (val == 0) {
$('.add-new-project__procedura input').prop('disabled', 'disabled').prop('checked', false); $('.add-new-project__procedura input').prop('disabled', 'disabled').prop('checked', false);
$('.add-new-project__procedura div').removeClass('success'); $('.add-new-project__procedura div').removeClass('success');
@ -217,15 +197,4 @@
$('.add-new-project__procedura input').prop('disabled', false).removeClass('disabled').parent().css('display', 'block'); $('.add-new-project__procedura input').prop('disabled', false).removeClass('disabled').parent().css('display', 'block');
} }
}); });
/*$('.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');
}
});*/
</aui:script> </aui:script>

128
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 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.util.AzioniPraticheUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%> <%@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.TipoIntegrazioneUtil"%>
@ -19,6 +21,7 @@
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%> <%@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.service.TerritorioLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%> <%@page import="it.tref.liferay.portos.bo.model.DettPratica"%>
<%@page import="it.mwg.sismica.bo.util.MappeUtil" %>
<%@page import="java.util.ArrayList"%> <%@page import="java.util.ArrayList"%>
<%@page import="com.liferay.portal.kernel.util.KeyValuePair"%> <%@page import="com.liferay.portal.kernel.util.KeyValuePair"%>
<%@ include file="/html/fascicolofe/init.jsp" %> <%@ include file="/html/fascicolofe/init.jsp" %>
@ -46,6 +49,7 @@
&& TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equals(dettPratica.getTipoIntegrazione()); && TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equals(dettPratica.getTipoIntegrazione());
boolean isNewVariante = ParamUtil.getBoolean(request, "isNewVariante"); boolean isNewVariante = ParamUtil.getBoolean(request, "isNewVariante");
String urlIframeMappe = MappeUtil.getUrlComune(request.getServerName(), comune);
%> %>
<liferay-util:include page="/html/fascicolofe/navigator/header.jsp" servletContext="<%=application %>"> <liferay-util:include page="/html/fascicolofe/navigator/header.jsp" servletContext="<%=application %>">
@ -85,20 +89,6 @@
<div class="module-group"> <div class="module-group">
<liferay-ui:panel extended="false" defaultState="open" collapsible="false" title="dp"> <liferay-ui:panel extended="false" defaultState="open" collapsible="false" title="dp">
<div class="container-fluid"> <div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-md-6">
<aui:input name="paesaggioLocale" label="dp-paesaggio-locale" type="text" value="" />
</div>
<div class="col-xs-12 col-md-6">
<aui:input name="livelloDiTutela" label="dp-livello-di-tutela" type="text" value="" />
</div>
</div>
<div class="row">
<div class="col-xs-12">
<aui:input type="textarea" name="vincoli" rows="4" cols="250" label="dp-vincoli"></aui:input>
</div>
</div>
<div class="col-sm-12 col-md-12"> <div class="col-sm-12 col-md-12">
<div class="module-group group_dati_catastali"> <div class="module-group group_dati_catastali">
@ -298,68 +288,16 @@
disabled="<%= true %>" onClick="localize(true)" value="Localizza"/> disabled="<%= true %>" onClick="localize(true)" value="Localizza"/>
</div> </div>
</div> </div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
<aui:input disabled="<%=disabledInput %>" name="dcFoglio" label="dc-foglio"/>
</div>
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
<aui:input disabled="<%=disabledInput %>" name="dcAllegato" label="dc-allegato"/>
</div>
</div>
<div class="row">
<%
String[] particelle= BeanParamUtil.getString(dettPratica, request, "dcParticelle","").split(Pattern.quote("|"));
%>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<h5><strong><%= LanguageUtil.get(pageContext, "dc-particelle") %></strong></h5>
</div>
<div class="col-xs-6 col-sm-6 col-md-2 col-lg-2">
<aui:input disabled="<%=disabledInput %>" type="text" name="particella1" maxLength ="15"
value='<%=particelle.length>0?particelle[0]:StringPool.BLANK %>' label=""/>
</div>
<div class="col-xs-6 col-sm-6 col-md-2 col-lg-2">
<aui:input disabled="<%=disabledInput %>" type="text" name="particella2" maxLength ="15"
value='<%=particelle.length>1?particelle[1]:StringPool.BLANK %>' label=""/>
</div>
<div class="col-xs-6 col-sm-6 col-md-2 col-lg-2">
<aui:input disabled="<%=disabledInput %>" type="text" name="particella3" maxLength ="15"
value='<%=particelle.length>2?particelle[2]:StringPool.BLANK %>' label=""/>
</div>
<div class="col-xs-6 col-sm-6 col-md-2 col-lg-2">
<aui:input disabled="<%=disabledInput %>" type="text" name="particella4" maxLength ="15"
value='<%=particelle.length>3?particelle[3]:StringPool.BLANK %>' label=""/>
</div>
</div>
<!--
<div class="row">
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
<aui:input type="text" name="progetto_estremi_catastali" label="Subalterno"/>
</div>
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
<aui:input type="text" name="progetto_estremi_catastali" label="Categoria"/>
</div>
</div>
-->
<div class="row">
<c:if test='<%= Validator.isNotNull(dettPratica.getEstremiCatastali()) %>'>
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
<aui:input disabled="<%=disabledInput %>" type="text" name="estremiCatastali"
label="estremi-catastali"/>
</div>
</c:if>
</div>
<div class="row"> <div class="row">
<% <%
String[] geolocalization = BeanParamUtil.getString(dettPratica, request, "localizzazioneGeografica","").split(Pattern.quote("|")); String[] geolocalization = BeanParamUtil.getString(dettPratica, request, "localizzazioneGeografica","").split(Pattern.quote("|"));
%> %>
<aui:input name="zoom" label="" type="hidden" <aui:input name="zoom" label="" type="hidden" value='<%=geolocalization.length>2?geolocalization[2]:"8" %>'/>
value='<%=geolocalization.length>2?geolocalization[2]:"8" %>'/>
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6"> <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
<aui:input name="lat_hidden" label="" type="hidden" <aui:input name="lat_hidden" label="" type="hidden"
value='<%=geolocalization.length>0?geolocalization[0]:StringPool.BLANK %>' /> value='<%=geolocalization.length>0?geolocalization[0]:StringPool.BLANK %>' />
<aui:input type="text" name="lat" <aui:input type="text" name="lat"
value='<%=geolocalization.length>0?geolocalization[0]:StringPool.BLANK %>' label="dp-lat"/> value='<%=geolocalization.length>0?geolocalization[0]:StringPool.BLANK %>' label="dp-lat"/>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6"> <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
<aui:input name="long_hidden" label="" type="hidden" <aui:input name="long_hidden" label="" type="hidden"
@ -370,10 +308,66 @@
<aui:input disabled="<%=disabledInput || isGeoEditable %>" type="hidden" name="geoIsEditable" <aui:input disabled="<%=disabledInput || isGeoEditable %>" type="hidden" name="geoIsEditable"
value='<%= ( disabledInput || isGeoEditable ) ? false : true %>' label=""/> value='<%= ( disabledInput || isGeoEditable ) ? false : true %>' label=""/>
</div> </div>
<div class="row">
<div class="col-xs-12">
<aui:input disabled="<%=disabledInput && !enabledByIntegrazione %>" name="estremiCatastali" id="input_estremiCatastali"
label="estremi-catastali"/>
</div>
</div>
<label class="control-label text-uppercase"><%= LanguageUtil.get(pageContext, "dp-ppp") %></label>
<div class="row">
<div class="col-xs-12 col-md-6">
<aui:input disabled="<%=disabledInput && !enabledByIntegrazione %>" type="textarea" name="paesaggioLocale" id="input_paesaggioLocale" label="dp-paesaggio-locale" value="" />
</div>
<div class="col-xs-12 col-md-6">
<aui:input disabled="<%=disabledInput && !enabledByIntegrazione %>" type="textarea" name="livelloDiTutela" id="input_livelloDiTutela" label="dp-livello-di-tutela" value="" />
</div>
</div>
<div class="row">
<div class="col-xs-12">
<aui:input disabled="<%=disabledInput && !enabledByIntegrazione %>" type="textarea" id="input_vincoli" name="vincoli" rows="4" cols="250" label="dp-vincoli"></aui:input>
</div>
</div>
</div> </div>
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6"> <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
<!-- Integrazione geoportal -->
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<iframe src="<%= urlIframeMappe %>" style="border:none;width:100%;height:850px">
</iframe>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function(event) {
window.addEventListener('message', messageListener, false);
});
function messageListener(event) {
try {
var data = JSON.parse(event.data);
} catch (e) {
return;
}
var trasferiti = [];
for (key in data) {
var el = document.getElementById('<portlet:namespace/>input_' + key);
if (null !== el) {
el.value = data[key];
trasferiti.push(key);
}
}
if (trasferiti.length > 0) {
alert('Trasferiti correttamente: ' + trasferiti.join(', '));
}
}
</script>
<liferay-portlet:runtime portletName="<%= PortletKeys.MAPIT %>" /> <liferay-portlet:runtime portletName="<%= PortletKeys.MAPIT %>" />
<!-- /Integrazione geoportal -->
</div> </div>
</aui:row> </aui:row>
</div> </div>

1
liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/build.xml

@ -2,5 +2,6 @@
<!DOCTYPE project> <!DOCTYPE project>
<project name="portos-mapit-plugin-portlet" basedir="." default="deploy"> <project name="portos-mapit-plugin-portlet" basedir="." default="deploy">
<property name="import.shared" value="tref-mapit-shared" />
<import file="../build-common-portlet.xml" /> <import file="../build-common-portlet.xml" />
</project> </project>

BIN
liferay-plugins-sdk-6.2/portlets/portos-mapit-plugin-portlet/docroot/WEB-INF/lib/tref-mapit-shared.jar

File binario non mostrato.

244
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.portal.util.PortletKeys"%>
<%@page import="com.liferay.portlet.PortletURLFactoryUtil"%> <%@page import="com.liferay.portlet.PortletURLFactoryUtil"%>
<%@include file="/html/plugin/init.jsp" %> <%@include file="/html/plugin/init.jsp" %>
<% <%
String contextName = getServletContext().getServletContextName(); String contextName = getServletContext().getServletContextName();
String portletNamespace = ParamUtil.getString(request, "mapitNamespace", "_1_WAR_portosfeportlet_"); String portletNamespace = ParamUtil.getString(request, "mapitNamespace", "_1_WAR_portosfeportlet_");
String verifyComune = ParamUtil.getString(request, "verifyComune", "true");
%> %>
<liferay-portlet:resourceURL var="moveAssetURL" id="moveAsset"> <liferay-portlet:resourceURL var="moveAssetURL" id="moveAsset">
<liferay-portlet:param name="contextName" value="<%= contextName %>"/> <liferay-portlet:param name="contextName" value="<%= contextName %>"/>
</liferay-portlet:resourceURL> </liferay-portlet:resourceURL>
<%
/* 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); */
%>
<style> <style>
.olMap { .olMap {
position: relative; position: relative;
@ -66,15 +54,13 @@ popupURL.setPortletMode(PortletMode.VIEW); */
visibility: hidden; visibility: hidden;
-webkit-transition: opacity .15s, visibility .15s; -webkit-transition: opacity .15s, visibility .15s;
transition: opacity .15s, visibility .15s; transition: opacity .15s, visibility .15s;
} }
.layermap .fa-lock { .layermap .fa-lock {
font-size:50px; font-size:50px;
} }
</style> </style>
<div class="container-btn-lock" id="<portlet:namespace/>container_btn"> <div class="container-btn-lock" id="<portlet:namespace/>container_btn">
<aui:button disabled="<%=true%>" cssClass="fa fa-unlock btn btn-primary btn-action bloccamap" message="Blocca Mappa" style="font-family:FontAwesome"/> <aui:button disabled="true" cssClass="fa fa-unlock btn btn-primary btn-action bloccamap" message="Blocca Mappa" style="font-family:FontAwesome"/>
</div> </div>
<div class='customAlert'> <div class='customAlert'>
@ -95,7 +81,7 @@ popupURL.setPortletMode(PortletMode.VIEW); */
var portletNamespace = "<%= portletNamespace %>", var portletNamespace = "<%= portletNamespace %>",
mapItMap; mapItMap;
var verifyComune = <%= verifyComune %>;
Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getServletContextName() %>', function(event) { Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getServletContextName() %>', function(event) {
AUI().use('liferay-mapit-map', 'aui-io-request', function(A) { AUI().use('liferay-mapit-map', 'aui-io-request', function(A) {
@ -121,86 +107,6 @@ Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getSer
var geographic = new OpenLayers.Projection("EPSG:4326"); var geographic = new OpenLayers.Projection("EPSG:4326");
var mercator = new OpenLayers.Projection( "EPSG:3857"); var mercator = new OpenLayers.Projection( "EPSG:3857");
extent.transform(geographic,mercator ); 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 = { var markerStyle = {
graphicHeight: 29, graphicHeight: 29,
@ -216,7 +122,6 @@ Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getSer
style: markerStyle style: markerStyle
}]; }];
mapItMap.addLayerPoints(layerName, point, true, {selectable: true, displayInLayerSwitcher: false}); mapItMap.addLayerPoints(layerName, point, true, {selectable: true, displayInLayerSwitcher: false});
/* mapItMap.moveMap(longitude , latitude , mapItMap.getCurrentZoom()); */
var secureZoom = "8"; var secureZoom = "8";
if(editableZoom != undefined && editableZoom != null){ if(editableZoom != undefined && editableZoom != null){
var secureZoom =editableZoom.val() var secureZoom =editableZoom.val()
@ -226,7 +131,6 @@ Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getSer
if (isEditable) { if (isEditable) {
mapItMap.registerFunctionOnEvent("click", function (e) { mapItMap.registerFunctionOnEvent("click", function (e) {
var position = mapItMap.getPositionOnClick(e); var position = mapItMap.getPositionOnClick(e);
var point_lat = position.lat; var point_lat = position.lat;
@ -237,35 +141,22 @@ Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getSer
lon: point_long, lon: point_long,
style: markerStyle style: markerStyle
}]; }];
mapItMap.addLayerPoints(layerName, newPoint, true, {}); mapItMap.addLayerPoints(layerName, newPoint, true, {});
if (confirm("Vuoi aggiornare automaticamente i dati della localizzazione?") == true) { if (confirm("Vuoi aggiornare automaticamente i dati della localizzazione?")) {
updateCoords(point_lat, point_long, zoom, true); updateCoords(point_lat, point_long, zoom, true);
} }
/* confirm("Vuoi aggiornare automaticamente i dati della localizzazione?",
{x : point_lat, y : point_long, z : true}
) */
}); });
mapItMap.attachDrag(layerName, { mapItMap.attachDrag(layerName, {
on: { on: {
complete: function(event) { complete: function(event) {
/* console.log(mapItMap);
console.log(event);
console.log(mapItMap.getPositionOnClick(event)); */
var point_lat = event.latitude; var point_lat = event.latitude;
var point_long = event.longitude; var point_long = event.longitude;
var zoom = mapItMap.getCurrentZoom(); var zoom = mapItMap.getCurrentZoom();
if (confirm("Vuoi aggiornare automaticamente i dati della localizzazione?")) {
if (confirm("Vuoi aggiornare automaticamente i dati della localizzazione?") == true) {
updateCoords(point_lat, point_long, zoom, true); updateCoords(point_lat, point_long, zoom, true);
} }
/* confirm("Vuoi aggiornare automaticamente i dati della localizzazione?",
{x : point_lat, y : point_long, z : true}
) */
} }
} }
}); });
@ -282,31 +173,6 @@ Liferay.on('<%= "mapItMapReady" + StringPool.PERIOD + getServletContext().getSer
Liferay.fire('mapIt-ready'); 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("#<portlet:namespace/>map").append('<div class="layermap"></div>'); A.one("#<portlet:namespace/>map").append('<div class="layermap"></div>');
var lockButton = A.one('#<portlet:namespace/>container_btn .bloccamap'), var lockButton = A.one('#<portlet:namespace/>container_btn .bloccamap'),
lockLayer = A.one('#<portlet:namespace/>map .layermap'), lockLayer = A.one('#<portlet:namespace/>map .layermap'),
@ -335,7 +201,6 @@ function lockMap(lockButton, lockLayer, latitude, longitude, locked){
} }
if (latitude != "" && longitude != "") { if (latitude != "" && longitude != "") {
mapItMap.moveMap(longitude, latitude, mapItMap.getCurrentZoom()); mapItMap.moveMap(longitude, latitude, mapItMap.getCurrentZoom());
//updateCoords(latitude, longitude, mapItMap.getCurrentZoom(), false);
var editableZoom = AUI().one("#"+portletNamespace+"zoom"); var editableZoom = AUI().one("#"+portletNamespace+"zoom");
if (editableZoom != null) { if (editableZoom != null) {
editableZoom.val(mapItMap.getCurrentZoom()); editableZoom.val(mapItMap.getCurrentZoom());
@ -353,9 +218,7 @@ Liferay.on('geolocation-ready',function(event) {
if (latitude != "" && longitude != "") { if (latitude != "" && longitude != "") {
var zoom = mapItMap.getCurrentZoom() > 8 ? mapItMap.getCurrentZoom() : 12; var zoom = mapItMap.getCurrentZoom() > 8 ? mapItMap.getCurrentZoom() : 12;
console.log(full);
if (full) { if (full) {
//zoom = 14;
var markerStyle = { var markerStyle = {
graphicHeight: 29, graphicHeight: 29,
graphicWidth: 22, graphicWidth: 22,
@ -373,9 +236,7 @@ Liferay.on('geolocation-ready',function(event) {
mapItMap.addLayerPoints(layerName, search_point, true, {}); mapItMap.addLayerPoints(layerName, search_point, true, {});
updateCoords(latitude, longitude, zoom, false); updateCoords(latitude, longitude, zoom, false);
} }
mapItMap.moveMap(longitude, latitude, zoom); mapItMap.moveMap(longitude, latitude, zoom);
} }
}); });
}); });
@ -392,10 +253,11 @@ function updateCoords(lat_coord, long_coord, zoom_coord, fullUpdate, noTransform
var newlonLat; var newlonLat;
if (fullUpdate) { if (fullUpdate) {
if(!noTransform) if (!noTransform) {
newlonLat = new OpenLayers.LonLat(long_coord, lat_coord).transform( new OpenLayers.Projection("EPSG:3857") , new OpenLayers.Projection("EPSG:4326")); 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); newlonLat = new OpenLayers.LonLat(long_coord, lat_coord);
}
var markerStyle = { var markerStyle = {
graphicHeight: 29, graphicHeight: 29,
@ -410,7 +272,6 @@ function updateCoords(lat_coord, long_coord, zoom_coord, fullUpdate, noTransform
style: markerStyle style: markerStyle
}]; }];
mapItMap.addLayerPoints(layerName, search_point, true, {}); mapItMap.addLayerPoints(layerName, search_point, true, {});
} else { } else {
newlonLat = new OpenLayers.LonLat(long_coord, lat_coord); newlonLat = new OpenLayers.LonLat(long_coord, lat_coord);
} }
@ -423,43 +284,51 @@ function updateCoords(lat_coord, long_coord, zoom_coord, fullUpdate, noTransform
dataType: 'json', dataType: 'json',
on: { on: {
success: function() { success: function() {
var response = this.get('responseData'), var response = this.get('responseData'),
town = response.address.city!=undefined ? response.address.city : (response.address.town!=undefined ? response.address.town : response.address.village); town = response.address.city != undefined
? response.address.city
if(city.val().toLowerCase().split(" ").join("_") != town.toLowerCase().split(" ").join("_")){ : (response.address.town != undefined
? response.address.town
: response.address.village)
.replaceAll(' ', '-')
.toLowerCase();
if (verifyComune && city.val().toLowerCase().split(" ").join("-") != town) {
alert("Attenzione!\nHai selezionato un punto esterno al comune di riferimento..."); alert("Attenzione!\nHai selezionato un punto esterno al comune di riferimento...");
address.val(""); address.val("");
} else { } else {
var fullAddress = ''; var fullAddress = '';
if(response.address.road != undefined) if(response.address.road != undefined) {
fullAddress += response.address.road; fullAddress += response.address.road;
else if(response.address.pedestrian != undefined) } else if (response.address.pedestrian != undefined) {
fullAddress += response.address.pedestrian; fullAddress += response.address.pedestrian;
}
if(fullAddress != '') if (fullAddress != '') {
fullAddress += (response.address.house_number != undefined ? " " + response.address.house_number : ""); fullAddress += (response.address.house_number != undefined ? " " + response.address.house_number : "");
}
address.val(fullAddress); 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); editableLatitude.val(newlonLat.lat);
latitude.val(newlonLat.lat); latitude.val(newlonLat.lat);
editableLongitude.val(newlonLat.lon); editableLongitude.val(newlonLat.lon);
editableZoom.val(zoom_coord);
longitude.val(newlonLat.lon); longitude.val(newlonLat.lon);
editableZoom.val(zoom_coord);
}); });
} }
@ -481,47 +350,4 @@ $(function(){
}, 100); }, 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');
$('.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;
});
}); */
</script> </script>

3
liferay-plugins-sdk-6.2/shared/portos-bo-shared/src/it/tref/liferay/portos/bo/shared/util/ConfigurazioneConstants.java

@ -39,4 +39,7 @@ public class ConfigurazioneConstants {
public static final String IRIS_GENERAZIONE_IUV_URL = "conf.geniocivile.scheduler.iris.iuv.url"; public static final String IRIS_GENERAZIONE_IUV_URL = "conf.geniocivile.scheduler.iris.iuv.url";
public static final String IMPORTO_BOLLO = "conf.geniocivile.scheduler.iris.importobollo"; public static final String IMPORTO_BOLLO = "conf.geniocivile.scheduler.iris.importobollo";
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";
} }

18
liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.classpath

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_80"/>
<classpathentry kind="lib" path="/home/portos/bin/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/lib/ext/portlet.jar"/>
<classpathentry kind="lib" path="/home/portos/bin/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/lib/ext/portal-service.jar" sourcepath="/home/portos/sources/liferay-portal-src-6.2-ce-ga6">
<attributes>
<attribute name="javadoc_location" value="file:/home/portos/sources/liferay-javadocs-all/"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/home/portos/bin/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/webapps/ROOT/WEB-INF/lib/util-taglib.jar" sourcepath="/home/portos/sources/liferay-portal-src-6.2-ce-ga6">
<attributes>
<attribute name="javadoc_location" value="file:/home/portos/sources/liferay-javadocs-all/"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/home/portos/bin/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/lib/servlet-api.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>

1
liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.gitignore vendored

@ -0,0 +1 @@
/classes/

17
liferay-plugins-sdk-6.2/shared/tref-mapit-shared/.project

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>tref-mapit-shared</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

7
liferay-plugins-sdk-6.2/shared/tref-mapit-shared/build.xml

@ -0,0 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="tref-mapit-shared" basedir="." default="deploy">
<property name="plugin.version" value="1" />
<import file="../build-common-shared.xml" />
</project>

47
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";
}
}

6
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";
}

28
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";
}

5
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";
}

38
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<String, BaseModelResolver<?>> _baseModelResolverMap = new ConcurrentHashMap<String, BaseModelResolver<?>>();
}

21
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<Class<? extends MapItPluginAction>> getMapItPluginActions();
Set<Class<? extends MapItPluginEvent>> getMapItPluginEvents();
}

13
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;
}

34
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;
}
}
}

7
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<T> {
BaseModel<T> getBaseModel(long paramLong1, long paramLong2);
}

22
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<DLFileEntry> {
@Override
public BaseModel<DLFileEntry> getBaseModel(long companyId, long classPK) {
try {
return DLFileEntryLocalServiceUtil.getDLFileEntry(classPK);
} catch (PortalException portalException) {
return null;
} catch (SystemException systemException) {
return null;
}
}
}

27
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<JournalArticle> {
@Override
public BaseModel<JournalArticle> 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;
}
}
}

26
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<WikiPage> {
@Override
public BaseModel<WikiPage> 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;
}
}
}

43
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<String, TemplateVariableGroup> getTemplateVariableGroups(String language) {
Map<String, TemplateVariableGroup> templateVariableGroups = new LinkedHashMap<String, TemplateVariableGroup>();
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;
}
}

162
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<Long> classNameIds = new ArrayList<Long>();
List<AssetRendererFactory> 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<Indexer> 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<Long> listClassNameIds = new ArrayList<Long>();
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<Long> 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() };
}

124
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);
}
}

68
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();
}
}

30
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);
}

190
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<String, Serializable> 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<String, Serializable>();
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;
}
}
Caricamento…
Annulla
Salva