irmtabUrno = irmtabRef;
ULDInfo inputUldInfo = (ULDInfo) _um.unmarshal(new StreamSource(new StringReader(message)));
FlightID inputFlightID = inputUldInfo.getFlightID();
Meta inputMeta = inputUldInfo.getMeta();
ULDDetails inputUldDetails = inputUldInfo.getULDDetails();
if(existsMandatory(inputFlightID, inputMeta, inputUldDetails)){
LOG.error("Compulsory uld info are empty. Message dropped. ");
addExptInfo(EMAND.name(), "");
return false;
}
if(!inputFlightID.getCarrierCode().contains(EK)) {
LOG.error("Processing performs only for EK flight. Message will be dropped.");
addExptInfo(EWALC.name(), inputFlightID.getCarrierCode());
return false;
}
if(!inputMeta.getType().equalsIgnoreCase(ULD_INFO)) {
LOG.warn("Processing performs only for ULDInfo. Message will be dropped.");
addExptInfo(EWVAL.name(), inputMeta.getType());
return false;
}
if(!OP_TYPE.valueList().contains(inputMeta.getSubtype().trim().toUpperCase())) {
LOG.warn("Processing performs only for INS, UPD, DEL sub type. Message will be dropped.");
addExptInfo(EENUM.name(), inputMeta.getSubtype());
return false;
}
if(!inputMeta.getSource().equalsIgnoreCase(SKY_CHAIN)) {
LOG.error("Processing performs only for SkyChain. Message will be dropped.");
addExptInfo(EWVAL.name(), inputMeta.getSource());
return false;
}
String flightNumber = String
.format("%s %s%s", inputFlightID.getCarrierCode(),
formatCedaFltn(inputFlightID
.getFlightNumber()), isNullOrEmptyStr(inputFlightID
.getFlightSuffix()) ? "" : inputFlightID
.getFlightSuffix());
String flightDate = formatFlightDate(inputFlightID.getFlightDate());
if(isNullOrEmptyStr(flightDate)) {
LOG.error("Flight Date provided format parsing error is encountered. Message will be dropped.");
addExptInfo(EWVAL.name(), inputFlightID.getFlightDate());
return false;
}
LOG.debug("Formed UFIS Flight Number, Flight Date - {}, {}", flightNumber, flightDate);
EntDbAfttab entDbAfttab = afttabBean.findFlightForUldDept(flightNumber, flightDate);
LOG.debug("Flight Search by Departure is done.");
if(entDbAfttab == null) {
entDbAfttab = afttabBean.findFlightForUldOrg(flightNumber, flightDate);
}
LOG.debug("Flight Search by Non-Departure is done as the search by Departure is not found.");
if(entDbAfttab == null) {
LOG.error("Flight provided cannot be found. Message will be dropped.");
addExptInfo(EnumExceptionCodes.ENOFL.name(), String.format("%s (%s)", flightNumber, flightDate));
return false;
}
LOG.debug("DB - URNO : {}, FLDA : {}, Flight Date Match : {}", entDbAfttab.getUrno(), entDbAfttab.getFlda(), flightDate.equals(entDbAfttab.getFlda()));
boolean isDel = inputMeta.getSubtype().equalsIgnoreCase(OP_TYPE.DEL.name());
HpUfisAppConstants.UfisASCommands cmdForBroadcasting;
EntDbLoadUld oldLoadUld = null;
EntDbLoadUld loadUld = (EntDbLoadUld) dLLoadUldBean.getUldNum(entDbAfttab.getUrno(), inputUldDetails.getULDNumber());