* org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#getRepresentationDescription(org.openmrs.module.webservices.rest.web.representation.Representation)
*/
@Override
public DelegatingResourceDescription getRepresentationDescription(Representation rep) {
if (rep instanceof DefaultRepresentation) {
DelegatingResourceDescription description = new DelegatingResourceDescription();
description.addProperty("uuid");
description.addProperty("display", findMethod("getDisplayString"));
description.addProperty("name");
description.addProperty("description");
description.addProperty("searchQuery");
description.addProperty("patients", Representation.REF);
description.addProperty("retired");
description.addSelfLink();
description.addLink("full", ".?v=" + RestConstants.REPRESENTATION_FULL);
return description;
} else if (rep instanceof FullRepresentation) {
DelegatingResourceDescription description = new DelegatingResourceDescription();
description.addProperty("uuid");
description.addProperty("display", findMethod("getDisplayString"));
description.addProperty("name");
description.addProperty("description");
description.addProperty("searchQuery");
description.addProperty("patients", Representation.DEFAULT);
description.addProperty("retired");
description.addProperty("auditInfo", findMethod("getAuditInfo"));
description.addSelfLink();
return description;
}
return null;
}