diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2016-03-19 02:05:33 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2016-03-19 02:07:24 -0700 |
commit | b9eb1329a6dbec7b75c21d8e0eb13134121db6bb (patch) | |
tree | fec73ab32ff625c304513c24e864809845eede1a /src/main/java/com/p4square/ccbapi/model/CustomField.java |
Initial commit for the CCB API Client.
The client currently supports the following APIs:
* individual_profiles
* individual_profile_from_id
* individual_profile_from_login_password
* individual_profile_from_micr
* custom_field_labels
Diffstat (limited to 'src/main/java/com/p4square/ccbapi/model/CustomField.java')
-rw-r--r-- | src/main/java/com/p4square/ccbapi/model/CustomField.java | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/main/java/com/p4square/ccbapi/model/CustomField.java b/src/main/java/com/p4square/ccbapi/model/CustomField.java new file mode 100644 index 0000000..c9917e4 --- /dev/null +++ b/src/main/java/com/p4square/ccbapi/model/CustomField.java @@ -0,0 +1,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; + } +} |