From b9eb1329a6dbec7b75c21d8e0eb13134121db6bb Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Sat, 19 Mar 2016 02:05:33 -0700 Subject: 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 --- .../com/p4square/ccbapi/model/CustomField.java | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 src/main/java/com/p4square/ccbapi/model/CustomField.java (limited to 'src/main/java/com/p4square/ccbapi/model/CustomField.java') 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; + } +} -- cgit v1.2.3