cern::laser::guiplatform::alarms::AlarmBean Class Reference

Inheritance diagram for cern::laser::guiplatform::alarms::AlarmBean:
Inheritance graph
[legend]
Collaboration diagram for cern::laser::guiplatform::alarms::AlarmBean:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AlarmBean (CommentedAlarm commentedAlarm)
 AlarmBean ()
CommentedAlarm getCommentedAlarm ()
void setCommentedAlarm (CommentedAlarm newCommentedAlarm)
boolean isAlarmNodeActive ()
void setIsAlarmNodeActive ()
boolean isAlarmNodeInhibited ()
void setIsAlarmNodeInhibited (boolean flag)
boolean isAlarmNodeMasked ()
void setIsAlarmNodeMasked (boolean flag)
boolean isAlarmNodeHighlighted ()
void setIsAlarmNodeHighlighted (boolean flag)
boolean isAlarmNodeHighlightedAndKlaxon ()
void setIsAlarmNodeHighlightedAndKlaxon (boolean flag)
int getHighlightedOrKlaxon ()
void setHighlightedOrKlaxon (final int highlightedOrKlaxon)
void setIsAlarmNodeAcknowledged (boolean flag)
boolean isAlarmNodeAcknowledged ()
boolean isAlarmNodeInstant ()
void setIsAlarmNodeInstant (boolean flag)
boolean isOnHighlightedList ()
void setIsOnHighlightedList (boolean flag)
boolean isNew ()
void setIsNew (boolean flag)
void setInfoMode (boolean flag)
boolean infoMode ()
String getAlarmId ()
Integer getPriority ()
Collection getCategories ()
ResponsiblePerson getResponsiblePerson ()
Location getLocation ()
String getProblemDescription ()
Source getSource ()
String getSourceName ()
String getFaultFamily ()
String getFaultMember ()
Integer getFaultCode ()
String getTimestamp ()
String getSourceTimestamp ()
String getUserTimestamp ()
Timestamp getTimestampForSorting ()
String getSourceHostName ()
String getUserData ()
String getIdentifier ()
String getSystemName ()
boolean isActive ()
boolean getIsActive ()
boolean isMasked ()
boolean isNodeChild ()
boolean isNodeParent ()
boolean isNodeReduced ()
boolean isMultiplicityParent ()
boolean isMultiplicityChild ()
boolean isReduced ()
List getTimestamps ()
List getDynamicInfo (boolean withEmptyFields)
List getStaticInfo (boolean withEmptyFields)
String getName ()
String getDisplayName ()
String getDate ()
String getTime ()
String getNodeDefaultAction ()
Image getNewIcon ()
Image getNodeIcon ()
Image getNodeIcon (boolean isSelected)
String[] getNodeActions ()
Color getBackgroundColor ()
Color getForegroundColor ()
Font getFont ()
void details ()
Object clone () throws CloneNotSupportedException
void propertyChange (java.beans.PropertyChangeEvent evt)
boolean equals (Object obj)
int hashCode ()
void registerPropertyChangeListener (PropertyChangeListener listener)
void addPropertyChangeListener (PropertyChangeListener listener)
void removePropertyChangeListener (PropertyChangeListener listener)
String checkIfNull (String str)
SystemAction[] getActions ()
int compareTo (Object o)
void fireFontChanged ()
Color getStandardBackgroundColor ()
Color getStandardForegroundColor ()

Protected Attributes

String consoleTimeStamp = null
PropertyChangeListener propertyListener = null
String[] nodeActions = null
String[] instantNodeActions = null
String defaultActionName = null
Color foregroundColor = Color.black
Color backgroundColor = new Color(70, 92, 113)
boolean isAlarmNodeActive = true
boolean isAlarmNodeInhibited = false
boolean isAlarmNodeMasked = false
boolean isAlarmNodeHighlighted = false
boolean isAlarmNodeHighlightedAndKlaxon = false
boolean isAlarmNodeAcknowledged = false
int highlitedOrKlaxonOrBoth = AlarmConstants.HIGHLIGHTED_ONLY
boolean isAlarmNodeInstant = false
boolean isNew = true
boolean infoMode = false
boolean isOnHighlightedList = false
CommentedAlarm commentedAlarm = null

