From ee8053b182f4ecfcedddd516d1e87bb3c5197c13 Mon Sep 17 00:00:00 2001 From: Adam Rauch Date: Tue, 1 Oct 2024 14:56:59 -0700 Subject: [PATCH] Use WritablePropertyMap --- hdrl/src/org/labkey/hdrl/HDRLManager.java | 5 +++-- hdrl/src/org/labkey/hdrl/query/LabWareQuerySchema.java | 7 ------- .../org/labkey/ms2extensions/MS2ExtensionsController.java | 5 +++-- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/hdrl/src/org/labkey/hdrl/HDRLManager.java b/hdrl/src/org/labkey/hdrl/HDRLManager.java index a87737e8..63c34c36 100644 --- a/hdrl/src/org/labkey/hdrl/HDRLManager.java +++ b/hdrl/src/org/labkey/hdrl/HDRLManager.java @@ -17,12 +17,13 @@ package org.labkey.hdrl; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.labkey.api.attachments.InputStreamAttachmentFile; import org.labkey.api.data.CompareType; import org.labkey.api.data.Container; import org.labkey.api.data.PropertyManager; +import org.labkey.api.data.PropertyManager.WritablePropertyMap; import org.labkey.api.data.SQLFragment; import org.labkey.api.data.SimpleFilter; import org.labkey.api.data.SqlSelector; @@ -103,7 +104,7 @@ public List getInboundSpecimen(int requestId) public static void saveProperties(HDRLController.SensitiveDataForm sensitiveDataForm) { - PropertyManager.PropertyMap map = PropertyManager.getNormalStore().getWritableProperties(HDRL_SENSITIVE_DATA_TIME_WINDOW, true); + WritablePropertyMap map = PropertyManager.getNormalStore().getWritableProperties(HDRL_SENSITIVE_DATA_TIME_WINDOW, true); map.clear(); map.put(NUM_OF_DAYS_KEY, String.valueOf(sensitiveDataForm.getTimeWindowInDays())); map.save(); diff --git a/hdrl/src/org/labkey/hdrl/query/LabWareQuerySchema.java b/hdrl/src/org/labkey/hdrl/query/LabWareQuerySchema.java index 0accd142..ddaf82c9 100644 --- a/hdrl/src/org/labkey/hdrl/query/LabWareQuerySchema.java +++ b/hdrl/src/org/labkey/hdrl/query/LabWareQuerySchema.java @@ -15,25 +15,18 @@ */ package org.labkey.hdrl.query; -import org.jetbrains.annotations.Nullable; import org.labkey.api.data.Container; import org.labkey.api.data.DbSchema; import org.labkey.api.data.DbSchemaType; import org.labkey.api.data.DbScope; -import org.labkey.api.data.SchemaTableInfo; -import org.labkey.api.data.TableInfo; import org.labkey.api.module.Module; import org.labkey.api.query.DefaultSchema; -import org.labkey.api.query.FilteredTable; import org.labkey.api.query.QuerySchema; import org.labkey.api.query.SimpleUserSchema; import org.labkey.api.query.ValidationException; import org.labkey.api.security.User; import org.labkey.hdrl.HDRLModule; -/** - * Created by susanh on 6/19/15. - */ public class LabWareQuerySchema extends SimpleUserSchema { public static final String NAME = "GW_LABKEY"; diff --git a/ms2extensions/src/org/labkey/ms2extensions/MS2ExtensionsController.java b/ms2extensions/src/org/labkey/ms2extensions/MS2ExtensionsController.java index d021355d..1e4aa132 100644 --- a/ms2extensions/src/org/labkey/ms2extensions/MS2ExtensionsController.java +++ b/ms2extensions/src/org/labkey/ms2extensions/MS2ExtensionsController.java @@ -15,6 +15,7 @@ */ package org.labkey.ms2extensions; +import jakarta.servlet.http.HttpSession; import org.json.JSONObject; import org.labkey.api.action.ApiResponse; import org.labkey.api.action.ApiSimpleResponse; @@ -25,6 +26,7 @@ import org.labkey.api.admin.AdminUrls; import org.labkey.api.data.Container; import org.labkey.api.data.PropertyManager; +import org.labkey.api.data.PropertyManager.WritablePropertyMap; import org.labkey.api.security.RequiresPermission; import org.labkey.api.security.permissions.AdminOperationsPermission; import org.labkey.api.security.permissions.ReadPermission; @@ -35,7 +37,6 @@ import org.springframework.validation.BindException; import org.springframework.web.servlet.ModelAndView; -import jakarta.servlet.http.HttpSession; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -144,7 +145,7 @@ public class SetPreferencesAction extends MutatingApiAction public ApiResponse execute(SimpleApiJsonForm simpleApiJsonForm, BindException errors) { Map props; - PropertyManager.PropertyMap mapToSave = null; + WritablePropertyMap mapToSave = null; if (getUser().isGuest()) { // Use session for guests