private ExcerptRecord buildRecord()

in src/main/java/com/epam/digital/data/platform/excerpt/api/service/ExcerptGenerationService.java [128:146]


  private ExcerptRecord buildRecord(ExcerptEventDto excerptEventDto, RequestContext requestContext,
      SecurityContext securityContext, String templateType) {
    var excerptRecord = new ExcerptRecord();
    excerptRecord.setStatus(IN_PROGRESS);
    var now = LocalDateTime.now();
    excerptRecord.setCreatedAt(now);
    excerptRecord.setUpdatedAt(now);
    excerptRecord.setSignatureRequired(excerptEventDto.isRequiresSystemSignature());
    excerptRecord.setKeycloakId(jwtHelper.getKeycloakId(securityContext.getAccessToken()));

    excerptRecord.setxDigitalSignature(securityContext.getDigitalSignature());
    excerptRecord.setxDigitalSignatureDerived(securityContext.getDigitalSignatureDerived());
    excerptRecord.setxSourceSystem(requestContext.getSourceSystem());
    excerptRecord.setxSourceApplication(requestContext.getSourceApplication());
    excerptRecord.setxSourceBusinessProcess(requestContext.getSourceBusinessProcess());
    excerptRecord.setxSourceBusinessActivity(requestContext.getSourceBusinessActivity());
    excerptRecord.setExcerptType(templateType);
    return excerptRecord;
  }