1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krms.framework.engine;
17
18 import java.util.Arrays;
19 import java.util.List;
20
21 import org.kuali.rice.krms.api.engine.ExecutionEnvironment;
22
23 public final class BasicAgendaTree implements AgendaTree {
24
25 private final List<AgendaTreeEntry> entries;
26
27 public BasicAgendaTree(AgendaTreeEntry... entries) {
28 this.entries = Arrays.asList(entries);
29 }
30
31 public BasicAgendaTree(List<AgendaTreeEntry> entries) {
32 if (entries == null) {
33 throw new IllegalArgumentException("entries list was null");
34 }
35 this.entries = entries;
36 }
37
38 public void execute(ExecutionEnvironment environment) {
39 for (AgendaTreeEntry entry : entries) {
40 entry.execute(environment);
41 }
42 }
43
44 }