From: Ray Lee Date: Sat, 4 May 2019 03:04:51 +0000 (-0700) Subject: NOJIRA: Remove hardcoded systeminfo fields. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=3b144dbb44abdb88b82ec95607e457b549020cf5;p=tmp%2Fjakarta-migration.git NOJIRA: Remove hardcoded systeminfo fields. --- 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();