Class Maestro2SimulationController
- java.lang.Object
-
- org.intocps.maestro.webapi.maestro2.Maestro2SimulationController
-
@RestController @Component public class Maestro2SimulationController extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static SessionControllersessionController
-
Constructor Summary
Constructors Constructor Description Maestro2SimulationController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatusModelcreateSession()voiddestroy(java.lang.String sessionId)voidexecuteViaCLI(java.lang.String sessionId, CliExecutionRequestBody cliExecutionRequestBody)org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>getResultPlain(java.lang.String sessionId)voidgetResultZip(java.lang.String sessionId, javax.servlet.http.HttpServletResponse response)java.lang.StringgetStatuses()java.lang.StringgetStatuses(java.lang.String sessionId)InitializeStatusModelinitializeSession(java.lang.String sessionId, InitializationData body)voidoverrideRootLoggerLogLevel(org.apache.logging.log4j.Level level)java.lang.Stringping()StatusModelsimulate(java.lang.String sessionId, SimulateRequestBody body)voidstop(java.lang.String sessionId)voiduploadFile(java.lang.String sessionId, org.springframework.web.multipart.MultipartFile file)java.lang.Stringversion()
-
-
-
Field Detail
-
sessionController
public static final SessionController sessionController
-
-
Method Detail
-
overrideRootLoggerLogLevel
public void overrideRootLoggerLogLevel(org.apache.logging.log4j.Level level)
-
uploadFile
@RequestMapping(value="/upload/{sessionId}", method=POST) public void uploadFile(@PathVariable java.lang.String sessionId, @RequestParam("fieldFile") org.springframework.web.multipart.MultipartFile file) throws java.io.IOException- Throws:
java.io.IOException
-
ping
@RequestMapping(value="/ping", method=GET, produces="text/plain") public java.lang.String ping()
-
getStatuses
@RequestMapping(value="/status/{sessionId}", method=GET, produces="text/plain") public java.lang.String getStatuses(@PathVariable java.lang.String sessionId) throws java.lang.Exception- Throws:
java.lang.Exception
-
getStatuses
@RequestMapping(value="/status", method=GET, produces="text/plain") public java.lang.String getStatuses() throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
createSession
@RequestMapping(value="/createSession", method=GET, produces="application/json") public StatusModel createSession()
-
initializeSession
@RequestMapping(value="/initialize/{sessionId}", method=POST, consumes={"text/plain","application/json"}, produces="application/json") public InitializeStatusModel initializeSession(@PathVariable java.lang.String sessionId, @RequestBody InitializationData body) throws java.lang.Exception- Throws:
java.lang.Exception
-
simulate
@RequestMapping(value="/simulate/{sessionId}", method=POST, consumes={"text/plain","application/json"}, produces="application/json") public StatusModel simulate(@PathVariable java.lang.String sessionId, @RequestBody SimulateRequestBody body) throws java.lang.Exception- Throws:
java.lang.Exception
-
stop
@RequestMapping(value="/stopsimulation/{sessionId}", method=POST) public void stop(@PathVariable java.lang.String sessionId)
-
getResultPlain
@RequestMapping(value="/result/{sessionId}/plain", method=GET, produces="text/csv") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getResultPlain(@PathVariable java.lang.String sessionId) throws java.lang.Exception- Throws:
java.lang.Exception
-
getResultZip
@RequestMapping(value="/result/{sessionId}/zip", method=GET, produces="application/zip") public void getResultZip(@PathVariable java.lang.String sessionId, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception- Throws:
java.lang.Exception
-
destroy
@RequestMapping(value="/destroy/{sessionId}", method=GET) public void destroy(@PathVariable java.lang.String sessionId) throws java.lang.Exception- Throws:
java.lang.Exception
-
version
@RequestMapping(value="/version", method=GET, produces="text/plain") public java.lang.String version()
-
executeViaCLI
@RequestMapping(value="/executeViaCLI/{sessionId}", method=POST) public void executeViaCLI(@PathVariable java.lang.String sessionId, @RequestBody CliExecutionRequestBody cliExecutionRequestBody)
-
-