Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use WritablePropertyMap #177

Merged
merged 1 commit into from
Oct 2, 2024
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 src/org/labkey/response/ResponseController.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import org.labkey.api.data.DataRegionSelection;
import org.labkey.api.data.NormalContainerType;
import org.labkey.api.data.PropertyManager;
import org.labkey.api.data.PropertyManager.WritablePropertyMap;
import org.labkey.api.module.FolderTypeManager;
import org.labkey.api.query.InvalidKeyException;
import org.labkey.api.query.QueryForm;
Expand Down Expand Up @@ -1273,7 +1274,7 @@ else if (form.getMetadataLoadLocation() != null && form.getMetadataLoadLocation(
return false;
else
{
PropertyManager.PropertyMap props = PropertyManager.getEncryptedStore().getWritableProperties(getContainer(), RESPONSE_SERVER_CONFIGURATION, true);
WritablePropertyMap props = PropertyManager.getEncryptedStore().getWritableProperties(getContainer(), RESPONSE_SERVER_CONFIGURATION, true);
Map<String, String> valuesToPersist = form.getOptions();

if (!valuesToPersist.isEmpty())
Expand Down
5 changes: 3 additions & 2 deletions src/org/labkey/response/forwarder/ForwarderProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
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.Encryption;
import org.labkey.api.util.logging.LogHelper;

Expand Down Expand Up @@ -60,7 +61,7 @@ public class ForwarderProperties
*/
public void setForwarderProperties(Container container, Map<String, String> newConfig)
{
PropertyManager.PropertyMap propertyMap = PropertyManager.getEncryptedStore().getWritableProperties(container, FORWARDER_CATEGORY ,true);
WritablePropertyMap propertyMap = PropertyManager.getEncryptedStore().getWritableProperties(container, FORWARDER_CATEGORY ,true);
newConfig.keySet().forEach((key) -> {
if (PROPERTIES.contains(key))
{
Expand All @@ -79,7 +80,7 @@ public void setForwarderProperties(Container container, Map<String, String> newC

public void setForwarderDisabled(Container container, ForwardingType authType)
{
PropertyManager.PropertyMap propertyMap = PropertyManager.getEncryptedStore().getWritableProperties(container, FORWARDER_CATEGORY ,true);
WritablePropertyMap propertyMap = PropertyManager.getEncryptedStore().getWritableProperties(container, FORWARDER_CATEGORY ,true);
propertyMap.put(FORWARDING_TYPE, authType.name());
propertyMap.save();
}
Expand Down
2 changes: 1 addition & 1 deletion src/org/labkey/response/forwarder/ForwardingScheduler.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public synchronized void schedule()
try
{
StdSchedulerFactory.getDefaultScheduler().scheduleJob(job, trigger);
logger.info(String.format("SurveyResponseForwarder scheduled to run every %1$S minutes. Next runtime %2$s", getIntervalMinutes(), DateUtil.formatDateTimeISO8601(trigger.getNextFireTime())));
logger.info(String.format("SurveyResponseForwarder scheduled to run every %1$S minutes. Next runtime %2$s", getIntervalMinutes(), DateUtil.formatIsoDateShortTime(trigger.getNextFireTime())));
}
catch (SchedulerException e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.labkey.api.data.Container;
import org.labkey.api.data.JdbcType;
import org.labkey.api.data.PropertyManager;
import org.labkey.api.data.PropertyManager.WritablePropertyMap;
import org.labkey.api.data.PropertyStorageSpec;
import org.labkey.api.data.SimpleFilter;
import org.labkey.api.data.Table;
Expand Down Expand Up @@ -246,7 +247,7 @@ private void updatePropertyMetadata(Integer rowId, ParticipantProperty.Participa

private void updateParticipantPropertiesVersion(Container container, User user, String newVersion)
{
PropertyManager.PropertyMap versionProperties = PropertyManager.getWritableProperties(user, container, PARTICIPANT_PROPERTIES_PROPERTY_CATEGORY, true);
WritablePropertyMap versionProperties = PropertyManager.getWritableProperties(user, container, PARTICIPANT_PROPERTIES_PROPERTY_CATEGORY, true);
versionProperties.put(PARTICIPANT_PROPERTIES_VERSION_KEY, newVersion);
versionProperties.save();
}
Expand Down