Sfoglia il codice sorgente

Elenco destinazioni d'uso

master
Salvatore La Manna 3 anni fa
parent
commit
269745cee1
  1. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalService.java
  2. 98
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceClp.java
  3. 8
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceUtil.java
  4. 10
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceWrapper.java
  5. 153
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/DomandaUtil.java
  6. 62
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/DettPraticaLocalServiceClpInvoker.java
  7. 166
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java
  8. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  9. 1
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Parameters.java
  10. 10
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Application.java
  11. 4
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/ListElement.java
  12. 23
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/CommandList.java
  13. 6
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/AddApplication.java
  14. 73
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/GetApplications.java
  15. 37
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListApplications.java
  16. 19
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListDocuments.java
  17. 14
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListFields.java
  18. 32
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListUses.java
  19. 3
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Manual.java
  20. 48
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/SetUse.java
  21. 31
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Uses.java

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

@ -937,9 +937,6 @@ public interface DettPraticaLocalService extends BaseLocalService,
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true) @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.util.Map<java.lang.String, java.lang.Integer> getDettPraticaFieldsTypes(); public java.util.Map<java.lang.String, java.lang.Integer> getDettPraticaFieldsTypes();
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.util.Map<java.lang.String, java.util.List<java.lang.String>> getFields();
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true) @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.util.List<it.tref.liferay.portos.bo.model.DettPratica> getVersioni( public java.util.List<it.tref.liferay.portos.bo.model.DettPratica> getVersioni(
long intPraticaId) long intPraticaId)
@ -962,4 +959,7 @@ public interface DettPraticaLocalService extends BaseLocalService,
public it.tref.liferay.portos.bo.model.DettPratica getFirstCompletedByIntPratica( public it.tref.liferay.portos.bo.model.DettPratica getFirstCompletedByIntPratica(
long intPraticaId) long intPraticaId)
throws com.liferay.portal.kernel.exception.SystemException; throws com.liferay.portal.kernel.exception.SystemException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.util.Map<java.lang.String, java.lang.String> getDestinazioniuso();
} }

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

@ -519,35 +519,35 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
_methodParameterTypes75 = new String[] { }; _methodParameterTypes75 = new String[] { };
_methodName76 = "getFields"; _methodName76 = "getVersioni";
_methodParameterTypes76 = new String[] { }; _methodParameterTypes76 = new String[] { "long" };
_methodName77 = "getVersioni"; _methodName77 = "callForChanges";
_methodParameterTypes77 = new String[] { "long" }; _methodParameterTypes77 = new String[] { "long" };
_methodName78 = "callForChanges"; _methodName78 = "isNumber";
_methodParameterTypes78 = new String[] { "long" }; _methodParameterTypes78 = new String[] { "java.lang.String" };
_methodName79 = "isNumber"; _methodName79 = "format";
_methodParameterTypes79 = new String[] { "java.lang.String" }; _methodParameterTypes79 = new String[] {
_methodName80 = "format";
_methodParameterTypes80 = new String[] {
"java.lang.String", "java.io.Serializable" "java.lang.String", "java.io.Serializable"
}; };
_methodName81 = "countVariateByIntPratica"; _methodName80 = "countVariateByIntPratica";
_methodParameterTypes80 = new String[] { "long" };
_methodName81 = "getFirstCompletedByIntPratica";
_methodParameterTypes81 = new String[] { "long" }; _methodParameterTypes81 = new String[] { "long" };
_methodName82 = "getFirstCompletedByIntPratica"; _methodName82 = "getDestinazioniuso";
_methodParameterTypes82 = new String[] { "long" }; _methodParameterTypes82 = new String[] { };
} }
@Override @Override
@ -4483,29 +4483,6 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
return (java.util.Map<java.lang.String, java.lang.Integer>)ClpSerializer.translateOutput(returnObj); return (java.util.Map<java.lang.String, java.lang.Integer>)ClpSerializer.translateOutput(returnObj);
} }
@Override
public java.util.Map<java.lang.String, java.util.List<java.lang.String>> 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<java.lang.String, java.util.List<java.lang.String>>)ClpSerializer.translateOutput(returnObj);
}
@Override @Override
public java.util.List<it.tref.liferay.portos.bo.model.DettPratica> getVersioni( public java.util.List<it.tref.liferay.portos.bo.model.DettPratica> getVersioni(
long intPraticaId) long intPraticaId)
@ -4513,8 +4490,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName77, returnObj = _invokableLocalService.invokeMethod(_methodName76,
_methodParameterTypes77, new Object[] { intPraticaId }); _methodParameterTypes76, new Object[] { intPraticaId });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
@ -4542,8 +4519,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName78, returnObj = _invokableLocalService.invokeMethod(_methodName77,
_methodParameterTypes78, new Object[] { intPraticaId }); _methodParameterTypes77, new Object[] { intPraticaId });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
@ -4569,8 +4546,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName79, returnObj = _invokableLocalService.invokeMethod(_methodName78,
_methodParameterTypes79, _methodParameterTypes78,
new Object[] { ClpSerializer.translateInput(field) }); new Object[] { ClpSerializer.translateInput(field) });
} }
catch (Throwable t) { catch (Throwable t) {
@ -4594,8 +4571,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName80, returnObj = _invokableLocalService.invokeMethod(_methodName79,
_methodParameterTypes80, _methodParameterTypes79,
new Object[] { new Object[] {
ClpSerializer.translateInput(field), ClpSerializer.translateInput(field),
@ -4623,8 +4600,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName81, returnObj = _invokableLocalService.invokeMethod(_methodName80,
_methodParameterTypes81, new Object[] { intPraticaId }); _methodParameterTypes80, new Object[] { intPraticaId });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
@ -4652,8 +4629,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName82, returnObj = _invokableLocalService.invokeMethod(_methodName81,
_methodParameterTypes82, new Object[] { intPraticaId }); _methodParameterTypes81, new Object[] { intPraticaId });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
@ -4674,6 +4651,29 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
return (it.tref.liferay.portos.bo.model.DettPratica)ClpSerializer.translateOutput(returnObj); return (it.tref.liferay.portos.bo.model.DettPratica)ClpSerializer.translateOutput(returnObj);
} }
@Override
public java.util.Map<java.lang.String, java.lang.String> getDestinazioniuso() {
Object returnObj = null;
try {
returnObj = _invokableLocalService.invokeMethod(_methodName82,
_methodParameterTypes82, 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<java.lang.String, java.lang.String>)ClpSerializer.translateOutput(returnObj);
}
private InvokableLocalService _invokableLocalService; private InvokableLocalService _invokableLocalService;
private String _methodName0; private String _methodName0;
private String[] _methodParameterTypes0; private String[] _methodParameterTypes0;

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

@ -1263,10 +1263,6 @@ public class DettPraticaLocalServiceUtil {
return getService().getDettPraticaFieldsTypes(); return getService().getDettPraticaFieldsTypes();
} }
public static java.util.Map<java.lang.String, java.util.List<java.lang.String>> getFields() {
return getService().getFields();
}
public static java.util.List<it.tref.liferay.portos.bo.model.DettPratica> getVersioni( public static java.util.List<it.tref.liferay.portos.bo.model.DettPratica> getVersioni(
long intPraticaId) long intPraticaId)
throws com.liferay.portal.kernel.exception.SystemException { throws com.liferay.portal.kernel.exception.SystemException {
@ -1299,6 +1295,10 @@ public class DettPraticaLocalServiceUtil {
return getService().getFirstCompletedByIntPratica(intPraticaId); return getService().getFirstCompletedByIntPratica(intPraticaId);
} }
public static java.util.Map<java.lang.String, java.lang.String> getDestinazioniuso() {
return getService().getDestinazioniuso();
}
public static void clearService() { public static void clearService() {
_service = null; _service = null;
} }

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

@ -1328,11 +1328,6 @@ public class DettPraticaLocalServiceWrapper implements DettPraticaLocalService,
return _dettPraticaLocalService.getDettPraticaFieldsTypes(); return _dettPraticaLocalService.getDettPraticaFieldsTypes();
} }
@Override
public java.util.Map<java.lang.String, java.util.List<java.lang.String>> getFields() {
return _dettPraticaLocalService.getFields();
}
@Override @Override
public java.util.List<it.tref.liferay.portos.bo.model.DettPratica> getVersioni( public java.util.List<it.tref.liferay.portos.bo.model.DettPratica> getVersioni(
long intPraticaId) long intPraticaId)
@ -1371,6 +1366,11 @@ public class DettPraticaLocalServiceWrapper implements DettPraticaLocalService,
return _dettPraticaLocalService.getFirstCompletedByIntPratica(intPraticaId); return _dettPraticaLocalService.getFirstCompletedByIntPratica(intPraticaId);
} }
@Override
public java.util.Map<java.lang.String, java.lang.String> getDestinazioniuso() {
return _dettPraticaLocalService.getDestinazioniuso();
}
/** /**
* @deprecated As of 6.1.0, replaced by {@link #getWrappedService} * @deprecated As of 6.1.0, replaced by {@link #getWrappedService}
*/ */

