From e431f41295198ee1e8ca79a78f5787d75f968d12 Mon Sep 17 00:00:00 2001 From: Ray Lee Date: Fri, 3 May 2019 16:22:38 -0700 Subject: [PATCH] Revert "DRYD-630: Show nuxeo properties in systeminfo." This reverts commit 5ac67d52068e576965a64075315c261755e3bbb5. --- .../src/main/resources/systeminfo-common.xsd | 48 +++++++------------ .../systeminfo/SystemInfoResource.java | 45 ++++------------- 2 files changed, 27 insertions(+), 66 deletions(-) diff --git a/services/systeminfo/jaxb/src/main/resources/systeminfo-common.xsd b/services/systeminfo/jaxb/src/main/resources/systeminfo-common.xsd index 9ee8518c0..d35336f9e 100644 --- a/services/systeminfo/jaxb/src/main/resources/systeminfo-common.xsd +++ b/services/systeminfo/jaxb/src/main/resources/systeminfo-common.xsd @@ -2,14 +2,14 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -54,17 +53,4 @@ - - - - - - - - - - - - diff --git a/services/systeminfo/service/src/main/java/org/collectionspace/services/systeminfo/SystemInfoResource.java b/services/systeminfo/service/src/main/java/org/collectionspace/services/systeminfo/SystemInfoResource.java index 85ddf090e..ecf56cbaf 100644 --- a/services/systeminfo/service/src/main/java/org/collectionspace/services/systeminfo/SystemInfoResource.java +++ b/services/systeminfo/service/src/main/java/org/collectionspace/services/systeminfo/SystemInfoResource.java @@ -1,11 +1,7 @@ package org.collectionspace.services.systeminfo; import java.nio.charset.Charset; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; import java.util.Locale; -import java.util.Properties; import java.util.TimeZone; import javax.ws.rs.Consumes; @@ -23,13 +19,11 @@ import org.collectionspace.services.authorization.CSpaceResource; import org.collectionspace.services.authorization.URIResourceImpl; import org.collectionspace.services.common.AbstractCollectionSpaceResourceImpl; import org.collectionspace.services.common.CSWebApplicationException; -import org.collectionspace.services.common.ServiceMain; import org.collectionspace.services.common.UriInfoWrapper; import org.collectionspace.services.common.context.RemoteServiceContextFactory; import org.collectionspace.services.common.context.ServiceContext; import org.collectionspace.services.common.context.ServiceContextFactory; import org.collectionspace.services.common.security.UnauthorizedException; -import org.nuxeo.runtime.api.Framework; @Path(SystemInfoClient.SERVICE_PATH) @Produces({"application/xml"}) @@ -52,18 +46,18 @@ public class SystemInfoResource extends AbstractCollectionSpaceResourceImpl ctx = createServiceContext(getServiceName(), ui); CSpaceResource res = new URIResourceImpl(ctx.getTenantId(), SystemInfoClient.SERVICE_NAME, HttpMethod.DELETE); if (AuthZ.get().isAccessAllowed(res)) { - // TODO: Stop hardcoding this! - // result.setNuxeoVersionString("7.10-HF17"); - result.setHost(String.format("Architecture:%s Name:%s Version:%s", - System.getProperty("os.arch"), System.getProperty("os.name"), System.getProperty("os.version"))); - result.setJavaVersionString(System.getProperty("java.version")); - - // TODO: Stop hardcoding this! - // result.setPostgresVersionString("9.5.7"); - - Properties properties = Framework.getProperties(); - List names = new ArrayList(properties.stringPropertyNames()); - PropertyList nuxeoPropertyList = new PropertyList(); - - Collections.sort(names); - - for (String name : names) { - Property p = new Property(); - p.setKey(name); - p.setValue(properties.getProperty(name)); - - nuxeoPropertyList.getProperty().add(p); - } - - result.setNuxeoPropertyList(nuxeoPropertyList); + result.setNuxeoVersionString("7.10-HF17"); + result.setHost(String.format("Architecture:%s Name:%s Version:%s", + System.getProperty("os.arch"), System.getProperty("os.name"), System.getProperty("os.version"))); + result.setJavaVersionString(System.getProperty("java.version")); + result.setPostgresVersionString("9.5.7"); } } catch (UnauthorizedException e) { e.printStackTrace(); @@ -118,7 +93,7 @@ public class SystemInfoResource extends AbstractCollectionSpaceResourceImpl getServiceContextFactory() { return (ServiceContextFactory) RemoteServiceContextFactory.get(); -- 2.47.3