

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 () |
Private Member Functions | |
| SourceManager (SourceDAO sourceDAO) | |
Private Attributes | |
| SourceDAO | _sourceDAO |
| Source[] | _sources |
Static Private Attributes | |
| static SourceManager | _instance |
The SourceManager class is responsible of handling all the references
| cl::utfsm::acs::acg::core::SourceManager::SourceManager | ( | SourceDAO | sourceDAO | ) | [inline, private] |
References _sourceDAO, and _sources.
Referenced by getInstance().
| void cl::utfsm::acs::acg::core::SourceManager::addSource | ( | Source | source | ) | throws IllegalOperationException [inline] |
This method allow to add a new source to the source List
| source | The source to be added |
| IllegalOperationException | If the source already exists |
References _sources.
Referenced by cl::utfsm::acs::acg::gui::SourcesView::createViewWidgets(), cl::utfsm::acs::acg::core::SourceManagerTest::testAddSource(), and cl::utfsm::acs::acg::core::SourceManagerTest::testDeleteSource().
| boolean cl::utfsm::acs::acg::core::SourceManager::deleteSource | ( | Source | source | ) | throws IllegalOperationException [inline] |
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 _sources, and cl::utfsm::acs::acg::core::AlarmManager::getAllAlarms().
Referenced by cl::utfsm::acs::acg::gui::SourcesView::createViewWidgets(), and cl::utfsm::acs::acg::core::SourceManagerTest::testDeleteSource().
| static void cl::utfsm::acs::acg::core::SourceManager::destroy | ( | ) | [inline, 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
References _instance.
| Source [] cl::utfsm::acs::acg::core::SourceManager::getAllSources | ( | ) | [inline] |
References _sources.
Referenced by cl::utfsm::acs::acg::gui::AlarmsView::fillFFWidgets(), cl::utfsm::acs::acg::gui::SourcesView::fillSource(), cl::utfsm::acs::acg::gui::SourcesView::refreshContents(), cl::utfsm::acs::acg::core::SourceManagerTest::testAddSource(), cl::utfsm::acs::acg::core::SourceManagerTest::testDeleteSource(), cl::utfsm::acs::acg::core::SourceManagerTest::testGetAllSources(), cl::utfsm::acs::acg::core::SourceManagerTest::testGetSource(), cl::utfsm::acs::acg::core::SourceManagerTest::testReloadFromCDB(), and cl::utfsm::acs::acg::gui::SourcesView::updateSource().
| static SourceManager cl::utfsm::acs::acg::core::SourceManager::getInstance | ( | SourceDAO | sourceDAO | ) | [inline, static] |
| Source cl::utfsm::acs::acg::core::SourceManager::getSource | ( | String | name | ) | [inline] |
References _sources.
Referenced by cl::utfsm::acs::acg::gui::SourcesView::createViewWidgets(), and cl::utfsm::acs::acg::core::SourceManagerTest::testGetSource().
| void cl::utfsm::acs::acg::core::SourceManager::loadFromCDB | ( | ) | [inline] |
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 _sourceDAO, _sources, and cern::laser::business::dao::SourceDAO::findAllSources().
Referenced by cl::utfsm::acs::acg::core::AlarmSystemManager::loadFromCDB(), cl::utfsm::acs::acg::core::SourceManagerTest::testDeleteSource(), cl::utfsm::acs::acg::core::SourceManagerTest::testGetAllSources(), cl::utfsm::acs::acg::core::SourceManagerTest::testGetSource(), and cl::utfsm::acs::acg::core::SourceManagerTest::testReloadFromCDB().
| void cl::utfsm::acs::acg::core::SourceManager::saveToCDB | ( | ) | [inline] |
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 _sourceDAO, _sources, and cern::laser::business::dao::SourceDAO::updateSource().
SourceManager cl::utfsm::acs::acg::core::SourceManager::_instance [static, private] |
The singleton instance shared across the project
Referenced by destroy(), and getInstance().
Referenced by loadFromCDB(), saveToCDB(), and SourceManager().
Source [] cl::utfsm::acs::acg::core::SourceManager::_sources [private] |
Referenced by addSource(), deleteSource(), getAllSources(), getSource(), loadFromCDB(), saveToCDB(), and SourceManager().
1.6.2