Skip to content
Snippets Groups Projects
Commit 4908bba3 authored by Justin Cleveland's avatar Justin Cleveland
Browse files

Merge remote-tracking branch 'origin/master' into TryBranching

parents 87700a9e ac6538b2
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ package org.nrg.xnat.restlet.services; ...@@ -12,6 +12,7 @@ package org.nrg.xnat.restlet.services;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.hibernate.PropertyNotFoundException; import org.hibernate.PropertyNotFoundException;
import org.json.JSONObject;
import org.nrg.config.entities.Configuration; import org.nrg.config.entities.Configuration;
import org.nrg.config.exceptions.ConfigServiceException; import org.nrg.config.exceptions.ConfigServiceException;
import org.nrg.dicomtools.filters.*; import org.nrg.dicomtools.filters.*;
...@@ -108,7 +109,7 @@ public class SettingsRestlet extends SecureResource { ...@@ -108,7 +109,7 @@ public class SettingsRestlet extends SecureResource {
if (StringUtils.isBlank(_property)) { if (StringUtils.isBlank(_property)) {
return mediaType == MediaType.TEXT_XML ? return mediaType == MediaType.TEXT_XML ?
new ItemXMLRepresentation(_arcSpec.getItem(), mediaType) : new ItemXMLRepresentation(_arcSpec.getItem(), mediaType) :
new StringRepresentation("{\"ResultSet\":{\"Result\":" + toJson(getArcSpecAsMap()) + ", \"title\": \"Settings\"}}"); new StringRepresentation("{\"ResultSet\":{\"Result\":" + new JSONObject(getArcSpecAsMap()) + ", \"title\": \"Settings\"}}");
} else { } else {
if (!getArcSpecAsMap().containsKey(_property)) { if (!getArcSpecAsMap().containsKey(_property)) {
throw new PropertyNotFoundException(String.format("Setting '%s' was not found in the system.", _property)); throw new PropertyNotFoundException(String.format("Setting '%s' was not found in the system.", _property));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment