Salvatore La Manna 4 anni fa
parent
commit
ee50a66b8b
  1. 14
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalService.java
  2. 150
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceClp.java
  3. 20
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceUtil.java
  4. 24
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceWrapper.java
  5. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/DomandaUtil.java
  6. 80
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/DettPraticaLocalServiceClpInvoker.java
  7. 14
      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. 8
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/CommandList.java
  11. 2
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/DeleteApplication.java
  12. 2
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/GetApplications.java
  13. 2
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListApplications.java
  14. 2
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListDocuments.java
  15. 32
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListFields.java
  16. 4
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListUses.java
  17. 123
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/SetFields.java
  18. 59
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/SetUse.java
  19. 2
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/parameter/Parameter.java

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

@ -931,12 +931,6 @@ public interface DettPraticaLocalService extends BaseLocalService,
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,
com.liferay.portal.kernel.exception.SystemException; com.liferay.portal.kernel.exception.SystemException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.util.List<java.lang.String> getDettPraticaFields();
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.util.Map<java.lang.String, java.lang.Integer> getDettPraticaFieldsTypes();
@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)
@ -961,5 +955,11 @@ public interface DettPraticaLocalService extends BaseLocalService,
throws com.liferay.portal.kernel.exception.SystemException; throws com.liferay.portal.kernel.exception.SystemException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true) @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.util.Map<java.lang.String, java.lang.String> getDestinazioniuso(); public java.util.Map<java.lang.String, java.lang.String> getDestinazioniUso();
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.util.List<java.lang.String> getDettPraticaFields();
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public java.util.Map<java.lang.String, java.lang.Integer> getDettPraticaFieldsTypes();
} }

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

