Skip to content

Commit

Permalink
O3-2446 - Update Queue resource to support the new priorityConceptSet…
Browse files Browse the repository at this point in the history
… and statusConceptSet properties, and also to retrieve the allowedPriorities and allowedStatuses concepts.
  • Loading branch information
mseaton committed Jan 3, 2024
1 parent 5e6dd05 commit c6a165a
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,19 @@ public DelegatingResourceDescription getRepresentationDescription(Representation
this.addSharedResourceDescriptionProperties(resourceDescription);
resourceDescription.addProperty("location", Representation.REF);
resourceDescription.addProperty("service", Representation.REF);
resourceDescription.addProperty("priorityConceptSet", Representation.REF);
resourceDescription.addProperty("statusConceptSet", Representation.REF);
resourceDescription.addProperty("allowedPriorities", Representation.REF);
resourceDescription.addProperty("allowedStatuses", Representation.REF);
resourceDescription.addLink("full", ".?v=" + RestConstants.REPRESENTATION_FULL);
} else if (representation instanceof FullRepresentation) {
this.addSharedResourceDescriptionProperties(resourceDescription);
resourceDescription.addProperty("location", Representation.FULL);
resourceDescription.addProperty("service", Representation.FULL);
resourceDescription.addProperty("priorityConceptSet", Representation.REF);
resourceDescription.addProperty("statusConceptSet", Representation.REF);
resourceDescription.addProperty("allowedPriorities", Representation.REF);
resourceDescription.addProperty("allowedStatuses", Representation.REF);
resourceDescription.addProperty("auditInfo");
} else if (representation instanceof CustomRepresentation) {
//For custom representation, must be null
Expand All @@ -134,6 +142,8 @@ public DelegatingResourceDescription getCreatableProperties() throws ResourceDoe
resourceDescription.addProperty("description");
resourceDescription.addProperty("location");
resourceDescription.addProperty("service");
resourceDescription.addProperty("priorityConceptSet");
resourceDescription.addProperty("statusConceptSet");
return resourceDescription;
}

Expand All @@ -156,6 +166,16 @@ public String getDisplay(Queue queue) {
return queue.getName();
}

@PropertyGetter("allowedPriorities")
public Object getAllowedPriorities(Queue delegate) {
return services.getAllowedPriorities(delegate);
}

@PropertyGetter("allowedStatuses")
public Object getAllowedStatuses(Queue delegate) {
return services.getAllowedStatuses(delegate);
}

@Override
public String getResourceVersion() {
return "2.3";
Expand Down

0 comments on commit c6a165a

Please sign in to comment.