alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer Class Reference

Inheritance diagram for alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer:
Inheritance graph
[legend]
Collaboration diagram for alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

Extends AlarmsContainer for the reduced alarms.

Author:
acaproni

Constructor & Destructor Documentation

alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::AlarmsReductionContainer ( int  max  )  [inline]

Constructor

Parameters:
max 
See also:
AlarmsContainer

Member Function Documentation

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.

Parameters:
entry The not null entry to add
Exceptions:
{@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]
synchronized void alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::clear (  )  [inline]
synchronized AlarmTableEntry alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::get ( int  pos,
boolean  reduced 
) [inline]
CategoryClient alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::getCategoryClient (  )  [inline]
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.

Returns:
-1 if there are not alarm to acknowledge; the highest priority of the alarm to acknowledge
See also:
AlarmContainer::hasNotAckAlarms()

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]
synchronized void alma::acsplugins::alarmsystem::gui::table::AlarmsReductionContainer::remove ( AlarmTableEntry  alarm  )  throws AlarmContainerException [inline]

Remove the entry for the passed alarm

Parameters:
alarm The alarm whose entry must be removed
Exceptions:
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

Returns:
The removed item
Exceptions:
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.

Parameters:
newAlarm The not null new alarm
Exceptions:
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

Parameters:
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

Parameters:
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]

Member Data Documentation

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().

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().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2