Public Member Functions | Static Public Member Functions

cl.utfsm.acs.acg.core.AlarmManager Class Reference

Inheritance diagram for cl.utfsm.acs.acg.core.AlarmManager:
cl.utfsm.acs.acg.core.EntityManager

List of all members.

Public Member Functions

void loadFromCDB ()
String checkCDB ()
List< FaultFamily > getAllAlarms ()
List< AlarmgetAlarms ()
Alarm getAlarm (String id)
FaultFamily getFaultFamily (String name)
FaultCode getFaultCode (String ffName, int value)
FaultMember getFaultMember (String ffName, String fmName)
FaultMemberDefault getFaultMemberDefault (String ffName)
boolean deleteFaultMember (FaultFamily ff, FaultMember fm) throws NullPointerException, IllegalOperationException
boolean setFaultMemberDefault (FaultFamily ff, FaultMemberDefault fmd) throws NullPointerException, IllegalOperationException
boolean deleteFaultCode (FaultFamily ff, FaultCode fc) throws NullPointerException, IllegalOperationException
boolean deleteFaultFamily (FaultFamily ff) throws NullPointerException, IllegalOperationException
void addFaultFamily (FaultFamily ff) throws NullPointerException, IllegalOperationException
void addFaultMember (FaultFamily ff, FaultMember fm) throws NullPointerException, IllegalOperationException
void addFaultCode (FaultFamily ff, FaultCode fc) throws NullPointerException, IllegalOperationException
void updateFaultFamily (FaultFamily ff, FaultFamily ffi) throws NullPointerException, IllegalOperationException
void updateFaultMember (FaultFamily ff, FaultMember fm, FaultMember fmi) throws NullPointerException, IllegalOperationException
void updateFaultCode (FaultFamily ff, FaultCode fc, FaultCode fci) throws NullPointerException, IllegalOperationException
void saveToCDB ()

Static Public Member Functions

static AlarmManager getInstance (AlarmDAO alarmDAO)
static void destroy ()

Detailed Description

The AlarmManager class is responsible of handling the references to the Alarm definitions that the ACG does. It also should validate if the set of alarms defined in the ACG are consistent with the other parts of the system (e.g., the Categories and the Sources)

Author:
rtobar

Member Function Documentation

void cl.utfsm.acs.acg.core.AlarmManager.addFaultCode ( FaultFamily  ff,
FaultCode  fc 
) throws NullPointerException, IllegalOperationException

Adds a new Fault Code to a given Fault Family.

Parameters:
ff The Fault Family to which the Fault Code will be added
fm The Fault Code to be added
Exceptions:
NullPointerException If the given Fault Family (or its name), the given Fault Code or both are null
IllegalOperationException If the Fault Code already exists or the Fault Family doesn't exist

References cl.utfsm.acs.acg.core.ObjectState.update().

void cl.utfsm.acs.acg.core.AlarmManager.addFaultFamily ( FaultFamily  ff  )  throws NullPointerException, IllegalOperationException

Adds a new Fault Family.

Parameters:
ff The Fault Family to be added
Exceptions:
NullPointerException If the given Fault Family (or its name) is null
IllegalOperationException If the Fault Family already exists

References cl.utfsm.acs.acg.core.ObjectState.create(), and cl.utfsm.acs.acg.core.ObjectState.update().

void cl.utfsm.acs.acg.core.AlarmManager.addFaultMember ( FaultFamily  ff,
FaultMember  fm 
) throws NullPointerException, IllegalOperationException

Adds a new Fault Member to a given Fault Family.

Parameters:
ff The Fault Family to which the Fault Member will be added
fm The Fault Member to be added
Exceptions:
NullPointerException If the given Fault Family (or its name), the given Fault Member (or its name) or both are null
IllegalOperationException If the Fault Member already exists or the Fault Family doesn't exist

References cl.utfsm.acs.acg.core.ObjectState.update().

