Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion LDK/src/org/labkey/ldk/LDKController.java
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,6 +39,7 @@
import org.labkey.api.data.CoreSchema;
import org.labkey.api.data.DbSequenceManager;
import org.labkey.api.data.PropertyManager;
import org.labkey.api.data.PropertyManager.WritablePropertyMap;
import org.labkey.api.data.SqlExecutor;
import org.labkey.api.data.SqlScriptRunner;
import org.labkey.api.data.TableInfo;
Expand DownExpand Up@@ -1079,7 +1080,7 @@ public ApiResponse execute(SetRedirectUrlForm form, BindException errors) throws
return null;
}

PropertyManager.PropertyMap props = PropertyManager.getWritableProperties(getContainer(), REDIRECT_URL_DOMAIN, true);
WritablePropertyMap props = PropertyManager.getWritableProperties(getContainer(), REDIRECT_URL_DOMAIN, true);
props.put(REDIRECT_URL_PROP, StringUtils.trimToNull(form.getUrl()));
props.save();

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,6 +30,7 @@
import org.labkey.api.data.Container;
import org.labkey.api.data.ContainerManager;
import org.labkey.api.data.PropertyManager;
import org.labkey.api.data.PropertyManager.WritablePropertyMap;
import org.labkey.api.data.SimpleFilter;
import org.labkey.api.data.Table;
import org.labkey.api.data.TableInfo;
Expand DownExpand Up@@ -169,7 +170,7 @@ public boolean isServiceEnabled()

