

Public Member Functions | |
| AlarmsReductionContainer (int max) | |
| synchronized int | size (boolean reduced) |
| synchronized void | add (AlarmTableEntry entry) throws AlarmContainerException |
| void | setCategoryClient (CategoryClient client) |
| synchronized AlarmTableEntry | get (int pos, boolean reduced) |
| synchronized void | clear () |
| synchronized void | remove (AlarmTableEntry alarm) throws AlarmContainerException |
| synchronized AlarmTableEntry | removeOldest () throws AlarmContainerException |
| synchronized void | replace (AlarmTableEntry newAlarm) throws AlarmContainerException |
| CategoryClient | getCategoryClient () |
| synchronized int | hasNotAckAlarms (boolean reduced) |
Private Member Functions | |
| void | addAlarm (AlarmTableEntry alarm) |
| void | hideReducedChildren (AlarmTableEntry entry) |
| void | showActiveChildren (AlarmTableEntry alarm, int pos) |
Private Attributes | |
| final Vector< String > | indexWithReduction = new Vector<String>() |
| CategoryClient | categoryClient = null |
Extends AlarmsContainer for the reduced alarms.
| alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::AlarmsReductionContainer | ( | int | max | ) | [inline] |
| synchronized void alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::add | ( | AlarmTableEntry | entry | ) | throws AlarmContainerException [inline] |
Add an entry (i.e a alarm) in the collection.
If there is no room available in the container, an exception is thrown: checking if there is enough room must be done by the caller.
| entry | The not null entry to add |
| {@link | AlarmContainerException} If the entry is already in the container |
Reimplemented from alma::acsplugins::alarmsystem::gui::table::AlarmsContainer.
References addAlarm().
Referenced by alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::addAlarm(), alma::acs::alarm::test::panel::AlarmContainerTest::populateContainer(), and alma::acs::alarm::test::panel::AlarmContainerTest::testContainerSize().
| void alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::addAlarm | ( | AlarmTableEntry | alarm | ) | [inline, private] |
Add an alarm to the reduction container
| alarm | The alarm to add to the container |
References alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::getAlarmId(), alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::getStatus(), hideReducedChildren(), indexWithReduction, and cern::laser::client::data::Status::isReduced().
| synchronized void alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::clear | ( | ) | [inline] |
Remove all the elements in the container
Reimplemented from alma::acsplugins::alarmsystem::gui::table::AlarmsContainer.
References indexWithReduction.
Referenced by alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::clear(), alma::acs::alarm::test::panel::AlarmContainerTest::tearDown(), alma::acs::alarm::test::panel::AlarmContainerTest::testContainerSize(), and alma::acs::alarm::test::panel::AlarmContainerTest::testRemoveInactivAls().
| synchronized AlarmTableEntry alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::get | ( | int | pos, | |
| boolean | reduced | |||
| ) | [inline] |
Return the entry in the given position
| pos | The position of the alarm in the container | |
| reduced | true if the alarms in the table are reduced |
AlarmTableEntry in the given position References indexWithReduction.
Referenced by alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::alarmSelected(), alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::getAlarmAt(), alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::getRowEntry(), alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::isRowAlarmNew(), alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::replaceAlarm(), and alma::acs::alarm::test::panel::AlarmContainerTest::testReplaceAlarm().
| CategoryClient alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::getCategoryClient | ( | ) | [inline] |
References categoryClient.
Referenced by alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::getCategoryClient().
| synchronized int alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::hasNotAckAlarms | ( | boolean | reduced | ) | [inline] |
Check if the container has alarm not yet acknowledged.
if there are active alarms to be acknowledged by the user, this method returns the highest of their priorities. Note that for alarm system the highest priority is 0.
References alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::getPriority(), alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::getStatus(), indexWithReduction, cern::laser::client::data::Status::isActive(), and alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::isNew.
Referenced by alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::hasNotAckAlarms().
| void alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::hideReducedChildren | ( | AlarmTableEntry | entry | ) | [inline, private] |
Hide the active alarms of this entry.
| entry | The not null entry to hide active children |
References categoryClient, alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::getAlarmId(), alma::alarmsystem::clients::CategoryClient::getChildren(), indexWithReduction, alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::isMultiplicityParent(), and alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::isNodeParent().
Referenced by addAlarm(), and replace().
| synchronized void alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::remove | ( | AlarmTableEntry | alarm | ) | throws AlarmContainerException [inline] |
Remove the entry for the passed alarm
| alarm | The alarm whose entry must be removed |
| AlarmContainerException | If the alarm is not in the container |
Reimplemented from alma::acsplugins::alarmsystem::gui::table::AlarmsContainer.
References indexWithReduction.
Referenced by alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::acknowledge(), and alma::acs::alarm::test::panel::AlarmContainerTest::testAlarmsRemove().
| synchronized AlarmTableEntry alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::removeOldest | ( | ) | throws AlarmContainerException [inline] |
Remove the oldest entry in the container
| AlarmContainerException | If the container is empty |
Reimplemented from alma::acsplugins::alarmsystem::gui::table::AlarmsContainer.
References alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::getAlarmId(), and indexWithReduction.
Referenced by alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::run(), and alma::acs::alarm::test::panel::AlarmContainerTest::testRemoveOldest().
| synchronized void alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::replace | ( | AlarmTableEntry | newAlarm | ) | throws AlarmContainerException [inline] |
Replace the alarm in a row with passed one.
The entry to replace the alarm is given by the alarm ID of the parameter.
| newAlarm | The not null new alarm |
| AlarmContainerException | if the entry is not in the container |
Reimplemented from alma::acsplugins::alarmsystem::gui::table::AlarmsContainer.
References addAlarm(), hideReducedChildren(), indexWithReduction, and showActiveChildren().
Referenced by alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::replaceAlarm(), and alma::acs::alarm::test::panel::AlarmContainerTest::testReplaceAlarm().
| void alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::setCategoryClient | ( | CategoryClient | client | ) | [inline] |
Set the CategoryClient
| client | The CategoryCLient; it can be null. |
References categoryClient.
Referenced by alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::setCategoryClient().
| void alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::showActiveChildren | ( | AlarmTableEntry | alarm, | |
| int | pos | |||
| ) | [inline, private] |
Show the active children of the passed alarms
| alarm | The alarm whose active children must be displayed | |
| pos | The position in the table where the active children must be shown |
References categoryClient, alma::alarmsystem::clients::CategoryClient::getActiveChildren(), alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::getAlarmId(), indexWithReduction, alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::isMultiplicityParent(), and alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::isNodeParent().
Referenced by replace().
| synchronized int alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::size | ( | boolean | reduced | ) | [inline] |
Return the number of alarms in the container depending if the reduction rules are applied or not
| <code>true</code> | if the reduction rules are applied |
References indexWithReduction.
Referenced by alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::getRowCount(), alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::getRowEntry(), alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::isRowAlarmNew(), alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::run(), alma::acs::alarm::test::panel::AlarmContainerTest::testAlarmsRemove(), alma::acs::alarm::test::panel::AlarmContainerTest::testContainerSize(), alma::acs::alarm::test::panel::AlarmContainerTest::testRemoveInactivAls(), alma::acs::alarm::test::panel::AlarmContainerTest::testRemoveOldest(), and alma::acs::alarm::test::panel::AlarmContainerTest::testReplaceAlarm().
CategoryClient alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::categoryClient = null [private] |
The CategoryClient to ask for parents/children while reducing alarms.
It can be null so needs to be checked before invoking methods.
Referenced by getCategoryClient(), hideReducedChildren(), setCategoryClient(), and showActiveChildren().
final Vector<String> alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::indexWithReduction = new Vector<String>() [private] |
The index when the reduction rules are in place
Each item in the vector represents the ID of the entry shown in a table row when the reduction rules are used.
Referenced by addAlarm(), clear(), get(), hasNotAckAlarms(), hideReducedChildren(), remove(), removeOldest(), replace(), showActiveChildren(), and size().
1.6.2