blob: c9917e4ad121f5fa8bb2d7def0f3e8d5ca169753 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
package com.p4square.ccbapi.model;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
* Representation of a Custom/User Defined Field.
*/
@XmlRootElement(name="custom_field")
@XmlAccessorType(XmlAccessType.PROPERTY)
public class CustomField {
private String name;
private String label;
private boolean adminOnly;
/**
* Create an empty CustomField object.
*/
public CustomField() {
// Default constructor
}
/**
* Create a CustomField object with the name and label set.
*
* adminOnly will be false by default.
*
* @param name The CustomField name.
* @param label The CustomField label.
*/
public CustomField(final String name, final String label) {
this(name, label, false);
}
/**
* Create a CustomField object with the name, label, and adminOnly fields set.
*
* @param name The CustomField name.
* @param label The CustomField label.
* @param adminOnly The value of the adminOnly field.
*/
public CustomField(final String name, final String label, final boolean adminOnly) {
this.name = name;
this.label = label;
this.adminOnly = adminOnly;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public boolean isAdminOnly() {
return adminOnly;
}
@XmlElement(name="admin_only")
public void setAdminOnly(boolean adminOnly) {
this.adminOnly = adminOnly;
}
}
|