Skip to content

Commit

Permalink
Tomcat 10 - Update namespace of Jakarta EE packages (#914)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Rauch <[email protected]>
  • Loading branch information
labkey-tchad and labkey-adam authored Feb 1, 2024
1 parent 6e957a0 commit a85aeeb
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 35 deletions.
6 changes: 3 additions & 3 deletions onprc_ehr/src/org/labkey/onprc_ehr/ONPRC_EHRController.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@
*/
package org.labkey.onprc_ehr;

import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.json.JSONObject;
import org.labkey.api.action.ReadOnlyApiAction;
import org.labkey.api.action.MutatingApiAction;
import org.labkey.api.action.ApiResponse;
import org.labkey.api.action.ApiSimpleResponse;
import org.labkey.api.action.ConfirmAction;
import org.labkey.api.action.ExportAction;
import org.labkey.api.action.MutatingApiAction;
import org.labkey.api.action.ReadOnlyApiAction;
import org.labkey.api.action.SimpleViewAction;
import org.labkey.api.action.SpringActionController;
import org.labkey.api.data.Container;
Expand All @@ -51,7 +52,6 @@
import org.springframework.validation.Errors;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.lang.reflect.Method;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
*/
package org.labkey.onprc_ehr.query;

import jakarta.mail.Address;
import jakarta.mail.Message;
import org.apache.commons.lang3.StringUtils;
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.jetbrains.annotations.NotNull;
import org.labkey.api.collections.CaseInsensitiveHashMap;
import org.labkey.api.collections.CaseInsensitiveHashSet;
Expand Down Expand Up @@ -69,8 +71,6 @@
import org.labkey.onprc_ehr.notification.ProjectAlertsNotification;
import org.labkey.onprc_ehr.notification.ProtocolAlertsNotification;

import javax.mail.Address;
import javax.mail.Message;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.ParseException;
Expand Down Expand Up @@ -99,36 +99,33 @@
*/
public class ONPRC_EHRTriggerHelper
{
private Container _container = null;
private User _user = null;
private static final Logger _log = LogManager.getLogger(ONPRC_EHRTriggerHelper.class);
private Map<String, TableInfo> _cachedTables = new HashMap<>();

private List<Map<String, Object>> _cachedCageSizeRecords = null;
private Map<String, Map<String, Object>> _cachedRooms = new HashMap<>();
private Map<Integer, Pair<String, String>> _cachedProtocols = new HashMap<>();
private Map<String, Map<String, Set<String>>> _cachedHousing = new HashMap<>();
private Map<Integer, String> _cachedProcedureCategories = new HashMap<>();
private Map<String, Boolean> _cachedBirthConditions = null;

private Integer _nextProjectId = null;
private Integer _nextProtocolId = null;


//NOTE: we probably do not want to cache this outside this transaction, unless we can keep it accurate
private Map<String, List<CageRecord>> _cachedCages = new HashMap<>();
private Map<Integer, Boolean> _cachedFrequencies = new HashMap<>();
private Map<Integer, List<Integer>> _cachedFrequencyTimes = new HashMap<>();
private Map<String, Integer> _cachedConditionCodes = new HashMap<>();
private Map<String, Integer> _cachedConditionCodeMeanings = new HashMap<>();
private Map<Integer, DividerRecord> _cachedDividerRecords = new HashMap<>();

private static final String NONRESTRICTED = "Nonrestricted";
private static final String EXPERIMENTAL_EUTHANASIA = "EUTHANASIA, EXPERIMENTAL";
private static final String NON_EXPERIMENTAL_EUTHANASIA = "EUTHANASIA, NONEXPERIMENTAL";
private static final String SPONTANEOUS_DEATH = "Spontaneous Death";
private SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd kk:mm");

private final Map<String, TableInfo> _cachedTables = new HashMap<>();
private final Container _container;
private final User _user ;
private final Map<String, Map<String, Object>> _cachedRooms = new HashMap<>();
private final Map<Integer, Pair<String, String>> _cachedProtocols = new HashMap<>();
private final Map<String, Map<String, Set<String>>> _cachedHousing = new HashMap<>();
private final Map<Integer, String> _cachedProcedureCategories = new HashMap<>();

//NOTE: we probably do not want to cache this outside this transaction, unless we can keep it accurate
private final Map<String, List<CageRecord>> _cachedCages = new HashMap<>();
private final Map<Integer, Boolean> _cachedFrequencies = new HashMap<>();
private final Map<Integer, List<Integer>> _cachedFrequencyTimes = new HashMap<>();
private final Map<String, Integer> _cachedConditionCodes = new HashMap<>();
private final Map<String, Integer> _cachedConditionCodeMeanings = new HashMap<>();
private final Map<Integer, DividerRecord> _cachedDividerRecords = new HashMap<>();
private final SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd kk:mm");

private Map<String, Boolean> _cachedBirthConditions = null;
private List<Map<String, Object>> _cachedCageSizeRecords = null;
private Integer _nextProjectId = null;
private Integer _nextProtocolId = null;

public ONPRC_EHRTriggerHelper(int userId, String containerId)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

import org.labkey.api.data.AbstractTableInfo;
import org.labkey.api.data.BaseColumnInfo;
import org.labkey.api.data.ColumnInfo;
import org.labkey.api.data.TableCustomizer;
import org.labkey.api.data.TableInfo;
import org.labkey.api.data.WrappedColumn;
import org.labkey.api.query.QueryForeignKey;
import org.labkey.api.query.UserSchema;

/***
* Created with IntelliJ IDEA.
* User: bimber
* Date: 5/16/13
* Time: 3:41 PM
Expand Down
6 changes: 3 additions & 3 deletions sla/src/org/labkey/sla/SLAController.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package org.labkey.sla;

import jakarta.mail.Message;
import jakarta.mail.MessagingException;
import jakarta.servlet.http.HttpServletResponse;
import org.jetbrains.annotations.NotNull;
import org.json.JSONObject;
import org.labkey.api.action.ApiResponse;
Expand Down Expand Up @@ -63,9 +66,6 @@
import org.springframework.validation.Errors;
import org.springframework.web.servlet.ModelAndView;

import javax.mail.Message;
import javax.mail.MessagingException;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
Expand Down

0 comments on commit a85aeeb

Please sign in to comment.