Class RequestSnapshotService

java.lang.Object
org.qubership.atp.itf.lite.backend.service.RequestSnapshotService

@Service public class RequestSnapshotService extends Object
  • Constructor Details

    • RequestSnapshotService

      public RequestSnapshotService()
  • Method Details

    • saveSnapshot

      public RequestSnapshot saveSnapshot(RequestSnapshot requestSnapshot, List<org.springframework.web.multipart.MultipartFile> files, Optional<FileBody> fileInfo) throws com.fasterxml.jackson.core.JsonProcessingException
      Create request.
      Parameters:
      requestSnapshot - creation request
      Returns:
      created request
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • saveFileToFileSystemAndGridFs

      public Optional<FileBody> saveFileToFileSystemAndGridFs(UUID sessionId, UUID sessionRequestId, org.springframework.web.multipart.MultipartFile file, TransportType transportType) throws IOException
      Saves multipart file to file system and grid fs.
      Parameters:
      sessionId - session id
      file - multipart file dictionary or binary
      Throws:
      IOException - could be during file system operations
    • getSnapshot

      public RequestSnapshotResponse getSnapshot(UUID sessionId, UUID requestId)
      Get snapshot by sessionId and requestId.
      Parameters:
      sessionId - session id
      requestId - request id.
      Returns:
      RequestSnapshotResponse
    • deleteSnapshotByRequestSnapshotKey

      public void deleteSnapshotByRequestSnapshotKey(UUID sessionId, UUID requestId)
      Remove snapshot by sessionId and requestId.
      Parameters:
      sessionId - session Id.
      requestId - request Id.
    • bulkDeleteSnapshots

      public void bulkDeleteSnapshots(BulkDeleteSnapshotsRequest bulkDeleteSnapshotsRequest, UUID sessionId)
      Remove snapshot by bulk request and sessionId.
    • preSaveRequestProcessing

      public void preSaveRequestProcessing(UUID sessionId, UUID requestId)
      Remove snapshot by sessionId.
      Parameters:
      sessionId - session id
      requestId - request id
    • getByCreatedWhenDifferenceGreaterThanReferenceDate

      public List<RequestSnapshotKey> getByCreatedWhenDifferenceGreaterThanReferenceDate(Date referenceDate, Long expirationPeriod)