Public Member Functions | Package Attributes

com.cosylab.acs.laser.dao.ACSCategoryDAOImpl Class Reference

Inheritance diagram for com.cosylab.acs.laser.dao.ACSCategoryDAOImpl:
cern.laser.business.dao.CategoryDAO cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl

List of all members.

Public Member Functions

Category getDefaultCategory ()
 ACSCategoryDAOImpl (Logger log, ACSAlarmDAOImpl alarmDAO)
Category findCategory (Integer identifier)
Category getCategory (Integer identifier)
Category findByCategoryTreeRoot ()
Category findBySurveillanceCategory ()
Category[] findAllCategories ()
Category findCategoryByPath (String path)
Category getCategoryByPathInitialized (String path)
Category getCategoryByPath (String path)
void saveCategory (Category category)
void updateCategory (Category category)
void deleteCategory (Category category)
String[] getAlarms (Integer categoryId)
Integer[] getChildren (Integer parentId)
alma.acs.alarmsystem.generated.Category[] loadCategories () throws Exception
void linkWithAlarms ()
void flushCategory ()
void setConfAccessor (ConfigurationAccessor conf)
void setCategoryTreeRoot (String categoryTreeRoot)
void setSurveillanceCategoryPath (String surveillanceCategoryPath)
Integer[] getAllCategoryIDs ()

Package Attributes

int nextCatID = 1
AlarmDAO alarmDao
ConfigurationAccessor conf
HashMap< String, CategorycatPathToCategory = new HashMap<String, Category>()
HashMap< Integer, Categorycategories = new HashMap<Integer, Category>()
String surveillanceCategoryPath
String categoryTreeRoot
Logger logger

Detailed Description

Read the categories from the CDB.

When the categories are available, the alarms are assigned to the categories (this complete the alarms initialization initiated by ACSAlarmDAOImpl)

See also:
ACSAlarmDAOImpl
Author:
acaproni

Constructor & Destructor Documentation

com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.ACSCategoryDAOImpl ( Logger  log,
ACSAlarmDAOImpl  alarmDAO 
)

Member Function Documentation

Category [] com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.findAllCategories (  ) 
Category com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.findCategory ( Integer  identifier  ) 
String [] com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.getAlarms ( Integer  categoryId  ) 
Integer [] com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.getAllCategoryIDs (  ) 
Category com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.getCategoryByPathInitialized ( String  path  ) 
Category com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.getDefaultCategory (  ) 
alma.acs.alarmsystem.generated.Category [] com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.loadCategories (  )  throws Exception

Load the categories from the CDB.

Loads all the category from the CDB and build an internal representation of category. The category is also added to all the alarms having the fault family specified in the XML.

All the categories derive from ROOT that is built here as default (in this way the user does ot need to add the ROOT entry in the CDB).

Returns:
list of Category entries read from CDB
Exceptions:
Exception In case of error reading the values from the CDB

Reimplemented in cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.

References com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.categories, com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.catPathToCategory, com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.conf, cern.laser.business.data.CategoryImpl.getCategoryId(), com.cosylab.acs.laser.dao.ConfigurationAccessor.getConfiguration(), cern.laser.business.data.CategoryImpl.getName(), cern.laser.business.data.Category.getPath(), cern.laser.business.data.CategoryImpl.getPath(), com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.logger, com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.nextCatID, cern.laser.business.data.CategoryImpl.setAlarmIds(), cern.laser.business.data.CategoryImpl.setCategoryId(), cern.laser.business.data.CategoryImpl.setChildrenIds(), cern.laser.business.data.CategoryImpl.setDescription(), cern.laser.business.data.CategoryImpl.setName(), cern.laser.business.data.CategoryImpl.setPath(), org.exolab.castor.xml.Unmarshaller.setValidation(), org.exolab.castor.xml.Unmarshaller.setWhitespacePreserve(), and org.exolab.castor.xml.Unmarshaller.unmarshal().

Referenced by com.cosylab.cdb.jdal.hibernate.plugin.HibernateWDALAlarmPluginImpl.importAlarms(), and com.cosylab.acs.laser.LaserComponent.initialize().

void com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.setCategoryTreeRoot ( String  categoryTreeRoot  ) 
void com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.setConfAccessor ( ConfigurationAccessor  conf  ) 
void com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.setSurveillanceCategoryPath ( String  surveillanceCategoryPath  ) 

Member Data Documentation


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