From 3b144dbb44abdb88b82ec95607e457b549020cf5 Mon Sep 17 00:00:00 2001 From: Ray Lee Date: Fri, 3 May 2019 20:04:51 -0700 Subject: [PATCH] NOJIRA: Remove hardcoded systeminfo fields. --- .../systeminfo/SystemInfoResource.java | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) 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 ecf56cbaf..ab8b2ce09 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 @@ -19,6 +19,7 @@ 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; @@ -46,26 +47,26 @@ 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)) { - 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(); + // 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"); + } + } catch (UnauthorizedException e) { + e.printStackTrace(); } } catch(Exception e) { @@ -93,7 +96,7 @@ public class SystemInfoResource extends AbstractCollectionSpaceResourceImpl getServiceContextFactory() { return (ServiceContextFactory) RemoteServiceContextFactory.get(); -- 2.47.3