示例#1
0
 public void loadArgs(String[] args) {
   DLRLogger.debug(CreateEntireFile.class, "loading args:");
   String keyValues = "";
   for (int i = 0; i < args.length; i += 2) {
     String key = args[i];
     String value = args[i + 1];
     keyValues += key;
     keyValues += " " + value + " ";
     ARGS_MAP.put(key, value);
   }
   DLRLogger.debug(CreateEntireFile.class, keyValues);
   System.out.println(keyValues);
 }
示例#2
0
  public String retrieveVehiclePrice(String make, String model, String year, int miles) {
    RetrieveVehiclePriceResponse response = new RetrieveVehiclePriceResponse();
    String price = null;
    try {
      CentricService service = new CentricServiceLocator();
      CentricSoapBindingStub serviceStub = new CentricSoapBindingStub(service);
      logger.debug("ICS client web service url: " + CENTRIC_SERVICE_URL);
      serviceStub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, CENTRIC_SERVICE_URL);

      RetrieveVehiclePriceRequest request = new RetrieveVehiclePriceRequest();
      request.setMake(make);
      request.setModel(model);
      request.setYear(year);
      request.setMileage(String.valueOf(miles));
      // request.setUserId(userId);
      // Submit Web Service Call
      long startTime = (new Date()).getTime();
      response = serviceStub.retrieveVehiclePrice(request);
      long elapsedTime = (new Date().getTime()) - startTime;
      logger.warn("****** Centric ws call, elapsedTime: " + elapsedTime + " ******");
      price = response.getPrice();
    } catch (RemoteException re) {
      throw new DLSSystemException(re.getMessage(), re, logger);
    }
    return price;
  }
示例#3
0
  public void invokeSubmitPaymentRequestWS(Owner app, String userId) {
    SubmitPaymentResponse response = new SubmitPaymentResponse();

    try {
      CentricService service = new CentricServiceLocator();
      CentricSoapBindingStub serviceStub = new CentricSoapBindingStub(service);
      logger.debug("ICS client web service url: " + CENTRIC_SERVICE_URL);
      serviceStub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, CENTRIC_SERVICE_URL);

      SubmitPaymentRequest request = getSubmitPaymentRequest(app);
      request.setUserId(userId);
      // Submit Web Service Call
      long startTime = (new Date()).getTime();
      response = serviceStub.submitPayment(request);
      long elapsedTime = (new Date().getTime()) - startTime;
      logger.warn("****** Centric ws call, elapsedTime: " + elapsedTime + " ******");
      String resultCode = response.getStatus();
      if (resultCode.equals("0")) {
        logger.info(
            "ICS inquiry response contained successful result code: " + response.getStatus());
      } else {
        /* TODO implement non successful code */
      }
    } catch (RemoteException re) {
      throw new DLSSystemException(re.getMessage(), re, logger);
    }
  }
示例#4
0
 private Conviction getConvictionDetails(Long convictionId, HttpServletRequest request) {
   logger.debug(
       " .......Starting execution of ViewConvictionController.getConvictionDetails()....... ");
   try {
     return convictionBusiness.findConvictionById(convictionId);
   } catch (Exception e) {
     throw new RuntimeException("Exception while getting Conviction and associations", e);
   }
 }
示例#5
0
  private void writeTrailer() throws Exception {
    try {
      writer.write("T");
      writer.write(HandlerUtil.padding(String.valueOf(count), 10, HandlerUtil.LEFT, "0"));
      writer.write("\r\n");
    } catch (Exception io) {
      rc = false;

      String message = io.getMessage();
      logger.debug(message, io);

      if (io.getCause() instanceof DataAccessResourceFailureException)
        throw new FatalUpdateException(message, io);
      throw new NonFatalException(message, io);
    }
  }
示例#6
0
  /**
   * Expunge Conviction functionality.
   *
   * @param request
   * @param response
   * @return
   * @throws Exception
   */
  public ModelAndView expungeOffense(HttpServletRequest request, HttpServletResponse response)
      throws Exception {
    logger.debug(" .......in ViewConvictionController.expungeOffense()....... ");
    String applicantID = request.getParameter("id");
    String convId = request.getParameter(LiConstants.CONVICTION_ID);
    String taskId = ControllerHelper.getTaskId(request);

    String path = getServletContext().getRealPath("/");
    Boolean isReevaluate = new Boolean(request.getParameter("reevaluate"));

    offenseBusiness.expungeConviction(convId, taskId, path, isReevaluate.booleanValue());

    request.setAttribute("msg", "message.expungeOffense");
    request.setAttribute("audit", "Expunge Offense");
    request
        .getSession()
        .setAttribute(
            "expungeSuccessMsg", "The Conviction  " + convId + " is successfully expunged.");
    return new ModelAndView(new RedirectView("customerProfile.do?id=" + applicantID));
  }
