}
@Override
public GroupGeneralData retrieveCenterGroupTemplate(final Long centerId) {
final CenterData center = retrieveOne(centerId);
final Long centerOfficeId = center.officeId();
final OfficeData centerOffice = this.officeReadPlatformService.retrieveOffice(centerOfficeId);
StaffData staff = null;
final Long staffId = center.staffId();
String staffName = null;
if (staffId != null) {
staff = this.staffReadPlatformService.retrieveStaff(staffId);
staffName = staff.getDisplayName();
}
final Collection<CenterData> centerOptions = Arrays.asList(center);
final Collection<OfficeData> officeOptions = Arrays.asList(centerOffice);
Collection<StaffData> staffOptions = this.staffReadPlatformService.retrieveAllStaffForDropdown(centerOfficeId);
if (CollectionUtils.isEmpty(staffOptions)) {
staffOptions = null;
}
Collection<ClientData> clientOptions = this.clientReadPlatformService.retrieveAllForLookupByOfficeId(centerOfficeId);
if (CollectionUtils.isEmpty(clientOptions)) {
clientOptions = null;
}
return GroupGeneralData.template(centerOfficeId, center.getId(), center.getName(), staffId, staffName, centerOptions,
officeOptions, staffOptions, clientOptions, null);
}