Public Member Functions | Static Public Member Functions

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

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

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 ()

Detailed Description

The SourceManager class is responsible of handling all the references

Author:
rtobar

Member Function Documentation

void cl.utfsm.acs.acg.core.SourceManager.addSource ( Source  source  )  throws IllegalOperationException

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
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

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 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 (  ) 
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().


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