Static Protected Attributes

static final String[] INSTANT_NODE_ACTIONS
static final String DEFAULT_ACTION_NAME = null

Private Member Functions

void addToList (List list, String key, String value, boolean withEmptyFields)
Image prepareIcon (String imagePathNew, String imagePathNotNew)
void changeBackgroundForeground ()
String getPrefix ()
String getSuffix ()

Private Attributes

PropertyChangeSupport changes = new PropertyChangeSupport(this)

Static Private Attributes

static final Logger LOGGER
static String[] NODE_ACTIONS

Detailed Description

Adapater class wrapping Alarm

Author:
pawlowsk

Constructor & Destructor Documentation

cern::laser::guiplatform::alarms::AlarmBean::AlarmBean ( CommentedAlarm  commentedAlarm  )  [inline]
cern::laser::guiplatform::alarms::AlarmBean::AlarmBean (  )  [inline]

This constructor should be used only for changing column names setTableColumns(Object bean, String[] propertyNames)

Constructor made only because of GP ListTableExplorer.setTableColumns method.

References consoleTimeStamp.

Referenced by details().


Member Function Documentation

void cern::laser::guiplatform::alarms::AlarmBean::addPropertyChangeListener ( PropertyChangeListener  listener  )  [inline]

References changes.

Referenced by registerPropertyChangeListener().

void cern::laser::guiplatform::alarms::AlarmBean::addToList ( List  list,
String  key,
String  value,
boolean  withEmptyFields 
) [inline, private]

helper method, which adds static properites to list depending on withEmptyFields value

Parameters:
list 
key key for LabelValueBean
value value for LabelValueBean (property value)
withEmptyFields 

Referenced by getDynamicInfo(), and getStaticInfo().

void cern::laser::guiplatform::alarms::AlarmBean::changeBackgroundForeground (  )  [inline, private]
String cern::laser::guiplatform::alarms::AlarmBean::checkIfNull ( String  str  )  [inline]
Parameters:
str string to be checked if it is null
Returns:
if str is null returm empty string "" else retur str

Referenced by getStaticInfo().

Object cern::laser::guiplatform::alarms::AlarmBean::clone (  )  throws CloneNotSupportedException [inline]
int cern::laser::guiplatform::alarms::AlarmBean::compareTo ( Object  o  )  [inline]
void cern::laser::guiplatform::alarms::AlarmBean::details (  )  [inline]
boolean cern::laser::guiplatform::alarms::AlarmBean::equals ( Object  obj  )  [inline]

References getAlarmId().

void cern::laser::guiplatform::alarms::AlarmBean::fireFontChanged (  )  [inline]
SystemAction [] cern::laser::guiplatform::alarms::AlarmBean::getActions (  )  [inline]
String cern::laser::guiplatform::alarms::AlarmBean::getAlarmId (  )  [inline]
Color cern::laser::guiplatform::alarms::AlarmBean::getBackgroundColor (  )  [inline]
Collection cern::laser::guiplatform::alarms::AlarmBean::getCategories (  )  [inline]

getter for the categories to which the alarm belongs

Returns:
a collection containing the names of the categories to which commentedAlarm.getAlarm(). alarm belongs

References commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), and cern::laser::client::data::Alarm::getCategories().

Referenced by cern::laser::guiplatform::alarms::AlarmContainer::belongsToSelectedCategories().

CommentedAlarm cern::laser::guiplatform::alarms::AlarmBean::getCommentedAlarm (  )  [inline]
String cern::laser::guiplatform::alarms::AlarmBean::getDate (  )  [inline]

References getUserTimestamp().