@ -511,41 +511,41 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
"long", "java.lang.String", "java.lang.String" "long", "java.lang.String", "java.lang.String"
}; };
_methodName74 = "getDettPraticaFields"; _methodName74 = "getVersioni";
_methodParameterTypes74 = new String[] { }; _methodParameterTypes74 = new String[] { "long" };
_methodName75 = "getDettPraticaFieldsTypes"; _methodName75 = "callForChanges";
_methodParameterTypes75 = new String[] { }; _methodParameterTypes75 = new String[] { "long" };
_methodName76 = "getVersioni"; _methodName76 = "isNumber";
_methodParameterTypes76 = new String[] { "long" }; _methodParameterTypes76 = new String[] { "java.lang.String" };
_methodName77 = "callForChanges"; _methodName77 = "format";
_methodParameterTypes77 = new String[] { "long" }; _methodParameterTypes77 = new String[] {
"java.lang.String", "java.io.Serializable"
};
_methodName78 = "isNumber"; _methodName78 = "countVariateByIntPratica";
_methodParameterTypes78 = new String[] { "java.lang.String" }; _methodParameterTypes78 = new String[] { "long" };
_methodName79 = "format"; _methodName79 = "getFirstCompletedByIntPratica";
_methodParameterTypes79 = new String[] { _methodParameterTypes79 = new String[] { "long" };
"java.lang.String", "java.io.Serializable"
};
_methodName80 = "countVariateByIntPratica"; _methodName80 = "getDestinazioniUso";
_methodParameterTypes80 = new String[] { "long" }; _methodParameterTypes80 = new String[] { };
_methodName81 = "getFirstCompletedByIntPratica"; _methodName81 = "getDettPraticaFields";
_methodParameterTypes81 = new String[] { "long" }; _methodParameterTypes81 = new String[] { };
_methodName82 = "getDestinazioniuso"; _methodName82 = "getDettPraticaFieldsTypes";
_methodParameterTypes82 = new String[] { }; _methodParameterTypes82 = new String[] { };
} }
@ -4438,16 +4438,22 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
} }
@Override @Override
public java.util.List<java.lang.String> getDettPraticaFields() { public java.util.List<it.tref.liferay.portos.bo.model.DettPratica> getVersioni(
long intPraticaId)
throws com.liferay.portal.kernel.exception.SystemException {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName74, returnObj = _invokableLocalService.invokeMethod(_methodName74,
_methodParameterTypes74, new Object[] { }); _methodParameterTypes74, new Object[] { intPraticaId });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }
@ -4457,20 +4463,26 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
} }
} }
return (java.util.List<java.lang.String>)ClpSerializer.translateOutput(returnObj); return (java.util.List<it.tref.liferay.portos.bo.model.DettPratica>)ClpSerializer.translateOutput(returnObj);
} }
@Override @Override
public java.util.Map<java.lang.String, java.lang.Integer> getDettPraticaFieldsTypes() { public java.util.List<java.util.Map<java.lang.String, java.io.Serializable>> callForChanges(
long intPraticaId)
throws com.liferay.portal.kernel.exception.SystemException {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName75, returnObj = _invokableLocalService.invokeMethod(_methodName75,
_methodParameterTypes75, new Object[] { }); _methodParameterTypes75, new Object[] { intPraticaId });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }
@ -4480,26 +4492,21 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
} }
} }
return (java.util.Map<java.lang.String, java.lang.Integer>)ClpSerializer.translateOutput(returnObj); return (java.util.List<java.util.Map<java.lang.String, java.io.Serializable>>)ClpSerializer.translateOutput(returnObj);
} }
@Override @Override
public java.util.List<it.tref.liferay.portos.bo.model.DettPratica> getVersioni( public boolean isNumber(java.lang.String field) {
long intPraticaId)
throws com.liferay.portal.kernel.exception.SystemException {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName76, returnObj = _invokableLocalService.invokeMethod(_methodName76,
_methodParameterTypes76, new Object[] { intPraticaId }); _methodParameterTypes76,
new Object[] { ClpSerializer.translateInput(field) });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }
@ -4509,26 +4516,26 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
} }
} }
return (java.util.List<it.tref.liferay.portos.bo.model.DettPratica>)ClpSerializer.translateOutput(returnObj); return ((Boolean)returnObj).booleanValue();
} }
@Override @Override
public java.util.List<java.util.Map<java.lang.String, java.io.Serializable>> callForChanges( public java.lang.String format(java.lang.String field,
long intPraticaId) java.io.Serializable value) {
throws com.liferay.portal.kernel.exception.SystemException {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName77, returnObj = _invokableLocalService.invokeMethod(_methodName77,
_methodParameterTypes77, new Object[] { intPraticaId }); _methodParameterTypes77,
new Object[] {
ClpSerializer.translateInput(field),
ClpSerializer.translateInput(value)
});
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }
@ -4538,21 +4545,25 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
} }
} }
return (java.util.List<java.util.Map<java.lang.String, java.io.Serializable>>)ClpSerializer.translateOutput(returnObj); return (java.lang.String)ClpSerializer.translateOutput(returnObj);
} }
@Override @Override
public boolean isNumber(java.lang.String field) { public int countVariateByIntPratica(long intPraticaId)
throws com.liferay.portal.kernel.exception.SystemException {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName78, returnObj = _invokableLocalService.invokeMethod(_methodName78,
_methodParameterTypes78, _methodParameterTypes78, new Object[] { intPraticaId });
new Object[] { ClpSerializer.translateInput(field) });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }
@ -4562,26 +4573,26 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
} }
} }
return ((Boolean)returnObj).booleanValue(); return ((Integer)returnObj).intValue();
} }
@Override @Override
public java.lang.String format(java.lang.String field, public it.tref.liferay.portos.bo.model.DettPratica getFirstCompletedByIntPratica(
java.io.Serializable value) { long intPraticaId)
throws com.liferay.portal.kernel.exception.SystemException {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName79, returnObj = _invokableLocalService.invokeMethod(_methodName79,
_methodParameterTypes79, _methodParameterTypes79, new Object[] { intPraticaId });
new Object[] {
ClpSerializer.translateInput(field),
ClpSerializer.translateInput(value)
});
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }
@ -4591,25 +4602,20 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
} }
} }
return (java.lang.String)ClpSerializer.translateOutput(returnObj); return (it.tref.liferay.portos.bo.model.DettPratica)ClpSerializer.translateOutput(returnObj);
} }
@Override @Override
public int countVariateByIntPratica(long intPraticaId) public java.util.Map<java.lang.String, java.lang.String> getDestinazioniUso() {
throws com.liferay.portal.kernel.exception.SystemException {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName80, returnObj = _invokableLocalService.invokeMethod(_methodName80,
_methodParameterTypes80, new Object[] { intPraticaId }); _methodParameterTypes80, new Object[] { });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }
@ -4619,26 +4625,20 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
} }
} }
return ((Integer)returnObj).intValue(); return (java.util.Map<java.lang.String, java.lang.String>)ClpSerializer.translateOutput(returnObj);
} }
@Override @Override
public it.tref.liferay.portos.bo.model.DettPratica getFirstCompletedByIntPratica( public java.util.List<java.lang.String> getDettPraticaFields() {
long intPraticaId)
throws com.liferay.portal.kernel.exception.SystemException {
Object returnObj = null; Object returnObj = null;
try { try {
returnObj = _invokableLocalService.invokeMethod(_methodName81, returnObj = _invokableLocalService.invokeMethod(_methodName81,
_methodParameterTypes81, new Object[] { intPraticaId }); _methodParameterTypes81, new Object[] { });
} }
catch (Throwable t) { catch (Throwable t) {
t = ClpSerializer.translateThrowable(t); t = ClpSerializer.translateThrowable(t);
if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
throw (com.liferay.portal.kernel.exception.SystemException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }
@ -4648,11 +4648,11 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
} }
} }
return (it.tref.liferay.portos.bo.model.DettPratica)ClpSerializer.translateOutput(returnObj); return (java.util.List<java.lang.String>)ClpSerializer.translateOutput(returnObj);
} }
@Override @Override
public java.util.Map<java.lang.String, java.lang.String> getDestinazioniuso() { public java.util.Map<java.lang.String, java.lang.Integer> getDettPraticaFieldsTypes() {
Object returnObj = null; Object returnObj = null;
try { try {
@ -4671,7 +4671,7 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
} }
} }
return (java.util.Map<java.lang.String, java.lang.String>)ClpSerializer.translateOutput(returnObj); return (java.util.Map<java.lang.String, java.lang.Integer>)ClpSerializer.translateOutput(returnObj);
} }
private InvokableLocalService _invokableLocalService; private InvokableLocalService _invokableLocalService;

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

