3 | | 1. Alarm numbering. Currently, when numbering of alarms have been needed, the numbers have been generated locally from an alarm list. It might be advantageous to have a unique number associated with each alarm, so data access object class/file `LabSensorAlarmConfig.java` in `src/net/sf/basedb/labenv/dao/` should be updated with a private instance variable `int no` with public accessor methods. To ensure that the numbers are unique and consecutive, they will not be set in the configuration file, but be assigned by class/file `LabEnvironmentConfiguraton.java` in `src/net/sf/basedb/labenv/` when parsing alarm entries in the configuration file in private method `List<LabSensorAlarmConfig> fetchLabSensorAlarmList(Element labSensorTag, Namespace ns)`. Only an alarm entry with some non-null value will result in an alarm item, and get a number. Java servlet `LabEnvironmentServlet.java` in `src/net/sf/basedb/labenv/servlet/` will be updated in private method `JSONObject createLabSensorConfigList(JSONObject json, SessionControl sc)` to include the number in the JSON object for the alarm in the JSON array. JSP file `labenvironmentalarms.jsp` in `resources/reports/` will be updated to use the intrinsic alarm numbers instead of locally generated ones. |
| 3 | 1. Alarm numbering. Currently, when numbering of alarms have been needed, the numbers have been generated locally from an alarm list. It might be advantageous to have a unique number associated with each alarm, so data access object class/file `LabSensorAlarmConfig.java` in `src/net/sf/basedb/labenv/dao/` should be updated with a private instance variable `int no` with public accessor methods. To ensure that the numbers are unique and consecutive, they will not be set in the configuration file, but be assigned by class/file `LabEnvironmentConfiguration.java` in `src/net/sf/basedb/labenv/` when parsing alarm entries in the configuration file in private method `List<LabSensorAlarmConfig> fetchLabSensorAlarmList(Element labSensorTag, Namespace ns)`. Only an alarm entry with some non-null value will result in an alarm item, and get a number. Java servlet `LabEnvironmentServlet.java` in `src/net/sf/basedb/labenv/servlet/` will be updated in private method `JSONObject createLabSensorConfigList(JSONObject json, SessionControl sc)` to include the number in the JSON object for the alarm in the JSON array. JSP file `labenvironmentalarms.jsp` in `resources/reports/` will be updated to use the intrinsic alarm numbers instead of locally generated ones. |