]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.runtime/src/org/argeo/slc/runtime/DefaultExecutionSpec.java
1 package org
.argeo
.slc
.runtime
;
3 import java
.io
.Serializable
;
4 import java
.util
.ArrayList
;
5 import java
.util
.HashMap
;
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
;
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
>();
20 private String name
= INTERNAL_NAME
;
22 public Map
<String
, ExecutionSpecAttribute
> getAttributes() {
26 public void setDescription(String description
) {
27 this.description
= description
;
30 public void setAttributes(Map
<String
, ExecutionSpecAttribute
> attributes
) {
31 this.attributes
= attributes
;
34 public void setName(String name
) {
39 * The Spring bean name (only relevant for specs declared has high-level beans)
41 public String
getName() {
45 public boolean equals(Object obj
) {
46 return ((ExecutionSpec
) obj
).getName().equals(name
);
50 * The Spring bean description (only relevant for specs declared has high-level
53 public String
getDescription() {
58 * Generates a list of ref value choices based on the bean available in the
59 * application ocntext.
61 protected List
<RefValueChoice
> buildRefValueChoices(RefSpecAttribute rsa
) {
62 List
<RefValueChoice
> choices
= new ArrayList
<RefValueChoice
>();
63 // FIXME implement something