MNP_RU_638 - Middleware Modernization 2024: Servizi GISP lotto5 (DROP 1 - R58-24-0029 - 296987)
This commit is contained in:
@@ -6,6 +6,7 @@ import java.util.List;
|
||||
|
||||
import javax.transaction.UserTransaction;
|
||||
|
||||
import com.tibco.tns.bw.json.x1718779962104.IBK61_RequestElementType;
|
||||
import mnp.bo.BoFactory;
|
||||
import mnp.bo.RequestIF;
|
||||
import mnp.bo.recipient.RichiestaRecipientBO;
|
||||
@@ -20,11 +21,14 @@ import mnp.objects.UniqueIdNotificationMessage;
|
||||
import mnp.objects.dao.RichiestaRecipient;
|
||||
import mnp.proxy.ToWTC.InfobusHandler;
|
||||
import mnp.proxy.ToWTC.InfobusHandlerException;
|
||||
import mnp.proxy.ws.o2c.client.IBK61Client;
|
||||
import mnp.systemcontroller.eventhandler.AbstractEventHandler;
|
||||
import mnp.systemcontroller.gisp.formatcontroller.GispRequestAttOutFormatController;
|
||||
import mnp.database.hb.dto.MnpGestRichRecVirt;
|
||||
import mnp.database.hb.dto.MnpGispAttOut;
|
||||
import mnp.database.hb.dao.MnpGispAttOutDAO;
|
||||
import mnp.utility.Resources;
|
||||
import org.example.ibk61_responseresource.IBK61_ResponseElementType;
|
||||
|
||||
/**
|
||||
* <p>Title: Handler per la gestione delle richieste di attivazione recipient a GISP</p>
|
||||
@@ -98,19 +102,15 @@ public class GispRequestAttOutEventHandler extends AbstractEventHandler {
|
||||
richiestaRecipientVirt.avanzaStatoInAttivazione(log);
|
||||
}
|
||||
dao.flush();
|
||||
//invio la notifica
|
||||
/** switch in base alla properties ed invia a o2c
|
||||
* if(!Resources.SOAP_GISP_RICH_ATT_ENABLED()) {
|
||||
* if(sendToIB(mnpGispAttOut)) {
|
||||
* requestSent = true;
|
||||
* }
|
||||
* } else {
|
||||
* if(sendToO2C(mnpGispAttOut)) {
|
||||
* requestSent = true;
|
||||
* }
|
||||
* }
|
||||
* **/
|
||||
sendToIB(mnpGispAttOut);
|
||||
//MNP_RU_638 - Middleware Modernization 2024: Servizi GISP lotto5 (drop 1)
|
||||
// introdotta variabile di properties da Gisp ad O2C
|
||||
if(!Resources.SOAP_O2C_RICH_ATTIVGSM_ENABLED()) {
|
||||
sendToIB(mnpGispAttOut);
|
||||
}
|
||||
else {
|
||||
sendToO2C(mnpGispAttOut);
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -365,31 +365,27 @@ public class GispRequestAttOutEventHandler extends AbstractEventHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Metodo utilizzato per inviare la richiesta di attivazione ad O2C utilizzando il Client IBK61.
|
||||
* NOTA: eventType = "lineeMobili_gestioneMNPMVNOAttiv"
|
||||
*
|
||||
*
|
||||
* public boolean sendToO2C(MnpGispAttOut MnpGispAttOut) throws Exception {
|
||||
*
|
||||
* GISPClient client = new GISPClient();
|
||||
* RequestType requesto2c = client.createRequest(MnpGispAttOut);
|
||||
*
|
||||
* iBK61RichiestaAttivazioneResponseElementType response;
|
||||
*
|
||||
* boolean esito = false;
|
||||
* try {
|
||||
* response = client.iBK61RichiestaAttivazioneLineaDonor(requesto2c, "lineeMobili_gestioneMNPMVNOAttiv’");
|
||||
* log.write("9999", "Response ricevuta OK: " + (response != null && response.getResponse() != null ?
|
||||
* response.getResponse().getReturnCode() : ""));
|
||||
* esito = true;
|
||||
* } catch(Exception e) {
|
||||
* log.write("9999", "Eccezione ricevuta su ibk50RichiestaCessazioneLineaDonor" + e.getMessage());
|
||||
* throw e;
|
||||
* }
|
||||
*
|
||||
* return esito;
|
||||
* }
|
||||
* **/
|
||||
* @param MnpGispAttOut
|
||||
* @throws Exception
|
||||
*/
|
||||
public void sendToO2C(MnpGispAttOut MnpGispAttOut) throws Exception {
|
||||
|
||||
IBK61Client client = new IBK61Client();
|
||||
IBK61_RequestElementType requesto2c = client.createRequest(MnpGispAttOut);
|
||||
|
||||
IBK61_ResponseElementType response;
|
||||
|
||||
try {
|
||||
response = client.iBK61RichiestaAttivazioneLineaDonor(requesto2c, "lineeMobili_gestioneMNPMVNOAttiv");
|
||||
log.write("9999", "Response ricevuta OK: " + (response != null && response.getResponse() != null ?
|
||||
response.getResponse().getReturnCode() : ""));
|
||||
|
||||
} catch(Exception e) {
|
||||
log.write("9999", "Eccezione ricevuta su iBK61RichiestaAttivazioneLineaDonor" + e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,20 +3,25 @@ package mnp.systemcontroller.gisp.handler;
|
||||
import java.util.*;
|
||||
import javax.transaction.*;
|
||||
|
||||
import com.tibco.tns.bw.json.x1718779962104.IBK61_RequestElementType;
|
||||
import mnp.bo.*;
|
||||
import mnp.bo.donor.*;
|
||||
import mnp.bo.virtuale.recipient.RichiestaRecipientVirtualeBO;
|
||||
import mnp.database.*;
|
||||
import mnp.database.hb.dao.*;
|
||||
import mnp.database.hb.dto.MnpGispAttOut;
|
||||
import mnp.exception.infobus.*;
|
||||
import mnp.log.*;
|
||||
import mnp.objects.*;
|
||||
import mnp.proxy.ToWTC.*;
|
||||
import mnp.proxy.ws.o2c.client.IBK61Client;
|
||||
import mnp.systemcontroller.eventhandler.*;
|
||||
import mnp.systemcontroller.gisp.formatcontroller.*;
|
||||
import mnp.objects.dao.RichiestaDonorGui;
|
||||
import mnp.database.hb.dto.MnpGestioneRichiesta;
|
||||
import mnp.database.hb.dto.MnpGispCessOut;
|
||||
import mnp.utility.Resources;
|
||||
import org.example.ibk61_responseresource.IBK61_ResponseElementType;
|
||||
|
||||
/**
|
||||
* <p>Title: DBC</p>
|
||||
@@ -151,18 +156,12 @@ public class GispRequestCessOutEventHandler extends AbstractEventHandler {
|
||||
richiestaRecVirtBO.avanzaStatoInCessazione(log);
|
||||
}
|
||||
dao.flush();
|
||||
/** switch in base alla properties ed invia a o2c
|
||||
* if(!Resources.SOAP_GISP_RICH_DISATMNPG_ENABLED()()) {
|
||||
* if(sendToIB(mnpGispCessOut)) {
|
||||
* requestSent = true;
|
||||
* }
|
||||
* } else {
|
||||
* if(sendToO2C(mnpGispCessOut)) {
|
||||
* requestSent = true;
|
||||
* }
|
||||
* }
|
||||
* **/
|
||||
sendToIB(mnpGispCessOut);
|
||||
//MNP_RU_638 - Middleware Modernization 2024: Servizi GISP lotto5 (drop 1)
|
||||
// introdotta variabile di properties da Gisp ad O2C
|
||||
if(!Resources.SOAP_O2C_RICH_DISATMNPG_ENABLED())
|
||||
sendToIB(mnpGispCessOut);
|
||||
else
|
||||
sendToO2C(mnpGispCessOut);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -337,10 +336,12 @@ public class GispRequestCessOutEventHandler extends AbstractEventHandler {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* invia la notifica
|
||||
/** Invia la notifica
|
||||
*
|
||||
* @param mnpGispRicCessOut MnpGispRicCessOut
|
||||
* @param mnpGispCessOut
|
||||
* @throws IBSendException
|
||||
* @throws InfobusHandlerException
|
||||
* @throws Exception
|
||||
*/
|
||||
private void sendToIB(MnpGispCessOut mnpGispCessOut) throws
|
||||
IBSendException, InfobusHandlerException, Exception {
|
||||
@@ -372,30 +373,31 @@ public class GispRequestCessOutEventHandler extends AbstractEventHandler {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/** Metodo utilizzato per inviare la richiesta di cessazione a O2C
|
||||
* utilizzando il Client IBK61.
|
||||
* NOTA: eventType = lineeMobili_gestioneMNPMVNODisat
|
||||
*
|
||||
*
|
||||
* public boolean sendToO2C(MnpGispCessOut mnpGispCessOut) throws Exception {
|
||||
*
|
||||
* GISPClient client = new GISPClient();
|
||||
* RequestType requesto2c = client.createRequest(mnpGispCessOut);
|
||||
*
|
||||
* iBK61RichiestaCessazioneResponseElementType response;
|
||||
*
|
||||
* boolean esito = false;
|
||||
* try {
|
||||
* response = client.iBK61RichiestaCessazioneLineaDonor(requesto2c, "lineeMobili_gestioneMNPMVNODisat’");
|
||||
* log.write("9999", "Response ricevuta OK: " + (response != null && response.getResponse() != null ?
|
||||
* response.getResponse().getReturnCode() : ""));
|
||||
* esito = true;
|
||||
* } catch(Exception e) {
|
||||
* log.write("9999", "Eccezione ricevuta su ibk50RichiestaCessazioneLineaDonor" + e.getMessage());
|
||||
* throw e;
|
||||
* }
|
||||
*
|
||||
* return esito;
|
||||
* }
|
||||
* **/
|
||||
* @param mnpGispCessOut
|
||||
* @throws Exception
|
||||
*/
|
||||
public void sendToO2C(MnpGispCessOut mnpGispCessOut) throws Exception {
|
||||
|
||||
IBK61Client client = new IBK61Client();
|
||||
IBK61_RequestElementType requesto2c = client.createRequest(mnpGispCessOut);
|
||||
|
||||
IBK61_ResponseElementType response;
|
||||
|
||||
try {
|
||||
response = client.iBK61RichiestaCessazioneLineaDonor(requesto2c, "lineeMobili_gestioneMNPMVNODisat");
|
||||
log.write("9999", "Response ricevuta OK: " + (response != null && response.getResponse() != null ?
|
||||
response.getResponse().getReturnCode() : ""));
|
||||
|
||||
} catch(Exception e) {
|
||||
log.write("9999", "Eccezione ricevuta su iBK61RichiestaCessazioneLineaDonor" + e.getMessage());
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2434,31 +2434,73 @@ public class Resources {
|
||||
return trim(props.getProperty("URL_WS_GISP_CESS_DONOR"));
|
||||
}
|
||||
|
||||
/************* Properties di ATTIVAZIONE ********************/
|
||||
public static Boolean SOAP_O2C_RICH_ATTIVGSM_ENABLED() {
|
||||
init();
|
||||
String valoreProp = trim(props.getProperty("SOAP_O2C_RICH_ATTIVGSM_ENABLED"));
|
||||
return ("1".equalsIgnoreCase(valoreProp));
|
||||
}
|
||||
|
||||
/************* Properties di DISATTIVAZIONE ********************/
|
||||
public static Boolean SOAP_O2C_RICH_DISATMNPG_ENABLED() {
|
||||
init();
|
||||
String valoreProp = trim(props.getProperty("SOAP_O2C_RICH_DISATMNPG_ENABLED"));
|
||||
return ("1".equalsIgnoreCase(valoreProp));
|
||||
}
|
||||
|
||||
/************* Properties di ATTIVAZOINE/DISATTIVAZIONE ********************/
|
||||
public static String getURL_WS_O2C_DISATMNPG_ATTIVGSM_DONOR() {
|
||||
init();
|
||||
return trim(props.getProperty("URL_WS_O2C_DISATMNPG_ATTIVGSM_DONOR"));
|
||||
}
|
||||
public static String getTIMEOUT_WS_O2C_DISATMNPG_ATTIVGSM_DONOR() {
|
||||
init();
|
||||
return trim(props.getProperty("TIMEOUT_WS_O2C_DISATMNPG_ATTIVGSM_DONOR"));
|
||||
}
|
||||
|
||||
/************* Properties di RESTITUZIONE ********************/
|
||||
|
||||
public static Boolean SOAP_O2C_RICH_RESTITUZIONE_ENABLED() {
|
||||
init();
|
||||
String valoreProp = trim(props.getProperty("SOAP_O2C_RICH_RESTITUZIONE_ENABLED"));
|
||||
return ("1".equalsIgnoreCase(valoreProp));
|
||||
}
|
||||
public static String getURL_WS_O2C_RESTITUZIONE_DONOR() {
|
||||
init();
|
||||
return trim(props.getProperty("URL_WS_O2C_RESTITUZIONE_DONOR"));
|
||||
}
|
||||
public static String getTIMEOUT_WS_O2C_RESTITUZIONE_DONOR() {
|
||||
init();
|
||||
return trim(props.getProperty("TIMEOUT_WS_O2C_RESTITUZIONE_DONOR"));
|
||||
}
|
||||
/************* Properties di TERZEPARTI ********************/
|
||||
|
||||
public static Boolean SOAP_O2C_RICH_TERZEPARTI_ENABLED() {
|
||||
init();
|
||||
String valoreProp = trim(props.getProperty("SOAP_O2C_RICH_TERZEPARTI_ENABLED"));
|
||||
return ("1".equalsIgnoreCase(valoreProp));
|
||||
}
|
||||
public static String getURL_WS_O2C_TERZEPARTI_DONOR() {
|
||||
init();
|
||||
return trim(props.getProperty("URL_WS_O2C_TERZEPARTI_DONOR"));
|
||||
}
|
||||
public static String getTIMEOUT_WS_O2C_TERZEPARTI_DONOR() {
|
||||
init();
|
||||
return trim(props.getProperty("TIMEOUT_WS_O2C_TERZEPARTI_DONOR"));
|
||||
}
|
||||
/************* Properties di DISATMNP_CO ********************/
|
||||
|
||||
public static Boolean SOAP_O2C_RICH_DISATMNPG_CO_ENABLED() {
|
||||
init();
|
||||
String valoreProp = trim(props.getProperty("SOAP_O2C_RICH_DISATMNPG_CO_ENABLED"));
|
||||
return ("1".equalsIgnoreCase(valoreProp));
|
||||
}
|
||||
public static String getURL_WS_O2C_DISATMNPG_CO_DONOR() {
|
||||
init();
|
||||
return trim(props.getProperty("URL_WS_O2C_DISATMNPG_CO_DONOR"));
|
||||
}
|
||||
public static String getTIMEOUT_WS_O2C_DISATMNPG_CO_DONOR() {
|
||||
init();
|
||||
return trim(props.getProperty("TIMEOUT_WS_O2C_DISATMNPG_CO_DONOR"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user