1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.core.provisioning.api.macro;
20
21 import java.util.Map;
22 import java.util.Optional;
23 import javax.validation.ValidationException;
24 import org.apache.syncope.common.lib.command.CommandArgs;
25 import org.apache.syncope.common.lib.form.SyncopeForm;
26
27
28
29
30 public interface MacroActions {
31
32 default Optional<String> getDefaultValue(String formProperty) {
33 return Optional.empty();
34 }
35
36 default Map<String, String> getDropdownValues(String formProperty) {
37 return Map.of();
38 }
39
40 default void validate(SyncopeForm form, Map<String, Object> vars) throws ValidationException {
41
42 }
43
44 default void beforeAll() {
45
46 }
47
48 default void beforeCommand(Command<CommandArgs> command, CommandArgs args) {
49
50 }
51
52 default void afterCommand(Command<CommandArgs> command, CommandArgs args, String output) {
53
54 }
55
56 default StringBuilder afterAll(StringBuilder output) {
57 return output;
58 }
59 }