// set urno of irmtab
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);