Public Member Functions | |
void | loadFromCDB () |
Source[] | getAllSources () |
Source | getSource (String name) |
void | addSource (Source source) throws IllegalOperationException |
boolean | deleteSource (Source source) throws IllegalOperationException |
void | saveToCDB () |
Static Public Member Functions | |
static SourceManager | getInstance (SourceDAO sourceDAO) |
static void | destroy () |
The SourceManager class is responsible of handling all the references
void cl.utfsm.acs.acg.core.SourceManager.addSource | ( | Source | source | ) | throws IllegalOperationException |
This method allow to add a new source to the source List
source | The source to be added |
IllegalOperationException | If the source already exists |
boolean cl.utfsm.acs.acg.core.SourceManager.deleteSource | ( | Source | source | ) | throws IllegalOperationException |
This method allows to delete a Source
from the configuration of the Alarm System
source | The source to be deleted |
IllegalOperationException | when there are not sources to be deleted |
References cl.utfsm.acs.acg.core.AlarmManager.getAllAlarms().
static void cl.utfsm.acs.acg.core.SourceManager.destroy | ( | ) | [static] |
Destroys the singleton instance of this class. This is needed to renew the internal reference to the SourceDAO if a new connection to the DAL and the ACS Manager has been performed
Source [] cl.utfsm.acs.acg.core.SourceManager.getAllSources | ( | ) |
static SourceManager cl.utfsm.acs.acg.core.SourceManager.getInstance | ( | SourceDAO | sourceDAO | ) | [static] |
Source cl.utfsm.acs.acg.core.SourceManager.getSource | ( | String | name | ) |
void cl.utfsm.acs.acg.core.SourceManager.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.
References cern.laser.business.dao.SourceDAO.findAllSources().
Referenced by cl.utfsm.acs.acg.core.AlarmSystemManager.loadFromCDB().
void cl.utfsm.acs.acg.core.SourceManager.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 cern.laser.business.dao.SourceDAO.updateSource().