<name>services</name>
<properties>
- <revision>5.3-SNAPSHOT</revision>
+ <revision>6.0-SNAPSHOT</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cspace.services.version>${revision}</cspace.services.version>
<cspace.services.client.version>${revision}</cspace.services.client.version>
*/
private boolean isAuthorizedToInvokeBatchJobs(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx) {
boolean result = true;
-
+
//
// Until we enforce a user having POST perms on "/batch/*/invoke", we will continue to allow users with
// POST perms on "/batch" to run reports -see JIRA issue https://collectionspace.atlassian.net/browse/DRYD-732
}
/*
- * This method is deprecated as of CollectionSpace v5.3. POST/invoke requests should be made to the
+ * This method is deprecated as of CollectionSpace v6.0. POST/invoke requests should be made to the
* '/reports/{csid}/invoke' endpoint
*/
@POST
try {
ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
ReportDocumentModelHandler handler = (ReportDocumentModelHandler)createDocumentHandler(ctx);
-
+
return handler.getSupportMIMETypes(ctx);
} catch (Exception e) {
throw bigReThrow(e, ServiceMessages.LIST_MIMETYPES_FAILED);
- }
+ }
}
-
+
/*
* TODO: provide a static utility that will load a report, interrogate it
* for information about the properties, and return that information.
StringBuffer outMimeType = new StringBuffer();
StringBuffer outReportFileName = new StringBuffer();
ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
-
+
if (isAuthorizedToInvokeReports(ctx) == true) {
InputStream reportInputStream = invokeReport(ctx, csid, invContext, outMimeType, outReportFileName);
response = PublicItemUtil.publishToRepository(
return response;
}
-
+
/*
* This method allows backward compatibility with the old API for running reports.
*/
private boolean isAuthorizedToInvokeReports(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx) {
boolean result = true;
-
+
//
// Until we enforce a user having POST perms on "/reports/*/invoke", we will continue to allow users with
// POST perms on "/reports" to run reports -see JIRA issue https://collectionspace.atlassian.net/browse/DRYD-732
}
/**
- * This method is deprecated at of CollectionSpace v5.3.
+ * This method is deprecated at of CollectionSpace v6.0.
* @param ui
* @param csid
* @param invContext
StringBuffer outMimeType = new StringBuffer();
StringBuffer outFileName = new StringBuffer();
ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
-
+
if (isAuthorizedToInvokeReports(ctx) == true) {
InputStream reportInputStream = invokeReport(ctx, csid, invContext, outMimeType, outFileName);
// Need to set response type for what is requested...
return response;
}
-
+
@POST
@Path("{csid}/invoke")
public Response invokeReport(
return result;
}
-
+
/*
* Does the actual report generation and returns an InputStream with the results.
*/