Skip to content

Commit

Permalink
Use WritablePropertyMap (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-adam authored Oct 2, 2024
1 parent bc3ee38 commit f36c82b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion genotyping/src/org/labkey/genotyping/GenotypingManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.labkey.api.data.AtomicDatabaseInteger;
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.SqlExecutor;
Expand Down Expand Up @@ -115,7 +116,7 @@ public String getDescription()

public void saveSettings(Container c, GenotypingFolderSettings settings)
{
PropertyManager.PropertyMap map = PropertyManager.getWritableProperties(c, FOLDER_CATEGORY, true);
WritablePropertyMap map = PropertyManager.getWritableProperties(c, FOLDER_CATEGORY, true);
map.put(Setting.ReferenceSequencesQuery.getKey(), settings.getSequencesQuery());
map.put(Setting.RunsQuery.getKey(), settings.getRunsQuery());
map.put(Setting.SamplesQuery.getKey(), settings.getSamplesQuery());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@

package org.labkey.genotyping.galaxy;

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.labkey.api.data.Container;
import org.labkey.api.data.PropertyManager;
import org.labkey.api.data.PropertyManager.WritablePropertyMap;
import org.labkey.api.security.User;

import java.util.Map;
Expand Down Expand Up @@ -50,7 +51,7 @@ public static GalaxyManager get()

public void saveSettings(Container c, GalaxyFolderSettings settings)
{
PropertyManager.PropertyMap map = PropertyManager.getWritableProperties(c, FOLDER_CATEGORY, true);
WritablePropertyMap map = PropertyManager.getWritableProperties(c, FOLDER_CATEGORY, true);
map.put(GALAXY_URL, settings.getGalaxyURL());
map.save();
}
Expand All @@ -73,7 +74,7 @@ public String getGalaxyURL()

public void saveUserSettings(Container c, User user, GalaxyUserSettings userSettings)
{
PropertyManager.PropertyMap map = PropertyManager.getWritableProperties(user, c, USER_CATEGORY, true);
WritablePropertyMap map = PropertyManager.getWritableProperties(user, c, USER_CATEGORY, true);
map.put(GALAXY_KEY, userSettings.getGalaxyKey());
map.save();
}
Expand Down

0 comments on commit f36c82b

Please sign in to comment.