From b0f3e9de65e152c07c02fe129466373c57472eb3 Mon Sep 17 00:00:00 2001 From: Salvatore La Manna Date: Thu, 24 Jun 2021 11:23:46 +0200 Subject: [PATCH] Api --- .../bo/service/DettPraticaLocalService.java | 6 + .../service/DettPraticaLocalServiceClp.java | 106 ++++++++++++++---- .../service/DettPraticaLocalServiceUtil.java | 8 ++ .../DettPraticaLocalServiceWrapper.java | 10 ++ .../DettPraticaLocalServiceClpInvoker.java | 58 +++++++--- .../impl/DettPraticaLocalServiceImpl.java | 68 ++++++++++- .../docroot/WEB-INF/src/service.properties | 4 +- .../sicilia-sue-connector-portlet-service.jar | Bin 71829 -> 71829 bytes .../it/mwg/sicilia/sue/api/v1/Parameters.java | 2 + .../it/mwg/sicilia/sue/api/v1/bean/Field.java | 29 +++++ .../sue/api/v1/command/CommandList.java | 16 ++- .../api/v1/command/impl/AddApplication.java | 17 +-- .../sue/api/v1/command/impl/Applications.java | 7 +- .../v1/command/impl/DeleteApplication.java | 14 ++- .../sue/api/v1/command/impl/Documents.java | 7 +- .../sue/api/v1/command/impl/Fields.java | 97 ++++++++++++++++ .../api/v1/command/impl/ListApplications.java | 11 +- .../sue/api/v1/command/impl/Login.java | 7 +- .../sue/api/v1/command/impl/Manual.java | 11 +- .../sue/api/v1/command/impl/ManualHtml.java | 5 +- .../sicilia/sue/api/v1/command/impl/Uses.java | 31 +++++ .../sue/api/v1/parameter/Parameter.java | 2 +- .../docroot/WEB-INF/src/service.properties | 4 +- .../docroot/WEB-INF/src/service.properties | 4 +- 24 files changed, 434 insertions(+), 90 deletions(-) create mode 100644 liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Field.java create mode 100644 liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Fields.java create mode 100644 liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Uses.java diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalService.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalService.java index d5894408..059be61f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalService.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalService.java @@ -934,6 +934,12 @@ public interface DettPraticaLocalService extends BaseLocalService, @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public java.util.List getDettPraticaFields(); + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.Map getDettPraticaFieldsTypes(); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.Map> getFields(); + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public java.util.List getVersioni( long intPraticaId) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceClp.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceClp.java index c7bb3940..b1aa3dc5 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceClp.java @@ -515,31 +515,39 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService { _methodParameterTypes74 = new String[] { }; - _methodName75 = "getVersioni"; + _methodName75 = "getDettPraticaFieldsTypes"; - _methodParameterTypes75 = new String[] { "long" }; + _methodParameterTypes75 = new String[] { }; - _methodName76 = "callForChanges"; + _methodName76 = "getFields"; - _methodParameterTypes76 = new String[] { "long" }; + _methodParameterTypes76 = new String[] { }; - _methodName77 = "isNumber"; + _methodName77 = "getVersioni"; - _methodParameterTypes77 = new String[] { "java.lang.String" }; + _methodParameterTypes77 = new String[] { "long" }; - _methodName78 = "format"; + _methodName78 = "callForChanges"; - _methodParameterTypes78 = new String[] { + _methodParameterTypes78 = new String[] { "long" }; + + _methodName79 = "isNumber"; + + _methodParameterTypes79 = new String[] { "java.lang.String" }; + + _methodName80 = "format"; + + _methodParameterTypes80 = new String[] { "java.lang.String", "java.io.Serializable" }; - _methodName79 = "countVariateByIntPratica"; + _methodName81 = "countVariateByIntPratica"; - _methodParameterTypes79 = new String[] { "long" }; + _methodParameterTypes81 = new String[] { "long" }; - _methodName80 = "getFirstCompletedByIntPratica"; + _methodName82 = "getFirstCompletedByIntPratica"; - _methodParameterTypes80 = new String[] { "long" }; + _methodParameterTypes82 = new String[] { "long" }; } @Override @@ -4452,6 +4460,52 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService { return (java.util.List)ClpSerializer.translateOutput(returnObj); } + @Override + public java.util.Map getDettPraticaFieldsTypes() { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName75, + _methodParameterTypes75, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.Map)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.util.Map> getFields() { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName76, + _methodParameterTypes76, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.Map>)ClpSerializer.translateOutput(returnObj); + } + @Override public java.util.List getVersioni( long intPraticaId) @@ -4459,8 +4513,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName75, - _methodParameterTypes75, new Object[] { intPraticaId }); + returnObj = _invokableLocalService.invokeMethod(_methodName77, + _methodParameterTypes77, new Object[] { intPraticaId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -4488,8 +4542,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName76, - _methodParameterTypes76, new Object[] { intPraticaId }); + returnObj = _invokableLocalService.invokeMethod(_methodName78, + _methodParameterTypes78, new Object[] { intPraticaId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -4515,8 +4569,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName77, - _methodParameterTypes77, + returnObj = _invokableLocalService.invokeMethod(_methodName79, + _methodParameterTypes79, new Object[] { ClpSerializer.translateInput(field) }); } catch (Throwable t) { @@ -4540,8 +4594,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName78, - _methodParameterTypes78, + returnObj = _invokableLocalService.invokeMethod(_methodName80, + _methodParameterTypes80, new Object[] { ClpSerializer.translateInput(field), @@ -4569,8 +4623,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName79, - _methodParameterTypes79, new Object[] { intPraticaId }); + returnObj = _invokableLocalService.invokeMethod(_methodName81, + _methodParameterTypes81, new Object[] { intPraticaId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -4598,8 +4652,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName80, - _methodParameterTypes80, new Object[] { intPraticaId }); + returnObj = _invokableLocalService.invokeMethod(_methodName82, + _methodParameterTypes82, new Object[] { intPraticaId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -4781,4 +4835,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService { private String[] _methodParameterTypes79; private String _methodName80; private String[] _methodParameterTypes80; + private String _methodName81; + private String[] _methodParameterTypes81; + private String _methodName82; + private String[] _methodParameterTypes82; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceUtil.java index cb8a26d2..96532027 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceUtil.java @@ -1259,6 +1259,14 @@ public class DettPraticaLocalServiceUtil { return getService().getDettPraticaFields(); } + public static java.util.Map getDettPraticaFieldsTypes() { + return getService().getDettPraticaFieldsTypes(); + } + + public static java.util.Map> getFields() { + return getService().getFields(); + } + public static java.util.List getVersioni( long intPraticaId) throws com.liferay.portal.kernel.exception.SystemException { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceWrapper.java index 696d6b1a..8b152c33 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceWrapper.java @@ -1323,6 +1323,16 @@ public class DettPraticaLocalServiceWrapper implements DettPraticaLocalService, return _dettPraticaLocalService.getDettPraticaFields(); } + @Override + public java.util.Map getDettPraticaFieldsTypes() { + return _dettPraticaLocalService.getDettPraticaFieldsTypes(); + } + + @Override + public java.util.Map> getFields() { + return _dettPraticaLocalService.getFields(); + } + @Override public java.util.List getVersioni( long intPraticaId) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/DettPraticaLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/DettPraticaLocalServiceClpInvoker.java index 782fffe6..85ef644e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/DettPraticaLocalServiceClpInvoker.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/DettPraticaLocalServiceClpInvoker.java @@ -524,31 +524,39 @@ public class DettPraticaLocalServiceClpInvoker { _methodParameterTypes266 = new String[] { }; - _methodName267 = "getVersioni"; + _methodName267 = "getDettPraticaFieldsTypes"; - _methodParameterTypes267 = new String[] { "long" }; + _methodParameterTypes267 = new String[] { }; - _methodName268 = "callForChanges"; + _methodName268 = "getFields"; - _methodParameterTypes268 = new String[] { "long" }; + _methodParameterTypes268 = new String[] { }; - _methodName269 = "isNumber"; + _methodName269 = "getVersioni"; - _methodParameterTypes269 = new String[] { "java.lang.String" }; + _methodParameterTypes269 = new String[] { "long" }; - _methodName270 = "format"; + _methodName270 = "callForChanges"; - _methodParameterTypes270 = new String[] { + _methodParameterTypes270 = new String[] { "long" }; + + _methodName271 = "isNumber"; + + _methodParameterTypes271 = new String[] { "java.lang.String" }; + + _methodName272 = "format"; + + _methodParameterTypes272 = new String[] { "java.lang.String", "java.io.Serializable" }; - _methodName271 = "countVariateByIntPratica"; + _methodName273 = "countVariateByIntPratica"; - _methodParameterTypes271 = new String[] { "long" }; + _methodParameterTypes273 = new String[] { "long" }; - _methodName273 = "getFirstCompletedByIntPratica"; + _methodName275 = "getFirstCompletedByIntPratica"; - _methodParameterTypes273 = new String[] { "long" }; + _methodParameterTypes275 = new String[] { "long" }; } public Object invokeMethod(String name, String[] parameterTypes, @@ -1498,32 +1506,42 @@ public class DettPraticaLocalServiceClpInvoker { if (_methodName267.equals(name) && Arrays.deepEquals(_methodParameterTypes267, parameterTypes)) { - return DettPraticaLocalServiceUtil.getVersioni(((Long)arguments[0]).longValue()); + return DettPraticaLocalServiceUtil.getDettPraticaFieldsTypes(); } if (_methodName268.equals(name) && Arrays.deepEquals(_methodParameterTypes268, parameterTypes)) { - return DettPraticaLocalServiceUtil.callForChanges(((Long)arguments[0]).longValue()); + return DettPraticaLocalServiceUtil.getFields(); } if (_methodName269.equals(name) && Arrays.deepEquals(_methodParameterTypes269, parameterTypes)) { - return DettPraticaLocalServiceUtil.isNumber((java.lang.String)arguments[0]); + return DettPraticaLocalServiceUtil.getVersioni(((Long)arguments[0]).longValue()); } if (_methodName270.equals(name) && Arrays.deepEquals(_methodParameterTypes270, parameterTypes)) { - return DettPraticaLocalServiceUtil.format((java.lang.String)arguments[0], - (java.io.Serializable)arguments[1]); + return DettPraticaLocalServiceUtil.callForChanges(((Long)arguments[0]).longValue()); } if (_methodName271.equals(name) && Arrays.deepEquals(_methodParameterTypes271, parameterTypes)) { - return DettPraticaLocalServiceUtil.countVariateByIntPratica(((Long)arguments[0]).longValue()); + return DettPraticaLocalServiceUtil.isNumber((java.lang.String)arguments[0]); + } + + if (_methodName272.equals(name) && + Arrays.deepEquals(_methodParameterTypes272, parameterTypes)) { + return DettPraticaLocalServiceUtil.format((java.lang.String)arguments[0], + (java.io.Serializable)arguments[1]); } if (_methodName273.equals(name) && Arrays.deepEquals(_methodParameterTypes273, parameterTypes)) { + return DettPraticaLocalServiceUtil.countVariateByIntPratica(((Long)arguments[0]).longValue()); + } + + if (_methodName275.equals(name) && + Arrays.deepEquals(_methodParameterTypes275, parameterTypes)) { return DettPraticaLocalServiceUtil.getFirstCompletedByIntPratica(((Long)arguments[0]).longValue()); } @@ -1692,6 +1710,10 @@ public class DettPraticaLocalServiceClpInvoker { private String[] _methodParameterTypes270; private String _methodName271; private String[] _methodParameterTypes271; + private String _methodName272; + private String[] _methodParameterTypes272; private String _methodName273; private String[] _methodParameterTypes273; + private String _methodName275; + private String[] _methodParameterTypes275; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java index 1092e47d..2d09e71c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java @@ -44,7 +44,9 @@ import java.text.NumberFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import com.liferay.portal.kernel.dao.orm.Disjunction; @@ -226,14 +228,15 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl source.getNormDpr01Aut(), source.getNormDpr02Aut(), source.getNormDm2018(), source.getNormAnr(), source.getNormArt3com3(), source.getNormArt3com4(), source.getSuap(), source.getNormSismaBonus(), source.getClRischioPreInt(), source.getClRischioPostInt(), source.getIntervFinPub(), - source.getIntervFinPubDesc(), serviceContext, true, source.getPaesaggioLocale(), + source.getIntervFinPubDesc(), source.getIntervInAreaDiInteresse(), source.getIntervNonModificante(), + source.getIntervNonAssoggettabile(), serviceContext, true, source.getPaesaggioLocale(), source.getLivelloDiTutela(), source.getVincoli(), source.getDestinazioneAltroIntervento(), source.getTcCostruzioniEsistenti(), source.getTcManutOrdStraord(), source.getTcAltriInterventi(), source.getTcAltriInterventiDesc(), source.getNoCollaudo(), source.getTcNuovaCostruzionePertinenza(), source.getTcInterventoOpereEscavazione(), source.getTcViarch(), source.getTcOperaA25(), source.getSanatoriaEdilizia47(), source.getSanatoriaEdilizia724(), source.getSanatoriaEdilizia326(), - source.getNormLavoriNoDirettore(), source.getInterventoVoceP7(), source.getNominaCollaudatore(), - source.getNominaDirettoreLavori(), source.getNominaImpresa(), source.getTcNoOpereEscavazione()); + source.getNormLavoriNoDirettore(), source.getInterventoVoceP7(), source.getNominaImpresa(), + source.getNominaDirettoreLavori(), source.getNominaCollaudatore(), source.getTcNoOpereEscavazione()); copy = updateDettPraticaGeologo(copy.getUserId(), copy.getDettPraticaId(), copy.getIntPraticaId(), source.getGeoClasseIndagine(), source.getGeoCategoriaSottosuolo(), source.getGeoCategoriaTopografica(), @@ -1411,8 +1414,8 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl DettPratica dettPratica = updateEsito(dettPraticaId, stato); long intPraticaId = dettPratica.getIntPraticaId(); intPraticaLocalService.updateStatoPratica(intPraticaId, StatoPraticaConstants.SOTTOPOSTA_A_PARERE); - ControlloPratica controlloPratica = controlloPraticaLocalService.findByIntPraticaId_Status( - intPraticaId, WorkflowConstants.STATUS_PENDING).get(0); + ControlloPratica controlloPratica = controlloPraticaLocalService.findByIntPraticaId_Status(intPraticaId, + WorkflowConstants.STATUS_PENDING).get(0); controlloPraticaLocalService.addPraticheAlControllo(controlloPratica.getControlloPraticaId(), dettPraticaId); return dettPratica; } @@ -1825,10 +1828,63 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl @Override public List getDettPraticaFields() { - return dettPraticaFields; } + @Override + public Map getDettPraticaFieldsTypes() { + return dettPraticaFieldsTypes; + } + + @SuppressWarnings("serial") + private static final Map> fields = new LinkedHashMap>() { + { + put(LanguageUtil.get(Locale.ITALIAN, "sezione-01"), new ArrayList() { + { + add("lavoriPubblici"); + add("intervFinPub"); + add("intervFinPubDesc"); + add("intervInAreaDiInteresse"); + add("intervNonModificante"); + add("intervNonAssoggettabile"); + add("normEsenteBollo"); + add("normEsenteSpese"); + add("estremiPratCom"); + add("normLavoriInProprio"); + add("nominaImpresa"); + add("normLavoriNoDirettore"); + add("nominaDirettoreLavori"); + add("noCollaudo"); + add("collaudoStatico"); + add("nominaCollaudatore"); + } + }); + put(LanguageUtil.get(Locale.ITALIAN, "dp-dc"), new ArrayList() { + { + add("descLongIntervento"); + add("localita"); + add("via"); + } + }); + put(LanguageUtil.get(Locale.ITALIAN, "piano-paesaggistico"), new ArrayList() { + { + add("paesaggioLocale"); + add("livelloDiTutela"); + add("vincoli"); + } + }); + put(LanguageUtil.get(Locale.ITALIAN, "destinazione"), new ArrayList() { + { + } + }); + } + }; + + @Override + public Map> getFields() { + return fields; + } + @Override @SuppressWarnings("unchecked") public List getVersioni(long intPraticaId) throws SystemException { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties index b10eeed7..f84e3a52 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_bo - build.number=3185 - build.date=1624449055901 + build.number=3199 + build.date=1624524026677 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/lib/sicilia-sue-connector-portlet-service.jar b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/lib/sicilia-sue-connector-portlet-service.jar index a677f5b8709cd92cd4fb925c0d8aa2da0b481c84..61dd47b58501e1c9c493c06e8bffeaa9695b4c0f 100644 GIT binary patch delta 1026 zcmYk4T}TvB6vyvz$DNPeS$B5V)ks!1D*7Oowk(q@(I_LN#TEOqRckl2w4{Qfhx8#N zAChFyOA@8kLs*2eElLms2B!2QVqX{`p(IJs%()kA9_IY`-~ajFbMH*&fY3Q0 zsG$QEK_NsUgq}}!sOv0UM#*nmZIp8I-(xYj{$gO+Zu&m0GVQto8?bJNTl73*Et zhIJf@u&zugHfy{lWdaZig((I(R<8UJCz&!SClU07Z5qAZ_E%{Lv8>q?gmCt7D#D62 zISRtgKpZr4@)y@jH+}FCQd&XCM!hyWi_WPa(;nj$&)xjRhwjW!P(UcFa4FcfD|Bt$4c_$k6J zge?;6LAWBpUW8!@LI_?N$`Q`Ua0FpQhKOWd+-R^^rA;z;X^Fyvt|@RFO*0BqA(Ysl z0-@UmhY;p%JSb#`!>By6!!ZO|g)l<33Y7>$D)+b@yuHx@M{#M)0VfawX%Iu8X>iJf zE+^EZ(BS0bymmqj^J-9wplc9C_^t7ADqVc(nTs#^-8{I>4RvUqck^R~Jy4BG!o!m@ n)8Qm4SJS!qTRL1uCF+Gngm+#xAT7**OQ;NHKm)?sOgQ%s5`>JZ delta 1026 zcmYk4TSyd97{|}&uFhq5)}7sTHImhhiZ0~RmSvJ98fApEsMyWClp9)FLP60(`Vf*2 zNwVmWL}~dD7NKm55(I&P7kVi|MF~voh7l4!pbO_gHkUy%Jcp8@^BL40}YTEvUOG1GR>BqCTKq zsFRe7x;8G)sL{%}DFWnJXE>xMn93hvnk&=N1RxT#&BEJhA4vp+Q|IFV#c4zFfHfP^ zWx(D*lvHE#SGNkbeef|>P{P>ONL5;@wxE!tb?L8Y#`Z5hxKlzwE1wE8$?wyS)`!`cep9{cgpODEF0pU-lodGIOUI&-X%=MTJ{NPwqp z($6=FO-;q)40hHOc3Bx))<0=x#NXi4?zr@$FMCLhPR^wAX@1T1@aX$rB@VswT|B7p zM+b+`3w9BEEG>6)Zlp**qEDS)I8p$aH5kC~j3 mL}#JgNHWdelIR+gYA@9T-h26gT23-ug))##b%2d2bm<@6h@@r! diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Parameters.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Parameters.java index d0695d15..8408507d 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Parameters.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Parameters.java @@ -9,8 +9,10 @@ public class Parameters { public static final String CODE = "code"; public static final String DESCRIPTION = "description"; public static final String DOCUMENTS = "documents"; + public static final String FIELDS = "fields"; public static final String FIRST_NAME = "firstName"; public static final String LAST_NAME = "lastName"; + public static final String NAME = "name"; public static final String PASSWORD = "password"; public static final String STATUS_CODE = "statusCode"; public static final String STATUS_MESSAGE = "statusMessage"; diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Field.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Field.java new file mode 100644 index 00000000..f78b383c --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Field.java @@ -0,0 +1,29 @@ +package it.mwg.sicilia.sue.api.v1.bean; + +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; + +public class Field { + + private final String name; + private final String description; + private final Parameter.TYPES type; + + public Field(String name, String description, Parameter.TYPES type) { + + this.name = name; + this.description = description; + this.type = type; + } + + public String getName() { + return name; + } + + public String getDescription() { + return description; + } + + public Parameter.TYPES getType() { + return type; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/CommandList.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/CommandList.java index 39c778f1..0165f931 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/CommandList.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/CommandList.java @@ -4,11 +4,13 @@ import it.mwg.sicilia.sue.api.v1.command.impl.AddApplication; import it.mwg.sicilia.sue.api.v1.command.impl.Applications; import it.mwg.sicilia.sue.api.v1.command.impl.DeleteApplication; import it.mwg.sicilia.sue.api.v1.command.impl.Documents; +import it.mwg.sicilia.sue.api.v1.command.impl.Fields; import it.mwg.sicilia.sue.api.v1.command.impl.ListApplications; import it.mwg.sicilia.sue.api.v1.command.impl.Login; import it.mwg.sicilia.sue.api.v1.command.impl.Manual; import it.mwg.sicilia.sue.api.v1.command.impl.ManualHtml; import it.mwg.sicilia.sue.api.v1.command.impl.Nop; +import it.mwg.sicilia.sue.api.v1.command.impl.Uses; import java.util.Collection; import java.util.LinkedHashMap; @@ -20,20 +22,28 @@ public class CommandList { private static final Map commands = new LinkedHashMap<>(); static { + // Manuali addCommand(new Manual("Restituisce la documentazione dell'API generata automaticamente", HttpMethods.GET, HttpMethods.POST)); addCommand(new ManualHtml("Restituisce la documentazione dell'API generata automaticamente in versione HTML", HttpMethods.GET, HttpMethods.POST)); + // Login addCommand(new Login("Esegue l'accesso con nome email e password e restituisce un token di accesso")); - addCommand(new Applications("Riceve l'elenco delle istanze valide contenenti codice e descrizione", + // Elenchi + addCommand(new Applications("Elenco delle istanze valide contenenti codice e descrizione", HttpMethods.GET, + HttpMethods.POST)); + addCommand(new Documents("Elenco dei documenti riconosciuti dal portale con codice e descrizione", HttpMethods.GET, HttpMethods.POST)); + addCommand(new Fields("Elenco dei dati dell'istanza accettati dal portale", HttpMethods.GET, HttpMethods.POST)); + addCommand(new Uses("Elenco delle destinazioni d'uso riconosciute dal portale", HttpMethods.GET, + HttpMethods.POST)); + // Istanze addCommand(new AddApplication( "Crea una nuova istanza di endoprocedimento, crea l'utente se non esiste ancora sul portale")); addCommand(new ListApplications("Elenca le istanze in lavorazione da questo SUE", HttpMethods.GET, HttpMethods.POST)); addCommand(new DeleteApplication("Elimina un'istanza")); - addCommand(new Documents("Riceve l'elenco dei documenti riconosciuti dal portale con codice e descrizione", - HttpMethods.GET, HttpMethods.POST)); + addCommand(new Nop("NOP verifica la connettività senza eseguire operazioni", HttpMethods.GET, HttpMethods.POST)); } diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/AddApplication.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/AddApplication.java index a2012902..b042fe49 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/AddApplication.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/AddApplication.java @@ -5,6 +5,7 @@ import it.mwg.sicilia.sue.api.v1.Response; import it.mwg.sicilia.sue.api.v1.Status; import it.mwg.sicilia.sue.api.v1.command.Command; import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; import it.tref.liferay.portos.bo.model.Comune; import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.IntPratica; @@ -40,12 +41,12 @@ public class AddApplication extends Command { @SuppressWarnings("serial") private static final List INPUT_PARAMETERS = new ArrayList() { { - add(new Parameter(Parameters.VAT_ID, Parameter.TYPES.STRING, "Codice fiscale del titolare digitale")); - add(new Parameter(Parameters.FIRST_NAME, Parameter.TYPES.STRING, "Nome del titolare digitale", false)); - add(new Parameter(Parameters.LAST_NAME, Parameter.TYPES.STRING, "Cognome del titolare digitale", false)); - add(new Parameter(Parameters.TYPE, Parameter.TYPES.STRING, - "Codice del tipo di istanza, come restituito da /" + getCommandName(Applications.class))); - add(new Parameter(Parameters.SUE_ID, Parameter.TYPES.STRING, "Estremi pratica SUE/SUAP", false)); + add(new Parameter(Parameters.VAT_ID, TYPES.STRING, "Codice fiscale del titolare digitale")); + add(new Parameter(Parameters.FIRST_NAME, TYPES.STRING, "Nome del titolare digitale", false)); + add(new Parameter(Parameters.LAST_NAME, TYPES.STRING, "Cognome del titolare digitale", false)); + add(new Parameter(Parameters.TYPE, TYPES.STRING, "Codice del tipo di istanza, come restituito da /" + + getCommandName(Applications.class))); + add(new Parameter(Parameters.SUE_ID, TYPES.STRING, "Estremi pratica SUE/SUAP", false)); } }; @@ -53,9 +54,9 @@ public class AddApplication extends Command { private static final List OUTPUT_PARAMETERS = new ArrayList() { { addAll(BASE_OUTPUT_PARAMETERS); - add(new Parameter(Parameters.APPLICATION_ID, Parameter.TYPES.INTEGER, + add(new Parameter(Parameters.APPLICATION_ID, TYPES.INTEGER, "Identificatore del procedimento creato, da utilizzare nelle successive operazioni")); - add(new Parameter(Parameters.ADDITIONAL_INFO, Parameter.TYPES.STRING, + add(new Parameter(Parameters.ADDITIONAL_INFO, TYPES.STRING, "Eventuali informazioni aggiuntive sull'operazione o sugli errori incontrati")); } }; diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Applications.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Applications.java index 9fb10228..d4a7de12 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Applications.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Applications.java @@ -6,6 +6,7 @@ import it.mwg.sicilia.sue.api.v1.Status; import it.mwg.sicilia.sue.api.v1.bean.ApplicationType; import it.mwg.sicilia.sue.api.v1.command.Command; import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; import java.io.Serializable; @@ -26,9 +27,9 @@ public class Applications extends Command { private static final List OUTPUT_PARAMETERS = new ArrayList(); static { OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS); - Parameter p = new Parameter(Parameters.DOCUMENTS, Parameter.TYPES.ARRAY, "Elenco di istanze presentabili"); - p.addSubParameter(new Parameter(Parameters.CODE, Parameter.TYPES.STRING, "Codice dell'istanza")); - p.addSubParameter(new Parameter(Parameters.DESCRIPTION, Parameter.TYPES.STRING, "Descrizione dell'istanza")); + Parameter p = new Parameter(Parameters.DOCUMENTS, TYPES.ARRAY, "Elenco di istanze presentabili"); + p.addSubParameter(new Parameter(Parameters.TYPE, TYPES.STRING, "Codice del tipo di istanza")); + p.addSubParameter(new Parameter(Parameters.DESCRIPTION, TYPES.STRING, "Descrizione dell'istanza")); OUTPUT_PARAMETERS.add(p); }; diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/DeleteApplication.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/DeleteApplication.java index 02181684..7c2f71bd 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/DeleteApplication.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/DeleteApplication.java @@ -5,6 +5,7 @@ import it.mwg.sicilia.sue.api.v1.Response; import it.mwg.sicilia.sue.api.v1.Status; import it.mwg.sicilia.sue.api.v1.command.Command; import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; @@ -26,7 +27,16 @@ public class DeleteApplication extends Command { @SuppressWarnings("serial") private static final List INPUT_PARAMETERS = new ArrayList() { { - add(new Parameter(Parameters.APPLICATION_ID, Parameter.TYPES.INTEGER, "Id dell'istanza")); + add(new Parameter(Parameters.APPLICATION_ID, TYPES.INTEGER, "Id dell'istanza")); + } + }; + + @SuppressWarnings("serial") + private static final List OUTPUT_PARAMETERS = new ArrayList() { + { + addAll(BASE_OUTPUT_PARAMETERS); + add(new Parameter(Parameters.ADDITIONAL_INFO, TYPES.STRING, + "Eventuali informazioni aggiuntive sull'operazione o sugli errori incontrati")); } }; @@ -77,7 +87,7 @@ public class DeleteApplication extends Command { @Override public List getOutputParameters() { - return BASE_OUTPUT_PARAMETERS; + return OUTPUT_PARAMETERS; } } diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Documents.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Documents.java index 8e6bdbaa..072923e8 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Documents.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Documents.java @@ -6,6 +6,7 @@ import it.mwg.sicilia.sue.api.v1.Status; import it.mwg.sicilia.sue.api.v1.bean.Document; import it.mwg.sicilia.sue.api.v1.command.Command; import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; import it.tref.liferay.portos.bo.util.DocumentiPraticaUtil; import java.io.Serializable; @@ -26,9 +27,9 @@ public class Documents extends Command { private static final List OUTPUT_PARAMETERS = new ArrayList(); static { OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS); - Parameter p = new Parameter(Parameters.DOCUMENTS, Parameter.TYPES.ARRAY, "Elenco di documenti"); - p.addSubParameter(new Parameter(Parameters.CODE, Parameter.TYPES.STRING, "Codice del documento")); - p.addSubParameter(new Parameter(Parameters.DESCRIPTION, Parameter.TYPES.STRING, "Descrizione del documento")); + Parameter p = new Parameter(Parameters.DOCUMENTS, TYPES.ARRAY, "Elenco di documenti"); + p.addSubParameter(new Parameter(Parameters.CODE, TYPES.STRING, "Codice del documento")); + p.addSubParameter(new Parameter(Parameters.DESCRIPTION, TYPES.STRING, "Descrizione del documento")); OUTPUT_PARAMETERS.add(p); }; diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Fields.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Fields.java new file mode 100644 index 00000000..3baa8ca1 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Fields.java @@ -0,0 +1,97 @@ +package it.mwg.sicilia.sue.api.v1.command.impl; + +import it.mwg.sicilia.sue.api.v1.Parameters; +import it.mwg.sicilia.sue.api.v1.Response; +import it.mwg.sicilia.sue.api.v1.Status; +import it.mwg.sicilia.sue.api.v1.bean.Field; +import it.mwg.sicilia.sue.api.v1.command.Command; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; +import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; + +import java.io.Serializable; +import java.sql.Types; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.liferay.portal.kernel.language.LanguageUtil; +import com.liferay.portal.kernel.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.util.StringPool; + +public class Fields extends Command { + + private static final List OUTPUT_PARAMETERS = new ArrayList(); + static { + OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS); + Parameter p = new Parameter(Parameters.FIELDS, TYPES.ARRAY, "Elenco di dati accettati"); + p.addSubParameter(new Parameter(Parameters.NAME, TYPES.STRING, "Nome del parametro")); + p.addSubParameter(new Parameter(Parameters.DESCRIPTION, TYPES.STRING, "Descrizione del parametro")); + p.addSubParameter(new Parameter(Parameters.TYPE, TYPES.STRING, "Tipo del parametro (" + TYPES.STRING + ", " + + TYPES.INTEGER + ", ecc.)")); + OUTPUT_PARAMETERS.add(p); + }; + + public Fields(String description, String... methods) { + super(description, methods); + } + + @Override + public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { + + if (verifyAccessToken(request, response)) { + List fields = new ArrayList<>(); + Map fieldTypes = DettPraticaLocalServiceUtil.getDettPraticaFieldsTypes(); + Map> dpFields = DettPraticaLocalServiceUtil.getFields(); + for (String section : dpFields.keySet()) { + List sFields = dpFields.get(section); + for (String field : sFields) { + String description = StringPool.OPEN_BRACKET + + section + + "] " + + LanguageUtil.get(Locale.ITALIAN, field.replaceAll("([A-Z])", "-$1").toLowerCase()) + .replace("
", StringPool.SPACE); + TYPES type = TYPES.UNKNOWN; + switch (fieldTypes.get(field)) { + case Types.BIGINT: + case Types.INTEGER: + type = TYPES.INTEGER; + break; + case Types.BOOLEAN: + type = TYPES.BOOLEAN; + break; + case Types.DOUBLE: + type = TYPES.FLOAT; + break; + case Types.TIMESTAMP: + type = TYPES.FLOAT; + break; + case Types.VARCHAR: + type = TYPES.STRING; + break; + } + fields.add(new Field(field, description, type)); + } + } + Map result = new HashMap<>(); + result.put(Parameters.FIELDS, (Serializable) fields); + ServletResponseUtil.write(response, Response.get(Status.OK, result)); + } + } + + @Override + public List getInputParameters() { + return EMPTY_PARAMETERS; + } + + @Override + public List getOutputParameters() { + return OUTPUT_PARAMETERS; + } + +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListApplications.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListApplications.java index 4b13309c..0d10f70c 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListApplications.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListApplications.java @@ -6,6 +6,7 @@ import it.mwg.sicilia.sue.api.v1.Status; import it.mwg.sicilia.sue.api.v1.bean.Application; import it.mwg.sicilia.sue.api.v1.command.Command; import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; @@ -28,12 +29,10 @@ public class ListApplications extends Command { private static final List OUTPUT_PARAMETERS = new ArrayList(); static { OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS); - Parameter p = new Parameter(Parameters.APPLICATIONS, Parameter.TYPES.ARRAY, "Elenco di istanze presentate"); - p.addSubParameter(new Parameter(Parameters.APPLICATION_ID, Parameter.TYPES.INTEGER, - "Identificatore dell'istanza")); - p.addSubParameter(new Parameter(Parameters.TYPE, Parameter.TYPES.STRING, "Tipo dell'istanza")); - p.addSubParameter(new Parameter(Parameters.VAT_ID, Parameter.TYPES.STRING, - "Codice fiscale del titolare digitale")); + Parameter p = new Parameter(Parameters.APPLICATIONS, TYPES.ARRAY, "Elenco di istanze presentate"); + p.addSubParameter(new Parameter(Parameters.APPLICATION_ID, TYPES.INTEGER, "Identificatore dell'istanza")); + p.addSubParameter(new Parameter(Parameters.TYPE, TYPES.STRING, "Tipo dell'istanza")); + p.addSubParameter(new Parameter(Parameters.VAT_ID, TYPES.STRING, "Codice fiscale del titolare digitale")); OUTPUT_PARAMETERS.add(p); }; diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Login.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Login.java index a7e1f22d..24aa8f73 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Login.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Login.java @@ -7,6 +7,7 @@ import it.mwg.sicilia.sue.api.v1.Response; import it.mwg.sicilia.sue.api.v1.Status; import it.mwg.sicilia.sue.api.v1.command.Command; import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; import it.mwg.sicilia.sue.model.Sportello; import it.mwg.sicilia.sue.service.SportelloLocalServiceUtil; @@ -28,15 +29,15 @@ public class Login extends Command { @SuppressWarnings("serial") private static final List INPUT_PARAMETERS = new ArrayList() { { - add(new Parameter(Parameters.USERNAME, Parameter.TYPES.STRING, "Nome utente")); - add(new Parameter(Parameters.PASSWORD, Parameter.TYPES.STRING, "Password")); + add(new Parameter(Parameters.USERNAME, TYPES.STRING, "Nome utente")); + add(new Parameter(Parameters.PASSWORD, TYPES.STRING, "Password")); } }; @SuppressWarnings("serial") private static final List OUTPUT_PARAMETERS = new ArrayList() { { addAll(BASE_OUTPUT_PARAMETERS); - add(new Parameter(Parameters.TOKEN, Parameter.TYPES.STRING, "Token di autorizzazione")); + add(new Parameter(Parameters.TOKEN, TYPES.STRING, "Token di autorizzazione")); } }; diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Manual.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Manual.java index 0c057ce7..0bf10741 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Manual.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Manual.java @@ -4,6 +4,7 @@ import it.mwg.sicilia.sue.api.v1.Parameters; import it.mwg.sicilia.sue.api.v1.command.Command; import it.mwg.sicilia.sue.api.v1.command.CommandList; import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; import java.io.Serializable; import java.util.ArrayList; @@ -29,7 +30,7 @@ public class Manual extends Command { @SuppressWarnings("serial") private static final List OUTPUT_PARAMETERS = new ArrayList() { { - add(new Parameter(StringPool.BLANK, Parameter.TYPES.TEXT_PLAIN, "Il testo del manuale (questa pagina)")); + add(new Parameter(StringPool.BLANK, TYPES.TEXT_PLAIN, "Il testo del manuale (questa pagina)")); } }; @@ -78,7 +79,7 @@ public class Manual extends Command { result.append(StringPool.TAB).append(parameter.getName()).append(" (") .append(parameter.getType().toString()).append(") - ").append(parameter.getDescription()) .append(StringPool.NEW_LINE); - if (parameter.getType().equals(Parameter.TYPES.ARRAY)) { + if (parameter.getType().equals(TYPES.ARRAY)) { for (Parameter subParameter : parameter.getSubParameters()) { result.append(StringPool.TAB).append(StringPool.TAB).append(subParameter.getName()) .append(" (").append(subParameter.getType().toString()).append(") - ") @@ -112,13 +113,13 @@ public class Manual extends Command { sb.append("--request POST \\\n\t\t"); Map data = new LinkedHashMap<>(); for (Parameter parameter : command.getInputParameters()) { - if (parameter.getType().equals(Parameter.TYPES.STRING)) { + if (parameter.getType().equals(TYPES.STRING)) { String value = parameter.getName().substring(0, 1).toUpperCase() + parameter.getName().substring(1); value = value.replaceAll("([A-Z])", " $1").substring(1); data.put(parameter.getName(), value); - } else if (parameter.getType().equals(Parameter.TYPES.INTEGER)) { + } else if (parameter.getType().equals(TYPES.INTEGER)) { data.put(parameter.getName(), 123456); - } else if (parameter.getType().equals(Parameter.TYPES.BOOLEAN)) { + } else if (parameter.getType().equals(TYPES.BOOLEAN)) { data.put(parameter.getName(), true); } } diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ManualHtml.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ManualHtml.java index 1fef85ca..b067b54e 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ManualHtml.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ManualHtml.java @@ -4,6 +4,7 @@ import it.mwg.sicilia.sue.api.v1.Parameters; import it.mwg.sicilia.sue.api.v1.command.Command; import it.mwg.sicilia.sue.api.v1.command.CommandList; import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; import java.io.File; import java.util.ArrayList; @@ -22,7 +23,7 @@ public class ManualHtml extends Manual { @SuppressWarnings("serial") private static final List OUTPUT_PARAMETERS = new ArrayList() { { - add(new Parameter(StringPool.BLANK, Parameter.TYPES.TEXT_HTML, "Il testo del manuale (questa pagina)")); + add(new Parameter(StringPool.BLANK, TYPES.TEXT_HTML, "Il testo del manuale (questa pagina)")); } }; @@ -70,7 +71,7 @@ public class ManualHtml extends Manual { for (Parameter parameter : parameters) { result.append("
").append(parameter.getName()).append(" (") .append(parameter.getType().toString()).append(") - ").append(parameter.getDescription()); - if (parameter.getType().equals(Parameter.TYPES.ARRAY)) { + if (parameter.getType().equals(TYPES.ARRAY)) { for (Parameter subParameter : parameter.getSubParameters()) { result.append("
").append(subParameter.getName()).append(" (") .append(subParameter.getType().toString()).append(") - ") diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Uses.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Uses.java new file mode 100644 index 00000000..2da0a8f8 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Uses.java @@ -0,0 +1,31 @@ +package it.mwg.sicilia.sue.api.v1.command.impl; + +import it.mwg.sicilia.sue.api.v1.command.Command; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class Uses extends Command { + + public Uses(String description, String... methods) { + super(description, methods); + } + + @Override + public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { + } + + @Override + public List getInputParameters() { + return EMPTY_PARAMETERS; + } + + @Override + public List getOutputParameters() { + return BASE_OUTPUT_PARAMETERS; + } + +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/parameter/Parameter.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/parameter/Parameter.java index 07ab89cf..e478649e 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/parameter/Parameter.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/parameter/Parameter.java @@ -56,6 +56,6 @@ public class Parameter { } public static enum TYPES { - ARRAY, BOOLEAN, INTEGER, STRING, TEXT_HTML, TEXT_PLAIN + ARRAY, BOOLEAN, FLOAT, INTEGER, STRING, TIMESTAMP, TEXT_HTML, TEXT_PLAIN, UNKNOWN } } diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/service.properties index 504a75f0..8bd746a5 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=sicilia_sue - build.number=62 - build.date=1624370773646 + build.number=63 + build.date=1624450843603 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties index 24c3efb0..48f307d4 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=Kaleo - build.number=49 - build.date=1624443212030 + build.number=50 + build.date=1624450810353 build.auto.upgrade=true ##