Public Member Functions | |
ACSAlarmDAOImpl (Logger log) | |
List< FaultFamily > | loadAlarms () throws Exception |
void | generateAlarmsMap (Vector< FaultFamily > families) |
Alarm | findAlarm (String alarmId) |
Alarm | getAlarm (String alarmId) |
String[] | findAlarmIdsByPriority (Integer priority) |
String | findLaserSurveillanceAlarmId () |
void | deleteAlarm (Alarm alarm) |
void | saveMemberAlarms (String member) |
void | saveAlarm (Alarm alarm) |
void | updateAlarm (Alarm alarm) |
void | updateStatus (Status status) |
Collection | search (String select_sql) |
Collection | archiveSearch (String select_sql) |
Building | findBuilding (String building) |
void | setConfAccessor (ConfigurationAccessor conf) |
void | setSurveillanceAlarmId (String surveillanceAlarmId) |
void | setResponsiblePersonDAO (ResponsiblePersonDAO responsiblePersonDAO) |
String[] | getAllAlarmIDs () |
void | addFaultFamily (FaultFamily ff) |
void | updateFaultFamily (FaultFamily ff) |
void | removeFaultFamily (FaultFamily ff) |
void | removeAlarmsMap (Vector< FaultFamily > families) |
alma.alarmsystem.alarmmessage.generated.ReductionDefinitions | getReductionRules () |
void | flushReductionRules (alma.alarmsystem.alarmmessage.generated.ReductionDefinitions rds) |
void | addReductionRule (alma.alarmsystem.alarmmessage.generated.ReductionDefinitions rds, alma.alarmsystem.alarmmessage.generated.ReductionLinkType rl) |
void | updateReductionRule (alma.alarmsystem.alarmmessage.generated.ReductionDefinitions rds, alma.alarmsystem.alarmmessage.generated.ReductionLinkType rl) |
void | deleteReductionRule (alma.alarmsystem.alarmmessage.generated.ReductionDefinitions rds, alma.alarmsystem.alarmmessage.generated.ReductionLinkType rl) |
void | addThreshold (alma.alarmsystem.alarmmessage.generated.ReductionDefinitions rds, alma.alarmsystem.alarmmessage.generated.Threshold th) |
void | updateThreshold (alma.alarmsystem.alarmmessage.generated.ReductionDefinitions rds, alma.alarmsystem.alarmmessage.generated.Threshold th) |
void | deleteThreshold (alma.alarmsystem.alarmmessage.generated.ReductionDefinitions rds, alma.alarmsystem.alarmmessage.generated.Threshold th) |
ConcurrentHashMap< String, Source > | getSources () |
Package Functions | |
Building | loadBuilding (String buildingID) |
Static Package Functions | |
static AlarmRefMatcher | toMatcher (AlarmDefinition def) |
static String | memberFromAlarmID (String alarmId) |
Package Attributes | |
Logger | logger |
ConfigurationAccessor | conf |
String | surveillanceAlarmId |
ResponsiblePersonDAO | responsiblePersonDAO |
Static Package Attributes | |
static final HardcodedBuilding | theBuilding = HardcodedBuilding.instance |
static final HardcodedLocation | theLocation = HardcodedLocation.instance |
Read alarms from the CDB.
CDB contains one file per each possible FF and one entry per each FC and FM. It is possible to specify a default member to be used when the administrator did not specify the member.
The alarms are stored in an HashMap having the triplet as key. The default member has a triplet with a "*" replacing its name.
The sources are defined together with an alarm definition so they are read here and requested by the ACSSourceDAOImpl at startup (instead of being read again from CDB).
The initialization of the alarms is not completely done by loadAlarms because not all the info are available at this time. In fact the categories are assigned to alarms by ACSCategoryDAOImpl
cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.ACSAlarmDAOImpl | ( | Logger | log | ) |
Constructor
log | The log (not null) | |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
References cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.logger.
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.addFaultFamily | ( | FaultFamily | ff | ) |
References cl.utfsm.acs.acg.dao.ConfigurationAccessor.addConfiguration(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.conf, cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.generateAlarmsMap(), com.cosylab.acs.laser.dao.ConfigurationAccessor.isWriteable(), org.exolab.castor.xml.Marshaller.marshal(), org.exolab.castor.core.exceptions.CastorException.printStackTrace(), and org.exolab.castor.xml.Marshaller.setValidation().
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.addReductionRule | ( | alma.alarmsystem.alarmmessage.generated.ReductionDefinitions | rds, | |
alma.alarmsystem.alarmmessage.generated.ReductionLinkType | rl | |||
) |
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.addThreshold | ( | alma.alarmsystem.alarmmessage.generated.ReductionDefinitions | rds, | |
alma.alarmsystem.alarmmessage.generated.Threshold | th | |||
) |
Collection cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.archiveSearch | ( | String | select_sql | ) |
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.deleteAlarm | ( | Alarm | alarm | ) |
category |
HibernateException |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
References cern.laser.business.data.Triplet.getFaultMember(), cern.laser.business.data.Alarm.getTriplet(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.saveMemberAlarms(), and cern.laser.business.data.Triplet.toIdentifier().
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.deleteReductionRule | ( | alma.alarmsystem.alarmmessage.generated.ReductionDefinitions | rds, | |
alma.alarmsystem.alarmmessage.generated.ReductionLinkType | rl | |||
) |
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.deleteThreshold | ( | alma.alarmsystem.alarmmessage.generated.ReductionDefinitions | rds, | |
alma.alarmsystem.alarmmessage.generated.Threshold | th | |||
) |
Alarm cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.findAlarm | ( | String | alarmId | ) |
Returns the alarm corresponding to the given id.
identifier | the id of the alarm to find |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
References cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.getAlarm().
String [] cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.findAlarmIdsByPriority | ( | Integer | priority | ) |
priority |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
References cern.laser.business.data.AlarmImpl.getPriority().
Building cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.findBuilding | ( | String | building | ) |
building |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
References cern.laser.business.data.Building.getBuildingNumber(), and cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.theBuilding.
String cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.findLaserSurveillanceAlarmId | ( | ) |
Returns all alarms.
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
References cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.getAlarm(), and cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.surveillanceAlarmId.
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.flushReductionRules | ( | alma.alarmsystem.alarmmessage.generated.ReductionDefinitions | rds | ) |
References cl.utfsm.acs.acg.dao.ConfigurationAccessor.addConfiguration(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.conf, com.cosylab.acs.laser.dao.ConfigurationAccessor.deleteConfiguration(), com.cosylab.acs.laser.dao.ConfigurationAccessor.isWriteable(), org.exolab.castor.xml.Marshaller.marshal(), org.exolab.castor.core.exceptions.CastorException.printStackTrace(), and org.exolab.castor.xml.Marshaller.setValidation().
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.generateAlarmsMap | ( | Vector< FaultFamily > | families | ) |
Generate the alarms from the definition of the fault families. The alarms will be added into the HashMap with their triplet as key. The default item has FM="*".
The sources read from the families are also added to the HashMap of the sources
families | The FF read from the CDB |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
References cern.laser.business.data.AlarmImpl.getAlarmId(), cern.laser.business.data.Source.getName(), cern.laser.business.data.Source.getSourceId(), cern.laser.business.data.AlarmImpl.getTriplet(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.logger, cern.laser.business.data.AlarmImpl.setAction(), cern.laser.business.data.AlarmImpl.setCategories(), cern.laser.business.data.AlarmImpl.setCause(), cern.laser.business.data.AlarmImpl.setConsequence(), cern.laser.business.data.AlarmImpl.setHelpURL(), cern.laser.business.data.AlarmImpl.setIdentifier(), cern.laser.business.data.AlarmImpl.setInstant(), cern.laser.business.data.AlarmImpl.setLocation(), cern.laser.business.data.AlarmImpl.setMultiplicityChildrenIds(), cern.laser.business.data.AlarmImpl.setMultiplicityParentIds(), cern.laser.business.data.AlarmImpl.setNodeChildrenIds(), cern.laser.business.data.AlarmImpl.setNodeParentIds(), cern.laser.business.data.AlarmImpl.setPiquetEmail(), cern.laser.business.data.AlarmImpl.setPiquetGSM(), cern.laser.business.data.AlarmImpl.setPriority(), cern.laser.business.data.AlarmImpl.setProblemDescription(), cern.laser.business.data.AlarmImpl.setResponsiblePerson(), cern.laser.business.data.AlarmImpl.setSource(), cern.laser.business.data.AlarmImpl.setTriplet(), and cern.laser.business.data.Triplet.toIdentifier().
Referenced by cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.addFaultFamily(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.loadAlarms(), and cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.updateFaultFamily().
Alarm cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.getAlarm | ( | String | alarmId | ) |
Get an alarm from the cache.
Get an alarm from the cache. If the alarm with the given triplet is not in the cache then it looks for a default alarm before returning null.
If a default alarm is found, then a new alarm is created by cloning the default alarm. The triplet of this new alarm is set to be equal to the passed alarm ID.
alarmId | The ID of the alarm |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
References cern.laser.business.data.AlarmImpl.clone(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.conf, cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.logger, and cern.laser.business.data.AlarmImpl.setTriplet().
Referenced by cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.addReductionRule(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.addThreshold(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.deleteReductionRule(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.deleteThreshold(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.findAlarm(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.findLaserSurveillanceAlarmId(), and cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.updateThreshold().
String [] cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.getAllAlarmIDs | ( | ) |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
Referenced by cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.removeAlarmsMap().
alma.alarmsystem.alarmmessage.generated.ReductionDefinitions cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.getReductionRules | ( | ) |
ConcurrentHashMap<String, Source> cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.getSources | ( | ) |
List<FaultFamily> cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.loadAlarms | ( | ) | throws Exception |
Load alarms from CDB.
Read the alarms by the alarm definitions file of the CDB. The initialization of the alarms is not complete at this stage. In fact the categories are assigned to alarms when reading the categories from the CDB by ACSCategoryDAOImpl
Exception | In case of error while parsing XML definition files |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
References cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.conf, cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.generateAlarmsMap(), com.cosylab.acs.laser.dao.ConfigurationAccessor.getConfiguration(), org.exolab.castor.xml.Unmarshaller.setValidation(), org.exolab.castor.xml.Unmarshaller.setWhitespacePreserve(), and org.exolab.castor.xml.Unmarshaller.unmarshal().
Building cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.loadBuilding | ( | String | buildingID | ) | [package] |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
References cern.laser.business.data.Building.getBuildingNumber(), and cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.theBuilding.
static String cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.memberFromAlarmID | ( | String | alarmId | ) | [static, package] |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.removeAlarmsMap | ( | Vector< FaultFamily > | families | ) |
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.removeFaultFamily | ( | FaultFamily | ff | ) |
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.saveAlarm | ( | Alarm | alarm | ) |
parent |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
References cern.laser.business.data.Triplet.getFaultMember(), cern.laser.business.data.Alarm.getTriplet(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.saveMemberAlarms(), and cern.laser.business.data.Triplet.toIdentifier().
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.saveMemberAlarms | ( | String | member | ) |
Collection cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.search | ( | String | select_sql | ) |
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.setConfAccessor | ( | ConfigurationAccessor | conf | ) |
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.setResponsiblePersonDAO | ( | ResponsiblePersonDAO | responsiblePersonDAO | ) |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.setSurveillanceAlarmId | ( | String | surveillanceAlarmId | ) |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
static AlarmRefMatcher cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.toMatcher | ( | AlarmDefinition | def | ) | [static, package] |
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.updateAlarm | ( | Alarm | alarm | ) |
parent |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
References cern.laser.business.data.Triplet.getFaultMember(), cern.laser.business.data.Alarm.getTriplet(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.saveMemberAlarms(), and cern.laser.business.data.Triplet.toIdentifier().
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.updateFaultFamily | ( | FaultFamily | ff | ) |
References cl.utfsm.acs.acg.dao.ConfigurationAccessor.addConfiguration(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.conf, com.cosylab.acs.laser.dao.ConfigurationAccessor.deleteConfiguration(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.generateAlarmsMap(), com.cosylab.acs.laser.dao.ConfigurationAccessor.getConfiguration(), com.cosylab.acs.laser.dao.ConfigurationAccessor.isWriteable(), org.exolab.castor.xml.Marshaller.marshal(), org.exolab.castor.core.exceptions.CastorException.printStackTrace(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.removeAlarmsMap(), and org.exolab.castor.xml.Marshaller.setValidation().
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.updateReductionRule | ( | alma.alarmsystem.alarmmessage.generated.ReductionDefinitions | rds, | |
alma.alarmsystem.alarmmessage.generated.ReductionLinkType | rl | |||
) |
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.updateStatus | ( | Status | status | ) |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
void cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.updateThreshold | ( | alma.alarmsystem.alarmmessage.generated.ReductionDefinitions | rds, | |
alma.alarmsystem.alarmmessage.generated.Threshold | th | |||
) |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
Referenced by cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.addFaultFamily(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.flushReductionRules(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.getAlarm(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.getReductionRules(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.loadAlarms(), cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.removeFaultFamily(), and cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.updateFaultFamily().
Logger cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.logger [package] |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
String cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.surveillanceAlarmId [package] |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
Referenced by cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.findLaserSurveillanceAlarmId().
final HardcodedBuilding cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.theBuilding = HardcodedBuilding.instance [static, package] |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.
Referenced by cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.findBuilding(), and cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.loadBuilding().
final HardcodedLocation cl.utfsm.acs.acg.dao.ACSAlarmDAOImpl.theLocation = HardcodedLocation.instance [static, package] |
Reimplemented from com.cosylab.acs.laser.dao.ACSAlarmDAOImpl.