alma::acsplugins::alarmsystem::gui::AlarmPanel Class Reference

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

List of all members.

Public Member Functions

 AlarmPanel ()
 AlarmPanel (JFrame frame)
void pause () throws Exception
void resume () throws Exception
void start () throws Exception
void stop () throws Exception
void setServices (ContainerServices ctrl)
boolean runRestricted (boolean restricted) throws Exception
void setACSContainerServices (ContainerServices cs)
boolean isOMCPlugin ()
boolean isConnecting ()
synchronized void addSpecialAlarm (Alarm alarm) throws Exception
void showMessage (String mesg, boolean red)
void showAlarmDetails (Alarm alarm)
void showPanel (final String panelName)

Static Public Attributes

static final String alSysNotAvailName = "CERN_N/A_pnl"
static final String cernSysName = "CERN_pnl"
static final String acsASName = "ACS_pnl"

Private Member Functions

void initialize ()
void initAlarmServiceType ()

Private Attributes

ContainerServices contSvc = null
JFrame frame = null
final CernSysPanel cernSysPnl
AcsAlSysPanel acsASPnl = new AcsAlSysPanel()
AlSysNotAvailPanel alSysNotAvailPnl = new AlSysNotAvailPanel()
final CardLayout layout = new CardLayout()
final JPanel panel = new JPanel()
boolean isAcsAs

Detailed Description

The panel showing alarms

The panel has a different content in the following situations:


Constructor & Destructor Documentation

alma::acsplugins::alarmsystem::gui::AlarmPanel::AlarmPanel (  )  [inline]

Constructor

References alSysNotAvailPnl, cernSysPnl, and initialize().

alma::acsplugins::alarmsystem::gui::AlarmPanel::AlarmPanel ( JFrame  frame  )  [inline]

Constructor

Parameters:
frame The window that owns this panel

References alSysNotAvailPnl, cernSysPnl, and initialize().


Member Function Documentation

synchronized void alma::acsplugins::alarmsystem::gui::AlarmPanel::addSpecialAlarm ( Alarm  alarm  )  throws Exception [inline]

A method to send alarms to the GUI outside of the alarm service.

At the present it is used by the OMC GUI to send alarms before the alarm service is started.