153
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/DomandaUtil.java

@ -0,0 +1,153 @@
package it.mwg.sismica.bo.util;
import it.tref.liferay.portos.bo.model.impl.DettPraticaImpl;
import java.util.ArrayList;
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.language.LanguageUtil;
import com.liferay.portal.kernel.util.StringPool;
public class DomandaUtil {
private static final Map<String, String> DESTINAZIONI_USO;
private static final List<String> DETT_PRATICA_FIELDS;
private static final Map<String, Integer> DETT_PRATICA_FIELDS_TYPES;
public static Map<String, String> getDestinazioniuso() {
return DESTINAZIONI_USO;
}
public static List<String> getDettPraticaFields() {
return DETT_PRATICA_FIELDS;
}
public static Map<String, Integer> getDettPraticaFieldsTypes() {
return DETT_PRATICA_FIELDS_TYPES;
}
static {
DESTINAZIONI_USO = new LinkedHashMap<String, String>();
for (char c = '1'; c <= '9'; c++) {
addDestinazioneUso(String.valueOf(c));
}
for (char c1 = 'A'; c1 <= 'C'; c1++) {
for (char c2 = '1'; c2 <= '9'; c2++) {
for (char c3 = 'A'; c3 <= 'N'; c3++) {
addDestinazioneUso(String.valueOf(c1) + String.valueOf(c2) + String.valueOf(c3));
}
}
}
@SuppressWarnings("serial")
List<String> hiddenFields = new ArrayList<String>() {
{
add("causalePagamentoBolli");
add("causalePagamentoOneri");
add("codicePagamentoBolli");
add("codicePagamentoOneri");
add("companyId");
add("completa");
add("createDate");
add("dataEffettuazione");
add("dettPraticaId");
add("dtInvioSignal");
add("dtProtocollo");
add("geoDtRelazione");
add("gestita");
add("groupId");
add("importoBolli");
add("importoSpeseIstruttoria");
add("integrazione");
add("intPraticaId");
add("mezzoPagamentoBolli");
add("mezzoPagamentoOneri");
add("modifiedDate");
add("pagAdeguamentoSismico");
add("pagAltriCasiCulturali");
add("pagAltriCasiPaesaggistici");
add("pagAltro");
add("pagamentoIdBolli");
add("pagamentoIdOneri");
add("pagCalcolatoAdeguamentoSismico");
add("pagCalcolatoMiglioramentoSismico");
add("pagCalcolatoOperaNonQuantificabile");
add("pagCalcolatoRiparazioneInterventoLocale");
add("pagCondotte");
add("pagConsultazioniArchivio");
add("pagEffettivoAdeguamentoSismico");
add("pagEffettivoMiglioramentoSismico");
add("pagEffettivoOperaNonQuantificabile");
add("pagEffettivoRiparazioneInterventoLocale");
add("pagGrandiStrutture");
add("pagImmobiliPreesistenti");
add("pagImpiantiEolici");
add("pagInterventiRestauroManufatti");
add("pagLottizzazioni");
add("pagManifestiPubblicitari");
add("pagMiglioramentoSismico");
add("pagMiglioramentoSismicoSicilia");
add("pagNoteUtente");
add("pagNuovaCostruzione");
add("pagNuoveRealizzazioni");
add("pagOperaNonQuantificabile");
add("pagPalificazioni");
add("pagPareriDiMassima");
add("pagRilascioAttestazioni");
add("pagRiparazioneInterventoLocale");
add("pagSoggettiAdAutorizzazione");
add("pagVarianti");
add("pagVariantiPareriResi");
add("protocollo");
add("soggettoSostituitoId");
add("status");
add("statusByUserId");
add("statusByUserName");
add("statusDate");
add("statusTask");
add("tipoIntegrazione");
add("uuid_");
add("userId");
add("userName");
add("varianteNumero");
add("version");
}
};
DETT_PRATICA_FIELDS = new ArrayList<>();
DETT_PRATICA_FIELDS_TYPES = new HashMap<>();
for (int i = 0; i < DettPraticaImpl.TABLE_COLUMNS.length; i++) {
String field = (String) DettPraticaImpl.TABLE_COLUMNS[i][0];
if (!hiddenFields.contains(field)) {
DETT_PRATICA_FIELDS.add(field);
}
DETT_PRATICA_FIELDS_TYPES.put(field, (int) DettPraticaImpl.TABLE_COLUMNS[i][1]);
}
};
private static void addDestinazioneUso(String destinazioneUso) {
String key = "destinazione-" + destinazioneUso;
String value = LanguageUtil.get(Locale.ITALIAN, key);
if (!key.equals(value)) {
String base = StringPool.BLANK;
if (destinazioneUso.length() > 1) {
base = LanguageUtil.get(Locale.ITALIAN, "destinazione-" + destinazioneUso.substring(0, 1)).replaceAll(
"^[AB]\\)\\s*", StringPool.BLANK)
+ StringPool.SLASH;
}
if (destinazioneUso.length() > 2) {
base += LanguageUtil.get(Locale.ITALIAN, "destinazione-" + destinazioneUso.substring(0, 2)).replaceAll(
"^[0-9]\\.\\s*", StringPool.BLANK)
+ StringPool.SLASH;
}
DESTINAZIONI_USO
.put(destinazioneUso,
base
+ value.replaceAll("^[a-z]\\)\\s*", StringPool.BLANK).replace("&gt;",
StringPool.GREATER_THAN));
}
}
}

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

