Public Member Functions | Package Attributes

cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl Class Reference

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

List of all members.

Public Member Functions

Category getDefaultCategory ()
 ACSCategoryDAOImpl (Logger log, com.cosylab.acs.laser.dao.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 ()
Categories getCategories ()
void flushCategories (Categories cats)
void addCategory (Categories cats, alma.acs.alarmsystem.generated.Category cat)
void updateCategory (Categories cats, alma.acs.alarmsystem.generated.Category cat)
void deleteCategory (Categories cats, alma.acs.alarmsystem.generated.Category cat)

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

Constructor & Destructor Documentation

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

Constructor

Parameters:
log The log (not null)

References cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.alarmDao, and cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.logger.


Member Function Documentation

void cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.addCategory ( Categories  cats,
alma.acs.alarmsystem.generated.Category  cat 
)
void cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.deleteCategory ( Categories  cats,
alma.acs.alarmsystem.generated.Category  cat 
)
Category [] cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.findAllCategories (  ) 
Category cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.findByCategoryTreeRoot (  ) 
Category cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.findCategory ( Integer  identifier  ) 
String [] cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.getAlarms ( Integer  categoryId  ) 
Integer [] cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.getAllCategoryIDs (  ) 
Category cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.getCategoryByPathInitialized ( String  path  ) 
Category cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.getDefaultCategory (  ) 
alma.acs.alarmsystem.generated.Category [] cl.utfsm.acs.acg.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 from com.cosylab.acs.laser.dao.ACSCategoryDAOImpl.

References cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.categories, cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.catPathToCategory, cl.utfsm.acs.acg.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(), cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.logger, cl.utfsm.acs.acg.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().

void cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.setCategoryTreeRoot ( String  categoryTreeRoot  ) 
void cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.setConfAccessor ( ConfigurationAccessor  conf  ) 
void cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.setSurveillanceCategoryPath ( String  surveillanceCategoryPath  ) 
void cl.utfsm.acs.acg.dao.ACSCategoryDAOImpl.updateCategory ( Categories  cats,
alma.acs.alarmsystem.generated.Category  cat 
)

Member Data Documentation


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