in src/main/java/org/apache/openwhisk/intellij/explorer/dialog/trigger/ui/TriggerCreationManagerDialogForm.java [61:86]
public void createTrigger() {
try {
// name
String triggerName = triggerNameJTextField.getText().trim();
// parameters
Optional<String> params = ParameterUtils.validateParams(triggerDefaultParameterJTextArea.getText());
if (!params.isPresent()) {
NOTIFIER.notify(project, "The json format of the parameter is incorrect.", NotificationType.ERROR);
return;
}
List<Map<String, Object>> validParams = ParameterUtils.mapToListMap(JsonParserUtils.parseMap(params.get()));
// payload
Map<String, Object> payload = new LinkedHashMap<>();
payload.put("name", triggerName);
payload.put("parameters", validParams);
whiskTriggerService.createWhiskTrigger(auth, triggerName, payload);
refreshWhiskTree();
NOTIFIER.notify(project, triggerName + " created", NotificationType.INFORMATION);
} catch (IOException e) {
String msg = "Failed to create trigger: " + triggerNameJTextField.getText().trim();
LOG.error(msg, e);
NOTIFIER.notify(project, msg, NotificationType.ERROR);
}
}