String cern::laser::guiplatform::alarms::AlarmBean::getDisplayName (  )  [inline]
List cern::laser::guiplatform::alarms::AlarmBean::getDynamicInfo ( boolean  withEmptyFields  )  [inline]
Parameters:
withEmptyFields indicates whether all fileds should be returned or only not empty
Returns:
dynamic properties as List with LabelValueBean objects

References addToList(), commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), and cern::laser::client::data::Alarm::getStatus().

Integer cern::laser::guiplatform::alarms::AlarmBean::getFaultCode (  )  [inline]
String cern::laser::guiplatform::alarms::AlarmBean::getFaultFamily (  )  [inline]
String cern::laser::guiplatform::alarms::AlarmBean::getFaultMember (  )  [inline]
Font cern::laser::guiplatform::alarms::AlarmBean::getFont (  )  [inline]
Color cern::laser::guiplatform::alarms::AlarmBean::getForegroundColor (  )  [inline]
int cern::laser::guiplatform::alarms::AlarmBean::getHighlightedOrKlaxon (  )  [inline]

this metod wheter alarm should be only highlighted or should have klaxon or maybe both

should not be used, this should be check on AutoKlaxon list

References highlitedOrKlaxonOrBoth.

Referenced by getBackgroundColor(), and getForegroundColor().

String cern::laser::guiplatform::alarms::AlarmBean::getIdentifier (  )  [inline]
boolean cern::laser::guiplatform::alarms::AlarmBean::getIsActive (  )  [inline]

debug method used to dispaly status on the console

References isActive().

Location cern::laser::guiplatform::alarms::AlarmBean::getLocation (  )  [inline]

getter for the location of the equipment

Returns:
the location of the equipment

References commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), and cern::laser::client::data::Alarm::getLocation().

String cern::laser::guiplatform::alarms::AlarmBean::getName (  )  [inline]
Image cern::laser::guiplatform::alarms::AlarmBean::getNewIcon (  )  [inline]

References getPriority(), and isNew().

String [] cern::laser::guiplatform::alarms::AlarmBean::getNodeActions (  )  [inline]
String cern::laser::guiplatform::alarms::AlarmBean::getNodeDefaultAction (  )  [inline]

References defaultActionName.

Image cern::laser::guiplatform::alarms::AlarmBean::getNodeIcon ( boolean  isSelected  )  [inline]

References getPriority(), and prepareIcon().

Image cern::laser::guiplatform::alarms::AlarmBean::getNodeIcon (  )  [inline]
String cern::laser::guiplatform::alarms::AlarmBean::getPrefix (  )  [inline, private]
Integer cern::laser::guiplatform::alarms::AlarmBean::getPriority (  )  [inline]

getter for the priority of the alarm

Returns:
the priority of the alarm

References commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), and cern::laser::client::data::Alarm::getPriority().

Referenced by changeBackgroundForeground(), compareTo(), getNewIcon(), and getNodeIcon().

String cern::laser::guiplatform::alarms::AlarmBean::getProblemDescription (  )  [inline]

getter for the problem description

Returns:
the description of the problem from static info

References commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), getPrefix(), cern::laser::client::data::Alarm::getProblemDescription(), and getSuffix().

ResponsiblePerson cern::laser::guiplatform::alarms::AlarmBean::getResponsiblePerson (  )  [inline]

getter for the responsible person for this equipement

Returns:
the name of the repsonsible person from the static info

References commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), and cern::laser::client::data::Alarm::getResponsiblePerson().

Source cern::laser::guiplatform::alarms::AlarmBean::getSource (  )  [inline]

getter for the alarm source

Returns:
the alarm source from static info

References commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), and cern::laser::client::data::Alarm::getSource().

String cern::laser::guiplatform::alarms::AlarmBean::getSourceHostName (  )  [inline]
String cern::laser::guiplatform::alarms::AlarmBean::getSourceName (  )  [inline]
String cern::laser::guiplatform::alarms::AlarmBean::getSourceTimestamp (  )  [inline]
Returns:
SourceTimestamp from the DynamicInfo class

References commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), and cern::laser::client::data::Alarm::getStatus().

Color cern::laser::guiplatform::alarms::AlarmBean::getStandardBackgroundColor (  )  [inline]
Color cern::laser::guiplatform::alarms::AlarmBean::getStandardForegroundColor (  )  [inline]
List cern::laser::guiplatform::alarms::AlarmBean::getStaticInfo ( boolean  withEmptyFields  )  [inline]
Parameters:
withEmptyFields indicates whether all fileds should be returned or only not empty
Returns:
static properties as List with LabelValueBean objects

References addToList(), checkIfNull(), commentedAlarm, cern::laser::client::data::Alarm::getAction(), cern::laser::console::CommentedAlarm::getAlarm(), cern::laser::client::data::Location::getBuilding(), cern::laser::client::data::Alarm::getCause(), cern::laser::client::data::Alarm::getConsequence(), cern::laser::client::data::Source::getDescription(), cern::laser::client::data::ResponsiblePerson::getEMail(), cern::laser::client::data::ResponsiblePerson::getFamilyName(), getFaultCode(), getFaultFamily(), getFaultMember(), cern::laser::client::data::ResponsiblePerson::getFirstName(), cern::laser::client::data::Location::getFloor(), cern::laser::client::data::ResponsiblePerson::getGsmNumber(), cern::laser::client::data::Alarm::getHelpURL(), cern::laser::client::data::Alarm::getLocation(), cern::laser::client::data::Location::getMap(), cern::laser::client::data::Location::getMnemonic(), cern::laser::client::data::Source::getName(), cern::laser::client::data::ResponsiblePerson::getPhoneNumber(), cern::laser::client::data::Alarm::getPiquetEmail(), cern::laser::client::data::Alarm::getPiquetGSM(), cern::laser::client::data::Location::getPosition(), cern::laser::client::data::Alarm::getPriority(), cern::laser::client::data::Alarm::getProblemDescription(), cern::laser::client::data::Source::getResponsiblePerson(), cern::laser::client::data::Alarm::getResponsiblePerson(), cern::laser::client::data::Location::getRoom(), cern::laser::client::data::Location::getSite(), cern::laser::client::data::Alarm::getSource(), and cern::laser::client::data::Location::getZone().

String cern::laser::guiplatform::alarms::AlarmBean::getSuffix (  )  [inline, private]
String cern::laser::guiplatform::alarms::AlarmBean::getSystemName (  )  [inline]
String cern::laser::guiplatform::alarms::AlarmBean::getTime (  )  [inline]

References getUserTimestamp().

String cern::laser::guiplatform::alarms::AlarmBean::getTimestamp (  )  [inline]
Timestamp cern::laser::guiplatform::alarms::AlarmBean::getTimestampForSorting (  )  [inline]
List cern::laser::guiplatform::alarms::AlarmBean::getTimestamps (  )  [inline]
String cern::laser::guiplatform::alarms::AlarmBean::getUserData (  )  [inline]
String cern::laser::guiplatform::alarms::AlarmBean::getUserTimestamp (  )  [inline]
int cern::laser::guiplatform::alarms::AlarmBean::hashCode (  )  [inline]

Return the object hashcode

Returns:
the object hashcode

References commentedAlarm, and cern::laser::console::CommentedAlarm::getAlarm().

Referenced by prepareIcon(), and setInfoMode().

boolean cern::laser::guiplatform::alarms::AlarmBean::isActive (  )  [inline]
Returns:
indicates whether this Node is on active list

Referenced by getName(), setIsAlarmNodeActive(), setIsAlarmNodeInhibited(), setIsAlarmNodeInstant(), and setIsAlarmNodeMasked().

Returns:
true if AlarNode is highlited. otherwise false

Referenced by getBackgroundColor(), getForegroundColor(), propertyChange(), and setIsAlarmNodeHighlighted().

Returns:
true if AlarmNode is on highlithed list

