Skip to content

Commit

Permalink
Use WritablePropertyMap (#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-adam authored Oct 2, 2024
1 parent 0ece9e3 commit 061b0c2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions snprc_ehr/src/org/labkey/snprc_ehr/domain/NewAnimalData.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,25 +220,25 @@ public JSONObject toJSON(Container c, User u)
@Nullable
public String birthDateToString()
{
return DateUtil.formatDateISO8601(getBirthDate());
return DateUtil.formatIsoDate(getBirthDate());
}

@Nullable
public String acqDateToString()
{
return DateUtil.formatDateISO8601(getAcqDate());
return DateUtil.formatIsoDate(getAcqDate());
}

@Nullable
public String modifiedDateToString()
{
return DateUtil.formatDateISO8601(getModified());
return DateUtil.formatIsoDate(getModified());
}

@Nullable
public String createdDateToString()
{
return DateUtil.formatDateISO8601(getCreated());
return DateUtil.formatIsoDate(getCreated());
}

public String getId()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.jetbrains.annotations.Nullable;
import org.labkey.api.data.Container;
import org.labkey.api.data.PropertyManager;
import org.labkey.api.data.PropertyManager.WritablePropertyMap;
import org.labkey.api.data.PropertyStore;

import java.net.MalformedURLException;
Expand Down Expand Up @@ -81,7 +82,7 @@ public void setProperties(@NotNull Container c, @Nullable String user, @Nullable
new URL(baseURL);

PropertyStore store = PropertyManager.getEncryptedStore();
PropertyManager.PropertyMap map = store.getWritableProperties(c, SSRS_PROPERTY_CATEGORY, true);
WritablePropertyMap map = store.getWritableProperties(c, SSRS_PROPERTY_CATEGORY, true);
map.put(SSRS_USER_NAME_PROPERTY, user);
map.put(SSRS_PASSWORD_PROPERTY, password);
map.put(SSRS_BASE_URL, baseURL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public Date getStartDate()
public String startDateToString()
{

return DateUtil.formatDateISO8601(getStartDate());
return DateUtil.formatIsoDate(getStartDate());
}

public void setStartDate(Date startDate)
Expand All @@ -204,7 +204,7 @@ public Date getEndDate()
public String endDateToString()
{

return DateUtil.formatDateISO8601(getEndDate());
return DateUtil.formatIsoDate(getEndDate());
}

public void setEndDate(Date endDate)
Expand Down Expand Up @@ -265,13 +265,13 @@ public void setCreated(Date created)
@Nullable
public String modifiedDateToString()
{
return DateUtil.formatDateISO8601(getModified());
return DateUtil.formatIsoDate(getModified());
}

@Nullable
public String createdDateToString()
{
return DateUtil.formatDateISO8601(getCreated());
return DateUtil.formatIsoDate(getCreated());
}

public Date getModified()
Expand Down

0 comments on commit 061b0c2

Please sign in to comment.