Esempio n. 1
0
  String createAppDataForExportOperation(ExchangeContext ctx) {
    ExportData exportData = new ExportData();
    DataRequest dataRequest = new DataRequest();
    Date startDate = (Date) ctx.getVariable("startDate");
    if (startDate != null) {
      dataRequest.setStartDate(
          XmlTypes.dateTimeAndZeroMilliseconds(formatDate(startDate, "dd.MM.yyyy HH:mm:ss")));
    }

    Date endDate = (Date) ctx.getVariable("endDate");
    if (endDate != null) {
      dataRequest.setEndDate(
          XmlTypes.dateTimeAndZeroMilliseconds(formatDate(endDate, "dd.MM.yyyy HH:mm:ss")));
    }
    exportData.setDataRequest(dataRequest);
    dataRequest.setKind((String) ctx.getVariable("exportRequestType"));
    String postBlockSenderIdentifier = (String) ctx.getVariable("postBlockSenderIdentifier");
    final PostBlock postBlock = createPostBlock(ctx, postBlockSenderIdentifier);
    dataRequest.setPostBlock(postBlock);
    fillSupplierBillIds(ctx, dataRequest);
    fillApplicationIds(ctx, dataRequest);
    fillUnifiedPayerIds(ctx, dataRequest);
    return new XmlTypes(ExportData.class).toXml(exportData);
  }