use of org.apache.zeppelin.rest.message.RunParagraphWithParametersRequest in project zeppelin by apache.
the class NotebookRestApi method handleParagraphParams.
private void handleParagraphParams(String message, Note note, Paragraph paragraph) throws IOException {
// handle params if presented
if (!StringUtils.isEmpty(message)) {
RunParagraphWithParametersRequest request = gson.fromJson(message, RunParagraphWithParametersRequest.class);
Map<String, Object> paramsForUpdating = request.getParams();
if (paramsForUpdating != null) {
paragraph.settings.getParams().putAll(paramsForUpdating);
AuthenticationInfo subject = new AuthenticationInfo(SecurityUtils.getPrincipal());
note.persist(subject);
}
}
}
Aggregations