public void setServiceEnabled(Boolean status)
{
PropertyManager.PropertyMap pm = PropertyManager.getWritableProperties(ContainerManager.getRoot(), NotificationServiceImpl.CONFIG_PROPERTY_DOMAIN, true);
WritablePropertyMap pm = PropertyManager.getWritableProperties(ContainerManager.getRoot(), NotificationServiceImpl.CONFIG_PROPERTY_DOMAIN, true);
pm.put(ENABLED_PROP, status.toString());
pm.save();
}
Expand DownExpand Up@@ -226,7 +227,7 @@ public void setReturnEmail(Container c, String returnEmail)
{
ValidEmail email = new ValidEmail(returnEmail);

PropertyManager.PropertyMap pm = PropertyManager.getWritableProperties(c, NotificationServiceImpl.CONFIG_PROPERTY_DOMAIN, true);
WritablePropertyMap pm = PropertyManager.getWritableProperties(c, NotificationServiceImpl.CONFIG_PROPERTY_DOMAIN, true);
pm.put(RETURN_EMAIL, email.getEmailAddress());
pm.save();
}
Expand All@@ -250,7 +251,7 @@ public void setUser(Container c, Integer userId)
{
if(userId != null)
{
PropertyManager.PropertyMap pm = PropertyManager.getWritableProperties(c, NotificationServiceImpl.CONFIG_PROPERTY_DOMAIN, true);
WritablePropertyMap pm = PropertyManager.getWritableProperties(c, NotificationServiceImpl.CONFIG_PROPERTY_DOMAIN, true);
pm.put(USER_PROP, String.valueOf(userId));
pm.save();
}
Expand DownExpand Up@@ -344,7 +345,7 @@ public Date getLastRunDate(Notification n)

public void setLastRun(Notification n, Long lastRun)
{
PropertyManager.PropertyMap pm = PropertyManager.getWritableProperties(NotificationServiceImpl.TIMESTAMP_PROPERTY_DOMAIN, true);
WritablePropertyMap pm = PropertyManager.getWritableProperties(NotificationServiceImpl.TIMESTAMP_PROPERTY_DOMAIN, true);
pm.put(getKey(n), lastRun.toString());
pm.save();
}
Expand All@@ -363,7 +364,7 @@ public boolean isActive(Notification n, Container c)

public void setActive(Notification n, Container c, boolean active)
{
PropertyManager.PropertyMap pm = PropertyManager.getWritableProperties(c, NotificationServiceImpl.STATUS_PROPERTY_DOMAIN, true);
WritablePropertyMap pm = PropertyManager.getWritableProperties(c, NotificationServiceImpl.STATUS_PROPERTY_DOMAIN, true);
pm.put(getKey(n), active ? String.valueOf(active) : null);
pm.save();
}
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,11 +19,14 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.commons.lang3.time.DurationFormatUtils;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.json.JSONArray;
import org.json.JSONObject;
import org.labkey.api.action.SpringActionController;
import org.labkey.api.assay.AssayProtocolSchema;
import org.labkey.api.assay.AssayProvider;
import org.labkey.api.assay.AssayService;
import org.labkey.api.audit.AuditLogService;
import org.labkey.api.audit.AuditTypeProvider;
import org.labkey.api.data.CompareType;
Expand All@@ -33,6 +36,7 @@
import org.labkey.api.data.DbSchema;
import org.labkey.api.data.DbScope;
import org.labkey.api.data.PropertyManager;
import org.labkey.api.data.PropertyManager.WritablePropertyMap;
import org.labkey.api.data.SQLFragment;
import org.labkey.api.data.Selector;
import org.labkey.api.data.SimpleFilter;
Expand All@@ -55,9 +59,6 @@
import org.labkey.api.settings.LookAndFeelProperties;
import org.labkey.api.study.Study;
import org.labkey.api.study.StudyService;
import org.labkey.api.assay.AssayProtocolSchema;
import org.labkey.api.assay.AssayProvider;
import org.labkey.api.assay.AssayService;
import org.labkey.api.util.JsonUtil;
import org.labkey.ldk.LDKServiceImpl;

Expand DownExpand Up@@ -155,7 +156,7 @@ private String getLastSaveString(Container c, Map<String, String> map)

private void saveValues(Container c, Map<String, String> saved, Map<String, String> newValues)
{
PropertyManager.PropertyMap map = PropertyManager.getWritableProperties(c, PROP_CATEGORY, true);
WritablePropertyMap map = PropertyManager.getWritableProperties(c, PROP_CATEGORY, true);

Long lastSaveMills = map.containsKey(lastSave) ? Long.parseLong(map.get(lastSave)) : null;

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@
import org.labkey.api.data.ContainerFilter;
import org.labkey.api.data.ContainerManager;
import org.labkey.api.data.PropertyManager;
import org.labkey.api.data.PropertyManager.WritablePropertyMap;
import org.labkey.api.data.SimpleFilter;
import org.labkey.api.data.TableInfo;
import org.labkey.api.data.TableSelector;
Expand DownExpand Up@@ -184,7 +185,7 @@ public Integer getCurrentId(Container c)
public void saveId(Container c, Integer value)
{
Container target = c.isWorkbook() ? c.getParent() : c;
PropertyManager.PropertyMap map = PropertyManager.getWritableProperties(target, PROPERT_CATEGORY_BASE, true);
WritablePropertyMap map = PropertyManager.getWritableProperties(target, PROPERT_CATEGORY_BASE, true);
map.put(getPropertyKey(), value.toString());
map.save();
}
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,6 +42,7 @@
import org.labkey.api.data.Container;
import org.labkey.api.data.ContainerManager;
import org.labkey.api.data.PropertyManager;
import org.labkey.api.data.PropertyManager.WritablePropertyMap;
import org.labkey.api.data.TableInfo;
import org.labkey.api.exp.ChangePropertyDescriptorException;
import org.labkey.api.exp.ExperimentException;
Expand DownExpand Up@@ -1557,7 +1558,7 @@ public ApiResponse execute(JsonDataForm form, BindException errors)
}

Map<String, Object> results = new HashMap<>();
PropertyManager.PropertyMap map = PropertyManager.getWritableProperties(getContainer(), NavItem.PROPERTY_CATEGORY, true);
WritablePropertyMap map = PropertyManager.getWritableProperties(getContainer(), NavItem.PROPERTY_CATEGORY, true);
map.clear();

JSONObject json = new JSONObject(form.getJsonData());
Expand DownExpand Up@@ -1613,7 +1614,7 @@ public ApiResponse execute(JsonDataForm form, BindException errors)
}

Map<String, Object> results = new HashMap<>();
PropertyManager.PropertyMap map = PropertyManager.getWritableProperties(getContainer(), NavItem.VIEW_PROPERTY_CATEGORY, true);
WritablePropertyMap map = PropertyManager.getWritableProperties(getContainer(), NavItem.VIEW_PROPERTY_CATEGORY, true);

JSONObject json = new JSONObject(form.getJsonData());
for (String key : json.keySet())
Expand DownExpand Up@@ -1648,7 +1649,7 @@ public ApiResponse execute(JsonDataForm form, BindException errors)

Map<String, Object> results = new HashMap<>();

PropertyManager.PropertyMap propMap = PropertyManager.getWritableProperties(getContainer(), TabbedReportItem.OVERRIDES_PROP_KEY, true);
WritablePropertyMap propMap = PropertyManager.getWritableProperties(getContainer(), TabbedReportItem.OVERRIDES_PROP_KEY, true);