Deprecated:
this method will be deleted when the alarm system will run as a daemon or as an ACS service.
Parameters:
alarm The alarm to show in the table (can't be null)
Exceptions:
Exception In case the alarm is not well formed

References alma::acsplugins::alarmsystem::gui::CernSysPanel::addSpecialAlarm(), and cernSysPnl.

void alma::acsplugins::alarmsystem::gui::AlarmPanel::initAlarmServiceType (  )  [inline, private]

Read the type of the alarm system in use.

If it is not possible to get the type, then we set the alarm type as false because in that case an error panel is shown.

If the AS is ACS, the ACS panel is shown.

References acsASName, contSvc, alma::acs::alarmsystem::corbaservice::AlarmServiceUtils::getAlarmServiceType(), isAcsAs, and showPanel().

Referenced by setACSContainerServices(), and setServices().

void alma::acsplugins::alarmsystem::gui::AlarmPanel::initialize (  )  [inline, private]
boolean alma::acsplugins::alarmsystem::gui::AlarmPanel::isConnecting (  )  [inline]
Returns:
true if an attempt to connect is running

References cernSysPnl, and alma::acsplugins::alarmsystem::gui::CernSysPanel::isConnecting().

boolean alma::acsplugins::alarmsystem::gui::AlarmPanel::isOMCPlugin (  )  [inline]

Return true if the panel is running inside OMC

See also:
alma.acs.gui.util.panel.IPanel

Implements alma::acs::gui::util::panel::IPanel.

References frame.

void alma::acsplugins::alarmsystem::gui::AlarmPanel::pause (  )  throws Exception [inline]

Pause by delegating to the cern panel

See also:
IpauseResume

References cernSysPnl, and alma::acsplugins::alarmsystem::gui::CernSysPanel::pause().

void alma::acsplugins::alarmsystem::gui::AlarmPanel::resume (  )  throws Exception [inline]

Unpause by delegating to the cern panel

See also:
IpauseResume

References cernSysPnl, and alma::acsplugins::alarmsystem::gui::CernSysPanel::resume().

boolean alma::acsplugins::alarmsystem::gui::AlarmPanel::runRestricted ( boolean  restricted  )  throws Exception [inline]
See also:
SubsystemPlugin
void alma::acsplugins::alarmsystem::gui::AlarmPanel::setACSContainerServices ( ContainerServices  cs  )  [inline]
void alma::acsplugins::alarmsystem::gui::AlarmPanel::setServices ( ContainerServices  ctrl  )  [inline]
void alma::acsplugins::alarmsystem::gui::AlarmPanel::showAlarmDetails ( Alarm  alarm  )  [inline]

Show the alarm in the details table

Parameters:
alarm The alarm to show in the details panel; if null the details table is cleared.

References cernSysPnl, and alma::acsplugins::alarmsystem::gui::CernSysPanel::showAlarmDetails().

void alma::acsplugins::alarmsystem::gui::AlarmPanel::showMessage ( String  mesg,
boolean  red 
) [inline]

Show a message in the status line

See also:
StatusLine

References cernSysPnl, and alma::acsplugins::alarmsystem::gui::CernSysPanel::showMessage().

void alma::acsplugins::alarmsystem::gui::AlarmPanel::showPanel ( final String  panelName  )  [inline]

Show the panel with the given name

Parameters:
panelName The not null and not empty name of the panel to show
Exceptions:
IllegalArgumentException panelName is not a valid panel name

References acsASName, alSysNotAvailName, cernSysName, layout, and panel.

Referenced by alma::acsplugins::alarmsystem::gui::CernSysPanel::connect(), initAlarmServiceType(), and initialize().

void alma::acsplugins::alarmsystem::gui::AlarmPanel::start (  )  throws Exception [inline]

Connect the Client and listens to the categories.

The CategoryClient is built only if its reference is null. Otherwise it means that the client is still trying to connect and the user restarted the plugin.

See also:
SubsystemPlugin

Implements alma::acs::gui::util::panel::IPanel.

References cernSysPnl, contSvc, and alma::acsplugins::alarmsystem::gui::CernSysPanel::start().

void alma::acsplugins::alarmsystem::gui::AlarmPanel::stop (  )  throws Exception [inline]

Member Data Documentation

The name (in the layout) of acsASPnl

Referenced by initAlarmServiceType(), initialize(), and showPanel().

The panel shown when the ACS alarm system is in use.

This panel contains a label to inform the user to open jlog instead

Referenced by initialize().

The name (in the layout) of alSysNotAvailPnl

Referenced by initialize(), and showPanel().

The panel shown when the AS is not available even if the CERN AS is in use.

This panel is shown at startup until the client connects to the AS. The purpose is to inform the user that the AS is not available but can signal an error if the AS did not start.

Referenced by AlarmPanel(), and initialize().

The name (in the layout) of cernSysPnl

Referenced by initialize(), and showPanel().

The panel shown when the CERN alarm system is in use and the client is connected to the AS

Referenced by addSpecialAlarm(), AlarmPanel(), initialize(), isConnecting(), pause(), resume(), setACSContainerServices(), setServices(), showAlarmDetails(), showMessage(), start(), and stop().

The container services

Referenced by initAlarmServiceType(), setACSContainerServices(), setServices(), and start().

The window that shows this panel

Referenced by isOMCPlugin().

true if the alarm system in use is the ACS implementation

Referenced by initAlarmServiceType().

final CardLayout alma::acsplugins::alarmsystem::gui::AlarmPanel::layout = new CardLayout() [private]

The layout to choose which panel the GUI shows

Referenced by initialize(), and showPanel().

final JPanel alma::acsplugins::alarmsystem::gui::AlarmPanel::panel = new JPanel() [private]

The panel showing the a different container for each situation

Referenced by initialize(), and showPanel().


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

Generated by  doxygen 1.6.2