@ -1255,14 +1255,6 @@ public class DettPraticaLocalServiceUtil {
tipologiaSoggetto); tipologiaSoggetto);
} }
public static java.util.List<java.lang.String> getDettPraticaFields() {
return getService().getDettPraticaFields();
}
public static java.util.Map<java.lang.String, java.lang.Integer> getDettPraticaFieldsTypes() {
return getService().getDettPraticaFieldsTypes();
}
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 {
@ -1295,8 +1287,16 @@ public class DettPraticaLocalServiceUtil {
return getService().getFirstCompletedByIntPratica(intPraticaId); return getService().getFirstCompletedByIntPratica(intPraticaId);
} }
public static java.util.Map<java.lang.String, java.lang.String> getDestinazioniuso() { public static java.util.Map<java.lang.String, java.lang.String> getDestinazioniUso() {
return getService().getDestinazioniuso(); return getService().getDestinazioniUso();
}
public static java.util.List<java.lang.String> getDettPraticaFields() {
return getService().getDettPraticaFields();
}
public static java.util.Map<java.lang.String, java.lang.Integer> getDettPraticaFieldsTypes() {
return getService().getDettPraticaFieldsTypes();
} }
public static void clearService() { public static void clearService() {

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

@ -1318,16 +1318,6 @@ public class DettPraticaLocalServiceWrapper implements DettPraticaLocalService,
codiceFiscale, tipologiaSoggetto); codiceFiscale, tipologiaSoggetto);
} }
@Override
public java.util.List<java.lang.String> getDettPraticaFields() {
return _dettPraticaLocalService.getDettPraticaFields();
}
@Override
public java.util.Map<java.lang.String, java.lang.Integer> getDettPraticaFieldsTypes() {
return _dettPraticaLocalService.getDettPraticaFieldsTypes();
}
@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)
@ -1367,8 +1357,18 @@ public class DettPraticaLocalServiceWrapper implements DettPraticaLocalService,
} }
@Override @Override
public java.util.Map<java.lang.String, java.lang.String> getDestinazioniuso() { public java.util.Map<java.lang.String, java.lang.String> getDestinazioniUso() {
return _dettPraticaLocalService.getDestinazioniuso(); return _dettPraticaLocalService.getDestinazioniUso();
}
@Override
public java.util.List<java.lang.String> getDettPraticaFields() {
return _dettPraticaLocalService.getDettPraticaFields();
}
@Override
public java.util.Map<java.lang.String, java.lang.Integer> getDettPraticaFieldsTypes() {
return _dettPraticaLocalService.getDettPraticaFieldsTypes();
} }
/** /**

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

@ -18,7 +18,7 @@ public class DomandaUtil {
private static final List<String> DETT_PRATICA_FIELDS; private static final List<String> DETT_PRATICA_FIELDS;
private static final Map<String, Integer> DETT_PRATICA_FIELDS_TYPES; private static final Map<String, Integer> DETT_PRATICA_FIELDS_TYPES;
public static Map<String, String> getDestinazioniuso() { public static Map<String, String> getDestinazioniUso() {
return DESTINAZIONI_USO; return DESTINAZIONI_USO;
} }

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

@ -520,43 +520,43 @@ public class DettPraticaLocalServiceClpInvoker {
"long", "java.lang.String", "java.lang.String" "long", "java.lang.String", "java.lang.String"
}; };
_methodName266 = "getDettPraticaFields"; _methodName266 = "getVersioni";
_methodParameterTypes266 = new String[] { }; _methodParameterTypes266 = new String[] { "long" };
_methodName267 = "getDettPraticaFieldsTypes"; _methodName267 = "callForChanges";
_methodParameterTypes267 = new String[] { }; _methodParameterTypes267 = new String[] { "long" };
_methodName268 = "getVersioni"; _methodName268 = "isNumber";
_methodParameterTypes268 = new String[] { "long" }; _methodParameterTypes268 = new String[] { "java.lang.String" };
_methodName269 = "callForChanges"; _methodName269 = "format";
_methodParameterTypes269 = new String[] { "long" }; _methodParameterTypes269 = new String[] {
"java.lang.String", "java.io.Serializable"
};
_methodName270 = "isNumber"; _methodName270 = "countVariateByIntPratica";
_methodParameterTypes270 = new String[] { "java.lang.String" }; _methodParameterTypes270 = new String[] { "long" };
_methodName271 = "format"; _methodName272 = "getFirstCompletedByIntPratica";
_methodParameterTypes271 = new String[] { _methodParameterTypes272 = new String[] { "long" };
"java.lang.String", "java.io.Serializable"
};
_methodName272 = "countVariateByIntPratica"; _methodName273 = "getDestinazioniUso";
_methodParameterTypes272 = new String[] { "long" }; _methodParameterTypes273 = new String[] { };
_methodName274 = "getFirstCompletedByIntPratica"; _methodName274 = "getDettPraticaFields";
_methodParameterTypes274 = new String[] { "long" }; _methodParameterTypes274 = new String[] { };
_methodName276 = "getDestinazioniuso"; _methodName275 = "getDettPraticaFieldsTypes";
_methodParameterTypes276 = new String[] { }; _methodParameterTypes275 = new String[] { };
} }
public Object invokeMethod(String name, String[] parameterTypes, public Object invokeMethod(String name, String[] parameterTypes,
@ -1501,48 +1501,48 @@ public class DettPraticaLocalServiceClpInvoker {
if (_methodName266.equals(name) && if (_methodName266.equals(name) &&
Arrays.deepEquals(_methodParameterTypes266, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes266, parameterTypes)) {
return DettPraticaLocalServiceUtil.getDettPraticaFields(); return DettPraticaLocalServiceUtil.getVersioni(((Long)arguments[0]).longValue());
} }
if (_methodName267.equals(name) && if (_methodName267.equals(name) &&
Arrays.deepEquals(_methodParameterTypes267, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes267, parameterTypes)) {
return DettPraticaLocalServiceUtil.getDettPraticaFieldsTypes(); return DettPraticaLocalServiceUtil.callForChanges(((Long)arguments[0]).longValue());
} }
if (_methodName268.equals(name) && if (_methodName268.equals(name) &&
Arrays.deepEquals(_methodParameterTypes268, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes268, parameterTypes)) {
return DettPraticaLocalServiceUtil.getVersioni(((Long)arguments[0]).longValue()); return DettPraticaLocalServiceUtil.isNumber((java.lang.String)arguments[0]);
} }
if (_methodName269.equals(name) && if (_methodName269.equals(name) &&
Arrays.deepEquals(_methodParameterTypes269, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes269, parameterTypes)) {
return DettPraticaLocalServiceUtil.callForChanges(((Long)arguments[0]).longValue()); return DettPraticaLocalServiceUtil.format((java.lang.String)arguments[0],
(java.io.Serializable)arguments[1]);
} }
if (_methodName270.equals(name) && if (_methodName270.equals(name) &&
Arrays.deepEquals(_methodParameterTypes270, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes270, parameterTypes)) {
return DettPraticaLocalServiceUtil.isNumber((java.lang.String)arguments[0]); return DettPraticaLocalServiceUtil.countVariateByIntPratica(((Long)arguments[0]).longValue());
}
if (_methodName271.equals(name) &&
Arrays.deepEquals(_methodParameterTypes271, parameterTypes)) {
return DettPraticaLocalServiceUtil.format((java.lang.String)arguments[0],
(java.io.Serializable)arguments[1]);
} }
if (_methodName272.equals(name) && if (_methodName272.equals(name) &&
Arrays.deepEquals(_methodParameterTypes272, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes272, parameterTypes)) {
return DettPraticaLocalServiceUtil.countVariateByIntPratica(((Long)arguments[0]).longValue()); return DettPraticaLocalServiceUtil.getFirstCompletedByIntPratica(((Long)arguments[0]).longValue());
}
if (_methodName273.equals(name) &&
Arrays.deepEquals(_methodParameterTypes273, parameterTypes)) {
return DettPraticaLocalServiceUtil.getDestinazioniUso();
} }
if (_methodName274.equals(name) && if (_methodName274.equals(name) &&
Arrays.deepEquals(_methodParameterTypes274, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes274, parameterTypes)) {
return DettPraticaLocalServiceUtil.getFirstCompletedByIntPratica(((Long)arguments[0]).longValue()); return DettPraticaLocalServiceUtil.getDettPraticaFields();
} }
if (_methodName276.equals(name) && if (_methodName275.equals(name) &&
Arrays.deepEquals(_methodParameterTypes276, parameterTypes)) { Arrays.deepEquals(_methodParameterTypes275, parameterTypes)) {
return DettPraticaLocalServiceUtil.getDestinazioniuso(); return DettPraticaLocalServiceUtil.getDettPraticaFieldsTypes();
} }
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
@ -1708,12 +1708,12 @@ public class DettPraticaLocalServiceClpInvoker {
private String[] _methodParameterTypes269; private String[] _methodParameterTypes269;
private String _methodName270; private String _methodName270;
private String[] _methodParameterTypes270; private String[] _methodParameterTypes270;
private String _methodName271;
private String[] _methodParameterTypes271;
private String _methodName272; private String _methodName272;
private String[] _methodParameterTypes272; private String[] _methodParameterTypes272;
private String _methodName273;
private String[] _methodParameterTypes273;
private String _methodName274; private String _methodName274;
private String[] _methodParameterTypes274; private String[] _methodParameterTypes274;
private String _methodName276; private String _methodName275;
private String[] _methodParameterTypes276; private String[] _methodParameterTypes275;
} }

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

@ -1761,7 +1761,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
versions.add(deserializer.deserialize(serializer.serialize(lista.get(i)))); versions.add(deserializer.deserialize(serializer.serialize(lista.get(i))));
changes.add(new HashMap<String, Serializable>()); changes.add(new HashMap<String, Serializable>());
} }
for (String field : dettPraticaFields) { for (String field : DomandaUtil.getDettPraticaFields()) {
Serializable v0 = null == versions.get(0).get(field) ? StringPool.BLANK : versions.get(0).get(field); Serializable v0 = null == versions.get(0).get(field) ? StringPool.BLANK : versions.get(0).get(field);
boolean changed = false; boolean changed = false;
for (int i = 1; i < size; i++) { for (int i = 1; i < size; i++) {
@ -1784,7 +1784,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
@Override @Override
public boolean isNumber(String field) { public boolean isNumber(String field) {
switch (dettPraticaFieldsTypes.get(field)) { switch (DomandaUtil.getDettPraticaFieldsTypes().get(field)) {
case Types.BOOLEAN: case Types.BOOLEAN:
case Types.TIMESTAMP: case Types.TIMESTAMP:
return false; return false;
@ -1799,7 +1799,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
case Types.INTEGER: case Types.INTEGER:
return true; return true;
default: default:
_log.info(dettPraticaFieldsTypes.get(field)); _log.info(DomandaUtil.getDettPraticaFieldsTypes().get(field));
} }
return true; return true;
} }
@ -1807,7 +1807,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
@Override @Override
public String format(String field, Serializable value) { public String format(String field, Serializable value) {
switch (dettPraticaFieldsTypes.get(field)) { switch (DomandaUtil.getDettPraticaFieldsTypes().get(field)) {
case Types.BOOLEAN: case Types.BOOLEAN:
return (Boolean) value ? "Sì" : "No"; return (Boolean) value ? "Sì" : "No";
case Types.TIMESTAMP: case Types.TIMESTAMP:
@ -1831,7 +1831,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
case Types.INTEGER: case Types.INTEGER:
return NumberFormat.getInstance().format(value); return NumberFormat.getInstance().format(value);
default: default:
_log.info(dettPraticaFieldsTypes.get(field)); _log.info(DomandaUtil.getDettPraticaFieldsTypes().get(field));
return "XXXXXXXXXXXXX"; return "XXXXXXXXXXXXX";
} }
} }
@ -1865,8 +1865,8 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
} }
@Override @Override
public Map<String, String> getDestinazioniuso() { public Map<String, String> getDestinazioniUso() {
return DomandaUtil.getDestinazioniuso(); return DomandaUtil.getDestinazioniUso();
} }
@Override @Override

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=3202 build.number=3203
build.date=1624536257328 build.date=1624539251511
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

@ -21,6 +21,7 @@ public class Parameters {
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 USES = "uses";
public static final String VALUE = "value";
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";
} }

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

@ -5,11 +5,13 @@ import it.mwg.sicilia.sue.api.v1.command.impl.DeleteApplication;
import it.mwg.sicilia.sue.api.v1.command.impl.GetApplications; import it.mwg.sicilia.sue.api.v1.command.impl.GetApplications;
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.ListDocuments;
import it.mwg.sicilia.sue.api.v1.command.impl.ListFields;
import it.mwg.sicilia.sue.api.v1.command.impl.ListUses; 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.SetFields;
import it.mwg.sicilia.sue.api.v1.command.impl.SetUse; import it.mwg.sicilia.sue.api.v1.command.impl.SetUse;
import java.util.Collection; import java.util.Collection;
@ -33,13 +35,15 @@ public class CommandList {
addCommand(new ListApplications("Elenco delle istanze presentabili sul portale", HttpMethods.GET, addCommand(new ListApplications("Elenco delle istanze presentabili sul portale", HttpMethods.GET,
HttpMethods.POST)); HttpMethods.POST));
addCommand(new ListDocuments("Elenco dei documenti riconosciuti dal portale", HttpMethods.GET, HttpMethods.POST)); addCommand(new ListDocuments("Elenco dei documenti riconosciuti dal portale", HttpMethods.GET, HttpMethods.POST));
// addCommand(new ListFields("Elenco dei dati dell'istanza accettati dal portale", HttpMethods.GET, addCommand(new ListFields("Elenco dei dati dell'istanza accettati dal portale", HttpMethods.GET,
// HttpMethods.POST)); HttpMethods.POST));
addCommand(new ListUses("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 SetFields("Imposta i valori dei dati dell'istanza, l'elenco è fornito dal comando /"
+ Command.getCommandName(ListFields.class)));
addCommand(new SetUse("Imposta la destinazione d'uso dell'immobile relativo all'istanza")); 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, addCommand(new GetApplications("Elenca le istanze in lavorazione da questo SUE", HttpMethods.GET,
HttpMethods.POST)); HttpMethods.POST));

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

@ -66,7 +66,7 @@ public class DeleteApplication extends Command {
try { try {
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
if (territorio.getComuneId() != sportello.getComuneId() || !intPratica.isInLavorazioneSue()) { if (territorio.getComuneId() != sportello.getComuneId() || !intPratica.isInLavorazioneSue()) {
additionalInfo.add("Istanza " + applicationId + " non cancellabile"); additionalInfo.add("Istanza " + applicationId + " non modificabile");
ServletResponseUtil.write(response, Response.get(Status.INVALID_INPUT, additionalInfo)); ServletResponseUtil.write(response, Response.get(Status.INVALID_INPUT, additionalInfo));
return; return;
} }

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

@ -26,7 +26,7 @@ import com.liferay.portal.kernel.servlet.ServletResponseUtil;
public class GetApplications extends Command { public class GetApplications extends Command {
private static final List<Parameter> OUTPUT_PARAMETERS = new ArrayList<Parameter>(); private static final List<Parameter> OUTPUT_PARAMETERS = new ArrayList<>();
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.APPLICATIONS, TYPES.ARRAY, "Elenco di istanze presentate");

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

@ -23,7 +23,7 @@ import com.liferay.portal.kernel.servlet.ServletResponseUtil;
public class ListApplications extends Command { public class ListApplications extends Command {
private static final List<Parameter> OUTPUT_PARAMETERS = new ArrayList<Parameter>(); private static final List<Parameter> OUTPUT_PARAMETERS = new ArrayList<>();
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.DOCUMENTS, TYPES.ARRAY, "Elenco di istanze presentabili");

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

@ -23,7 +23,7 @@ import com.liferay.portal.kernel.servlet.ServletResponseUtil;
public class ListDocuments 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<>();
static { static {
OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS); OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS);
Parameter p = new Parameter(Parameters.DOCUMENTS, TYPES.ARRAY, "Elenco di documenti"); Parameter p = new Parameter(Parameters.DOCUMENTS, TYPES.ARRAY, "Elenco di documenti");

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

@ -14,19 +14,17 @@ import java.sql.Types;
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.Locale;
import java.util.Map; import java.util.Map;
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.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 ListFields 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<>();
static { static {
OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS); OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS);
Parameter p = new Parameter(Parameters.FIELDS, TYPES.ARRAY, "Elenco di dati accettati"); Parameter p = new Parameter(Parameters.FIELDS, TYPES.ARRAY, "Elenco di dati accettati");
@ -44,17 +42,21 @@ public class ListFields extends Command {
@Override @Override
public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { public void run(HttpServletRequest request, HttpServletResponse response) throws Exception {
List<Field> fields = new ArrayList<>(); List<Field> list = new ArrayList<>();
Map<String, Integer> fieldTypes = DettPraticaLocalServiceUtil.getDettPraticaFieldsTypes(); Map<String, Integer> fieldTypes = DettPraticaLocalServiceUtil.getDettPraticaFieldsTypes();
Map<String, List<String>> dpFields = DettPraticaLocalServiceUtil.getFields(); List<String> fields = DettPraticaLocalServiceUtil.getDettPraticaFields();
for (String section : dpFields.keySet()) { for (String field : fields) {
List<String> sFields = dpFields.get(section); String description = StringPool.BLANK;
for (String field : sFields) { boolean insert = true;
String description = StringPool.OPEN_BRACKET switch (field) {
+ section case "destinazione":
+ "] " description = "Codice della destinazione d'uso, l'elenco è fornito dal comando /"
+ LanguageUtil.get(Locale.ITALIAN, field.replaceAll("([A-Z])", "-$1").toLowerCase()).replace( + getCommandName(ListUses.class);
"<br/>", StringPool.SPACE); break;
default:
insert = false;
}
if (insert) {
TYPES type = TYPES.UNKNOWN; TYPES type = TYPES.UNKNOWN;
switch (fieldTypes.get(field)) { switch (fieldTypes.get(field)) {
case Types.BIGINT: case Types.BIGINT:
@ -74,11 +76,11 @@ public class ListFields extends Command {
type = TYPES.STRING; type = TYPES.STRING;
break; break;
} }
fields.add(new Field(field, description, type)); list.add(new Field(field, description, type));
} }
} }
Map<String, Serializable> result = new HashMap<>(); Map<String, Serializable> result = new HashMap<>();
result.put(Parameters.FIELDS, (Serializable) fields); result.put(Parameters.FIELDS, (Serializable) list);
ServletResponseUtil.write(response, Response.get(Status.OK, result)); ServletResponseUtil.write(response, Response.get(Status.OK, result));
} }

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

@ -23,7 +23,7 @@ import com.liferay.portal.kernel.servlet.ServletResponseUtil;
public class ListUses 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<>();
static { static {
OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS); OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS);
Parameter p = new Parameter(Parameters.USES, TYPES.ARRAY, "Elenco di destinazioni d'uso"); Parameter p = new Parameter(Parameters.USES, TYPES.ARRAY, "Elenco di destinazioni d'uso");
@ -40,7 +40,7 @@ public class ListUses extends Command {
public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { public void run(HttpServletRequest request, HttpServletResponse response) throws Exception {
List<ListElement> uses = new ArrayList<>(); List<ListElement> uses = new ArrayList<>();
for (Entry<String, String> e : DettPraticaLocalServiceUtil.getDestinazioniuso().entrySet()) { for (Entry<String, String> e : DettPraticaLocalServiceUtil.getDestinazioniUso().entrySet()) {
uses.add(new ListElement(e.getKey(), e.getValue())); uses.add(new ListElement(e.getKey(), e.getValue()));
} }
Map<String, Serializable> result = new HashMap<>(); Map<String, Serializable> result = new HashMap<>();

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

@ -0,0 +1,123 @@
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.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.DettPratica;
import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.servlet.ServletResponseUtil;
import com.liferay.portal.kernel.util.MapUtil;
.portal.kernel.util.MapUtil;
public class SetFields extends Command {
private static final List<Parameter> INPUT_PARAMETERS = new ArrayList<>();
static {
INPUT_PARAMETERS.add(new Parameter(Parameters.APPLICATION_ID, TYPES.INTEGER, "Id dell'istanza"));
Parameter p = new Parameter(Parameters.FIELDS, TYPES.ARRAY, "Elenco di campi da impostare");
p.addSubParameter(new Parameter(Parameters.NAME, TYPES.STRING, "Nome del campo"));
p.addSubParameter(new Parameter(Parameters.VALUE, TYPES.VARYING, "Valore da impostare per il campo"));
}
public SetFields(String description, String... methods) {
super(description, methods);
}
@Override
public void run(HttpServletRequest request, HttpServletResponse response) throws Exception {
if (verifyAccessToken(request, response)) {
List<String> additionalInfo = new ArrayList<String>();
if (!parameters.containsKey(Parameters.APPLICATION_ID)) {
additionalInfo.add("Parametro " + Parameters.APPLICATION_ID + " mancante");
ServletResponseUtil.write(response, Response.get(Status.MALFORMED_REQUEST, additionalInfo));
return;
}
if (!parameters.containsKey(Parameters.FIELDS)) {
additionalInfo.add("Parametro " + Parameters.FIELDS + " mancante");
ServletResponseUtil.write(response, Response.get(Status.MALFORMED_REQUEST, additionalInfo));
return;
}
Object mapObj = parameters.get(Parameters.FIELDS);
if (!(mapObj instanceof Map<?, ?>)) {
additionalInfo.add("Formato del parametro " + Parameters.FIELDS + " errato");
ServletResponseUtil.write(response, Response.get(Status.MALFORMED_REQUEST, additionalInfo));
return;
}
@SuppressWarnings("unchecked")
Map<Object, Object> mapMap = (Map<Object, Object>) mapObj;
if (mapMap.size() > 0) {
Entry<Object, Object> i = mapMap.entrySet().iterator().next();
System.out.println("====== " + i.getValue().getClass().getName());
if (!(i.getKey() instanceof String) || !(i.getValue() instanceof Serializable)) {
System.out.println("****** " + i.getValue().getClass().getName());
}
if (i.getValue() instanceof String) {
System.out.println("String");
}
if (i.getValue() instanceof Date) {
System.out.println("Date");
}
if (i.getValue() instanceof Long) {
System.out.println("Long");
}
System.out.println(i.getValue() + "!!!");
}
long applicationId = MapUtil.getLong(parameters, Parameters.APPLICATION_ID);
IntPratica intPratica = null;
Object obj = parameters.get(Parameters.FIELDS);
try {
intPratica = IntPraticaLocalServiceUtil.getIntPratica(applicationId);
} catch (PortalException | SystemException e) {
additionalInfo.add("Istanza " + applicationId + " non trovata");
ServletResponseUtil.write(response, Response.get(Status.INVALID_INPUT, additionalInfo));
return;
}
DettPratica dettPratica = null;
try {
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
if (territorio.getComuneId() != sportello.getComuneId() || !intPratica.isInLavorazioneSue()) {
additionalInfo.add("Istanza " + applicationId + " non modificabile");
ServletResponseUtil.write(response, Response.get(Status.INVALID_INPUT, additionalInfo));
return;
}
dettPratica = DettPraticaLocalServiceUtil.getLastEditableByIntPratica(applicationId);
} catch (PortalException | SystemException e) {
additionalInfo.add("Errore del server durante il caricamento dell'istanza");
ServletResponseUtil.write(response, Response.get(Status.INVALID_INPUT, additionalInfo));
return;
}
ServletResponseUtil.write(response, Response.get(Status.OK));
}
}
@Override
public List<Parameter> getInputParameters() {
return INPUT_PARAMETERS;
}
@Override
public List<Parameter> getOutputParameters() {
return BASE_OUTPUT_PARAMETERS;
}
}

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

@ -1,9 +1,17 @@
package it.mwg.sicilia.sue.api.v1.command.impl; 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.Status;
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.DettPratica;
import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -11,6 +19,11 @@ import java.util.List;
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.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.servlet.ServletResponseUtil;
import com.liferay.portal.kernel.util.MapUtil;
public class SetUse extends Command { public class SetUse extends Command {
@SuppressWarnings("serial") @SuppressWarnings("serial")
@ -20,7 +33,7 @@ public class SetUse extends Command {
add(new Parameter(Parameters.CODE, TYPES.STRING, "Codice della destinazione d'uso come restituito da /" add(new Parameter(Parameters.CODE, TYPES.STRING, "Codice della destinazione d'uso come restituito da /"
+ getCommandName(ListUses.class))); + getCommandName(ListUses.class)));
add(new Parameter(Parameters.DESCRIPTION, TYPES.STRING, add(new Parameter(Parameters.DESCRIPTION, TYPES.STRING,
"Descrizione della destinazione d'uso, obbligatoria se " + Parameters.CODE + " = 3", false)); "Descrizione della destinazione d'uso, obbligatoria* se " + Parameters.CODE + " = 3", false));
} }
}; };
@ -32,7 +45,49 @@ public class SetUse extends Command {
public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { public void run(HttpServletRequest request, HttpServletResponse response) throws Exception {
if (verifyAccessToken(request, response)) { if (verifyAccessToken(request, response)) {
List<String> additionalInfo = new ArrayList<String>();
if (!parameters.containsKey(Parameters.APPLICATION_ID)) {
additionalInfo.add("Parametro " + Parameters.APPLICATION_ID + " mancante");
ServletResponseUtil.write(response, Response.get(Status.MALFORMED_REQUEST, additionalInfo));
return;
}
if (!parameters.containsKey(Parameters.CODE)) {
additionalInfo.add("Parametro " + Parameters.CODE + " mancante");
ServletResponseUtil.write(response, Response.get(Status.MALFORMED_REQUEST, additionalInfo));
return;
}
long applicationId = MapUtil.getLong(parameters, Parameters.APPLICATION_ID);
String code = MapUtil.getString(parameters, Parameters.CODE);
if (!DettPraticaLocalServiceUtil.getDestinazioniUso().containsKey(code)) {
additionalInfo.add("Parametro " + Parameters.CODE + " = " + code + " non valido");
ServletResponseUtil.write(response, Response.get(Status.MALFORMED_REQUEST, additionalInfo));
return;
}
IntPratica intPratica = null;
try {
intPratica = IntPraticaLocalServiceUtil.getIntPratica(applicationId);
} catch (PortalException | SystemException e) {
additionalInfo.add("Istanza " + applicationId + " non trovata");
ServletResponseUtil.write(response, Response.get(Status.INVALID_INPUT, additionalInfo));
return;
}
DettPratica dettPratica = null;
try {
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
if (territorio.getComuneId() != sportello.getComuneId() || !intPratica.isInLavorazioneSue()) {
additionalInfo.add("Istanza " + applicationId + " non modificabile");
ServletResponseUtil.write(response, Response.get(Status.INVALID_INPUT, additionalInfo));
return;
}
dettPratica = DettPraticaLocalServiceUtil.getLastEditableByIntPratica(applicationId);
} catch (PortalException | SystemException e) {
additionalInfo.add("Errore del server durante il caricamento dell'istanza");
ServletResponseUtil.write(response, Response.get(Status.INVALID_INPUT, additionalInfo));
return;
}
dettPratica.setDestinazione(code);
DettPraticaLocalServiceUtil.updateDettPratica(dettPratica);
ServletResponseUtil.write(response, Response.get(Status.OK));
} }
} }

2
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 { public static enum TYPES {
ARRAY, BOOLEAN, FLOAT, INTEGER, STRING, TIMESTAMP, TEXT_HTML, TEXT_PLAIN, UNKNOWN ARRAY, BOOLEAN, FLOAT, INTEGER, STRING, TIMESTAMP, TEXT_HTML, TEXT_PLAIN, UNKNOWN, VARYING
} }
} }

Caricamento…
Annulla
Salva