no.difi.vefa.peppol.common.model.Header.getSender()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(94)

本文整理了Java中no.difi.vefa.peppol.common.model.Header.getSender()方法的一些代码示例,展示了Header.getSender()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Header.getSender()方法的具体详情如下:
包路径:no.difi.vefa.peppol.common.model.Header
类名称:Header
方法名:getSender

Header.getSender介绍

暂无

代码示例

代码示例来源:origin: no.difi.oxalis/oxalis-commons

/**
   * Computes the Path for a directory into which your file artifacts associated with
   * the supplied header may be written. Any intermediate directories are created for you.
   *
   * @param baseFolder the root folder to use as the basis for appending additional folders.
   * @param header     meta data to be used as input for computation.
   * @return a path to a directory into which you may store your artifacts.
   * @throws IOException
   */
  public static Path createArtifactFolders(Path baseFolder, Header header) throws IOException {
    Path folder = baseFolder.resolve(Paths.get(
        FileUtils.filterString(header.getReceiver().getIdentifier()),
        FileUtils.filterString(header.getSender().getIdentifier())));

    Files.createDirectories(folder);

    return folder;
  }
}

代码示例来源:origin: difi/oxalis

@Override
  public void verify(Header header, Direction direction) {
    log.info("Direction: {} | Sender/Receiver: {}/{} | Instance identifier: {}",
        direction,
        header.getSender().getIdentifier(),
        header.getReceiver().getIdentifier(),
        header.getIdentifier());
  }
}

代码示例来源:origin: difi/oxalis

/**
   * Computes the Path for a directory into which your file artifacts associated with
   * the supplied header may be written. Any intermediate directories are created for you.
   *
   * @param baseFolder the root folder to use as the basis for appending additional folders.
   * @param header     meta data to be used as input for computation.
   * @return a path to a directory into which you may store your artifacts.
   * @throws IOException
   */
  public static Path createArtifactFolders(Path baseFolder, Header header) throws IOException {
    Path folder = baseFolder.resolve(Paths.get(
        FileUtils.filterString(header.getReceiver().getIdentifier()),
        FileUtils.filterString(header.getSender().getIdentifier())));

    Files.createDirectories(folder);

    return folder;
  }
}

代码示例来源:origin: no.difi.vefa/peppol-evidence

public Evidence header(Header header) {
  Evidence evidence = copy();
  evidence.sender = header.getSender();
  evidence.receiver = header.getReceiver();
  evidence.documentTypeIdentifier = header.getDocumentType();
  evidence.documentIdentifier = header.getIdentifier();
  return evidence;
}

代码示例来源:origin: difi/oxalis

public PeppolStandardBusinessHeader(Header header) {
  senderId = header.getSender();
  recipientId = header.getReceiver();
  creationDateAndTime = header.getCreationTimestamp();
  peppolDocumentTypeId = header.getDocumentType();
  profileTypeIdentifier = header.getProcess();
  instanceId = new InstanceId(header.getIdentifier().getIdentifier());
}

代码示例来源:origin: no.difi.oxalis/oxalis-statistics

public void persist(InboundMetadata inboundMetadata) {
    // Persists raw statistics when message was received (ignore if stats couldn't be persisted, just warn)
    try {
      DefaultRawStatistics rawStatistics = new DefaultRawStatistics.RawStatisticsBuilder()
          .accessPointIdentifier(ourAccessPointIdentifier)
          .direction(Direction.IN)
          .documentType(inboundMetadata.getHeader().getDocumentType())
          .sender(inboundMetadata.getHeader().getSender())
          .receiver(inboundMetadata.getHeader().getReceiver())
          .profile(inboundMetadata.getHeader().getProcess())
          .channel(new ChannelId("AS2"))
          .build();

      rawStatisticsRepository.persist(rawStatistics);
    } catch (Exception e) {
      logger.error("Unable to persist statistics for " + inboundMetadata.toString() + ";\n " + e.getMessage(), e);
    }
  }
}

代码示例来源:origin: difi/oxalis

public void persist(InboundMetadata inboundMetadata) {
    // Persists raw statistics when message was received (ignore if stats couldn't be persisted, just warn)
    try {
      DefaultRawStatistics rawStatistics = new DefaultRawStatistics.RawStatisticsBuilder()
          .accessPointIdentifier(ourAccessPointIdentifier)
          .direction(Direction.IN)
          .documentType(inboundMetadata.getHeader().getDocumentType())
          .sender(inboundMetadata.getHeader().getSender())
          .receiver(inboundMetadata.getHeader().getReceiver())
          .profile(inboundMetadata.getHeader().getProcess())
          .channel(new ChannelId("AS2"))
          .build();

      rawStatisticsRepository.persist(rawStatistics);
    } catch (Exception e) {
      logger.error("Unable to persist statistics for " + inboundMetadata.toString() + ";\n " + e.getMessage(), e);
    }
  }
}

代码示例来源:origin: no.difi.vefa/peppol-sbdh

sbdh.getSender().add(SbdhHelper.createPartner(header.getSender()));

代码示例来源:origin: no.difi.oxalis/oxalis-statistics

.direction(Direction.OUT)
.documentType(transmissionResponse.getHeader().getDocumentType())
.sender(transmissionResponse.getHeader().getSender())
.receiver(transmissionResponse.getHeader().getReceiver())
.profile(transmissionResponse.getHeader().getProcess())

代码示例来源:origin: difi/oxalis

.direction(Direction.OUT)
.documentType(transmissionResponse.getHeader().getDocumentType())
.sender(transmissionResponse.getHeader().getSender())
.receiver(transmissionResponse.getHeader().getReceiver())
.profile(transmissionResponse.getHeader().getProcess())

相关文章