@ -528,35 +528,35 @@ public class DettPraticaLocalServiceClpInvoker {
_methodParameterTypes267 = new String[] { }; _methodParameterTypes267 = new String[] { };
_methodName268 = "getFields"; _methodName268 = "getVersioni";
_methodParameterTypes268 = new String[] { }; _methodParameterTypes268 = new String[] { "long" };
_methodName269 = "getVersioni"; _methodName269 = "callForChanges";
_methodParameterTypes269 = new String[] { "long" }; _methodParameterTypes269 = new String[] { "long" };
_methodName270 = "callForChanges"; _methodName270 = "isNumber";
_methodParameterTypes270 = new String[] { "long" }; _methodParameterTypes270 = new String[] { "java.lang.String" };
_methodName271 = "isNumber"; _methodName271 = "format";
_methodParameterTypes271 = new String[] { "java.lang.String" }; _methodParameterTypes271 = new String[] {
_methodName272 = "format";
_methodParameterTypes272 = new String[] {
"java.lang.String", "java.io.Serializable" "java.lang.String", "java.io.Serializable"
}; };
_methodName273 = "countVariateByIntPratica"; _methodName272 = "countVariateByIntPratica";
_methodParameterTypes272 = new String[] { "long" };
_methodParameterTypes273 = new String[] { "long" }; _methodName274 = "getFirstCompletedByIntPratica";
_methodName275 = "getFirstCompletedByIntPratica"; _methodParameterTypes274 = new String[] { "long" };
_methodParameterTypes275 = new String[] { "long" }; _methodName276 = "getDestinazioniuso";
_methodParameterTypes276 = new String[] { };
} }
public Object invokeMethod(String name, String[] parameterTypes, public Object invokeMethod(String name, String[] parameterTypes,
@ -1511,40 +1511,40 @@ public class DettPraticaLocalServiceClpInvoker {
if (_methodName268.equals(name) && if (_methodName268.equals(name) &&
Arrays.deepEquals(_methodParameterTypes268, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes268, parameterTypes)) {
return DettPraticaLocalServiceUtil.getFields(); return DettPraticaLocalServiceUtil.getVersioni(((Long)arguments[0]).longValue());
} }
if (_methodName269.equals(name) && if (_methodName269.equals(name) &&
Arrays.deepEquals(_methodParameterTypes269, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes269, parameterTypes)) {
return DettPraticaLocalServiceUtil.getVersioni(((Long)arguments[0]).longValue()); return DettPraticaLocalServiceUtil.callForChanges(((Long)arguments[0]).longValue());
} }
if (_methodName270.equals(name) && if (_methodName270.equals(name) &&
Arrays.deepEquals(_methodParameterTypes270, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes270, parameterTypes)) {
return DettPraticaLocalServiceUtil.callForChanges(((Long)arguments[0]).longValue()); return DettPraticaLocalServiceUtil.isNumber((java.lang.String)arguments[0]);
} }
if (_methodName271.equals(name) && if (_methodName271.equals(name) &&
Arrays.deepEquals(_methodParameterTypes271, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes271, parameterTypes)) {
return DettPraticaLocalServiceUtil.isNumber((java.lang.String)arguments[0]);
}
if (_methodName272.equals(name) &&
Arrays.deepEquals(_methodParameterTypes272, parameterTypes)) {
return DettPraticaLocalServiceUtil.format((java.lang.String)arguments[0], return DettPraticaLocalServiceUtil.format((java.lang.String)arguments[0],
(java.io.Serializable)arguments[1]); (java.io.Serializable)arguments[1]);
} }
if (_methodName273.equals(name) && if (_methodName272.equals(name) &&
Arrays.deepEquals(_methodParameterTypes273, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes272, parameterTypes)) {
return DettPraticaLocalServiceUtil.countVariateByIntPratica(((Long)arguments[0]).longValue()); return DettPraticaLocalServiceUtil.countVariateByIntPratica(((Long)arguments[0]).longValue());
} }
if (_methodName275.equals(name) && if (_methodName274.equals(name) &&
Arrays.deepEquals(_methodParameterTypes275, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes274, parameterTypes)) {
return DettPraticaLocalServiceUtil.getFirstCompletedByIntPratica(((Long)arguments[0]).longValue()); return DettPraticaLocalServiceUtil.getFirstCompletedByIntPratica(((Long)arguments[0]).longValue());
} }
if (_methodName276.equals(name) &&
Arrays.deepEquals(_methodParameterTypes276, parameterTypes)) {
return DettPraticaLocalServiceUtil.getDestinazioniuso();
}
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@ -1712,8 +1712,8 @@ public class DettPraticaLocalServiceClpInvoker {
private String[] _methodParameterTypes271; private String[] _methodParameterTypes271;
private String _methodName272; private String _methodName272;
private String[] _methodParameterTypes272; private String[] _methodParameterTypes272;
private String _methodName273; private String _methodName274;
private String[] _methodParameterTypes273; private String[] _methodParameterTypes274;
private String _methodName275; private String _methodName276;
private String[] _methodParameterTypes275; private String[] _methodParameterTypes276;
} }

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

@ -12,6 +12,7 @@
package it.tref.liferay.portos.bo.service.impl; package it.tref.liferay.portos.bo.service.impl;
import it.mwg.sismica.bo.util.DomandaUtil;
import it.tref.liferay.portos.bo.NoSuchDettPraticaException; import it.tref.liferay.portos.bo.NoSuchDettPraticaException;
import it.tref.liferay.portos.bo.model.Asseverazione; import it.tref.liferay.portos.bo.model.Asseverazione;
import it.tref.liferay.portos.bo.model.ControlloPratica; import it.tref.liferay.portos.bo.model.ControlloPratica;
@ -22,7 +23,6 @@ import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.model.Soggetto; import it.tref.liferay.portos.bo.model.Soggetto;
import it.tref.liferay.portos.bo.model.Tempistica; import it.tref.liferay.portos.bo.model.Tempistica;
import it.tref.liferay.portos.bo.model.impl.DettPraticaImpl;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.base.DettPraticaLocalServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.DettPraticaLocalServiceBaseImpl;
import it.tref.liferay.portos.bo.shared.util.PagamentoConstants; import it.tref.liferay.portos.bo.shared.util.PagamentoConstants;
@ -44,9 +44,7 @@ import java.text.NumberFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import com.liferay.portal.kernel.dao.orm.Disjunction; import com.liferay.portal.kernel.dao.orm.Disjunction;
@ -1738,153 +1736,6 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
return dettPratica; return dettPratica;
} }
private static final List<String> dettPraticaFields;
private static final Map<String, Integer> dettPraticaFieldsTypes;
static {
@SuppressWarnings("serial")
List<String> hiddenFields = new ArrayList<String>() {
{
add("causalePagamentoBolli");
add("causalePagamentoOneri");
add("codicePagamentoBolli");
add("codicePagamentoOneri");
add("companyId");
add("completa");
add("createDate");
add("dataEffettuazione");
add("dettPraticaId");
add("dtInvioSignal");
add("dtProtocollo");
add("geoDtRelazione");
add("gestita");
add("groupId");
add("importoBolli");
add("importoSpeseIstruttoria");
add("integrazione");
add("intPraticaId");
add("mezzoPagamentoBolli");
add("mezzoPagamentoOneri");
add("modifiedDate");
add("pagAdeguamentoSismico");
add("pagAltriCasiCulturali");
add("pagAltriCasiPaesaggistici");
add("pagAltro");
add("pagamentoIdBolli");
add("pagamentoIdOneri");
add("pagCalcolatoAdeguamentoSismico");
add("pagCalcolatoMiglioramentoSismico");
add("pagCalcolatoOperaNonQuantificabile");
add("pagCalcolatoRiparazioneInterventoLocale");
add("pagCondotte");
add("pagConsultazioniArchivio");
add("pagEffettivoAdeguamentoSismico");
add("pagEffettivoMiglioramentoSismico");
add("pagEffettivoOperaNonQuantificabile");
add("pagEffettivoRiparazioneInterventoLocale");
add("pagGrandiStrutture");
add("pagImmobiliPreesistenti");
add("pagImpiantiEolici");
add("pagInterventiRestauroManufatti");
add("pagLottizzazioni");
add("pagManifestiPubblicitari");
add("pagMiglioramentoSismico");
add("pagMiglioramentoSismicoSicilia");
add("pagNoteUtente");
add("pagNuovaCostruzione");
add("pagNuoveRealizzazioni");
add("pagOperaNonQuantificabile");
add("pagPalificazioni");
add("pagPareriDiMassima");
add("pagRilascioAttestazioni");
add("pagRiparazioneInterventoLocale");
add("pagSoggettiAdAutorizzazione");
add("pagVarianti");
add("pagVariantiPareriResi");
add("protocollo");
add("soggettoSostituitoId");
add("status");
add("statusByUserId");
add("statusByUserName");
add("statusDate");
add("statusTask");
add("tipoIntegrazione");
add("uuid_");
add("userId");
add("userName");
add("varianteNumero");
add("version");
}
};
dettPraticaFields = new ArrayList<>();
dettPraticaFieldsTypes = new HashMap<>();
for (int i = 0; i < DettPraticaImpl.TABLE_COLUMNS.length; i++) {
String field = (String) DettPraticaImpl.TABLE_COLUMNS[i][0];
if (!hiddenFields.contains(field)) {
dettPraticaFields.add(field);
}
dettPraticaFieldsTypes.put(field, (int) DettPraticaImpl.TABLE_COLUMNS[i][1]);
}
}
@Override
public List<String> getDettPraticaFields() {
return dettPraticaFields;
}
@Override
public Map<String, Integer> getDettPraticaFieldsTypes() {
return dettPraticaFieldsTypes;
}
@SuppressWarnings("serial")
private static final Map<String, List<String>> fields = new LinkedHashMap<String, List<String>>() {
{
put(LanguageUtil.get(Locale.ITALIAN, "sezione-01"), new ArrayList<String>() {
{
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<String>() {
{
add("descLongIntervento");
add("localita");
add("via");
}
});
put(LanguageUtil.get(Locale.ITALIAN, "piano-paesaggistico"), new ArrayList<String>() {
{
add("paesaggioLocale");
add("livelloDiTutela");
add("vincoli");
}
});
put(LanguageUtil.get(Locale.ITALIAN, "destinazione"), new ArrayList<String>() {
{
}
});
}
};
@Override
public Map<String, List<String>> getFields() {
return fields;
}
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public List<DettPratica> getVersioni(long intPraticaId) throws SystemException { public List<DettPratica> getVersioni(long intPraticaId) throws SystemException {
@ -2012,4 +1863,19 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
List<DettPratica> ritorno = dynamicQuery(dynamicQuery, 0, 1); List<DettPratica> ritorno = dynamicQuery(dynamicQuery, 0, 1);
return ritorno.isEmpty() ? null : ritorno.get(0); return ritorno.isEmpty() ? null : ritorno.get(0);
} }
@Override
public Map<String, String> getDestinazioniuso() {
return DomandaUtil.getDestinazioniuso();
}
@Override
public List<String> getDettPraticaFields() {
return DomandaUtil.getDettPraticaFields();
}
@Override
public Map<String, Integer> getDettPraticaFieldsTypes() {
return DomandaUtil.getDettPraticaFieldsTypes();
}
} }

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=3199 build.number=3202
build.date=1624524026677 build.date=1624536257328
build.auto.upgrade=true build.auto.upgrade=true
## ##