String cl.utfsm.acs.acg.core.AlarmManager.checkCDB (  ) 
boolean cl.utfsm.acs.acg.core.AlarmManager.deleteFaultCode ( FaultFamily  ff,
FaultCode  fc 
) throws NullPointerException, IllegalOperationException

Deletes a Fault Code of a given Fault Family. The Fault Code to be deleted is checked against the existing Reduction Rules in order to preserve the consistency of the application (i.e., a Fault Code cannot be deleted if it is currently present in a Reduction Rule).

Parameters:
ff The Fault Family of the Fault Code to be deleted
fc The Fault Code to be deleted
Returns:
True if it deletes the given Fault Code, false otherwise
Exceptions:
NullPointerException If the given Fault Family or Fault Code is null
IllegalOperationException If the Fault Code is part of an existing Reduction Rule

References cl.utfsm.acs.acg.core.ReductionManager.getNodeReductionRules(), and cl.utfsm.acs.acg.core.ObjectState.update().

boolean cl.utfsm.acs.acg.core.AlarmManager.deleteFaultFamily ( FaultFamily  ff  )  throws NullPointerException, IllegalOperationException

Deletes a Fault Family. The Fault Family to be deleted is checked against the existing Reduction Rules in order to preserve the consistency of the application (i.e., a Fault Code cannot be deleted if it is currently present in a Reduction Rule).

Parameters:
ff The Fault Family to be deleted
Returns:
True if it deletes the given Fault Family, false otherwise
Exceptions:
NullPointerException If the given Fault Family (or its name) is null
IllegalOperationException If the Fault Family is part of an existing Reduction Rule

References cl.utfsm.acs.acg.core.ObjectState.delete(), cl.utfsm.acs.acg.core.CategoryManager.getAllCategories(), cl.utfsm.acs.acg.core.ReductionManager.getNodeReductionRules(), and cl.utfsm.acs.acg.core.CategoryManager.updateCategory().

boolean cl.utfsm.acs.acg.core.AlarmManager.deleteFaultMember ( FaultFamily  ff,
FaultMember  fm 
) throws NullPointerException, IllegalOperationException

Deletes a Fault Member of a given Fault Family. The Fault Member to be deleted is checked against the existing Reduction Rules in order to preserve the consistency of the application (i.e., a Fault Member cannot be deleted if it is currently present in a Reduction Rule).

Parameters:
ff The Fault Family of the Fault Member to be deleted
fm The Fault Member to be deleted
Returns:
True if it deletes the given Fault Member, false otherwise
Exceptions:
NullPointerException If the given Fault Family or Fault Member is null
IllegalOperationException If the Fault Member is part of an existing Reduction Rule

References cl.utfsm.acs.acg.core.ReductionManager.getNodeReductionRules(), and cl.utfsm.acs.acg.core.ObjectState.update().

static void cl.utfsm.acs.acg.core.AlarmManager.destroy (  )  [static]

Destroys the singleton instance of this class. This is needed to renew the internal reference to the AlarmDAO if a new connection to the DAL and the ACS Manager has been performed

List<FaultFamily> cl.utfsm.acs.acg.core.AlarmManager.getAllAlarms (  ) 

Returns a list of all the fault families that this manager currently handles

Returns:
The list of all the fault families that this manager currently handles

Referenced by cl.utfsm.acs.acg.core.CategoryManager.deleteCategory(), cl.utfsm.acs.acg.core.SourceManager.deleteSource(), cl.utfsm.acs.acg.gui.AlarmsView.sortFaultFamilyList(), and cl.utfsm.acs.acg.gui.CategoriesView.sortFullFaultFamilyList().

FaultCode cl.utfsm.acs.acg.core.AlarmManager.getFaultCode ( String  ffName,
int  value 
)

Searches and returns a fault code, based on the fault family name and the fault code value

Parameters:
ffName The Fault Family name
value The Fault Code value
Returns:
The referenced fault code
FaultFamily cl.utfsm.acs.acg.core.AlarmManager.getFaultFamily ( String  name  ) 

Retrieves a fault family description searching by the fault family name.

Parameters:
name The name of the fault family to retrieve
Returns:
The fault family description (null if not found)

