Skip to content

Commit

Permalink
Use WritablePropertyMap (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-adam authored Oct 2, 2024
1 parent e5da320 commit 64be795
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
5 changes: 3 additions & 2 deletions hdrl/src/org/labkey/hdrl/HDRLManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -103,7 +104,7 @@ public List<InboundSpecimenBean> 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();
Expand Down
7 changes: 0 additions & 7 deletions hdrl/src/org/labkey/hdrl/query/LabWareQuerySchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -144,7 +145,7 @@ public class SetPreferencesAction extends MutatingApiAction<SimpleApiJsonForm>
public ApiResponse execute(SimpleApiJsonForm simpleApiJsonForm, BindException errors)
{
Map<String, String> props;
PropertyManager.PropertyMap mapToSave = null;
WritablePropertyMap mapToSave = null;
if (getUser().isGuest())
{
// Use session for guests
Expand Down

0 comments on commit 64be795

Please sign in to comment.