1
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Parameters.java

@ -20,6 +20,7 @@ public class Parameters {
public static final String TOKEN = "token"; public static final String TOKEN = "token";
public static final String TYPE = "type"; public static final String TYPE = "type";
public static final String USERNAME = "username"; public static final String USERNAME = "username";
public static final String USES = "uses";
public static final String VAT_ID = "vatId"; public static final String VAT_ID = "vatId";
public static final String X_AUTH_TOKEN = "X-Auth-Token"; public static final String X_AUTH_TOKEN = "X-Auth-Token";
} }

10
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Application.java

@ -6,13 +6,13 @@ import java.io.Serializable;
public class Application implements Serializable { public class Application implements Serializable {
private long applicationId; private long applicationId;
private String type; private String code;
private String vatId; private String vatId;
public Application(long applicationId, String type, String vatId) { public Application(long applicationId, String code, String vatId) {
this.applicationId = applicationId; this.applicationId = applicationId;
this.type = type; this.code = code;
this.vatId = vatId; this.vatId = vatId;
} }
@ -20,8 +20,8 @@ public class Application implements Serializable {
return applicationId; return applicationId;
} }
public String getType() { public String getCode() {
return type; return code;
} }
public String getVatId() { public String getVatId() {

4
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Document.java → liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/ListElement.java

@ -3,12 +3,12 @@ package it.mwg.sicilia.sue.api.v1.bean;
import java.io.Serializable; import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class Document implements Serializable { public class ListElement implements Serializable {
private String code; private String code;
private String description; private String description;
public Document(String code, String description) { public ListElement(String code, String description) {
this.code = code; this.code = code;
this.description = description; this.description = description;

23
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/CommandList.java

@ -1,16 +1,16 @@
package it.mwg.sicilia.sue.api.v1.command; package it.mwg.sicilia.sue.api.v1.command;
import it.mwg.sicilia.sue.api.v1.command.impl.AddApplication; import it.mwg.sicilia.sue.api.v1.command.impl.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.DeleteApplication;
import it.mwg.sicilia.sue.api.v1.command.impl.Documents; import it.mwg.sicilia.sue.api.v1.command.impl.GetApplications;
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.ListApplications;
import it.mwg.sicilia.sue.api.v1.command.impl.ListDocuments;
import it.mwg.sicilia.sue.api.v1.command.impl.ListUses;
import it.mwg.sicilia.sue.api.v1.command.impl.Login; 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.Manual;
import it.mwg.sicilia.sue.api.v1.command.impl.ManualHtml; 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.Nop;
import it.mwg.sicilia.sue.api.v1.command.impl.Uses; import it.mwg.sicilia.sue.api.v1.command.impl.SetUse;
import java.util.Collection; import java.util.Collection;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
@ -30,20 +30,21 @@ public class CommandList {
// Login // Login
addCommand(new Login("Esegue l'accesso con nome email e password e restituisce un token di accesso")); addCommand(new Login("Esegue l'accesso con nome email e password e restituisce un token di accesso"));
// Elenchi // Elenchi
addCommand(new Applications("Elenco delle istanze valide contenenti codice e descrizione", HttpMethods.GET, addCommand(new ListApplications("Elenco delle istanze presentabili sul portale", HttpMethods.GET,
HttpMethods.POST)); HttpMethods.POST));
addCommand(new Documents("Elenco dei documenti riconosciuti dal portale con codice e descrizione", addCommand(new ListDocuments("Elenco dei documenti riconosciuti dal portale", HttpMethods.GET, HttpMethods.POST));
HttpMethods.GET, HttpMethods.POST)); // addCommand(new ListFields("Elenco dei dati dell'istanza accettati dal portale", HttpMethods.GET,
addCommand(new Fields("Elenco dei dati dell'istanza accettati dal portale", HttpMethods.GET, HttpMethods.POST)); // HttpMethods.POST));
addCommand(new Uses("Elenco delle destinazioni d'uso riconosciute dal portale", HttpMethods.GET, addCommand(new ListUses("Elenco delle destinazioni d'uso riconosciute dal portale", HttpMethods.GET,
HttpMethods.POST)); HttpMethods.POST));
// Istanze // Istanze
addCommand(new AddApplication( addCommand(new AddApplication(
"Crea una nuova istanza di endoprocedimento, crea l'utente se non esiste ancora sul portale")); "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, addCommand(new SetUse("Imposta la destinazione d'uso dell'immobile relativo all'istanza"));
addCommand(new GetApplications("Elenca le istanze in lavorazione da questo SUE", HttpMethods.GET,
HttpMethods.POST)); HttpMethods.POST));
addCommand(new DeleteApplication("Elimina un'istanza")); addCommand(new DeleteApplication("Elimina un'istanza"));
// Altro
addCommand(new Nop("NOP verifica la connettività senza eseguire operazioni", HttpMethods.GET, HttpMethods.POST)); addCommand(new Nop("NOP verifica la connettività senza eseguire operazioni", HttpMethods.GET, HttpMethods.POST));
} }

6
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/AddApplication.java

@ -44,8 +44,8 @@ public class AddApplication extends Command {
add(new Parameter(Parameters.VAT_ID, TYPES.STRING, "Codice fiscale del titolare digitale")); 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.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.LAST_NAME, TYPES.STRING, "Cognome del titolare digitale", false));
add(new Parameter(Parameters.TYPE, TYPES.STRING, "Codice del tipo di istanza, come restituito da /" add(new Parameter(Parameters.CODE, TYPES.STRING, "Codice del tipo di istanza, come restituito da /"
+ getCommandName(Applications.class))); + getCommandName(ListApplications.class)));
add(new Parameter(Parameters.SUE_ID, TYPES.STRING, "Estremi pratica SUE/SUAP", false)); add(new Parameter(Parameters.SUE_ID, TYPES.STRING, "Estremi pratica SUE/SUAP", false));
} }
}; };
@ -76,7 +76,7 @@ public class AddApplication extends Command {
ServletResponseUtil.write(response, Response.get(Status.MALFORMED_REQUEST, additionalInfo)); ServletResponseUtil.write(response, Response.get(Status.MALFORMED_REQUEST, additionalInfo));
return; return;
} }
String tipoProcedura = MapUtil.getString(parameters, Parameters.TYPE); String tipoProcedura = MapUtil.getString(parameters, Parameters.CODE);
if (Validator.isNull(tipoProcedura) if (Validator.isNull(tipoProcedura)
|| !IntPraticaLocalServiceUtil.getTipiProcedure().containsKey(tipoProcedura)) { || !IntPraticaLocalServiceUtil.getTipiProcedure().containsKey(tipoProcedura)) {
additionalInfo.add("Tipo pratica non specificato o non valido"); additionalInfo.add("Tipo pratica non specificato o non valido");

73
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/GetApplications.java

@ -0,0 +1,73 @@
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.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;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.liferay.portal.kernel.dao.orm.QueryUtil;
import com.liferay.portal.kernel.servlet.ServletResponseUtil;
public class GetApplications extends Command {
private static final List<Parameter> OUTPUT_PARAMETERS = new ArrayList<Parameter>();
static {
OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS);
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.CODE, TYPES.STRING, "Tipo dell'istanza"));
p.addSubParameter(new Parameter(Parameters.VAT_ID, TYPES.STRING, "Codice fiscale del titolare digitale"));
OUTPUT_PARAMETERS.add(p);
};
public GetApplications(String description, String... methods) {
super(description, methods);
}
@Override
public void run(HttpServletRequest request, HttpServletResponse response) throws Exception {
if (verifyAccessToken(request, response)) {
List<Application> applications = new ArrayList<>();
for (Territorio territorio : TerritorioLocalServiceUtil.findByComuneId(sportello.getComuneId(),
QueryUtil.ALL_POS, QueryUtil.ALL_POS)) {
for (IntPratica intPratica : IntPraticaLocalServiceUtil
.findByTerritorioId(territorio.getTerritorioId())) {
if (intPratica.getInLavorazioneSue()) {
applications.add(new Application(intPratica.getIntPraticaId(), intPratica.getTipoProcedura(),
intPratica.getUserName()));
}
}
}
Map<String, Serializable> result = new HashMap<>();
result.put(Parameters.APPLICATIONS, (Serializable) applications);
ServletResponseUtil.write(response, Response.get(Status.OK, result));
}
}
@Override
public List<Parameter> getInputParameters() {
return EMPTY_PARAMETERS;
}
@Override
public List<Parameter> getOutputParameters() {
return OUTPUT_PARAMETERS;
}
}

37
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListApplications.java

@ -3,25 +3,22 @@ package it.mwg.sicilia.sue.api.v1.command.impl;
import it.mwg.sicilia.sue.api.v1.Parameters; import it.mwg.sicilia.sue.api.v1.Parameters;
import it.mwg.sicilia.sue.api.v1.Response; import it.mwg.sicilia.sue.api.v1.Response;
import it.mwg.sicilia.sue.api.v1.Status; import it.mwg.sicilia.sue.api.v1.Status;
import it.mwg.sicilia.sue.api.v1.bean.Application; import it.mwg.sicilia.sue.api.v1.bean.ListElement;
import it.mwg.sicilia.sue.api.v1.command.Command; 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;
import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; 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; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.liferay.portal.kernel.dao.orm.QueryUtil;
import com.liferay.portal.kernel.servlet.ServletResponseUtil; import com.liferay.portal.kernel.servlet.ServletResponseUtil;
public class ListApplications extends Command { public class ListApplications extends Command {
@ -29,10 +26,9 @@ public class ListApplications extends Command {
private static final List<Parameter> OUTPUT_PARAMETERS = new ArrayList<Parameter>(); private static final List<Parameter> OUTPUT_PARAMETERS = new ArrayList<Parameter>();
static { static {
OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS); OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS);
Parameter p = new Parameter(Parameters.APPLICATIONS, TYPES.ARRAY, "Elenco di istanze presentate"); Parameter p = new Parameter(Parameters.DOCUMENTS, TYPES.ARRAY, "Elenco di istanze presentabili");
p.addSubParameter(new Parameter(Parameters.APPLICATION_ID, TYPES.INTEGER, "Identificatore dell'istanza")); p.addSubParameter(new Parameter(Parameters.CODE, TYPES.STRING, "Codice del tipo di istanza"));
p.addSubParameter(new Parameter(Parameters.TYPE, TYPES.STRING, "Tipo dell'istanza")); p.addSubParameter(new Parameter(Parameters.DESCRIPTION, TYPES.STRING, "Descrizione dell'istanza"));
p.addSubParameter(new Parameter(Parameters.VAT_ID, TYPES.STRING, "Codice fiscale del titolare digitale"));
OUTPUT_PARAMETERS.add(p); OUTPUT_PARAMETERS.add(p);
}; };
@ -43,23 +39,15 @@ public class ListApplications extends Command {
@Override @Override
public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { public void run(HttpServletRequest request, HttpServletResponse response) throws Exception {
if (verifyAccessToken(request, response)) { Map<String, String> procedure = IntPraticaLocalServiceUtil.getTipiProcedure();
List<Application> applications = new ArrayList<>(); List<ListElement> list = new ArrayList<>(procedure.size());
for (Territorio territorio : TerritorioLocalServiceUtil.findByComuneId(sportello.getComuneId(), for (Entry<String, String> entry : procedure.entrySet()) {
QueryUtil.ALL_POS, QueryUtil.ALL_POS)) { list.add(new ListElement(entry.getKey(), entry.getValue()));
for (IntPratica intPratica : IntPraticaLocalServiceUtil
.findByTerritorioId(territorio.getTerritorioId())) {
if (intPratica.getInLavorazioneSue()) {
applications.add(new Application(intPratica.getIntPraticaId(), intPratica.getTipoProcedura(),
intPratica.getUserName()));
}
}
} }
Map<String, Serializable> result = new HashMap<>(); Map<String, Serializable> result = new HashMap<>();
result.put(Parameters.APPLICATIONS, (Serializable) applications); result.put(Parameters.APPLICATIONS, (Serializable) list);
ServletResponseUtil.write(response, Response.get(Status.OK, result)); ServletResponseUtil.write(response, Response.get(Status.OK, result));
} }
}
@Override @Override
public List<Parameter> getInputParameters() { public List<Parameter> getInputParameters() {
@ -70,4 +58,9 @@ public class ListApplications extends Command {
public List<Parameter> getOutputParameters() { public List<Parameter> getOutputParameters() {
return OUTPUT_PARAMETERS; return OUTPUT_PARAMETERS;
} }
@Override
public boolean isSecure() {
return false;
}
} }

19
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Documents.java → liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListDocuments.java

@ -3,7 +3,7 @@ package it.mwg.sicilia.sue.api.v1.command.impl;
import it.mwg.sicilia.sue.api.v1.Parameters; import it.mwg.sicilia.sue.api.v1.Parameters;
import it.mwg.sicilia.sue.api.v1.Response; import it.mwg.sicilia.sue.api.v1.Response;
import it.mwg.sicilia.sue.api.v1.Status; import it.mwg.sicilia.sue.api.v1.Status;
import it.mwg.sicilia.sue.api.v1.bean.Document; import it.mwg.sicilia.sue.api.v1.bean.ListElement;
import it.mwg.sicilia.sue.api.v1.command.Command; 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;
import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES;
@ -20,9 +20,8 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.liferay.portal.kernel.servlet.ServletResponseUtil; import com.liferay.portal.kernel.servlet.ServletResponseUtil;
import com.liferay.portal.kernel.util.StringPool;
public class Documents extends Command { public class ListDocuments extends Command {
private static final List<Parameter> OUTPUT_PARAMETERS = new ArrayList<Parameter>(); private static final List<Parameter> OUTPUT_PARAMETERS = new ArrayList<Parameter>();
static { static {
@ -33,25 +32,22 @@ public class Documents extends Command {
OUTPUT_PARAMETERS.add(p); OUTPUT_PARAMETERS.add(p);
}; };
public Documents(String description, String... methods) { public ListDocuments(String description, String... methods) {
super(description, methods); super(description, methods);
} }
@Override @Override
public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { public void run(HttpServletRequest request, HttpServletResponse response) throws Exception {
if (verifyAccessToken(request, response)) {
Map<String, String> documents = DocumentiPraticaUtil.getTipiDocDomanda(); Map<String, String> documents = DocumentiPraticaUtil.getTipiDocDomanda();
List<Document> list = new ArrayList<>(documents.size()); List<ListElement> list = new ArrayList<>(documents.size());
for (Entry<String, String> entry : documents.entrySet()) { for (Entry<String, String> entry : documents.entrySet()) {
list.add(new Document(entry.getKey(), entry.getValue() list.add(new ListElement(entry.getKey(), entry.getValue()));
.replaceAll("^A[0-9]+\\s*-\\s*", StringPool.BLANK)));
} }
Map<String, Serializable> result = new HashMap<>(); Map<String, Serializable> result = new HashMap<>();
result.put(Parameters.DOCUMENTS, (Serializable) list); result.put(Parameters.DOCUMENTS, (Serializable) list);
ServletResponseUtil.write(response, Response.get(Status.OK, result)); ServletResponseUtil.write(response, Response.get(Status.OK, result));
} }
}
@Override @Override
public List<Parameter> getInputParameters() { public List<Parameter> getInputParameters() {
@ -62,4 +58,9 @@ public class Documents extends Command {
public List<Parameter> getOutputParameters() { public List<Parameter> getOutputParameters() {
return OUTPUT_PARAMETERS; return OUTPUT_PARAMETERS;
} }
@Override
public boolean isSecure() {
return false;
}
} }

14
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Fields.java → liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListFields.java

@ -24,7 +24,7 @@ import com.liferay.portal.kernel.language.LanguageUtil;
import com.liferay.portal.kernel.servlet.ServletResponseUtil; import com.liferay.portal.kernel.servlet.ServletResponseUtil;
import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringPool;
public class Fields extends Command { public class ListFields extends Command {
private static final List<Parameter> OUTPUT_PARAMETERS = new ArrayList<Parameter>(); private static final List<Parameter> OUTPUT_PARAMETERS = new ArrayList<Parameter>();
static { static {
@ -37,14 +37,13 @@ public class Fields extends Command {
OUTPUT_PARAMETERS.add(p); OUTPUT_PARAMETERS.add(p);
}; };
public Fields(String description, String... methods) { public ListFields(String description, String... methods) {
super(description, methods); super(description, methods);
} }
@Override @Override
public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { public void run(HttpServletRequest request, HttpServletResponse response) throws Exception {
if (verifyAccessToken(request, response)) {
List<Field> fields = new ArrayList<>(); List<Field> fields = new ArrayList<>();
Map<String, Integer> fieldTypes = DettPraticaLocalServiceUtil.getDettPraticaFieldsTypes(); Map<String, Integer> fieldTypes = DettPraticaLocalServiceUtil.getDettPraticaFieldsTypes();
Map<String, List<String>> dpFields = DettPraticaLocalServiceUtil.getFields(); Map<String, List<String>> dpFields = DettPraticaLocalServiceUtil.getFields();
@ -54,8 +53,8 @@ public class Fields extends Command {
String description = StringPool.OPEN_BRACKET String description = StringPool.OPEN_BRACKET
+ section + section
+ "] " + "] "
+ LanguageUtil.get(Locale.ITALIAN, field.replaceAll("([A-Z])", "-$1").toLowerCase()) + LanguageUtil.get(Locale.ITALIAN, field.replaceAll("([A-Z])", "-$1").toLowerCase()).replace(
.replace("<br/>", StringPool.SPACE); "<br/>", StringPool.SPACE);
TYPES type = TYPES.UNKNOWN; TYPES type = TYPES.UNKNOWN;
switch (fieldTypes.get(field)) { switch (fieldTypes.get(field)) {
case Types.BIGINT: case Types.BIGINT:
@ -82,7 +81,6 @@ public class Fields extends Command {
result.put(Parameters.FIELDS, (Serializable) fields); result.put(Parameters.FIELDS, (Serializable) fields);
ServletResponseUtil.write(response, Response.get(Status.OK, result)); ServletResponseUtil.write(response, Response.get(Status.OK, result));
} }
}
@Override @Override
public List<Parameter> getInputParameters() { public List<Parameter> getInputParameters() {
@ -94,4 +92,8 @@ public class Fields extends Command {
return OUTPUT_PARAMETERS; return OUTPUT_PARAMETERS;
} }
@Override
public boolean isSecure() {
return false;
}
} }

32
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Applications.java → liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListUses.java

@ -3,11 +3,11 @@ package it.mwg.sicilia.sue.api.v1.command.impl;
import it.mwg.sicilia.sue.api.v1.Parameters; import it.mwg.sicilia.sue.api.v1.Parameters;
import it.mwg.sicilia.sue.api.v1.Response; import it.mwg.sicilia.sue.api.v1.Response;
import it.mwg.sicilia.sue.api.v1.Status; import it.mwg.sicilia.sue.api.v1.Status;
import it.mwg.sicilia.sue.api.v1.bean.ApplicationType; import it.mwg.sicilia.sue.api.v1.bean.ListElement;
import it.mwg.sicilia.sue.api.v1.command.Command; 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;
import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES; import it.mwg.sicilia.sue.api.v1.parameter.Parameter.TYPES;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
@ -20,38 +20,33 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.liferay.portal.kernel.servlet.ServletResponseUtil; import com.liferay.portal.kernel.servlet.ServletResponseUtil;
import com.liferay.portal.kernel.util.StringPool;
public class Applications extends Command { public class ListUses extends Command {
private static final List<Parameter> OUTPUT_PARAMETERS = new ArrayList<Parameter>(); private static final List<Parameter> OUTPUT_PARAMETERS = new ArrayList<Parameter>();
static { static {
OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS); OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS);
Parameter p = new Parameter(Parameters.DOCUMENTS, TYPES.ARRAY, "Elenco di istanze presentabili"); Parameter p = new Parameter(Parameters.USES, TYPES.ARRAY, "Elenco di destinazioni d'uso");
p.addSubParameter(new Parameter(Parameters.TYPE, TYPES.STRING, "Codice del tipo di istanza")); p.addSubParameter(new Parameter(Parameters.CODE, TYPES.STRING, "Codice della destinazione d'uso"));
p.addSubParameter(new Parameter(Parameters.DESCRIPTION, TYPES.STRING, "Descrizione dell'istanza")); p.addSubParameter(new Parameter(Parameters.DESCRIPTION, TYPES.STRING, "Descrizione della destinazione d'uso"));
OUTPUT_PARAMETERS.add(p); OUTPUT_PARAMETERS.add(p);
}; };
public Applications(String description, String... methods) { public ListUses(String description, String... methods) {
super(description, methods); super(description, methods);
} }
@Override @Override
public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { public void run(HttpServletRequest request, HttpServletResponse response) throws Exception {
if (verifyAccessToken(request, response)) { List<ListElement> uses = new ArrayList<>();
Map<String, String> procedure = IntPraticaLocalServiceUtil.getTipiProcedure(); for (Entry<String, String> e : DettPraticaLocalServiceUtil.getDestinazioniuso().entrySet()) {
List<ApplicationType> list = new ArrayList<>(procedure.size()); uses.add(new ListElement(e.getKey(), e.getValue()));
for (Entry<String, String> entry : procedure.entrySet()) {
list.add(new ApplicationType(entry.getKey(), entry.getValue().replaceAll("^[0-9\\.]+\\)\\s*",
StringPool.BLANK)));
} }
Map<String, Serializable> result = new HashMap<>(); Map<String, Serializable> result = new HashMap<>();
result.put(Parameters.APPLICATIONS, (Serializable) list); result.put(Parameters.USES, (Serializable) uses);
ServletResponseUtil.write(response, Response.get(Status.OK, result)); ServletResponseUtil.write(response, Response.get(Status.OK, result));
} }
}
@Override @Override
public List<Parameter> getInputParameters() { public List<Parameter> getInputParameters() {
@ -62,4 +57,9 @@ public class Applications extends Command {
public List<Parameter> getOutputParameters() { public List<Parameter> getOutputParameters() {
return OUTPUT_PARAMETERS; return OUTPUT_PARAMETERS;
} }
@Override
public boolean isSecure() {
return false;
}
} }

3
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Manual.java

@ -127,8 +127,7 @@ public class Manual extends Command {
sb.append("--data '").append(serializer.serialize(data)).append("' \\\n\t\t"); sb.append("--data '").append(serializer.serialize(data)).append("' \\\n\t\t");
} }
} }
sb.append(StringPool.APOSTROPHE).append(baseUrl).append(command.getVerb()).append(StringPool.APOSTROPHE) sb.append(baseUrl).append(command.getVerb()).append(StringPool.NEW_LINE);
.append(StringPool.NEW_LINE);
return sb.toString(); return sb.toString();
} }

48
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/SetUse.java

@ -0,0 +1,48 @@
package it.mwg.sicilia.sue.api.v1.command.impl;
import it.mwg.sicilia.sue.api.v1.Parameters;
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 java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class SetUse extends Command {
@SuppressWarnings("serial")
private static final List<Parameter> INPUT_PARAMETERS = new ArrayList<Parameter>() {
{
add(new Parameter(Parameters.APPLICATION_ID, TYPES.INTEGER, "Id dell'istanza"));
add(new Parameter(Parameters.CODE, TYPES.STRING, "Codice della destinazione d'uso come restituito da /"
+ getCommandName(ListUses.class)));
add(new Parameter(Parameters.DESCRIPTION, TYPES.STRING,
"Descrizione della destinazione d'uso, obbligatoria se " + Parameters.CODE + " = 3", false));
}
};
public SetUse(String description, String... methods) {
super(description, methods);
}
@Override
public void run(HttpServletRequest request, HttpServletResponse response) throws Exception {
if (verifyAccessToken(request, response)) {
}
}
@Override
public List<Parameter> getInputParameters() {
return INPUT_PARAMETERS;
}
@Override
public List<Parameter> getOutputParameters() {
return BASE_OUTPUT_PARAMETERS;
}
}

31
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Uses.java

@ -1,31 +0,0 @@
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<Parameter> getInputParameters() {
return EMPTY_PARAMETERS;
}
@Override
public List<Parameter> getOutputParameters() {
return BASE_OUTPUT_PARAMETERS;
}
}
Caricamento…
Annulla
Salva