Referenced by cl.utfsm.acs.acg.core.CategoryManager.checkCDB(), and cl.utfsm.acs.acg.core.AlarmManager.saveToCDB().

FaultMember cl.utfsm.acs.acg.core.AlarmManager.getFaultMember ( String  ffName,
String  fmName 
)

Searches and returns a fault member, based on the fault family name and the fault code name

Parameters:
ffName The Fault Family name
fmName The Fault Member name
Returns:
The associated Fault Member
FaultMemberDefault cl.utfsm.acs.acg.core.AlarmManager.getFaultMemberDefault ( String  ffName  ) 
void cl.utfsm.acs.acg.core.AlarmManager.loadFromCDB (  ) 

Performs a full reload of the contents of the Manager. All the current internal contents of the EntityManager are cleared, and replaced by the ones that are currently available on the CDB. Therefore, this call should be done with great care.

Implements cl.utfsm.acs.acg.core.EntityManager.

Referenced by cl.utfsm.acs.acg.core.AlarmSystemManager.loadFromCDB().

void cl.utfsm.acs.acg.core.AlarmManager.saveToCDB (  ) 

Performs a full save of the contents of the Manager to the CDB. All the modified contents of the CDB are updated, and replaced by the ones that are currently available on the EntityManager. Therefore, this call should be done with great care.

Implements cl.utfsm.acs.acg.core.EntityManager.

References cl.utfsm.acs.acg.core.ObjectState.getAction(), cl.utfsm.acs.acg.core.AlarmManager.getFaultFamily(), and org.exolab.castor.core.exceptions.CastorException.printStackTrace().

Referenced by cl.utfsm.acs.acg.core.AlarmSystemManager.saveToCDB().

boolean cl.utfsm.acs.acg.core.AlarmManager.setFaultMemberDefault ( FaultFamily  ff,
FaultMemberDefault  fmd 
) throws NullPointerException, IllegalOperationException
void cl.utfsm.acs.acg.core.AlarmManager.updateFaultCode ( FaultFamily  ff,
FaultCode  fc,
FaultCode  fci 
) throws NullPointerException, IllegalOperationException

Modifies a Fault Code of a given Fault Family.

Parameters:
ff The Fault Family to which belongs the Fault Code to be changed
fc The Fault Code to be changed
fci The Fault Code with the new values
Exceptions:
NullPointerException If any (or both) of the given Fault Codes or the Fault Family (or its name) or both are null
IllegalOperationException If the Fault Family doesn't exists

References cl.utfsm.acs.acg.core.ObjectState.update().

void cl.utfsm.acs.acg.core.AlarmManager.updateFaultFamily ( FaultFamily  ff,
FaultFamily  ffi 
) throws NullPointerException, IllegalOperationException

Modifies a Fault Family.

Parameters:
ff The Fault Family to be changed
ffi The Fault Family with the new values
Exceptions:
NullPointerException If any (or both) of the given Fault Families (or their names) are null
IllegalOperationException If the Fault Family doesn't exists

References cl.utfsm.acs.acg.core.ObjectState.create(), cl.utfsm.acs.acg.core.ObjectState.delete(), cl.utfsm.acs.acg.core.CategoryManager.getAllCategories(), cl.utfsm.acs.acg.core.ObjectState.update(), and cl.utfsm.acs.acg.core.CategoryManager.updateCategory().

void cl.utfsm.acs.acg.core.AlarmManager.updateFaultMember ( FaultFamily  ff,
FaultMember  fm,
FaultMember  fmi 
) throws NullPointerException, IllegalOperationException

Modifies a Fault Member of a given Fault Family.

Parameters:
ff The Fault Family to which belongs the Fault Member to be changed
fm The Fault Member to be changed
fmi The Fault Member with the new values
Exceptions:
NullPointerException If any (or both) of the given Fault Members (or their names) or the Fault Family (or its name) or both are null
IllegalOperationException If the Fault Family doesn't exists

References cl.utfsm.acs.acg.core.ObjectState.update().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties