class DelfiEnrichService implements EnrichService {

  @Override
  public EnrichedFile enrichRecord(DelfiIngestedFile file, String srn,
      RequestContext requestContext) {

    WorkProductComponent wpc = file.getSubmittedFile().getSignedFile().getFile().getWpc();
    WorkProductComponent reducedWpc = deepCopy(wpc, WorkProductComponent.class);

    Record record = portalService
        .getRecord(file.getRecordId(), requestContext.getAuthorizationToken(),
            requestContext.getPartition());

    record.getData().put(RecordDataFields.WPC_DATA, reducedWpc);
    record.getData().put(RecordDataFields.OSDU_DATA, generateOsduFileRecord(file, srn, requestContext.getHeaders()));

    Record enrichedRecord = portalService.putRecord(record, requestContext.getAuthorizationToken(),
        requestContext.getPartition());

    return EnrichedFile.builder()
        .delfiIngestedFile(file)
        .record(enrichedRecord)
        .build();
  }

}