List<TabbedReportItem> tabbedReports = LaboratoryService.get().getTabbedReportItems(getContainer(), getUser());
Map<String, TabbedReportItem> reportMap = new HashMap<String, TabbedReportItem>();
Expand DownExpand Up@@ -1707,7 +1708,7 @@ public ApiResponse execute(JsonDataForm form, BindException errors)
}

Map<String, Object> results = new HashMap<>();
PropertyManager.PropertyMap map = PropertyManager.getWritableProperties(getContainer(), AbstractAssayDataProvider.PROPERTY_CATEGORY, true);
WritablePropertyMap map = PropertyManager.getWritableProperties(getContainer(), AbstractAssayDataProvider.PROPERTY_CATEGORY, true);

JSONObject json = new JSONObject(form.getJsonData());
for (String key : json.keySet())
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,8 +15,8 @@
*/
package org.labkey.laboratory;

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.jetbrains.annotations.Nullable;
import org.json.JSONObject;
import org.labkey.api.assay.AssayFileWriter;
Expand All@@ -27,6 +27,7 @@
import org.labkey.api.data.Container;
import org.labkey.api.data.ContainerManager;
import org.labkey.api.data.PropertyManager;
import org.labkey.api.data.PropertyManager.WritablePropertyMap;
import org.labkey.api.data.TableCustomizer;
import org.labkey.api.data.TableInfo;
import org.labkey.api.exp.ChangePropertyDescriptorException;
Expand DownExpand Up@@ -402,7 +403,7 @@ public Set<DemographicsSource> getDemographicsSources(Container c, User u) throw
public void setDemographicsSources(Container c, User u, Set<DemographicsSource> sources) throws IllegalArgumentException
{
Container target = c.isWorkbookOrTab() ? c.getParent() : c;
PropertyManager.PropertyMap props = PropertyManager.getWritableProperties(target, DEMOGRAPHICS_PROPERTY_CATEGORY, true);
WritablePropertyMap props = PropertyManager.getWritableProperties(target, DEMOGRAPHICS_PROPERTY_CATEGORY, true);
props.clear();

Set<String> labels = new HashSet<>();
Expand DownExpand Up@@ -541,7 +542,7 @@ public Set<AdditionalDataSource> getAdditionalDataSources(Container c, User u) t
public void setURLDataSources(Container c, User u, Set<URLDataSource> sources)
{
Container cc = c.isWorkbookOrTab() ? c.getParent() : c;
PropertyManager.PropertyMap props = PropertyManager.getWritableProperties(cc, URL_DATASOURCE_PROPERTY_CATEGORY, true);
WritablePropertyMap props = PropertyManager.getWritableProperties(cc, URL_DATASOURCE_PROPERTY_CATEGORY, true);
props.clear();

for (URLDataSource qd : sources)
Expand All@@ -554,7 +555,7 @@ public void setURLDataSources(Container c, User u, Set<URLDataSource> sources)
public void setAdditionalDataSources(Container c, User u, Set<AdditionalDataSource> sources)
{
Container cc = c.isWorkbookOrTab() ? c.getParent() : c;
PropertyManager.PropertyMap props = PropertyManager.getWritableProperties(cc, DATASOURCE_PROPERTY_CATEGORY, true);
WritablePropertyMap props = PropertyManager.getWritableProperties(cc, DATASOURCE_PROPERTY_CATEGORY, true);
props.clear();

for (AdditionalDataSource qd : sources)
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,14 +2,15 @@

import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.json.JSONArray;
import org.json.JSONObject;
import org.labkey.api.action.SpringActionController;
import org.labkey.api.data.Container;
import org.labkey.api.data.CoreSchema;
import org.labkey.api.data.PropertyManager;
import org.labkey.api.data.PropertyManager.WritablePropertyMap;
import org.labkey.api.data.SimpleFilter;
import org.labkey.api.data.TableInfo;
import org.labkey.api.data.TableSelector;
Expand DownExpand Up@@ -102,7 +103,7 @@ private Map<String, String> getSavedValues(Container c)

private void saveValues(Container c, Map<String, String> saved, Map<String, String> newValues)
{
PropertyManager.PropertyMap map = PropertyManager.getWritableProperties(c, PROP_CATEGORY, true);
WritablePropertyMap map = PropertyManager.getWritableProperties(c, PROP_CATEGORY, true);

Long lastSaveMills = map.containsKey(lastSave) ? Long.parseLong(map.get(lastSave)) : null;

Expand Down