Closed markdaugherty closed 4 years ago
@lykorian from my side now it's good. Thank you very much.
GroovyConsoleService.saveScript could have 2 signatures. First request agnostic with parameters like file name and script content... second one accepting request as it is already which will pass file name and content retrieved from request to first method.
interface GroovyConsoleService {
RunScriptResponse runScript(SlingHttpServletRequest request) // backward compatibility
RunScriptResponse runScript(ScriptContext scriptContext)
SaveScriptResponse saveScript(SlingHttpServletRequest request) // backward compatibility
SaveScriptResponse saveScript(ScriptData scriptData) // another request agnostic
}
interface ScriptData {
String getFileName()
String getContent()
}
@pun-ky let me know what you think about the updates in this latest commit