use of gov.ca.cwds.data.ReadablePhone in project api-core by ca-cwds.
the class BaseAttorney method getPhones.
// =======================
// ApiMultiplePhonesAware:
// =======================
@JsonIgnore
@Override
@Transient
public ApiPhoneAware[] getPhones() {
List<ApiPhoneAware> phones = new ArrayList<>();
if (this.primaryPhoneNumber != null && this.messagePhoneNumber != 0) {
phones.add(new ReadablePhone(null, String.valueOf(this.primaryPhoneNumber), this.primaryPhoneExtensionNumber != null ? this.primaryPhoneExtensionNumber.toString() : null, null));
}
if (this.messagePhoneNumber != null && this.messagePhoneNumber != 0) {
LOGGER.debug("add message phone");
phones.add(new ReadablePhone(null, String.valueOf(this.messagePhoneNumber), this.messagePhoneExtensionNumber != null ? this.messagePhoneExtensionNumber.toString() : null, ApiPhoneAware.PhoneType.Cell));
}
return phones.toArray(new ApiPhoneAware[0]);
}
Aggregations