Package com.ufis_as.ek_if.lms.entities

Examples of com.ufis_as.ek_if.lms.entities.EntDbMsgTelex


  }

  public boolean routeMessage(Message inMessage, String messageDetailsType,
      Long irmtabRef, String msgType, String msgSource) {
    // long startTime = new Date().getTime();
    EntDbMsgTelex msgTelex = new EntDbMsgTelex();
    EntDbMsgTelex msgTelexInsrt = new EntDbMsgTelex();
    msgLogged = Boolean.FALSE;
    logLevel = _startupInitSingleton.getIrmLogLev();
    if (irmtabRef > 0) {
      msgLogged = Boolean.TRUE;
    }
    try {     
      fillIdFlightFromMsg(inMessage,messageDetailsType, irmtabRef, msgLogged,
          msgTelex, msgSource, msgType);
      if (msgTelex.getMsgFltno() == null
          || msgTelex.getIdFlight() == null) {
        LOG.error("Invalid Message.");
        if (logLevel
            .equalsIgnoreCase(HpUfisAppConstants.IrmtabLogLev.LOG_ERR
                .name())) {
          if (!msgLogged) {
            irmtabRef = _irmfacade.storeRawMsg(inMessage, dtflStr);
            msgLogged = Boolean.TRUE;
          }
        }
        if (irmtabRef > 0) {
          sendErrInfo(EnumExceptionCodes.EWVAL, "Invalid Message",
              irmtabRef);
        }
        return true;
      }

      if (msgTelex.getIdFlight().equals(BigDecimal.ZERO)) {
        LOG.error("No flight found in the AFTTAB.");
        if (logLevel
            .equalsIgnoreCase(HpUfisAppConstants.IrmtabLogLev.LOG_ERR
                .name())) {
          if (!msgLogged) {
            irmtabRef = _irmfacade.storeRawMsg(inMessage, dtflStr);
            msgLogged = Boolean.TRUE;
          }
        }
        if (irmtabRef > 0) {
          sendErrInfo(EnumExceptionCodes.WNOFL, "Flight num:"
              + msgTelex.getMsgFltno() + " Flight DAY: "
              + msgTelex.getMsgFltDay(), irmtabRef);

        }

      }

      msgTelex.setRecStatus(" ");
      msgTelex.setDataSource(HpEKConstants.LOAD_CONTROL_MSG);
      msgTelexInsrt = msgTelexBean.updateMsgTelex(msgTelex);
      if (msgTelexInsrt != null) {
        /*
         * sendLoadBagUpdateToCedaInJson(loadBagStat, oldLoadBag,
         * UfisASCommands.URT.name(), true);
         */
        if (HpUfisUtils.isNotEmptyStr(HpCommonConfig.notifyTopic)) {
          // send notification message to topic
          ufisTopicProducer.sendNotification(true,
              UfisASCommands.IRT,
              String.valueOf(msgTelexInsrt.getIdFlight()), null,
              msgTelexInsrt);
        }
        if (HpUfisUtils.isNotEmptyStr(HpCommonConfig.notifyQueue)) {
          // if topic not defined, send
          // notification to queue
          ufisQueueProducer.sendNotification(true,
              UfisASCommands.IRT,
              String.valueOf(msgTelexInsrt.getIdFlight()), null,
              msgTelexInsrt);
        }
        LOG.debug("Msg Telex communicated to Ceda.");
      } else {
        LOG.error("Error inserting Telex msg to DB.");
View Full Code Here


      }

      LOG.debug("URNO from DB - {}", entDbAfttab.getUrno());
      LOG.debug("FLUT : {}, {}", entDbAfttab.getFlut(), flightDate.equals(entDbAfttab.getFlut()));

      EntDbMsgTelex msgTelex = createMessageTelex(message, uwsInfo, entDbAfttab.getUrno());
      if(msgTelex == null) {
        LOG.error("Message Telex persisting encounter error. It won't be persisted.");
      }
     
      List<EntDbLoadUld> existingLoadUlds = dLLoadUldBean.findUldsByFlight(entDbAfttab.getUrno());
View Full Code Here

      LOG.error("Message Meta Data parsing exception : {}", ex.getMessage());
    }
   
   
    FlightInfo flightInfo = uwsInfo.getFlightInfo();
    EntDbMsgTelex msgTelex = new EntDbMsgTelex();
    msgTelex.setMsgType("UWS");
    msgTelex.setMsgFltno(flightInfo.getFlightNumber());
    msgTelex.setMsgFltDay(flightInfo.getDateOfMonth());
    msgTelex.setLoadingPt(flightInfo.getAirportCode());
    msgTelex.setMsgSubtype(flightInfo.getFinalMessageIndicator());
    msgTelex.setMsgInfo(rawUWSInfo);
    msgTelex.setArrDepFlag(HpEKConstants.EK_HOPO.equalsIgnoreCase(flightInfo.getAirportCode().trim()) ? "D" : "A");
    msgTelex.setSendRecvFlag("R");
    msgTelex.setIdFlight(flightUrno);
    msgTelex.setDataSource(HpEKConstants.ULD_SOURCE_SKYCHAIN);
    msgTelex.setCreatedUser(HpEKConstants.ULD_SOURCE_SKYCHAIN);
    msgTelex.setCreatedDate(HpUfisCalendar.getCurrentUTCTime());
    if(msgMeta.isEmpty()) {
      msgTelex.setMsgSendDay(" ");
      msgTelex.setMsgSendTime(" ")
    } else {
      setMessageMetaData(msgTelex, msgMeta);
    }
    boolean success = dlMsgTelexBean.saveMsgTelex(msgTelex);
    return success ? msgTelex : null;
View Full Code Here

  }

  // @Override
  @TransactionAttribute(TransactionAttributeType.REQUIRED)
  public EntDbMsgTelex updateMsgTelex(EntDbMsgTelex msgTelex) {
    EntDbMsgTelex msgTelexStat = null;
    try {
      msgTelexStat = em.merge(msgTelex);
      LOG.debug("Merge Successfull");

    } catch (OptimisticLockException Oexc) {
View Full Code Here

TOP

Related Classes of com.ufis_as.ek_if.lms.entities.EntDbMsgTelex

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.