From 168fb28ab218ae15081845b9ff457d44caf04526 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Thu, 20 Jun 2019 17:53:06 -0700 Subject: [PATCH] DRYD-670: Adding new InvocationContext field for specifying MIME type when generating reports. This value, if set, will override the MIME type specified (if any) in the Report resource. --- .../src/main/resources/invocationContext.xsd | 1 + .../nuxeo/ReportDocumentModelHandler.java | 25 +++++++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/services/jaxb/src/main/resources/invocationContext.xsd b/services/jaxb/src/main/resources/invocationContext.xsd index b4f234722..2da78da2e 100644 --- a/services/jaxb/src/main/resources/invocationContext.xsd +++ b/services/jaxb/src/main/resources/invocationContext.xsd @@ -13,6 +13,7 @@ + diff --git a/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportDocumentModelHandler.java b/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportDocumentModelHandler.java index 0256887eb..4e37787ae 100644 --- a/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportDocumentModelHandler.java +++ b/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportDocumentModelHandler.java @@ -124,10 +124,10 @@ public class ReportDocumentModelHandler extends NuxeoDocumentModelHandler csids = null; InvocationContext.ListCSIDs listThing = invContext.getListCSIDs(); - if(listThing!=null) { + if (listThing!=null) { csids = listThing.getCsid(); } - if(csids==null||csids.isEmpty()){ + if (csids==null||csids.isEmpty()){ throw new BadRequestException( "ReportResource: Report invoked in list mode, with no csids in list." ); } @@ -180,12 +180,21 @@ public class ReportDocumentModelHandler extends NuxeoDocumentModelHandler