public final void addToSearchCriteria(final MessageLog messageLog) {
   inRelatedView = true;
   mainCriteria = criteria.cloneWithoutRelated();
   cleanSearchCriteria();
   if (MessageDirection.OUTPUT.equals(messageLog.getDirection())) {
     criteria.setRelatedToOutputId(messageLog.getId());
   } else {
     criteria.setRelatedToInputId(messageLog.getId());
   }
   setFirstPage();
 }
 public StreamedContent getTransportFile() {
   StreamedContent result = null;
   if (Objects.isNull(logToSave)) {
     LOGGER.error("Cannot download transport file! No item selected!");
   } else {
     result =
         getFile(
             String.format("%s.%s", logToSave.getMessageName(), getFileExt()),
             logToSave.getTransportForm());
   }
   return result;
 }
 public StreamedContent getChanges() {
   StreamedContent result = null;
   if (Objects.isNull(logToSave)) {
     LOGGER.error("Cannot download changes file! No data available!");
   } else {
     result = getFile(String.format("%s.%s", "changes", getFileExt()), logToSave.getChangeLog());
   }
   return result;
 }
  public ReportData getReportKDPWResponseData(final MessageLog msgLog) {
    final Collection<KDPWResponseWrapper> data = new ArrayList<>();
    ParametersWrapper parameters =
        new ParametersWrapper(
            "c.statusMessageFile",
            "c.dateTimeLoading",
            "c.login",
            "c.idMessage",
            "c.idTransaction",
            "c.idClient",
            "c.statusMesasge",
            "c.codeError",
            "c.descError");
    KDPWResponseWrapper wrapper = new KDPWResponseWrapper();
    wrapper.setStatusMessageFile(BeanHelper.getMessage(msgLog.getFileStatus().getMsgKey()));
    wrapper.setDatatimeLoading(msgLog.getMessageTime());
    wrapper.setLogin(msgLog.getUserLogin());

    // Dla raportu dotyczącego plików otrzymanych z KDPW:
    if (CollectionsUtils.isNotEmpty(msgLog.getContentItems())) {
      for (KdpwMsgItem item : msgLog.getContentItems()) {
        // parameters = new
        // ParametersWrapper("c.statusMessageFile","c.dateTimeLoading","c.login","c.idMessage","c.idTransaction","c.idClient");
        reportKDPWType = ReportType.KDPW_REQUEST_REPORT;
        wrapper.setIdMessage(item.getSndrMsgRef()); // Id komunikatu
        wrapper.setIdTransaction(item.getTransactionId()); // Identyfikator transakcji
        wrapper.setIdClients(item.getClientId()); // Identyfikator kontrahenta
        if (MessageDirection.INPUT.equals(msgLog.getDirection())) {
          reportKDPWType = ReportType.KDPW_RESPONSE_REPORT;
          wrapper.setStatusMessage(
              BeanHelper.getMessage(item.getStatus().getMsgKey())); // Status komunikatu
          wrapper.setErrorCode(item.getResponseDetails().getStatusCode()); // Kod błędu
          wrapper.setDescriptionError(item.getResponseDetails().getStatusDesc()); // Opis błędu
        }
        data.add(wrapper);
        wrapper = new KDPWResponseWrapper();
      }
    } else {
      data.add(wrapper);
    }

    reportKDPWResponseData.setParameters(parameters.getParameters());
    reportKDPWResponseData.setReportData(data);

    return reportKDPWResponseData;
  }
 public boolean hasChangeLog(final MessageLog value) {
   return StringUtil.isNotEmpty(value.getChangeLog());
 }