1 | |
package org.kuali.rice.kew.api.document.attribute; |
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
import javax.xml.bind.annotation.XmlAccessType; |
8 | |
import javax.xml.bind.annotation.XmlAccessorType; |
9 | |
import javax.xml.bind.annotation.XmlElement; |
10 | |
import javax.xml.bind.annotation.XmlRootElement; |
11 | |
import javax.xml.bind.annotation.XmlType; |
12 | |
|
13 | 0 | @XmlRootElement(name = DocumentAttributeString.Constants.ROOT_ELEMENT_NAME) |
14 | |
@XmlAccessorType(XmlAccessType.NONE) |
15 | |
@XmlType(name = DocumentAttributeString.Constants.TYPE_NAME, propOrder = { |
16 | |
DocumentAttributeString.Elements.VALUE |
17 | |
}) |
18 | |
public final class DocumentAttributeString extends DocumentAttribute<String> { |
19 | |
|
20 | |
@XmlElement(name = Elements.VALUE, required = false) |
21 | |
private final String value; |
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | 0 | private DocumentAttributeString() { |
27 | 0 | this.value = null; |
28 | 0 | } |
29 | |
|
30 | |
public DocumentAttributeString(String name, String value) { |
31 | 0 | super(name); |
32 | 0 | this.value = value; |
33 | 0 | } |
34 | |
|
35 | |
public static DocumentAttributeString create(String name, String value) { |
36 | 0 | return new DocumentAttributeString(name, value); |
37 | |
} |
38 | |
|
39 | |
@Override |
40 | |
public String getValue() { |
41 | 0 | return value; |
42 | |
} |
43 | |
|
44 | |
@Override |
45 | |
public DocumentAttributeDataType getDataType() { |
46 | 0 | return DocumentAttributeDataType.STRING; |
47 | |
} |
48 | |
|
49 | |
|
50 | |
|
51 | |
|
52 | 0 | static class Constants { |
53 | |
final static String ROOT_ELEMENT_NAME = "documentAttributeString"; |
54 | |
final static String TYPE_NAME = "DocumentAttributeStringType"; |
55 | |
} |
56 | |
|
57 | |
|
58 | |
|
59 | |
|
60 | 0 | static class Elements { |
61 | |
final static String VALUE = "value"; |
62 | |
} |
63 | |
|
64 | |
} |