]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/RefSpecAttribute.java
Modular distributions
[gpl/argeo-slc.git] / runtime / org.argeo.slc.core / src / main / java / org / argeo / slc / core / execution / RefSpecAttribute.java
1 package org.argeo.slc.core.execution;
2
3 import java.util.List;
4
5 public class RefSpecAttribute extends AbstractSpecAttribute implements
6 Cloneable {
7 private Class<?> targetClass;
8 /** Read only. */
9 private String targetClassName;
10 private Object value = null;
11
12 private List<RefValueChoice> choices = null;
13
14 public Object getValue() {
15 return value;
16 }
17
18 public void setValue(Object value) {
19 this.value = value;
20 }
21
22 public Class<?> getTargetClass() {
23 return targetClass;
24 }
25
26 public void setTargetClass(Class<?> targetClass) {
27 this.targetClass = targetClass;
28 this.targetClassName = targetClass.getName();
29 }
30
31 public String getTargetClassName() {
32 return targetClassName;
33 }
34
35 /** @return can be null */
36 public List<RefValueChoice> getChoices() {
37 return choices;
38 }
39
40 public void setChoices(List<RefValueChoice> choices) {
41 this.choices = choices;
42 }
43
44 @Override
45 protected Object clone() throws CloneNotSupportedException {
46 RefSpecAttribute rsa = new RefSpecAttribute();
47 rsa.setTargetClass(targetClass);
48 rsa.setChoices(choices);
49 return rsa;
50 }
51
52 @Override
53 public String toString() {
54 return "Ref spec attribute [" + targetClass + "]";
55 }
56
57 }