Referenced by getBackgroundColor(), getForegroundColor(), propertyChange(), and setIsAlarmNodeHighlightedAndKlaxon().

Returns:
true if AlarNode is instant, otherwise false

Referenced by setIsAlarmNodeActive(), setIsAlarmNodeInhibited(), setIsAlarmNodeInstant(), and setIsAlarmNodeMasked().

boolean cern::laser::guiplatform::alarms::AlarmBean::isMasked (  )  [inline]
Returns:
isMasked field from the StatusInfo class

References commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), and cern::laser::client::data::Alarm::getStatus().

Referenced by isActive().

boolean cern::laser::guiplatform::alarms::AlarmBean::isMultiplicityChild (  )  [inline]
Returns:
isMultiplicityChild field from the StatusInfo class

References commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), and cern::laser::client::data::Alarm::isMultiplicityChild().

boolean cern::laser::guiplatform::alarms::AlarmBean::isMultiplicityParent (  )  [inline]
Returns:
isMultiplicityParent field from the StatusInfo class

References commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), and cern::laser::client::data::Alarm::isMultiplicityParent().

Referenced by getFont().

Referenced by getNewIcon(), and setIsNew().

boolean cern::laser::guiplatform::alarms::AlarmBean::isNodeChild (  )  [inline]

Tests if the alarm is a node child

Returns:
boolean

References commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), and cern::laser::client::data::Alarm::isNodeChild().

boolean cern::laser::guiplatform::alarms::AlarmBean::isNodeParent (  )  [inline]

Tests if the alarm is a node parent

Returns:
boolean

References commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), and cern::laser::client::data::Alarm::isNodeParent().

Referenced by getFont().

boolean cern::laser::guiplatform::alarms::AlarmBean::isNodeReduced (  )  [inline]

Tests if a node reduction is applied on this alarm

Returns:
boolean

References commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), and cern::laser::client::data::Alarm::getStatus().

boolean cern::laser::guiplatform::alarms::AlarmBean::isReduced (  )  [inline]
Returns:
isMaintenanceMasked field from the StatusInfo class
isModeMasked field from the StatusInfo class
isReduced field from the StatusInfo class

References commentedAlarm, cern::laser::console::CommentedAlarm::getAlarm(), and cern::laser::client::data::Alarm::getStatus().

Referenced by isActive().

Image cern::laser::guiplatform::alarms::AlarmBean::prepareIcon ( String  imagePathNew,
String  imagePathNotNew 
) [inline, private]
void cern::laser::guiplatform::alarms::AlarmBean::propertyChange ( java.beans.PropertyChangeEvent  evt  )  [inline]
void cern::laser::guiplatform::alarms::AlarmBean::registerPropertyChangeListener ( PropertyChangeListener  listener  )  [inline]
void cern::laser::guiplatform::alarms::AlarmBean::removePropertyChangeListener ( PropertyChangeListener  listener  )  [inline]

References changes.

Referenced by registerPropertyChangeListener().

void cern::laser::guiplatform::alarms::AlarmBean::setCommentedAlarm ( CommentedAlarm  newCommentedAlarm  )  [inline]
void cern::laser::guiplatform::alarms::AlarmBean::setHighlightedOrKlaxon ( final int  highlightedOrKlaxon  )  [inline]

Sets flag, which indicates whether, this alarm should be only highlighted, or should a klaxon or maybe both

Parameters:
highlightedOrKlaxon AlarmConstans.HIGHLIGHTED_ONLY or AlarmConstans.KLAXON_ONLY or AlarmConstans.HIGHLIGHTED_AND_KLAXON

References changeBackgroundForeground(), and highlitedOrKlaxonOrBoth.

Referenced by cern::laser::guiplatform::alarms::AlarmContainer::highlightAndKlaxon().

