@Produces({ MediaType.APPLICATION_JSON })
public String retreiveStaff(@PathParam("staffId") final Long staffId, @Context final UriInfo uriInfo) {
this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions);
final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
StaffData staff = this.readPlatformService.retrieveStaff(staffId);
if (settings.isTemplate()) {
final Collection<OfficeData> allowedOffices = this.officeReadPlatformService.retrieveAllOfficesForDropdown();
staff = StaffData.templateData(staff, allowedOffices);
}
return this.toApiJsonSerializer.serialize(settings, staff, this.RESPONSE_DATA_PARAMETERS);
}