From 5a64b488e3f33281b462bb97b85c98601db87a8b Mon Sep 17 00:00:00 2001 From: Rick Herrick <jrherrick@wustl.edu> Date: Mon, 15 Aug 2016 12:46:56 -0500 Subject: [PATCH] XNAT-4377 XNAT-4382 Cleaned up some dependency issues that affected build of XNAT data builder plugin. Added XnatPluginApi REST API. Added SortedProperties utility class to make it a bit easier to read properties outputs. --- build.gradle | 1 + .../{XnatPluginAdminApi.java => XnatPluginApi.java} | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) rename src/main/java/org/nrg/xapi/rest/settings/{XnatPluginAdminApi.java => XnatPluginApi.java} (79%) diff --git a/build.gradle b/build.gradle index 151061f9..73dade74 100644 --- a/build.gradle +++ b/build.gradle @@ -254,6 +254,7 @@ configurations { all*.exclude group: 'servletapi' all*.exclude group: 'velocity' all*.exclude group: 'xmlrpc' + all*.exclude group: 'quartz' all*.exclude group: 'ant', module: 'ant' all*.exclude group: 'commons-email', module: 'commons-email' all*.exclude group: 'edu.ucar', module: 'netcdf' diff --git a/src/main/java/org/nrg/xapi/rest/settings/XnatPluginAdminApi.java b/src/main/java/org/nrg/xapi/rest/settings/XnatPluginApi.java similarity index 79% rename from src/main/java/org/nrg/xapi/rest/settings/XnatPluginAdminApi.java rename to src/main/java/org/nrg/xapi/rest/settings/XnatPluginApi.java index bff17199..71e9471a 100644 --- a/src/main/java/org/nrg/xapi/rest/settings/XnatPluginAdminApi.java +++ b/src/main/java/org/nrg/xapi/rest/settings/XnatPluginApi.java @@ -21,17 +21,17 @@ import java.io.IOException; import java.util.Map; import java.util.Properties; -@Api(description = "XNAT Plugin Admin API") +@Api(description = "XNAT Plugin API") @XapiRestController @RequestMapping(value = "/plugins") -public class XnatPluginAdminApi extends AbstractXapiRestController { +public class XnatPluginApi extends AbstractXapiRestController { @Autowired - public XnatPluginAdminApi(final UserManagementServiceI userManagementService, final RoleHolder roleHolder, final XnatAppInfo appInfo) { + public XnatPluginApi(final UserManagementServiceI userManagementService, final RoleHolder roleHolder, final XnatAppInfo appInfo) { super(userManagementService, roleHolder); _appInfo = appInfo; } - @ApiOperation(value = "Returns a list of all of the installed XNAT plugins.", notes = "The maps returned from this call include all of the properties specified in the plugin's property file.", response = String.class, responseContainer = "Map") + @ApiOperation(value = "Returns a list of all of the installed and active XNAT plugins with their properties.", notes = "The maps returned from this call include all of the properties specified in the plugin's property file.", response = String.class, responseContainer = "Map") @ApiResponses({@ApiResponse(code = 200, message = "XNAT plugin properties successfully retrieved."), @ApiResponse(code = 401, message = "Must be authenticated to access the XNAT REST API."), @ApiResponse(code = 500, message = "Unexpected error")}) @@ -40,7 +40,7 @@ public class XnatPluginAdminApi extends AbstractXapiRestController { return new ResponseEntity<>(_appInfo.getPluginProperties(), HttpStatus.OK); } - @ApiOperation(value = "Returns the requested XNAT plugin properties.", notes = "The maps returned from this call include all of the properties specified in the plugin's property file.", response = Properties.class) + @ApiOperation(value = "Returns the indicated XNAT plugin with its properties.", notes = "The map returned from this call include all of the properties specified in the plugin's property file.", response = Properties.class) @ApiResponses({@ApiResponse(code = 200, message = "XNAT plugin properties successfully retrieved."), @ApiResponse(code = 401, message = "Must be authenticated to access the XNAT REST API."), @ApiResponse(code = 404, message = "The requested resource wasn't found."), -- GitLab