use of org.folio.circulation.domain.RequestStatus in project mod-circulation by folio-org.
the class RequestFromRepresentationService method validateStatus.
private Result<Request> validateStatus(Request request) {
JsonObject representation = request.getRequestRepresentation();
RequestStatus status = RequestStatus.from(representation);
if (!status.isValid()) {
return failed(new BadRequestFailure(RequestStatus.invalidStatusErrorMessage()));
} else {
status.writeTo(representation);
return succeeded(request);
}
}
Aggregations