]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionSpec.java
Massive Argeo APIs refactoring
[gpl/argeo-slc.git] / org.argeo.slc.runtime / src / org / argeo / slc / runtime / DefaultExecutionSpec.java
1 package org.argeo.slc.runtime;
2
3 import java.io.Serializable;
4 import java.util.ArrayList;
5 import java.util.HashMap;
6 import java.util.List;
7 import java.util.Map;
8
9 import org.argeo.slc.execution.ExecutionSpec;
10 import org.argeo.slc.execution.ExecutionSpecAttribute;
11 import org.argeo.slc.execution.RefSpecAttribute;
12 import org.argeo.slc.execution.RefValueChoice;
13
14 /** Spring based implementation of execution specifications. */
15 public class DefaultExecutionSpec implements ExecutionSpec, Serializable {
16 private static final long serialVersionUID = 7042162759380893595L;
17 private String description;
18 private Map<String, ExecutionSpecAttribute> attributes = new HashMap<String, ExecutionSpecAttribute>();
19
20 private String name = INTERNAL_NAME;
21
22 public Map<String, ExecutionSpecAttribute> getAttributes() {
23 return attributes;
24 }
25
26 public void setDescription(String description) {
27 this.description = description;
28 }
29
30 public void setAttributes(Map<String, ExecutionSpecAttribute> attributes) {
31 this.attributes = attributes;
32 }
33
34 public void setName(String name) {
35 this.name = name;
36 }
37
38 /**
39 * The Spring bean name (only relevant for specs declared has high-level beans)
40 */
41 public String getName() {
42 return name;
43 }
44
45 public boolean equals(Object obj) {
46 return ((ExecutionSpec) obj).getName().equals(name);
47 }
48
49 /**
50 * The Spring bean description (only relevant for specs declared has high-level
51 * beans)
52 */
53 public String getDescription() {
54 return description;
55 }
56
57 /**
58 * Generates a list of ref value choices based on the bean available in the
59 * application ocntext.
60 */
61 protected List<RefValueChoice> buildRefValueChoices(RefSpecAttribute rsa) {
62 List<RefValueChoice> choices = new ArrayList<RefValueChoice>();
63 // FIXME implement something
64 return choices;
65 }
66
67 }