Class MiaFileController

java.lang.Object
org.qubership.atp.mia.controllers.MiaFileController
All Implemented Interfaces:
MiaFileControllerApi

@RestController public class MiaFileController extends Object implements MiaFileControllerApi
IMPORTANT!!! The first parameter in the request must be projectId, the second must be sessionId.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>
    downloadFile(UUID projectId, UUID sessionId, String logFile)
    GET /rest/downloadFile/{projectId}/MIA_FILE_TYPE_LOG/{sessionId}/{logFile} Download file of execution
    org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>
    downloadFileFromUploads(UUID projectId, UUID sessionId, String logFile)
    GET /rest/downloadFile/{projectId}/MIA_FILE_TYPE_UPLOAD/{sessionId}/{logFile} Download file from uploads
    org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>
    downloadOutputAsZip(UUID projectId, UUID sessionId, String processName, List<String> filePaths)
    POST /rest/downloadOutputAsZip downloadOutputAsZip
    org.springframework.http.ResponseEntity<String>
    handleFileUpload(UUID projectId, UUID sessionId, Boolean needDos2Unix, org.springframework.web.multipart.MultipartFile file)
    POST /rest/uploadFile Upload file for project.
    org.springframework.http.ResponseEntity<String>
    handleTestDataFileUpload(UUID projectId, UUID sessionId, org.springframework.web.multipart.MultipartFile file)
    POST /rest/uploadTestDataFile handleTestDataFileUpload

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MiaFileController

      public MiaFileController()
  • Method Details

    • downloadFile

      @PreAuthorize("@entityAccess.checkAccess(#projectId, \"EXECUTE\")") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> downloadFile(UUID projectId, UUID sessionId, String logFile)
      Description copied from interface: MiaFileControllerApi
      GET /rest/downloadFile/{projectId}/MIA_FILE_TYPE_LOG/{sessionId}/{logFile} Download file of execution
      Specified by:
      downloadFile in interface MiaFileControllerApi
      Parameters:
      projectId - projectId (required)
      sessionId - sessionId (required)
      logFile - logFile (required)
      Returns:
      OK (status code 200) or Created (status code 201) or Unauthorized (status code 401) or Forbidden (status code 403) or Not Found (status code 404)
    • downloadFileFromUploads

      @PreAuthorize("@entityAccess.checkAccess(#projectId, \"EXECUTE\")") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> downloadFileFromUploads(UUID projectId, UUID sessionId, String logFile)
      Description copied from interface: MiaFileControllerApi
      GET /rest/downloadFile/{projectId}/MIA_FILE_TYPE_UPLOAD/{sessionId}/{logFile} Download file from uploads
      Specified by:
      downloadFileFromUploads in interface MiaFileControllerApi
      Parameters:
      projectId - projectId (required)
      sessionId - sessionId (required)
      logFile - logFile (required)
      Returns:
      OK (status code 200) or Created (status code 201) or Unauthorized (status code 401) or Forbidden (status code 403) or Not Found (status code 404)
    • downloadOutputAsZip

      @PreAuthorize("@entityAccess.checkAccess(#projectId, \"EXECUTE\")") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> downloadOutputAsZip(UUID projectId, UUID sessionId, String processName, List<String> filePaths)
      Description copied from interface: MiaFileControllerApi
      POST /rest/downloadOutputAsZip downloadOutputAsZip
      Specified by:
      downloadOutputAsZip in interface MiaFileControllerApi
      Parameters:
      projectId - projectId (required)
      sessionId - sessionId (required)
      processName - processName (required)
      filePaths - filePaths (required)
      Returns:
      OK (status code 200) or Created (status code 201) or Unauthorized (status code 401) or Forbidden (status code 403) or Not Found (status code 404)
    • handleFileUpload

      @PreAuthorize("@entityAccess.checkAccess(#projectId, \"EXECUTE\")") public org.springframework.http.ResponseEntity<String> handleFileUpload(UUID projectId, UUID sessionId, Boolean needDos2Unix, org.springframework.web.multipart.MultipartFile file)
      Description copied from interface: MiaFileControllerApi
      POST /rest/uploadFile Upload file for project.
      Specified by:
      handleFileUpload in interface MiaFileControllerApi
      Parameters:
      projectId - projectId (required)
      sessionId - sessionId (required)
      needDos2Unix - needDos2Unix (optional)
      file - file (optional)
      Returns:
      OK (status code 200) or Created (status code 201) or Unauthorized (status code 401) or Forbidden (status code 403) or Not Found (status code 404)
    • handleTestDataFileUpload

      @PreAuthorize("@entityAccess.checkAccess(#projectId, \"EXECUTE\")") public org.springframework.http.ResponseEntity<String> handleTestDataFileUpload(UUID projectId, UUID sessionId, org.springframework.web.multipart.MultipartFile file)
      Description copied from interface: MiaFileControllerApi
      POST /rest/uploadTestDataFile handleTestDataFileUpload
      Specified by:
      handleTestDataFileUpload in interface MiaFileControllerApi
      Parameters:
      projectId - projectId (required)
      sessionId - sessionId (optional)
      file - file (optional)
      Returns:
      OK (status code 200) or Created (status code 201) or Unauthorized (status code 401) or Forbidden (status code 403) or Not Found (status code 404)