void cern::laser::guiplatform::alarms::AlarmBean::setInfoMode ( boolean  flag  )  [inline]
void cern::laser::guiplatform::alarms::AlarmBean::setIsAlarmNodeAcknowledged ( boolean  flag  )  [inline]
void cern::laser::guiplatform::alarms::AlarmBean::setIsAlarmNodeActive (  )  [inline]
void cern::laser::guiplatform::alarms::AlarmBean::setIsAlarmNodeHighlighted ( boolean  flag  )  [inline]
void cern::laser::guiplatform::alarms::AlarmBean::setIsAlarmNodeHighlightedAndKlaxon ( boolean  flag  )  [inline]
void cern::laser::guiplatform::alarms::AlarmBean::setIsAlarmNodeInhibited ( boolean  flag  )  [inline]
void cern::laser::guiplatform::alarms::AlarmBean::setIsAlarmNodeInstant ( boolean  flag  )  [inline]
void cern::laser::guiplatform::alarms::AlarmBean::setIsAlarmNodeMasked ( boolean  flag  )  [inline]
void cern::laser::guiplatform::alarms::AlarmBean::setIsNew ( boolean  flag  )  [inline]
void cern::laser::guiplatform::alarms::AlarmBean::setIsOnHighlightedList ( boolean  flag  )  [inline]

Member Data Documentation

Color cern::laser::guiplatform::alarms::AlarmBean::backgroundColor = new Color(70, 92, 113) [protected]
PropertyChangeSupport cern::laser::guiplatform::alarms::AlarmBean::changes = new PropertyChangeSupport(this) [private]

alarm console timestamp

Referenced by AlarmBean(), getTimestamps(), and setCommentedAlarm().

default action name

Referenced by AlarmBean().

Referenced by AlarmBean(), and getNodeDefaultAction().

this value indicates wheter alarm should be only highlighted or should have klaxon or maybe both

TODO: reimplement this use AutKlaxon and AutoHighlighed lists

Referenced by getHighlightedOrKlaxon(), and setHighlightedOrKlaxon().

info mode when alarm displayed on lists like "alarm by category", "search list", etc

Initial value:
 new String [] {
        DetailsAction.class.getName()
    }

instant node actions

Referenced by AlarmBean().

Referenced by AlarmBean(), and getNodeActions().

this indicate whether alarm is actvie or not, even if is on actvie iist, (reduction mechanism --- alarm can be on active list but can be displayed as terminated) this means that alarm in inhibited and is on inhibit list (inhibit explorer)

Referenced by cern::laser::guiplatform::actions::alarms::UninhibitAction::enable(), and cern::laser::guiplatform::actions::alarms::UnacknowledgeAction::enable().

alarm is instant and is on insttant list (instant explorer)

alarm in masked and is on masked list (masked explorer)

Referenced by cern::laser::guiplatform::actions::alarms::UnmaskAction::enable().

Initial value:
    LogFactory.getLogger(AlarmBean.class.getName())

logger

Referenced by details(), getTimestamps(), propertyChange(), and setIsAlarmNodeAcknowledged().

Initial value:
 new String[] {
        UnacknowledgeAction.class.getName(),
        AcknowledgeAction.class.getName(),
        null,
        HighlightAction.class.getName(),
        UnhighlightAction.class.getName(),
        null,
        InhibitAction.class.getName(),
        UninhibitAction.class.getName(),
        null,
        MaskAction.class.getName(),
        UnmaskAction.class.getName(),
        null,
        HighlightedAndKlaxonAction.class.getName(),
        UnhighlightedAndKlaxonAction.class.getName(),
        null,
        DetailsAction.class.getName(),
        null,
        ShowTimestampsAction.class.getName(),
        null,
        ShowMultiplicityChildrenAction.class.getName(),
        ShowNodeChildrenAction.class.getName(),
        null,
        ShowHelpUrlInBrowserAction.class.getName(),
    }

node actions

Referenced by AlarmBean().

Referenced by AlarmBean(), and getNodeActions().

PropertyChangeListener cern::laser::guiplatform::alarms::AlarmBean::propertyListener = null [protected]

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

Generated by  doxygen 1.6.2