cl::utfsm::acs::acg::core::SourceManager Class Reference

Inheritance diagram for cl::utfsm::acs::acg::core::SourceManager:
Inheritance graph
[legend]
Collaboration diagram for cl::utfsm::acs::acg::core::SourceManager:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

The SourceManager class is responsible of handling all the references

Author:
rtobar

Constructor & Destructor Documentation

cl::utfsm::acs::acg::core::SourceManager::SourceManager ( SourceDAO  sourceDAO  )  [inline, private]

References _sourceDAO, and _sources.

Referenced by getInstance().


Member Function Documentation

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

Parameters:
source The source to be added
Exceptions:
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

Parameters:
source The source to be deleted
Returns:
true if the source was deleted correctly, false otherwise
Exceptions:
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]
static SourceManager cl::utfsm::acs::acg::core::SourceManager::getInstance ( SourceDAO  sourceDAO  )  [inline, static]
Source cl::utfsm::acs::acg::core::SourceManager::getSource ( String  name  )  [inline]
void cl::utfsm::acs::acg::core::SourceManager::loadFromCDB (  )  [inline]
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().


Member Data Documentation

The singleton instance shared across the project

Referenced by destroy(), and getInstance().


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

Generated by  doxygen 1.6.2