示例#7
0
  @SuppressWarnings("unchecked")
  public HashMap invokeSubmitProductQueryWS(String[] productIdArray) {
    logger.info("Class ProcessIssuanceUtil...Method invokeSubmitProductQueryWS :line no :63");
    SubmitProductQueryResponse response = new SubmitProductQueryResponse();
    HashMap productFeeMap = new HashMap();
    try {
      CentricService service = new CentricServiceLocator();
      CentricSoapBindingStub serviceStub = new CentricSoapBindingStub(service);
      logger.debug("ICS client web service url: " + CENTRIC_SERVICE_URL);
      serviceStub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, CENTRIC_SERVICE_URL);

      SubmitProductQueryRequest request = new SubmitProductQueryRequest();
      request.setProductIds(productIdArray);
      long startTime = (new Date()).getTime();
      /*
       * Commented the submit product query becuase we are not getting the
       * product list from drools cache loader
       */
      logger.info("Class ProcessIssuanceUtil...Method invokeSubmitProductQueryWS :line no :79");
      response = serviceStub.submitProductQuery(request);
      long elapsedTime = (new Date().getTime()) - startTime;
      logger.warn("****** Centric ws call, elapsedTime: " + elapsedTime + " ******");
    } catch (RemoteException re) {
      throw new DLSSystemException(re.getMessage(), re, logger);
    }
    float totalAmount = 0;
    if (response.getProducts() != null) {
      Product[] productArray = response.getProducts();
      for (int i = 0; i < productArray.length; i++) {
        Product product = productArray[i];
        productFeeMap.put(product.getProductId(), product);
        totalAmount = totalAmount + (new Float(product.getAmount()).floatValue());
      }
      logger.info(
          "Class ProcessIssuanceUtil...Method invokeSubmitProductQueryWS :line no :94 with total amount "
              + totalAmount);
    }
    productFeeMap.put("TOTAL_AMOUNT", totalAmount + "");
    return productFeeMap;
  }
示例#8
0
 public String retrieveNextPlateNumber() {
   InventoryResponse response = new InventoryResponse();
   String plateNumber = null;
   try {
     CentricService service = new CentricServiceLocator();
     CentricSoapBindingStub serviceStub = new CentricSoapBindingStub(service);
     logger.debug("ICS client web service url: " + CENTRIC_SERVICE_URL);
     serviceStub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, CENTRIC_SERVICE_URL);
     InventoryRequest request = new InventoryRequest();
     request.setItemLocation("3");
     request.setItemType("0101");
     long startTime = (new Date()).getTime();
     response = serviceStub.performInventoryOperation(request);
     long elapsedTime = (new Date().getTime()) - startTime;
     logger.warn("****** Centric ws call, elapsedTime: " + elapsedTime + " ******");
     System.out.println(response.getItemCode() + " " + response.getItemNumber());
     if (org.apache.commons.lang.StringUtils.isNotBlank(response.getItemCode())
         && !"ERROR".equalsIgnoreCase(response.getItemCode()))
       plateNumber = response.getItemCode().trim().toUpperCase();
   } catch (RemoteException re) {
     throw new DLSSystemException(re.getMessage(), re, logger);
   }
   return plateNumber;
 }
示例#9
0
  public void basicFlowID() throws Exception {
    try {
      long n = 0;

      java.util.Date date = new java.util.Date();
      t1 = date.getTime();

      sqlStr =
          "SELECT IREC_DOC_NBR, DPSP_LAST_NME, DPSP_FIRST_NME, DPSP_MIDDLE_NME, DPSP_SUFFIX, DPSP_DOB, "
              + "DMDT_STRT_ADDR_1, DMDT_STRT_ADDR_2, DMDT_CITY, DMDT_STATE, SUBSTR(CHAR(DMDT_ZIP_CDE),1,5) AS ZIPCODE , "
              + "SUBSTR(CHAR(DMDT_ZIP_CDE),6,4) AS ZIPCODEEXT, SUBSTR(CHAR(IDDC_ORIG_ISS_DTE),1,10) AS OIDTE, "
              + "IREC_ISSUANCE_TYP FROM "
              + schema
              + "DPS_PERSON, "
              + schema
              + "ISSUANCE_RECORD, "
              + schema
              + "ID_DOCUMENT, "
              + schema
              + "DEMOGRAPHIC_DETAIL WHERE IREC_ISSUANCE_TYP = '2' AND DPSP_PERSON_ID = IREC_PERSON_ID "
              + "AND (DPSP_DV_FLG = '0' OR DPSP_DV_FLG IS NULL) AND (DPSP_DESIGNATION IS NULL OR (DPSP_DESIGNATION NOT IN ('S', 'A'))) "
              + "AND DPSP_PERSON_ID NOT IN (SELECT DISTINCT ADST_PERSON_ID FROM "
              + schema
              + "ADMIN_STATUS WHERE ADST_ADMIN_STATUS = '08' "
              + "AND ADST_REMOVE_DTE IS NULL) AND IREC_ID_NBR = IDDC_ID_NBR AND IDDC_ORIG_ISS_DTE IS NOT NULL "
              + "AND DPSP_PERSON_ID = DMDT_PERSON_ID AND DMDT_ADDR_TYP = 'P' FOR FETCH ONLY";

      stmt2 = con1.prepareStatement(sqlStr);
      rs2 = stmt2.executeQuery();

      date = new java.util.Date();
      t2 = date.getTime();

      logger.debug(sqlStr);
      logger.debug("Elapsed time for excuting SQL statement is " + (t2 - t1) + " ms");

      date = new java.util.Date();
      t1 = date.getTime();

      while (rs2.next()) {
        count++;
        n++;

        String recordStr = createRecord(rs2, "ID");
        writer.write(recordStr + "\r\n");
      } // end of while(rs2.next())

      date = new java.util.Date();
      t2 = date.getTime();

      logger.debug("Elapsed time for excuting while(rs2.next()) is " + (t2 - t1) + " ms");
      logger.debug("count = " + n);
      logger.debug(date.toString());

      if (rs2 != null) {
        rs2.close();
        rs2 = null;
      }

      if (stmt2 != null) {
        stmt2.close();
        stmt2 = null;
      }
    } // end of try
    catch (Exception e) {
      System.out.println("basicFlowID()" + e);
      logger.error("Exception during basicFlowID()", e);
      rc = false;

      throw new RuntimeException("Exception during basicFlowID()" + e.getMessage());
    }
  }