Sfoglia il codice sorgente

Fix IOException nuove asseverazioni

master
Salvatore La Manna 4 anni fa
parent
commit
52f3cdb220
  1. BIN
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/util-java.jar
  2. 9
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneService.java
  3. 21
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneServiceClp.java
  4. 9
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneServiceUtil.java
  5. 9
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/AsseverazioneServiceWrapper.java
  6. 12
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalService.java
  7. 28
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceClp.java
  8. 12
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceUtil.java
  9. 12
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/DettPraticaLocalServiceWrapper.java
  10. 335
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneServiceImpl.java
  11. 11
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java
  12. 880
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/PagamentiUtil.java
  13. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties

BIN
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

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

@ -67,13 +67,15 @@ public interface AsseverazioneService extends BaseService, InvokableService {
public void cambioStatoAsseverazione(long asseverazioneId, public void cambioStatoAsseverazione(long asseverazioneId,
java.lang.String stato) java.lang.String stato)
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,
java.io.IOException;
public void cambioStatoAsseverazioni(long dettPraticaId, public void cambioStatoAsseverazioni(long dettPraticaId,
java.lang.String stato) java.lang.String stato)
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,
com.liferay.portal.security.auth.PrincipalException; com.liferay.portal.security.auth.PrincipalException,
java.io.IOException;
public void richiediAsseverazioni(long dettPraticaId, public void richiediAsseverazioni(long dettPraticaId,
com.liferay.portal.service.ServiceContext serviceContext) com.liferay.portal.service.ServiceContext serviceContext)
@ -88,7 +90,8 @@ public interface AsseverazioneService extends BaseService, InvokableService {
public void annullaAsseverazioni(long dettPraticaId) public void annullaAsseverazioni(long dettPraticaId)
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,
com.liferay.portal.security.auth.PrincipalException; com.liferay.portal.security.auth.PrincipalException,
java.io.IOException;
public void rimuoviFileAsseverazione(long asseverazioneId) public void rimuoviFileAsseverazione(long asseverazioneId)
throws com.liferay.portal.kernel.exception.PortalException, throws com.liferay.portal.kernel.exception.PortalException,

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

@ -268,7 +268,8 @@ public class AsseverazioneServiceClp implements AsseverazioneService {
public void cambioStatoAsseverazione(long asseverazioneId, public void cambioStatoAsseverazione(long asseverazioneId,
java.lang.String stato) java.lang.String stato)
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,
java.io.IOException {
try { try {
_invokableService.invokeMethod(_methodName3, _invokableService.invokeMethod(_methodName3,
_methodParameterTypes3, _methodParameterTypes3,
@ -289,6 +290,10 @@ public class AsseverazioneServiceClp implements AsseverazioneService {
throw (com.liferay.portal.kernel.exception.SystemException)t; throw (com.liferay.portal.kernel.exception.SystemException)t;
} }
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }
@ -304,7 +309,8 @@ public class AsseverazioneServiceClp implements AsseverazioneService {
java.lang.String stato) java.lang.String stato)
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,
com.liferay.portal.security.auth.PrincipalException { com.liferay.portal.security.auth.PrincipalException,
java.io.IOException {
try { try {
_invokableService.invokeMethod(_methodName4, _invokableService.invokeMethod(_methodName4,
_methodParameterTypes4, _methodParameterTypes4,
@ -326,6 +332,10 @@ public class AsseverazioneServiceClp implements AsseverazioneService {
throw (com.liferay.portal.security.auth.PrincipalException)t; throw (com.liferay.portal.security.auth.PrincipalException)t;
} }
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }
@ -410,7 +420,8 @@ public class AsseverazioneServiceClp implements AsseverazioneService {
public void annullaAsseverazioni(long dettPraticaId) public void annullaAsseverazioni(long dettPraticaId)
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,
com.liferay.portal.security.auth.PrincipalException { com.liferay.portal.security.auth.PrincipalException,
java.io.IOException {
try { try {
_invokableService.invokeMethod(_methodName7, _invokableService.invokeMethod(_methodName7,
_methodParameterTypes7, new Object[] { dettPraticaId }); _methodParameterTypes7, new Object[] { dettPraticaId });
@ -430,6 +441,10 @@ public class AsseverazioneServiceClp implements AsseverazioneService {
throw (com.liferay.portal.security.auth.PrincipalException)t; throw (com.liferay.portal.security.auth.PrincipalException)t;
} }
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }

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

@ -66,7 +66,8 @@ public class AsseverazioneServiceUtil {
public static void cambioStatoAsseverazione(long asseverazioneId, public static void cambioStatoAsseverazione(long asseverazioneId,
java.lang.String stato) java.lang.String stato)
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,
java.io.IOException {
getService().cambioStatoAsseverazione(asseverazioneId, stato); getService().cambioStatoAsseverazione(asseverazioneId, stato);
} }
@ -74,7 +75,8 @@ public class AsseverazioneServiceUtil {
java.lang.String stato) java.lang.String stato)
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,
com.liferay.portal.security.auth.PrincipalException { com.liferay.portal.security.auth.PrincipalException,
java.io.IOException {
getService().cambioStatoAsseverazioni(dettPraticaId, stato); getService().cambioStatoAsseverazioni(dettPraticaId, stato);
} }
@ -96,7 +98,8 @@ public class AsseverazioneServiceUtil {
public static void annullaAsseverazioni(long dettPraticaId) public static void annullaAsseverazioni(long dettPraticaId)
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,
com.liferay.portal.security.auth.PrincipalException { com.liferay.portal.security.auth.PrincipalException,
java.io.IOException {
getService().annullaAsseverazioni(dettPraticaId); getService().annullaAsseverazioni(dettPraticaId);
} }

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

@ -62,7 +62,8 @@ public class AsseverazioneServiceWrapper implements AsseverazioneService,
public void cambioStatoAsseverazione(long asseverazioneId, public void cambioStatoAsseverazione(long asseverazioneId,
java.lang.String stato) java.lang.String stato)
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,
java.io.IOException {
_asseverazioneService.cambioStatoAsseverazione(asseverazioneId, stato); _asseverazioneService.cambioStatoAsseverazione(asseverazioneId, stato);
} }
@ -71,7 +72,8 @@ public class AsseverazioneServiceWrapper implements AsseverazioneService,
java.lang.String stato) java.lang.String stato)
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,
com.liferay.portal.security.auth.PrincipalException { com.liferay.portal.security.auth.PrincipalException,
java.io.IOException {
_asseverazioneService.cambioStatoAsseverazioni(dettPraticaId, stato); _asseverazioneService.cambioStatoAsseverazioni(dettPraticaId, stato);
} }
@ -96,7 +98,8 @@ public class AsseverazioneServiceWrapper implements AsseverazioneService,
public void annullaAsseverazioni(long dettPraticaId) public void annullaAsseverazioni(long dettPraticaId)
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,
com.liferay.portal.security.auth.PrincipalException { com.liferay.portal.security.auth.PrincipalException,
java.io.IOException {
_asseverazioneService.annullaAsseverazioni(dettPraticaId); _asseverazioneService.annullaAsseverazioni(dettPraticaId);
} }

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

@ -755,12 +755,14 @@ public interface DettPraticaLocalService extends BaseLocalService,
public void updateEsitoPagamento(long pagamentoId, long dettPraticaId, public void updateEsitoPagamento(long pagamentoId, long dettPraticaId,
java.lang.String stato) java.lang.String stato)
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,
java.io.IOException;
public void updateEsitoPagamento(long pagamentoId, long dettPraticaId, public void updateEsitoPagamento(long pagamentoId, long dettPraticaId,
long fileEntryId, java.lang.String stato) long fileEntryId, java.lang.String stato)
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,
java.io.IOException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true) @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public boolean isControlloObbligatorio( public boolean isControlloObbligatorio(
@ -769,12 +771,14 @@ public interface DettPraticaLocalService extends BaseLocalService,
public it.tref.liferay.portos.bo.model.DettPratica updateEsito( public it.tref.liferay.portos.bo.model.DettPratica updateEsito(
long dettPraticaId, int stato) long dettPraticaId, int stato)
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,
java.io.IOException;
public it.tref.liferay.portos.bo.model.DettPratica updateEsitoIntegrazione( public it.tref.liferay.portos.bo.model.DettPratica updateEsitoIntegrazione(
long dettPraticaId, int stato) long dettPraticaId, int stato)
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,
java.io.IOException;
public it.tref.liferay.portos.bo.model.DettPratica pagaInvia( public it.tref.liferay.portos.bo.model.DettPratica pagaInvia(
long dettPraticaId, int pagAdeguamentoSismico, int pagAltro, long dettPraticaId, int pagAdeguamentoSismico, int pagAltro,

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

@ -3387,7 +3387,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
public void updateEsitoPagamento(long pagamentoId, long dettPraticaId, public void updateEsitoPagamento(long pagamentoId, long dettPraticaId,
java.lang.String stato) java.lang.String stato)
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,
java.io.IOException {
try { try {
_invokableLocalService.invokeMethod(_methodName47, _invokableLocalService.invokeMethod(_methodName47,
_methodParameterTypes47, _methodParameterTypes47,
@ -3410,6 +3411,10 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
throw (com.liferay.portal.kernel.exception.SystemException)t; throw (com.liferay.portal.kernel.exception.SystemException)t;
} }
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }
@ -3424,7 +3429,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
public void updateEsitoPagamento(long pagamentoId, long dettPraticaId, public void updateEsitoPagamento(long pagamentoId, long dettPraticaId,
long fileEntryId, java.lang.String stato) long fileEntryId, java.lang.String stato)
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,
java.io.IOException {
try { try {
_invokableLocalService.invokeMethod(_methodName48, _invokableLocalService.invokeMethod(_methodName48,
_methodParameterTypes48, _methodParameterTypes48,
@ -3449,6 +3455,10 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
throw (com.liferay.portal.kernel.exception.SystemException)t; throw (com.liferay.portal.kernel.exception.SystemException)t;
} }
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }
@ -3488,7 +3498,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
public it.tref.liferay.portos.bo.model.DettPratica updateEsito( public it.tref.liferay.portos.bo.model.DettPratica updateEsito(
long dettPraticaId, int stato) long dettPraticaId, int stato)
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,
java.io.IOException {
Object returnObj = null; Object returnObj = null;
try { try {
@ -3507,6 +3518,10 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
throw (com.liferay.portal.kernel.exception.SystemException)t; throw (com.liferay.portal.kernel.exception.SystemException)t;
} }
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }
@ -3523,7 +3538,8 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
public it.tref.liferay.portos.bo.model.DettPratica updateEsitoIntegrazione( public it.tref.liferay.portos.bo.model.DettPratica updateEsitoIntegrazione(
long dettPraticaId, int stato) long dettPraticaId, int stato)
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,
java.io.IOException {
Object returnObj = null; Object returnObj = null;
try { try {
@ -3542,6 +3558,10 @@ public class DettPraticaLocalServiceClp implements DettPraticaLocalService {
throw (com.liferay.portal.kernel.exception.SystemException)t; throw (com.liferay.portal.kernel.exception.SystemException)t;
} }
if (t instanceof java.io.IOException) {
throw (java.io.IOException)t;
}
if (t instanceof RuntimeException) { if (t instanceof RuntimeException) {
throw (RuntimeException)t; throw (RuntimeException)t;
} }

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

@ -1017,14 +1017,16 @@ public class DettPraticaLocalServiceUtil {
public static void updateEsitoPagamento(long pagamentoId, public static void updateEsitoPagamento(long pagamentoId,
long dettPraticaId, java.lang.String stato) long dettPraticaId, java.lang.String stato)
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,
java.io.IOException {
getService().updateEsitoPagamento(pagamentoId, dettPraticaId, stato); getService().updateEsitoPagamento(pagamentoId, dettPraticaId, stato);
} }
public static void updateEsitoPagamento(long pagamentoId, public static void updateEsitoPagamento(long pagamentoId,
long dettPraticaId, long fileEntryId, java.lang.String stato) long dettPraticaId, long fileEntryId, java.lang.String stato)
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,
java.io.IOException {
getService() getService()
.updateEsitoPagamento(pagamentoId, dettPraticaId, fileEntryId, stato); .updateEsitoPagamento(pagamentoId, dettPraticaId, fileEntryId, stato);
} }
@ -1037,14 +1039,16 @@ public class DettPraticaLocalServiceUtil {
public static it.tref.liferay.portos.bo.model.DettPratica updateEsito( public static it.tref.liferay.portos.bo.model.DettPratica updateEsito(
long dettPraticaId, int stato) long dettPraticaId, int stato)
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,
java.io.IOException {
return getService().updateEsito(dettPraticaId, stato); return getService().updateEsito(dettPraticaId, stato);
} }
public static it.tref.liferay.portos.bo.model.DettPratica updateEsitoIntegrazione( public static it.tref.liferay.portos.bo.model.DettPratica updateEsitoIntegrazione(
long dettPraticaId, int stato) long dettPraticaId, int stato)
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,
java.io.IOException {
return getService().updateEsitoIntegrazione(dettPraticaId, stato); return getService().updateEsitoIntegrazione(dettPraticaId, stato);
} }

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

@ -1048,7 +1048,8 @@ public class DettPraticaLocalServiceWrapper implements DettPraticaLocalService,
public void updateEsitoPagamento(long pagamentoId, long dettPraticaId, public void updateEsitoPagamento(long pagamentoId, long dettPraticaId,
java.lang.String stato) java.lang.String stato)
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,
java.io.IOException {
_dettPraticaLocalService.updateEsitoPagamento(pagamentoId, _dettPraticaLocalService.updateEsitoPagamento(pagamentoId,
dettPraticaId, stato); dettPraticaId, stato);
} }
@ -1057,7 +1058,8 @@ public class DettPraticaLocalServiceWrapper implements DettPraticaLocalService,
public void updateEsitoPagamento(long pagamentoId, long dettPraticaId, public void updateEsitoPagamento(long pagamentoId, long dettPraticaId,
long fileEntryId, java.lang.String stato) long fileEntryId, java.lang.String stato)
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,
java.io.IOException {
_dettPraticaLocalService.updateEsitoPagamento(pagamentoId, _dettPraticaLocalService.updateEsitoPagamento(pagamentoId,
dettPraticaId, fileEntryId, stato); dettPraticaId, fileEntryId, stato);
} }
@ -1072,7 +1074,8 @@ public class DettPraticaLocalServiceWrapper implements DettPraticaLocalService,
public it.tref.liferay.portos.bo.model.DettPratica updateEsito( public it.tref.liferay.portos.bo.model.DettPratica updateEsito(
long dettPraticaId, int stato) long dettPraticaId, int stato)
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,
java.io.IOException {
return _dettPraticaLocalService.updateEsito(dettPraticaId, stato); return _dettPraticaLocalService.updateEsito(dettPraticaId, stato);
} }
@ -1080,7 +1083,8 @@ public class DettPraticaLocalServiceWrapper implements DettPraticaLocalService,
public it.tref.liferay.portos.bo.model.DettPratica updateEsitoIntegrazione( public it.tref.liferay.portos.bo.model.DettPratica updateEsitoIntegrazione(
long dettPraticaId, int stato) long dettPraticaId, int stato)
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,
java.io.IOException {
return _dettPraticaLocalService.updateEsitoIntegrazione(dettPraticaId, return _dettPraticaLocalService.updateEsitoIntegrazione(dettPraticaId,
stato); stato);
} }

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

@ -16,6 +16,7 @@ import it.tref.liferay.portos.bo.model.Asseverazione;
import it.tref.liferay.portos.bo.service.base.AsseverazioneServiceBaseImpl; import it.tref.liferay.portos.bo.service.base.AsseverazioneServiceBaseImpl;
import it.tref.liferay.portos.bo.util.AsseverazioniUtil; import it.tref.liferay.portos.bo.util.AsseverazioniUtil;
import java.io.IOException;
import java.util.List; import java.util.List;
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.PortalException;
@ -29,13 +30,14 @@ import com.liferay.portal.service.ServiceContext;
* The implementation of the asseverazione remote service. * The implementation of the asseverazione remote service.
* *
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun * All custom service methods should be put in this class. Whenever methods are
* ServiceBuilder to copy their definitions into the * added, rerun ServiceBuilder to copy their definitions into the
* {@link it.tref.liferay.portos.bo.service.AsseverazioneService} interface. * {@link it.tref.liferay.portos.bo.service.AsseverazioneService} interface.
* *
* <p> * <p>
* This is a remote service. Methods of this service are expected to have security checks based on * This is a remote service. Methods of this service are expected to have
* the propagated JAAS credentials because this service can be accessed remotely. * security checks based on the propagated JAAS credentials because this service
* can be accessed remotely.
* </p> * </p>
* *
* @author Davide Barbagallo, 3F Consulting * @author Davide Barbagallo, 3F Consulting
@ -43,223 +45,238 @@ import com.liferay.portal.service.ServiceContext;
* @see it.tref.liferay.portos.bo.service.AsseverazioneServiceUtil * @see it.tref.liferay.portos.bo.service.AsseverazioneServiceUtil
*/ */
public class AsseverazioneServiceImpl extends AsseverazioneServiceBaseImpl { public class AsseverazioneServiceImpl extends AsseverazioneServiceBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use
* it.tref.liferay.portos.bo.service.AsseverazioneServiceUtil} to access the asseverazione remote * {@link it.tref.liferay.portos.bo.service.AsseverazioneServiceUtil} to
* service. * access the asseverazione remote service.
*/ */
public void cambioStatoAsseverazione(long asseverazioneId, String stato) throws SystemException, PortalException { public void cambioStatoAsseverazione(long asseverazioneId, String stato) throws IOException,
SystemException, PortalException {
if (AsseverazioniUtil.hasCambioStatoAsseverazione(getUserId(), asseverazioneId)) { if (AsseverazioniUtil.hasCambioStatoAsseverazione(getUserId(), asseverazioneId)) {
asseverazioneLocalService.cambioStatoAsseverazione(getUserId(), asseverazioneId, stato); asseverazioneLocalService.cambioStatoAsseverazione(getUserId(), asseverazioneId, stato);
} else { } else {
throw new SystemException("annulla-asseverazione-non-possibile"); throw new SystemException("annulla-asseverazione-non-possibile");
} }
} }
public void cambioStatoAsseverazioni(long dettPraticaId, String stato) throws SystemException, PrincipalException, public void cambioStatoAsseverazioni(long dettPraticaId, String stato) throws IOException,
PortalException { SystemException, PrincipalException, PortalException {
if (AsseverazioniUtil.hasRichiediAsseverazioni(getUserId(), dettPraticaId)) { if (AsseverazioniUtil.hasRichiediAsseverazioni(getUserId(), dettPraticaId)) {
asseverazioneLocalService.cambioStatoAsseverazioni(dettPraticaId, stato); asseverazioneLocalService.cambioStatoAsseverazioni(dettPraticaId, stato);
} else { } else {
throw new SystemException("annulla-asseverazione-non-possibile"); throw new SystemException("annulla-asseverazione-non-possibile");
} }
} }
public void richiediAsseverazioni(long dettPraticaId, ServiceContext serviceContext) throws PrincipalException, public void richiediAsseverazioni(long dettPraticaId, ServiceContext serviceContext)
PortalException, SystemException { throws PrincipalException, PortalException, SystemException {
if (AsseverazioniUtil.hasRichiediAsseverazioni(getUserId(), dettPraticaId)) { if (AsseverazioniUtil.hasRichiediAsseverazioni(getUserId(), dettPraticaId)) {
asseverazioneLocalService.richiediAsseverazioni(dettPraticaId, serviceContext); asseverazioneLocalService.richiediAsseverazioni(dettPraticaId, serviceContext);
} else { } else {
throw new SystemException("richiedi-asseverazione-non-possibile"); throw new SystemException("richiedi-asseverazione-non-possibile");
} }
} }
public void resetAsseverazione(long dettPraticaId, long asseverazioneId) throws PortalException, SystemException { public void resetAsseverazione(long dettPraticaId, long asseverazioneId) throws PortalException,
SystemException {
if (AsseverazioniUtil.hasAnnullaAsseverazioni(getUserId(), dettPraticaId)) { if (AsseverazioniUtil.hasAnnullaAsseverazioni(getUserId(), dettPraticaId)) {
asseverazioneLocalService.resetAsseverazione(asseverazioneId); asseverazioneLocalService.resetAsseverazione(asseverazioneId);
} else { } else {
throw new SystemException("reset-asseverazione-non-possibile"); throw new SystemException("reset-asseverazione-non-possibile");
} }
} }
public void annullaAsseverazioni(long dettPraticaId) throws PrincipalException, PortalException, SystemException { public void annullaAsseverazioni(long dettPraticaId) throws IOException, PrincipalException,
PortalException, SystemException {
if (AsseverazioniUtil.hasAnnullaAsseverazioni(getUserId(), dettPraticaId)) { if (AsseverazioniUtil.hasAnnullaAsseverazioni(getUserId(), dettPraticaId)) {
asseverazioneLocalService.annullaAsseverazioni(dettPraticaId); asseverazioneLocalService.annullaAsseverazioni(dettPraticaId);
} else { } else {
throw new SystemException("annulla-asseverazione-non-possibile"); throw new SystemException("annulla-asseverazione-non-possibile");
} }
} }
public void rimuoviFileAsseverazione(long asseverazioneId) throws SystemException, PortalException { public void rimuoviFileAsseverazione(long asseverazioneId) throws SystemException, PortalException {
if (AsseverazioniUtil.hasGestisciFileAsseverazione(getUserId(), asseverazioneId)) { if (AsseverazioniUtil.hasGestisciFileAsseverazione(getUserId(), asseverazioneId)) {
asseverazioneLocalService.rimuoviFileAsseverazione(asseverazioneId); asseverazioneLocalService.rimuoviFileAsseverazione(asseverazioneId);
} else { } else {
throw new SystemException("annulla-asseverazione-non-possibile"); throw new SystemException("annulla-asseverazione-non-possibile");
} }
} }
public FileEntry allegaFileAsseverazione(long asseverazioneId, byte[] content, String sourceFileName, public FileEntry allegaFileAsseverazione(long asseverazioneId, byte[] content, String sourceFileName,
ServiceContext serviceContext) throws SystemException, PortalException { ServiceContext serviceContext) throws SystemException, PortalException {
if (AsseverazioniUtil.hasGestisciFileAsseverazione(getUserId(), asseverazioneId)) { if (AsseverazioniUtil.hasGestisciFileAsseverazione(getUserId(), asseverazioneId)) {
return asseverazioneLocalService.allegaFileAsseverazione(asseverazioneId, content, sourceFileName, serviceContext); return asseverazioneLocalService.allegaFileAsseverazione(asseverazioneId, content,
} else { sourceFileName, serviceContext);
throw new SystemException("annulla-asseverazione-non-possibile"); } else {
} throw new SystemException("annulla-asseverazione-non-possibile");
} }
}
public List<Asseverazione> findByIntPratica(long intPraticaId, int start, int end, OrderByComparator orderByComparator) public List<Asseverazione> findByIntPratica(long intPraticaId, int start, int end,
throws SystemException { OrderByComparator orderByComparator) throws SystemException {
return asseverazioneLocalService.findByIntPratica(intPraticaId, start, end, orderByComparator); return asseverazioneLocalService.findByIntPratica(intPraticaId, start, end, orderByComparator);
} }
public List<Asseverazione> findByDettPratica(long dettPraticaId, int start, int end, public List<Asseverazione> findByDettPratica(long dettPraticaId, int start, int end,
OrderByComparator orderByComparator) throws SystemException { OrderByComparator orderByComparator) throws SystemException {
return asseverazioneLocalService.findByDettPratica(dettPraticaId, start, end, orderByComparator); return asseverazioneLocalService.findByDettPratica(dettPraticaId, start, end, orderByComparator);
} }
public int countByIntPratica(long intPraticaId) throws SystemException { public int countByIntPratica(long intPraticaId) throws SystemException {
return asseverazioneLocalService.countByIntPratica(intPraticaId); return asseverazioneLocalService.countByIntPratica(intPraticaId);
} }
public int countByDettPratica(long dettPraticaId) throws SystemException { public int countByDettPratica(long dettPraticaId) throws SystemException {
return asseverazioneLocalService.countByDettPratica(dettPraticaId); return asseverazioneLocalService.countByDettPratica(dettPraticaId);
} }
public List<Asseverazione> findByIntPratica_CodiceFiscale(long intPraticaId, String codiceFiscale, int start, public List<Asseverazione> findByIntPratica_CodiceFiscale(long intPraticaId, String codiceFiscale,
int end, OrderByComparator orderByComparator) throws SystemException { int start, int end, OrderByComparator orderByComparator) throws SystemException {
return asseverazioneLocalService.findByIntPratica_CodiceFiscale(intPraticaId, codiceFiscale, start, end, return asseverazioneLocalService.findByIntPratica_CodiceFiscale(intPraticaId, codiceFiscale, start,
orderByComparator); end, orderByComparator);
} }
public int countByIntPratica_CodiceFiscale(long intPraticaId, String codiceFiscale) throws SystemException { public int countByIntPratica_CodiceFiscale(long intPraticaId, String codiceFiscale)
throws SystemException {
return asseverazioneLocalService.countByIntPratica_CodiceFiscale(intPraticaId, codiceFiscale); return asseverazioneLocalService.countByIntPratica_CodiceFiscale(intPraticaId, codiceFiscale);
} }
public List<Asseverazione> findByCodiceFiscale_InEsito(String codiceFiscale, String[] esiti, int start, int end, public List<Asseverazione> findByCodiceFiscale_InEsito(String codiceFiscale, String[] esiti, int start,
OrderByComparator orderByComparator) throws SystemException { int end, OrderByComparator orderByComparator) throws SystemException {
return asseverazioneLocalService.findByCodiceFiscale_InEsito(codiceFiscale, esiti, start, end, orderByComparator); return asseverazioneLocalService.findByCodiceFiscale_InEsito(codiceFiscale, esiti, start, end,
} orderByComparator);
}
public int countByCodiceFiscale_InEsito(String codiceFiscale, String[] esiti) throws SystemException { public int countByCodiceFiscale_InEsito(String codiceFiscale, String[] esiti) throws SystemException {
return asseverazioneLocalService.countByCodiceFiscale_InEsito(codiceFiscale, esiti); return asseverazioneLocalService.countByCodiceFiscale_InEsito(codiceFiscale, esiti);
} }
public List<Asseverazione> findByIntPratica_CodiceFiscale_InEsito(long intPraticaId, String codiceFiscale, public List<Asseverazione> findByIntPratica_CodiceFiscale_InEsito(long intPraticaId,
String[] esiti, int start, int end, OrderByComparator orderByComparator) throws SystemException { String codiceFiscale, String[] esiti, int start, int end, OrderByComparator orderByComparator)
throws SystemException {
return asseverazioneLocalService.findByIntPratica_CodiceFiscale_InEsito(intPraticaId, codiceFiscale, esiti, start, return asseverazioneLocalService.findByIntPratica_CodiceFiscale_InEsito(intPraticaId, codiceFiscale,
end, orderByComparator); esiti, start, end, orderByComparator);
} }
public List<Asseverazione> findByDettPratica_CodiceFiscale_InEsito(long dettPraticaId, String codiceFiscale, public List<Asseverazione> findByDettPratica_CodiceFiscale_InEsito(long dettPraticaId,
String[] esiti, int start, int end, OrderByComparator orderByComparator) throws SystemException { String codiceFiscale, String[] esiti, int start, int end, OrderByComparator orderByComparator)
throws SystemException {
return asseverazioneLocalService.findByDettPratica_CodiceFiscale_InEsito(dettPraticaId, codiceFiscale, esiti, return asseverazioneLocalService.findByDettPratica_CodiceFiscale_InEsito(dettPraticaId,
start, end, orderByComparator); codiceFiscale, esiti, start, end, orderByComparator);
} }
public int countByIntPratica_CodiceFiscale_InEsito(long intPraticaId, String codiceFiscale, String[] esiti) public int countByIntPratica_CodiceFiscale_InEsito(long intPraticaId, String codiceFiscale, String[] esiti)
throws SystemException { throws SystemException {
return asseverazioneLocalService.countByIntPratica_CodiceFiscale_InEsito(intPraticaId, codiceFiscale, esiti); return asseverazioneLocalService.countByIntPratica_CodiceFiscale_InEsito(intPraticaId, codiceFiscale,
} esiti);
}
public int countByDettPratica_CodiceFiscale_InEsito(long dettPraticaId, String codiceFiscale, String[] esiti) public int countByDettPratica_CodiceFiscale_InEsito(long dettPraticaId, String codiceFiscale,
throws SystemException { String[] esiti) throws SystemException {
return asseverazioneLocalService.countByDettPratica_CodiceFiscale_InEsito(dettPraticaId, codiceFiscale, esiti); return asseverazioneLocalService.countByDettPratica_CodiceFiscale_InEsito(dettPraticaId,
} codiceFiscale, esiti);
}
public List<Asseverazione> findByIntPratica_InEsito(long intPraticaId, String[] esiti, int start, int end, public List<Asseverazione> findByIntPratica_InEsito(long intPraticaId, String[] esiti, int start,
OrderByComparator orderByComparator) throws SystemException { int end, OrderByComparator orderByComparator) throws SystemException {
return asseverazioneLocalService.findByIntPratica_InEsito(intPraticaId, esiti, start, end, orderByComparator); return asseverazioneLocalService.findByIntPratica_InEsito(intPraticaId, esiti, start, end,
} orderByComparator);
}
public int countByIntPratica_InEsito(long intPraticaId, String[] esiti) throws SystemException { public int countByIntPratica_InEsito(long intPraticaId, String[] esiti) throws SystemException {
return asseverazioneLocalService.countByIntPratica_InEsito(intPraticaId, esiti); return asseverazioneLocalService.countByIntPratica_InEsito(intPraticaId, esiti);
} }
public List<Asseverazione> findByDettPratica_InEsito(long dettPraticaId, String[] esiti, int start, int end, public List<Asseverazione> findByDettPratica_InEsito(long dettPraticaId, String[] esiti, int start,
OrderByComparator orderByComparator) throws SystemException { int end, OrderByComparator orderByComparator) throws SystemException {
return asseverazioneLocalService.findByDettPratica_InEsito(dettPraticaId, esiti, start, end, orderByComparator); return asseverazioneLocalService.findByDettPratica_InEsito(dettPraticaId, esiti, start, end,
} orderByComparator);
}
public int countByDettPratica_InEsito(long dettPraticaId, String[] esiti) throws SystemException { public int countByDettPratica_InEsito(long dettPraticaId, String[] esiti) throws SystemException {
return asseverazioneLocalService.countByDettPratica_InEsito(dettPraticaId, esiti); return asseverazioneLocalService.countByDettPratica_InEsito(dettPraticaId, esiti);
} }
public List<Asseverazione> findByCodiceFiscale_Tipologia_InEsito(String codiceFiscale, String tipologia, public List<Asseverazione> findByCodiceFiscale_Tipologia_InEsito(String codiceFiscale, String tipologia,
String[] esiti, int start, int end, OrderByComparator orderByComparator) throws SystemException { String[] esiti, int start, int end, OrderByComparator orderByComparator) throws SystemException {
return asseverazioneLocalService.findByCodiceFiscale_Tipologia_InEsito(codiceFiscale, tipologia, esiti, start, end, return asseverazioneLocalService.findByCodiceFiscale_Tipologia_InEsito(codiceFiscale, tipologia,
orderByComparator); esiti, start, end, orderByComparator);
} }
public int countByCodiceFiscale_Tipologia_InEsito(String codiceFiscale, String tipologia, String[] esiti) public int countByCodiceFiscale_Tipologia_InEsito(String codiceFiscale, String tipologia, String[] esiti)
throws SystemException { throws SystemException {
return asseverazioneLocalService.countByCodiceFiscale_Tipologia_InEsito(codiceFiscale, tipologia, esiti); return asseverazioneLocalService.countByCodiceFiscale_Tipologia_InEsito(codiceFiscale, tipologia,
} esiti);
}
public List<Asseverazione> findByIntPratica_CodiceFiscale_Tipologia_InEsito(long intPraticaId, String codiceFiscale, public List<Asseverazione> findByIntPratica_CodiceFiscale_Tipologia_InEsito(long intPraticaId,
String tipologia, String[] esiti, int start, int end, OrderByComparator orderByComparator) throws SystemException { String codiceFiscale, String tipologia, String[] esiti, int start, int end,
OrderByComparator orderByComparator) throws SystemException {
return asseverazioneLocalService.findByIntPratica_CodiceFiscale_Tipologia_InEsito(intPraticaId, codiceFiscale, return asseverazioneLocalService.findByIntPratica_CodiceFiscale_Tipologia_InEsito(intPraticaId,
tipologia, esiti, start, end, orderByComparator); codiceFiscale, tipologia, esiti, start, end, orderByComparator);
} }
public int countByIntPratica_CodiceFiscale_Tipologia_InEsito(long intPraticaId, String codiceFiscale, public int countByIntPratica_CodiceFiscale_Tipologia_InEsito(long intPraticaId, String codiceFiscale,
String tipologia, String[] esiti) throws SystemException { String tipologia, String[] esiti) throws SystemException {
return asseverazioneLocalService.countByIntPratica_CodiceFiscale_Tipologia_InEsito(intPraticaId, codiceFiscale, return asseverazioneLocalService.countByIntPratica_CodiceFiscale_Tipologia_InEsito(intPraticaId,
tipologia, esiti); codiceFiscale, tipologia, esiti);
} }
public List<Asseverazione> findByIntPratica_Tipologia_InEsito(long intPraticaId, String tipologia, String[] esiti, public List<Asseverazione> findByIntPratica_Tipologia_InEsito(long intPraticaId, String tipologia,
int start, int end, OrderByComparator orderByComparator) throws SystemException { String[] esiti, int start, int end, OrderByComparator orderByComparator) throws SystemException {
return asseverazioneLocalService.findByIntPratica_Tipologia_InEsito(intPraticaId, tipologia, esiti, start, end, return asseverazioneLocalService.findByIntPratica_Tipologia_InEsito(intPraticaId, tipologia, esiti,
orderByComparator); start, end, orderByComparator);
} }
public List<Asseverazione> findByDettPratica_Tipologia_InEsito(long dettPraticaId, String tipologia, String[] esiti, public List<Asseverazione> findByDettPratica_Tipologia_InEsito(long dettPraticaId, String tipologia,
int start, int end, OrderByComparator orderByComparator) throws SystemException { String[] esiti, int start, int end, OrderByComparator orderByComparator) throws SystemException {
return asseverazioneLocalService.findByDettPratica_Tipologia_InEsito(dettPraticaId, tipologia, esiti, start, end, return asseverazioneLocalService.findByDettPratica_Tipologia_InEsito(dettPraticaId, tipologia, esiti,
orderByComparator); start, end, orderByComparator);
} }
public int countByIntPratica_Tipologia_InEsito(long intPraticaId, String tipologia, String[] esiti) public int countByIntPratica_Tipologia_InEsito(long intPraticaId, String tipologia, String[] esiti)
throws SystemException { throws SystemException {
return asseverazioneLocalService.countByIntPratica_Tipologia_InEsito(intPraticaId, tipologia, esiti); return asseverazioneLocalService.countByIntPratica_Tipologia_InEsito(intPraticaId, tipologia, esiti);
} }
public int countByDettPratica_Tipologia_InEsito(long dettPraticaId, String tipologia, String[] esiti) public int countByDettPratica_Tipologia_InEsito(long dettPraticaId, String tipologia, String[] esiti)
throws SystemException { throws SystemException {
return asseverazioneLocalService.countByDettPratica_Tipologia_InEsito(dettPraticaId, tipologia, esiti); return asseverazioneLocalService
} .countByDettPratica_Tipologia_InEsito(dettPraticaId, tipologia, esiti);
}
} }

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

@ -1630,13 +1630,13 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
} }
public void updateEsitoPagamento(long pagamentoId, long dettPraticaId, String stato) public void updateEsitoPagamento(long pagamentoId, long dettPraticaId, String stato)
throws SystemException, PortalException { throws IOException, SystemException, PortalException {
updateEsitoPagamento(pagamentoId, dettPraticaId, 0l, stato); updateEsitoPagamento(pagamentoId, dettPraticaId, 0l, stato);
} }
public void updateEsitoPagamento(long pagamentoId, long dettPraticaId, long fileEntryId, String stato) public void updateEsitoPagamento(long pagamentoId, long dettPraticaId, long fileEntryId, String stato)
throws SystemException, PortalException { throws IOException, SystemException, PortalException {
Date now = new Date(); Date now = new Date();
DettPratica dettPratica = dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId); DettPratica dettPratica = dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId);
@ -1700,7 +1700,8 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
} }
public DettPratica updateEsito(long dettPraticaId, int stato) throws SystemException, PortalException { public DettPratica updateEsito(long dettPraticaId, int stato) throws IOException, SystemException,
PortalException {
boolean sendMail = false; boolean sendMail = false;
@ -1822,8 +1823,8 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl
serviceContext); serviceContext);
} }
public DettPratica updateEsitoIntegrazione(long dettPraticaId, int stato) throws SystemException, public DettPratica updateEsitoIntegrazione(long dettPraticaId, int stato) throws IOException,
PortalException { SystemException, PortalException {
DettPratica dettPratica = updateEsito(dettPraticaId, stato); DettPratica dettPratica = updateEsito(dettPraticaId, stato);
long intPraticaId = dettPratica.getIntPraticaId(); long intPraticaId = dettPratica.getIntPraticaId();

880
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/util/PagamentiUtil.java

@ -26,6 +26,7 @@ import it.tref.liferay.portos.bo.shared.util.PagamentoConstants;
import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil; import it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil;
import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil; import it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil;
import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
@ -46,432 +47,455 @@ import com.liferay.portal.service.ServiceContext;
public abstract class PagamentiUtil { public abstract class PagamentiUtil {
private static final Log _log = LogFactoryUtil.getLog(PagamentiUtil.class); private static final Log _log = LogFactoryUtil.getLog(PagamentiUtil.class);
public static void verificaPagamentoIRIS(Pagamento pagamento) throws SystemException, PortalException { public static void verificaPagamentoIRIS(Pagamento pagamento) throws IOException, SystemException,
PortalException {
// long companyId = pagamento.getCompanyId();
// long groupId = pagamento.getGroupId(); // long companyId = pagamento.getCompanyId();
// // long groupId = pagamento.getGroupId();
// InformazioniPagamentoType[] statoPagamentiType = //
// IrisVerificaPagamenti // InformazioniPagamentoType[] statoPagamentiType =
// .verificaPagamenti(companyId, groupId, pagamento.getCodice(), pagamento.getTipoPagamento()); // IrisVerificaPagamenti
// .verificaPagamenti(companyId, groupId, pagamento.getCodice(),
// List<InformazioniPagamentoType> infoPagamentoTypes = // pagamento.getTipoPagamento());
// IrisVerificaPagamenti
// .verificaPagamenti(companyId, groupId, pagamento.getCodice(), pagamento.getTipoPagamento()); // List<InformazioniPagamentoType> infoPagamentoTypes =
// String statoPagamento = StringPool.BLANK; // IrisVerificaPagamenti
// if (infoPagamentoTypes != null) { // .verificaPagamenti(companyId, groupId, pagamento.getCodice(),
// InformazioniPagamentoType infoPagamentoType = infoPagamentoTypes.get(0); // pagamento.getTipoPagamento());
// if // String statoPagamento = StringPool.BLANK;
// (infoPagamentoType.getStato().equals(VerificaStatoPagamentoDettagliato.POSIZIONE_NON_PRESENTE)) // if (infoPagamentoTypes != null) {
// { // InformazioniPagamentoType infoPagamentoType =
// // "Posizione non presente" -> si riprova successivamente // infoPagamentoTypes.get(0);
// return; // if
// } else if // (infoPagamentoType.getStato().equals(VerificaStatoPagamentoDettagliato.POSIZIONE_NON_PRESENTE))
// (infoPagamentoType.getStato().equals(VerificaStatoPagamentoDettagliato.POSIZIONE_NON_PAGABILE)) // {
// { // // "Posizione non presente" -> si riprova successivamente
// // "Posizione non pagabile" -> esito negativo // return;
// statoPagamento = PagamentoConstants.UTILIZZATA_NON_PAGABILE; // } else if
// } else if // (infoPagamentoType.getStato().equals(VerificaStatoPagamentoDettagliato.POSIZIONE_NON_PAGABILE))
// (infoPagamentoType.getStato().equals(VerificaStatoPagamentoDettagliato.POSIZIONE_NON_PAGATA)) // {
// { // // "Posizione non pagabile" -> esito negativo
// // "Pagamento non eseguito" -> esito negativo // statoPagamento = PagamentoConstants.UTILIZZATA_NON_PAGABILE;
// statoPagamento = PagamentoConstants.UTILIZZATA_RIFIUTATA; // } else if
// } else if // (infoPagamentoType.getStato().equals(VerificaStatoPagamentoDettagliato.POSIZIONE_NON_PAGATA))
// (infoPagamentoType.getStato().equals(VerificaStatoPagamentoDettagliato.POSIZIONE_CON_PAG_IN_CORSO)) // {
// { // // "Pagamento non eseguito" -> esito negativo
// // "Pagamento non eseguito" -> esito in corso // statoPagamento = PagamentoConstants.UTILIZZATA_RIFIUTATA;
// statoPagamento = PagamentoConstants.UTILIZZATA_IN_CORSO; // } else if
// return; // (infoPagamentoType.getStato().equals(VerificaStatoPagamentoDettagliato.POSIZIONE_CON_PAG_IN_CORSO))
// } else if // {
// (infoPagamentoType.getStato().equals(VerificaStatoPagamentoDettagliato.POSIZIONE_PAGATA) // // "Pagamento non eseguito" -> esito in corso
// || // statoPagamento = PagamentoConstants.UTILIZZATA_IN_CORSO;
// infoPagamentoType.getStato().equals(VerificaStatoPagamentoDettagliato.POSIZIONE_PAGATA_SBF)) // return;
// { // } else if
// // "Pagamento eseguito" -> esito positivo // (infoPagamentoType.getStato().equals(VerificaStatoPagamentoDettagliato.POSIZIONE_PAGATA)
// statoPagamento = PagamentoConstants.UTILIZZATA_PAGATA; // ||
// } // infoPagamentoType.getStato().equals(VerificaStatoPagamentoDettagliato.POSIZIONE_PAGATA_SBF))
// {
// // "Pagamento eseguito" -> esito positivo
// String statoPagamento = StringPool.BLANK; // statoPagamento = PagamentoConstants.UTILIZZATA_PAGATA;
// if (statoPagamentiType != null) { // }
// InformazioniPagamentoType statoPagamentoType = statoPagamentiType[0];
// String statoPendenza = statoPagamentoType.getStato().getValue(); // String statoPagamento = StringPool.BLANK;
// // if (statoPagamentiType != null) {
// if (statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_NON_PAGATA)) { // InformazioniPagamentoType statoPagamentoType = statoPagamentiType[0];
// if (statoPagamentoType.getDescrizioneStato().equalsIgnoreCase( // String statoPendenza = statoPagamentoType.getStato().getValue();
// VerificaStatoPagamentoDettagliato._POSIZIONE_NON_PAGATA)) { //
// // "Posizione non presente" -> si riprova successivamente // if
// return; // (statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_NON_PAGATA))
// } else if (statoPagamentoType.getDescrizioneStato().equalsIgnoreCase("PAG_NON_ESEGUITO")) { // {
// statoPagamento = PagamentoConstants.UTILIZZATA_RIFIUTATA; // if (statoPagamentoType.getDescrizioneStato().equalsIgnoreCase(
// } // VerificaStatoPagamentoDettagliato._POSIZIONE_NON_PAGATA)) {
// } else if (statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_NON_PAGABILE)) { // // "Posizione non presente" -> si riprova successivamente
// // "Posizione non pagabile" -> esito negativo // return;
// statoPagamento = PagamentoConstants.UTILIZZATA_NON_PAGABILE; // } else if
// // } else if (statoPendenza.equals(StatoPagamentoType._value3)) { // (statoPagamentoType.getDescrizioneStato().equalsIgnoreCase("PAG_NON_ESEGUITO"))
// // "Pagamento non ancora eseguito" -> si riprova successivamente // {
// // if (!pagamento.getOtf()) { // statoPagamento = PagamentoConstants.UTILIZZATA_RIFIUTATA;
// // return; // }
// // } // } else if
// // "Pagamento non eseguito" -> esito negativo // (statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_NON_PAGABILE))
// // statoPagamento = PagamentoConstants.UTILIZZATA_RIFIUTATA; // {
// } else if (statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_PAGATA) // // "Posizione non pagabile" -> esito negativo
// || statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_PAGATA_SBF)) { // statoPagamento = PagamentoConstants.UTILIZZATA_NON_PAGABILE;
// // "Pagamento eseguito" -> esito positivo // // } else if (statoPendenza.equals(StatoPagamentoType._value3)) {
// statoPagamento = PagamentoConstants.UTILIZZATA_PAGATA; // // "Pagamento non ancora eseguito" -> si riprova successivamente
// } else if // // if (!pagamento.getOtf()) {
// (statoPendenza.equals(VerificaStatoPagamentoDettagliato.POSIZIONE_CON_PAG_IN_CORSO)) { // // return;
// // "Pagamento non eseguito" -> esito in corso // // }
// statoPagamento = PagamentoConstants.UTILIZZATA_IN_CORSO; // // "Pagamento non eseguito" -> esito negativo
// return; // // statoPagamento = PagamentoConstants.UTILIZZATA_RIFIUTATA;
// } // } else if
// (statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_PAGATA)
// ||
// StatoPagamentoType statoPagamentoType = statoPagamentiType[0]; // statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_PAGATA_SBF))
// if (statoPagamentoType.enumValue().equals(VerificaStatoPagamento.POSIZIONE_NON_PRESENTE)) { // {
// // "Posizione non presente" -> si riprova successivamente // // "Pagamento eseguito" -> esito positivo
// return; // statoPagamento = PagamentoConstants.UTILIZZATA_PAGATA;
// } else if // } else if
// (statoPagamentoType.enumValue().equals(VerificaStatoPagamento.POSIZIONE_NON_PAGABILE)) { // (statoPendenza.equals(VerificaStatoPagamentoDettagliato.POSIZIONE_CON_PAG_IN_CORSO))
// // "Posizione non pagabile" -> esito negativo // {
// statoPagamento = PagamentoConstants.UTILIZZATA_NON_PAGABILE; // // "Pagamento non eseguito" -> esito in corso
// } else if // statoPagamento = PagamentoConstants.UTILIZZATA_IN_CORSO;
// (statoPagamentoType.enumValue().equals(VerificaStatoPagamento.PAGAMENTO_NON_ESEGUITO)) { // return;
// // "Pagamento non ancora eseguito" -> si riprova successivamente // }
// if (!pagamento.getOtf()) {
// return; // StatoPagamentoType statoPagamentoType = statoPagamentiType[0];
// } // if
// // "Pagamento non eseguito" -> esito negativo // (statoPagamentoType.enumValue().equals(VerificaStatoPagamento.POSIZIONE_NON_PRESENTE))
// statoPagamento = PagamentoConstants.UTILIZZATA_RIFIUTATA; // {
// } else if // // "Posizione non presente" -> si riprova successivamente
// (statoPagamentoType.enumValue().equals(VerificaStatoPagamento.POSIZIONE_NON_PAGABILE)) { // return;
// // "Pagamento eseguito" -> esito positivo // } else if
// statoPagamento = PagamentoConstants.UTILIZZATA_PAGATA; // (statoPagamentoType.enumValue().equals(VerificaStatoPagamento.POSIZIONE_NON_PAGABILE))
// } // {
// // "Posizione non pagabile" -> esito negativo
// statoPagamento = PagamentoConstants.UTILIZZATA_NON_PAGABILE;
// if (DettPratica.class.getName().equals(pagamento.getClassName())) { // } else if
// DettPraticaLocalServiceUtil.updateEsitoPagamento(pagamento.getPagamentoId(), // (statoPagamentoType.enumValue().equals(VerificaStatoPagamento.PAGAMENTO_NON_ESEGUITO))
// pagamento.getClassPk(), // {
// statoPagamento); // // "Pagamento non ancora eseguito" -> si riprova successivamente
// } else if (FineLavori.class.getName().equals(pagamento.getClassName())) { // if (!pagamento.getOtf()) {
// FineLavoriLocalServiceUtil.updateEsitoPagamento(pagamento.getPagamentoId(), // return;
// pagamento.getClassPk(), // }
// statoPagamento); // // "Pagamento non eseguito" -> esito negativo
// } else if (Collaudo.class.getName().equals(pagamento.getClassName())) { // statoPagamento = PagamentoConstants.UTILIZZATA_RIFIUTATA;
// CollaudoLocalServiceUtil.updateEsitoPagamento(pagamento.getPagamentoId(), // } else if
// pagamento.getClassPk(), // (statoPagamentoType.enumValue().equals(VerificaStatoPagamento.POSIZIONE_NON_PAGABILE))
// statoPagamento); // {
// } else { // // "Pagamento eseguito" -> esito positivo
// throw new RuntimeException("unable to update pagamento esito for entity type " + // statoPagamento = PagamentoConstants.UTILIZZATA_PAGATA;
// pagamento.getClassName() // }
// + " with id " + pagamento.getClassPk());
// } // if (DettPratica.class.getName().equals(pagamento.getClassName())) {
// // DettPraticaLocalServiceUtil.updateEsitoPagamento(pagamento.getPagamentoId(),
// } // pagamento.getClassPk(),
// statoPagamento);
String statoPagamento = callVerificaPagamenti(pagamento); // } else if
if (Validator.isNotNull(statoPagamento)) { // (FineLavori.class.getName().equals(pagamento.getClassName())) {
if (DettPratica.class.getName().equals(pagamento.getClassName())) { // FineLavoriLocalServiceUtil.updateEsitoPagamento(pagamento.getPagamentoId(),
DettPraticaLocalServiceUtil.updateEsitoPagamento(pagamento.getPagamentoId(), pagamento.getClassPk(), // pagamento.getClassPk(),
statoPagamento); // statoPagamento);
} else if (FineLavori.class.getName().equals(pagamento.getClassName())) { // } else if (Collaudo.class.getName().equals(pagamento.getClassName()))
FineLavoriLocalServiceUtil.updateEsitoPagamento(pagamento.getPagamentoId(), pagamento.getClassPk(), // {
statoPagamento); // CollaudoLocalServiceUtil.updateEsitoPagamento(pagamento.getPagamentoId(),
} else if (Collaudo.class.getName().equals(pagamento.getClassName())) { // pagamento.getClassPk(),
CollaudoLocalServiceUtil.updateEsitoPagamento(pagamento.getPagamentoId(), pagamento.getClassPk(), // statoPagamento);
statoPagamento); // } else {
} else { // throw new
throw new RuntimeException("unable to update pagamento esito for entity type " + pagamento.getClassName() // RuntimeException("unable to update pagamento esito for entity type "
+ " with id " + pagamento.getClassPk()); // +
} // pagamento.getClassName()
} // + " with id " + pagamento.getClassPk());
// }
} //
// }
private static String callVerificaPagamenti(Pagamento pagamento) throws SystemException {
String statoPagamento = callVerificaPagamenti(pagamento);
long companyId = pagamento.getCompanyId(); if (Validator.isNotNull(statoPagamento)) {
long groupId = pagamento.getGroupId(); if (DettPratica.class.getName().equals(pagamento.getClassName())) {
DettPraticaLocalServiceUtil.updateEsitoPagamento(pagamento.getPagamentoId(),
if (PagamentoConstants.PAGAMENTO_ONERI.equals(pagamento.getTipoPagamento())) { pagamento.getClassPk(), statoPagamento);
InformazioniPagamentoType[] statoPagamentiType = } else if (FineLavori.class.getName().equals(pagamento.getClassName())) {
IrisVerificaPagamenti.verificaPagamenti(companyId, groupId, pagamento.getCodice(), FineLavoriLocalServiceUtil.updateEsitoPagamento(pagamento.getPagamentoId(),
pagamento.getTipoPagamento()); pagamento.getClassPk(), statoPagamento);
} else if (Collaudo.class.getName().equals(pagamento.getClassName())) {
return checkStatoPagamento(statoPagamentiType); CollaudoLocalServiceUtil.updateEsitoPagamento(pagamento.getPagamentoId(),
pagamento.getClassPk(), statoPagamento);
} else if (PagamentoConstants.PAGAMENTO_BOLLI.equals(pagamento.getTipoPagamento())) { } else {
List<IUV> iuvs = IUVLocalServiceUtil.findByPagamento(pagamento.getPagamentoId()); throw new RuntimeException("unable to update pagamento esito for entity type "
List<String> statiPagamento = new ArrayList<String>(); + pagamento.getClassName() + " with id " + pagamento.getClassPk());
for (IUV iuv : iuvs) { }
InformazioniPagamentoType[] statoPagamentiType = }
IrisVerificaPagamenti.verificaPagamenti(companyId, groupId, iuv.getCodice(), pagamento.getTipoPagamento());
GenericUtils.addIfnotExist(statiPagamento, checkStatoPagamento(statoPagamentiType)); }
}
private static String callVerificaPagamenti(Pagamento pagamento) throws SystemException {
if (statiPagamento.size() > 1) {
// return VerificaStatoPagamentoDettagliato._POSIZIONE_CON_PAG_IN_CORSO; long companyId = pagamento.getCompanyId();
return StringPool.BLANK; long groupId = pagamento.getGroupId();
}
return statiPagamento.get(0); if (PagamentoConstants.PAGAMENTO_ONERI.equals(pagamento.getTipoPagamento())) {
} InformazioniPagamentoType[] statoPagamentiType = IrisVerificaPagamenti.verificaPagamenti(
companyId, groupId, pagamento.getCodice(), pagamento.getTipoPagamento());
throw new SystemException("error.geniocivile.tipopagamento.notexist");
return checkStatoPagamento(statoPagamentiType);
}
} else if (PagamentoConstants.PAGAMENTO_BOLLI.equals(pagamento.getTipoPagamento())) {
private static String checkStatoPagamento(InformazioniPagamentoType[] statoPagamentiType) { List<IUV> iuvs = IUVLocalServiceUtil.findByPagamento(pagamento.getPagamentoId());
List<String> statiPagamento = new ArrayList<String>();
if (statoPagamentiType == null) { for (IUV iuv : iuvs) {
return null; InformazioniPagamentoType[] statoPagamentiType = IrisVerificaPagamenti.verificaPagamenti(
} companyId, groupId, iuv.getCodice(), pagamento.getTipoPagamento());
GenericUtils.addIfnotExist(statiPagamento, checkStatoPagamento(statoPagamentiType));
InformazioniPagamentoType statoPagamentoType = statoPagamentiType[0]; }
String statoPendenza = statoPagamentoType.getStato().getValue();
if (statiPagamento.size() > 1) {
String statoPagamento = StringPool.BLANK; // return
if (statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_NON_PAGATA)) { // VerificaStatoPagamentoDettagliato._POSIZIONE_CON_PAG_IN_CORSO;
if (statoPagamentoType.getDescrizioneStato().equalsIgnoreCase( return StringPool.BLANK;
VerificaStatoPagamentoDettagliato._POSIZIONE_NON_PAGATA)) { }
// "Posizione non presente" -> si riprova successivamente return statiPagamento.get(0);
return StringPool.BLANK; }
} else if (statoPagamentoType.getDescrizioneStato().equalsIgnoreCase("PAG_NON_ESEGUITO")) {
statoPagamento = PagamentoConstants.UTILIZZATA_RIFIUTATA; throw new SystemException("error.geniocivile.tipopagamento.notexist");
} else if (statoPagamentoType.getDescrizioneStato().equalsIgnoreCase("PAG_IN_ERRORE")) {
statoPagamento = PagamentoConstants.UTILIZZATA_NON_PAGABILE; }
}
_log.debug(statoPagamento); private static String checkStatoPagamento(InformazioniPagamentoType[] statoPagamentiType) {
} else if (statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_NON_PAGABILE)) {
// "Posizione non pagabile" -> esito negativo if (statoPagamentiType == null) {
statoPagamento = PagamentoConstants.UTILIZZATA_NON_PAGABILE; return null;
// } else if (statoPendenza.equals(StatoPagamentoType._value3)) { }
// "Pagamento non ancora eseguito" -> si riprova successivamente
// if (!pagamento.getOtf()) { InformazioniPagamentoType statoPagamentoType = statoPagamentiType[0];
// return; String statoPendenza = statoPagamentoType.getStato().getValue();
// }
// "Pagamento non eseguito" -> esito negativo String statoPagamento = StringPool.BLANK;
// statoPagamento = PagamentoConstants.UTILIZZATA_RIFIUTATA; if (statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_NON_PAGATA)) {
_log.debug(statoPagamento); if (statoPagamentoType.getDescrizioneStato().equalsIgnoreCase(
} else if (statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_PAGATA) VerificaStatoPagamentoDettagliato._POSIZIONE_NON_PAGATA)) {
|| statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_PAGATA_SBF)) { // "Posizione non presente" -> si riprova successivamente
// "Pagamento eseguito" -> esito positivo return StringPool.BLANK;
statoPagamento = PagamentoConstants.UTILIZZATA_PAGATA; } else if (statoPagamentoType.getDescrizioneStato().equalsIgnoreCase("PAG_NON_ESEGUITO")) {
_log.debug(statoPagamento); statoPagamento = PagamentoConstants.UTILIZZATA_RIFIUTATA;
} else if (statoPendenza.equalsIgnoreCase(VerificaStatoPagamentoDettagliato._POSIZIONE_CON_PAG_IN_CORSO)) { } else if (statoPagamentoType.getDescrizioneStato().equalsIgnoreCase("PAG_IN_ERRORE")) {
// "Pagamento non eseguito" -> esito in corso statoPagamento = PagamentoConstants.UTILIZZATA_NON_PAGABILE;
statoPagamento = PagamentoConstants.UTILIZZATA_IN_CORSO; }
return StringPool.BLANK; _log.debug(statoPagamento);
} } else if (statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_NON_PAGABILE)) {
// "Posizione non pagabile" -> esito negativo
return statoPagamento; statoPagamento = PagamentoConstants.UTILIZZATA_NON_PAGABILE;
} // } else if (statoPendenza.equals(StatoPagamentoType._value3)) {
// "Pagamento non ancora eseguito" -> si riprova successivamente
public static BigDecimal getImportoBolli(long companyId, long dettPraticaId, String tipoIntegrazione) // if (!pagamento.getOtf()) {
throws PortalException, SystemException { // return;
// }
return PagamentiCommonUtil.getImportoBolli(companyId, dettPraticaId, DettPratica.class.getName(), tipoIntegrazione); // "Pagamento non eseguito" -> esito negativo
} // statoPagamento = PagamentoConstants.UTILIZZATA_RIFIUTATA;
_log.debug(statoPagamento);
public static Date getScadenzaPending() { } else if (statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_PAGATA)
|| statoPendenza.equals(VerificaStatoPagamentoDettagliato._POSIZIONE_PAGATA_SBF)) {
Calendar calendar = CalendarFactoryUtil.getCalendar(); // "Pagamento eseguito" -> esito positivo
calendar.add(Calendar.MINUTE, -30); statoPagamento = PagamentoConstants.UTILIZZATA_PAGATA;
return calendar.getTime(); _log.debug(statoPagamento);
} } else if (statoPendenza
.equalsIgnoreCase(VerificaStatoPagamentoDettagliato._POSIZIONE_CON_PAG_IN_CORSO)) {
public static boolean isPagamentoScadutoInPending(Pagamento pagamento) { // "Pagamento non eseguito" -> esito in corso
statoPagamento = PagamentoConstants.UTILIZZATA_IN_CORSO;
return pagamento.getCreateDate().compareTo(getScadenzaPending()) < 0; return StringPool.BLANK;
} }
public static Pagamento nuovoPagamento(String currentURL, long classPk, String className, String tipoPagamento, return statoPagamento;
String importo, String codiceFiscaleCommittente, ServiceContext serviceContext) throws PortalException, }
SystemException {
public static BigDecimal getImportoBolli(long companyId, long dettPraticaId, String tipoIntegrazione)
boolean irisDisabled = !PagamentiCommonUtil.irisIsEnable(serviceContext.getCompanyId()); throws PortalException, SystemException {
boolean esenzioneBolli = false; return PagamentiCommonUtil.getImportoBolli(companyId, dettPraticaId, DettPratica.class.getName(),
boolean esenzioneSpeseIstruttoria = false; tipoIntegrazione);
String tipoIntegrazione = StringPool.BLANK; }
long pagamentoId = 0l;
long intPraticaId = 0l; public static Date getScadenzaPending() {
// long dettPraticaId = 0l; Calendar calendar = CalendarFactoryUtil.getCalendar();
if (DettPratica.class.getName().equals(className)) { calendar.add(Calendar.MINUTE, -30);
DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(classPk); return calendar.getTime();
esenzioneBolli = dettPratica.isNormEsenteBollo(); }
esenzioneSpeseIstruttoria = dettPratica.isNormEsenteSpese();
tipoIntegrazione = dettPratica.getTipoIntegrazione(); public static boolean isPagamentoScadutoInPending(Pagamento pagamento) {
if (PagamentoConstants.PAGAMENTO_ONERI.equals(tipoPagamento)) {
pagamentoId = dettPratica.getPagamentoIdOneri(); return pagamento.getCreateDate().compareTo(getScadenzaPending()) < 0;
} else if (PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento)) { }
pagamentoId = dettPratica.getPagamentoIdBolli();
} public static Pagamento nuovoPagamento(String currentURL, long classPk, String className,
intPraticaId = dettPratica.getIntPraticaId(); String tipoPagamento, String importo, String codiceFiscaleCommittente,
// dettPraticaId = classPk; ServiceContext serviceContext) throws PortalException, SystemException {
} else if (FineLavori.class.getName().equals(className)) {
FineLavori fineLavori = FineLavoriLocalServiceUtil.getFineLavori(classPk); boolean irisDisabled = !PagamentiCommonUtil.irisIsEnable(serviceContext.getCompanyId());
esenzioneBolli = fineLavori.isNormEsenteBollo();
esenzioneSpeseIstruttoria = true; boolean esenzioneBolli = false;
tipoIntegrazione = TipoIntegrazioneUtil.FINE_LAVORI; boolean esenzioneSpeseIstruttoria = false;
if (PagamentoConstants.PAGAMENTO_ONERI.equals(tipoPagamento)) { String tipoIntegrazione = StringPool.BLANK;
throw new SystemException("error.fields.fineLavori.pagamento.classPk.invalid"); long pagamentoId = 0l;
} else if (PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento)) { long intPraticaId = 0l;
pagamentoId = fineLavori.getPagamentoId();
} // long dettPraticaId = 0l;
// dettPraticaId = if (DettPratica.class.getName().equals(className)) {
// DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(fineLavori.getIntPraticaId()).getDettPraticaId(); DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(classPk);
intPraticaId = fineLavori.getIntPraticaId(); esenzioneBolli = dettPratica.isNormEsenteBollo();
} else if (Collaudo.class.getName().equals(className)) { esenzioneSpeseIstruttoria = dettPratica.isNormEsenteSpese();
Collaudo collaudo = CollaudoLocalServiceUtil.getCollaudo(classPk); tipoIntegrazione = dettPratica.getTipoIntegrazione();
esenzioneBolli = collaudo.isNormEsenteBollo(); if (PagamentoConstants.PAGAMENTO_ONERI.equals(tipoPagamento)) {
esenzioneSpeseIstruttoria = true; pagamentoId = dettPratica.getPagamentoIdOneri();
tipoIntegrazione = TipoIntegrazioneUtil.COLLAUDO; } else if (PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento)) {
if (PagamentoConstants.PAGAMENTO_ONERI.equals(tipoPagamento)) { pagamentoId = dettPratica.getPagamentoIdBolli();
throw new SystemException("error.fields.collaudo.pagamento.classPk.invalid"); }
} else if (PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento)) { intPraticaId = dettPratica.getIntPraticaId();
pagamentoId = collaudo.getPagamentoId(); // dettPraticaId = classPk;
} } else if (FineLavori.class.getName().equals(className)) {
// dettPraticaId = FineLavori fineLavori = FineLavoriLocalServiceUtil.getFineLavori(classPk);
// DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(collaudo.getIntPraticaId()).getDettPraticaId(); esenzioneBolli = fineLavori.isNormEsenteBollo();
intPraticaId = collaudo.getIntPraticaId(); esenzioneSpeseIstruttoria = true;
} else { tipoIntegrazione = TipoIntegrazioneUtil.FINE_LAVORI;
throw new SystemException("error.fields.pratica.pagamento.classPk.invalid"); if (PagamentoConstants.PAGAMENTO_ONERI.equals(tipoPagamento)) {
} throw new SystemException("error.fields.fineLavori.pagamento.classPk.invalid");
} else if (PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento)) {
pagamentoId = fineLavori.getPagamentoId();
List<String> importi = new ArrayList<>(); }
// dettPraticaId =
if (esenzioneSpeseIstruttoria && esenzioneBolli) { // DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(fineLavori.getIntPraticaId()).getDettPraticaId();
throw new SystemException("error.fields.pratica.pagamento.esente.oneri.bolli"); intPraticaId = fineLavori.getIntPraticaId();
} else { } else if (Collaudo.class.getName().equals(className)) {
if ((PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento) && !esenzioneBolli) Collaudo collaudo = CollaudoLocalServiceUtil.getCollaudo(classPk);
|| (PagamentoConstants.PAGAMENTO_ONERI.equals(tipoPagamento) && !esenzioneSpeseIstruttoria)) { esenzioneBolli = collaudo.isNormEsenteBollo();
esenzioneSpeseIstruttoria = true;
if (Validator.isNotNull(importo)) { tipoIntegrazione = TipoIntegrazioneUtil.COLLAUDO;
importo = importo.replaceAll(StringPool.COMMA, StringPool.PERIOD); if (PagamentoConstants.PAGAMENTO_ONERI.equals(tipoPagamento)) {
try { throw new SystemException("error.fields.collaudo.pagamento.classPk.invalid");
BigDecimal importoVal = new BigDecimal(importo); } else if (PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento)) {
importo = importoVal.toPlainString(); pagamentoId = collaudo.getPagamentoId();
if (PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento)) { }
int numeroBolli = PagamentiCommonUtil.getNumeroBolli(tipoIntegrazione); // dettPraticaId =
BigDecimal singoloImporto = importoVal.divide(new BigDecimal(numeroBolli)); // DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(collaudo.getIntPraticaId()).getDettPraticaId();
for (int i = 0; i < numeroBolli; i++) { intPraticaId = collaudo.getIntPraticaId();
importi.add(singoloImporto.toPlainString()); } else {
} throw new SystemException("error.fields.pratica.pagamento.classPk.invalid");
} else if (PagamentoConstants.PAGAMENTO_ONERI.equals(tipoPagamento)) { }
importi.add(importo);
} List<String> importi = new ArrayList<>();
} catch (NumberFormatException e) { if (esenzioneSpeseIstruttoria && esenzioneBolli) {
throw new SystemException("error.fields.pratica.pagamento." throw new SystemException("error.fields.pratica.pagamento.esente.oneri.bolli");
+ (PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento) ? "bolli" : "speseistruttoria") + ".valid", } else {
e); if ((PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento) && !esenzioneBolli)
} || (PagamentoConstants.PAGAMENTO_ONERI.equals(tipoPagamento) && !esenzioneSpeseIstruttoria)) {
} else {
if (PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento) if (Validator.isNotNull(importo)) {
|| PagamentiCommonUtil.existsSpeseIstruttoria(tipoIntegrazione)) { importo = importo.replaceAll(StringPool.COMMA, StringPool.PERIOD);
throw new SystemException("error.fields.pratica.pagamento." try {
+ (PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento) ? "bolli" : "speseistruttoria") BigDecimal importoVal = new BigDecimal(importo);
+ ".required"); importo = importoVal.toPlainString();
} if (PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento)) {
} int numeroBolli = PagamentiCommonUtil.getNumeroBolli(tipoIntegrazione);
} else { BigDecimal singoloImporto = importoVal.divide(new BigDecimal(numeroBolli));
return null; for (int i = 0; i < numeroBolli; i++) {
} importi.add(singoloImporto.toPlainString());
} }
} else if (PagamentoConstants.PAGAMENTO_ONERI.equals(tipoPagamento)) {
if (!irisDisabled) { importi.add(importo);
if (Validator.isNull(pagamentoId)) { }
Soggetto committente = } catch (NumberFormatException e) {
SoggettoLocalServiceUtil.getValidTmpByIntPratica_CodiceFiscale_TipologiaSoggetto(intPraticaId, throw new SystemException("error.fields.pratica.pagamento."
codiceFiscaleCommittente, TipoSoggettoUtil.COMMITTENTE); + (PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento) ? "bolli"
String provincia = StringPool.BLANK; : "speseistruttoria") + ".valid", e);
String codiceProvincia = committente.getProvincia(); }
if (codiceProvincia.equalsIgnoreCase("ee")) { } else {
provincia = "EE"; if (PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento)
} else { || PagamentiCommonUtil.existsSpeseIstruttoria(tipoIntegrazione)) {
Provincia provinciaEntity = throw new SystemException("error.fields.pratica.pagamento."
ProvinciaLocalServiceUtil.fetchByC_C(serviceContext.getCompanyId(), codiceProvincia); + (PagamentoConstants.PAGAMENTO_BOLLI.equals(tipoPagamento) ? "bolli"
if (Validator.isNotNull(provinciaEntity)) { : "speseistruttoria") + ".required");
provincia = provinciaEntity.getSigla(); }
} }
} } else {
return null;
String codice = IrisCommonUtil.createCodicePendenza(); }
String causale = IrisCommonUtil.getDescrizioneCausale(tipoPagamento); }
long irisPagamentoId = PagamentoLocalServiceUtil.createPagamentoId(); if (!irisDisabled) {
if (Validator.isNull(pagamentoId)) {
currentURL = StringUtil.replaceLast(currentURL, "/0", StringPool.SLASH + irisPagamentoId);
Soggetto committente = SoggettoLocalServiceUtil
String auth = HttpUtil.getParameter(currentURL, "p_auth", false); .getValidTmpByIntPratica_CodiceFiscale_TipologiaSoggetto(intPraticaId,
codiceFiscaleCommittente, TipoSoggettoUtil.COMMITTENTE);
// XXX Se non li rimuovi non funziona più String provincia = StringPool.BLANK;
Map<String, String[]> parameters = HttpUtil.getParameterMap(HttpUtil.getQueryString(currentURL)); String codiceProvincia = committente.getProvincia();
for (String key : parameters.keySet()) { if (codiceProvincia.equalsIgnoreCase("ee")) {
currentURL = HttpUtil.removeParameter(currentURL, key); provincia = "EE";
} } else {
Provincia provinciaEntity = ProvinciaLocalServiceUtil.fetchByC_C(
if (Validator.isNotNull(auth)) { serviceContext.getCompanyId(), codiceProvincia);
currentURL = HttpUtil.addParameter(currentURL, "p_auth", auth); if (Validator.isNotNull(provinciaEntity)) {
} provincia = provinciaEntity.getSigla();
}
if (Validator.isNull(codiceFiscaleCommittente)) { }
throw new SystemException("error.fields.pratica.pagamento.codicefiscale.richiesto");
} String codice = IrisCommonUtil.createCodicePendenza();
String causale = IrisCommonUtil.getDescrizioneCausale(tipoPagamento);
List<ElencoIdentificativiType> iuvs = new ArrayList<ElencoIdentificativiType>(); long irisPagamentoId = PagamentoLocalServiceUtil.createPagamentoId();
if (PagamentoConstants.PAGAMENTO_BOLLI.equalsIgnoreCase(tipoPagamento)) {
iuvs = IrisComunicaPosizioniDebitorie.generaIUV(serviceContext.getCompanyId(), importi.size()); currentURL = StringUtil.replaceLast(currentURL, "/0", StringPool.SLASH + irisPagamentoId);
}
String auth = HttpUtil.getParameter(currentURL, "p_auth", false);
IdpOTFType idpOTFType =
IrisComunicaPosizioniDebitorie.comunicaPosizioniDebitorieOTF(serviceContext.getCompanyId(), // XXX Se non li rimuovi non funziona più
serviceContext.getScopeGroupId(), serviceContext.getUserId(), codice, causale, Map<String, String[]> parameters = HttpUtil.getParameterMap(HttpUtil
codiceFiscaleCommittente, tipoPagamento, importi, iuvs, currentURL, currentURL, provincia); .getQueryString(currentURL));
for (String key : parameters.keySet()) {
String urlPagamento = ""; currentURL = HttpUtil.removeParameter(currentURL, key);
}
if (idpOTFType == null) {
urlPagamento = currentURL; if (Validator.isNotNull(auth)) {
throw new SystemException("error.geniocivilefe.pratica.pagamento | intPraticaId=" + intPraticaId currentURL = HttpUtil.addParameter(currentURL, "p_auth", auth);
+ " | classPk=" + classPk + " | className=" + className); }
} else { if (Validator.isNull(codiceFiscaleCommittente)) {
urlPagamento = idpOTFType.getUrlGW().toString(); throw new SystemException("error.fields.pratica.pagamento.codicefiscale.richiesto");
} }
return PagamentoLocalServiceUtil.addPagamentoAndUpdate(irisPagamentoId, codice, causale, List<ElencoIdentificativiType> iuvs = new ArrayList<ElencoIdentificativiType>();
PagamentoConstants.MEZZO_IRIS, codiceFiscaleCommittente, tipoPagamento, importo, if (PagamentoConstants.PAGAMENTO_BOLLI.equalsIgnoreCase(tipoPagamento)) {
PagamentoConstants.UTILIZZATA_IN_CORSO, classPk, className, 0l, urlPagamento, iuvs, serviceContext); iuvs = IrisComunicaPosizioniDebitorie.generaIUV(serviceContext.getCompanyId(),
// actionResponse.sendRedirect(idpOTFType.getUrlGW().toString()); importi.size());
} else { }
return PagamentoLocalServiceUtil.getPagamento(pagamentoId);
} IdpOTFType idpOTFType = IrisComunicaPosizioniDebitorie.comunicaPosizioniDebitorieOTF(
// } serviceContext.getCompanyId(), serviceContext.getScopeGroupId(),
} else { serviceContext.getUserId(), codice, causale, codiceFiscaleCommittente, tipoPagamento,
boolean add = true; importi, iuvs, currentURL, currentURL, provincia);
if (Validator.isNotNull(pagamentoId)) {
Pagamento pagamento = PagamentoLocalServiceUtil.getPagamento(pagamentoId); String urlPagamento = "";
if (pagamento.getClassPk() == classPk) {
add = false; if (idpOTFType == null) {
PagamentoLocalServiceUtil.updatePagamento(pagamentoId, codiceFiscaleCommittente, importo); urlPagamento = currentURL;
} throw new SystemException("error.geniocivilefe.pratica.pagamento | intPraticaId="
return pagamento; + intPraticaId + " | classPk=" + classPk + " | className=" + className);
}
if (add) { } else {
return PagamentoLocalServiceUtil.addPagamentoAndUpdate(StringPool.BLANK, StringPool.BLANK, urlPagamento = idpOTFType.getUrlGW().toString();
PagamentoConstants.MEZZO_MANUALE, codiceFiscaleCommittente, tipoPagamento, importo, }
PagamentoConstants.UTILIZZATA_IN_CORSO, classPk, className, 0l, serviceContext);
} return PagamentoLocalServiceUtil.addPagamentoAndUpdate(irisPagamentoId, codice, causale,
return null; PagamentoConstants.MEZZO_IRIS, codiceFiscaleCommittente, tipoPagamento, importo,
} PagamentoConstants.UTILIZZATA_IN_CORSO, classPk, className, 0l, urlPagamento, iuvs,
serviceContext);
} // actionResponse.sendRedirect(idpOTFType.getUrlGW().toString());
} else {
return PagamentoLocalServiceUtil.getPagamento(pagamentoId);
}
// }
} else {
boolean add = true;
if (Validator.isNotNull(pagamentoId)) {
Pagamento pagamento = PagamentoLocalServiceUtil.getPagamento(pagamentoId);
if (pagamento.getClassPk() == classPk) {
add = false;
PagamentoLocalServiceUtil.updatePagamento(pagamentoId, codiceFiscaleCommittente, importo);
}
return pagamento;
}
if (add) {
return PagamentoLocalServiceUtil.addPagamentoAndUpdate(StringPool.BLANK, StringPool.BLANK,
PagamentoConstants.MEZZO_MANUALE, codiceFiscaleCommittente, tipoPagamento, importo,
PagamentoConstants.UTILIZZATA_IN_CORSO, classPk, className, 0l, serviceContext);
}
return null;
}
}
} }

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=2249 build.number=2254
build.date=1589721359115 build.date=1589897278985
build.auto.upgrade=true build.auto.upgrade=true
## ##

Caricamento…
Annulla
Salva