

Public Member Functions | |
| List< Category > | getAllCategories () |
| Category | getCategoryByPath (String path) |
| void | loadFromCDB () |
| boolean | deleteCategory (Category c) throws NullPointerException, IllegalOperationException |
| boolean | addCategory (Category c) throws IllegalOperationException, NullPointerException |
| void | updateCategory (Category c, Category ci) throws NullPointerException, IllegalOperationException |
| void | updateDefaultCategory (Category c) |
| void | saveToCDB () |
Static Public Member Functions | |
| static CategoryManager | getInstance (CategoryDAO categoryDAO) |
| static void | destroy () |
Private Member Functions | |
| CategoryManager (CategoryDAO categoryDAO) | |
Private Attributes | |
| CategoryDAO | _categoryDAO |
| List< Category > | _categoryList |
| HashMap< String, ObjectState > | _objState |
Static Private Attributes | |
| static CategoryManager | _instance |
Class used to manage all the information about categories that the ACG uses.
| cl::utfsm::acs::acg::core::CategoryManager::CategoryManager | ( | CategoryDAO | categoryDAO | ) | [inline, private] |
References _categoryDAO, _categoryList, and _objState.
Referenced by getInstance().
| boolean cl::utfsm::acs::acg::core::CategoryManager::addCategory | ( | Category | c | ) | throws IllegalOperationException, NullPointerException [inline] |
Add a new Category. If there is a Category with the same name that the given Category, the new Category cannot be added
| c | The Category to be added |
| IllegalOperationException | If the Category to add already exists | |
| NullPointerException | If the Category is null |
References _categoryList, _objState, cl::utfsm::acs::acg::core::ObjectState::create(), and cl::utfsm::acs::acg::core::ObjectState::update().
Referenced by cl::utfsm::acs::acg::gui::CategoriesView::createViewWidgets(), and cl::utfsm::acs::acg::core::CategoryManagerTest::testAddCategory().
| boolean cl::utfsm::acs::acg::core::CategoryManager::deleteCategory | ( | Category | c | ) | throws NullPointerException, IllegalOperationException [inline] |
Deletes a category. The category to be deleted is checked against the existing Fault Families in order to preserve the consistency of the application (i.e., a category cannot be deleted if it currently being used by a Fault Family).
| c | The category to be deleted |
| NullPointerException | If the given category is null | |
| IllegalOperationException | If the category is part of a existing Fault Family |
References _categoryList, _objState, cl::utfsm::acs::acg::core::ObjectState::delete(), and cl::utfsm::acs::acg::core::AlarmManager::getAllAlarms().
Referenced by cl::utfsm::acs::acg::gui::CategoriesView::createViewWidgets(), and cl::utfsm::acs::acg::core::CategoryManagerTest::testDeleteCategory().
| static void cl::utfsm::acs::acg::core::CategoryManager::destroy | ( | ) | [inline, static] |
Destroys the singleton instance of this class. This is needed to renew the internal reference to the CategoryDAO if a new connection to the DAL and the ACS Manager has been performed
References _instance.
| List<Category> cl::utfsm::acs::acg::core::CategoryManager::getAllCategories | ( | ) | [inline] |
References _categoryList.
Referenced by cl::utfsm::acs::acg::core::AlarmManager::deleteFaultFamily(), cl::utfsm::acs::acg::gui::AlarmsView::fillFFWidgets(), cl::utfsm::acs::acg::gui::CategoriesView::refreshContents(), cl::utfsm::acs::acg::core::CategoryManagerTest::testAddCategory(), cl::utfsm::acs::acg::core::CategoryManagerTest::testDeleteCategory(), cl::utfsm::acs::acg::core::CategoryManagerTest::testGetAllCategories(), cl::utfsm::acs::acg::core::CategoryManagerTest::testGetCategoryByPath(), cl::utfsm::acs::acg::core::CategoryManagerTest::testLoadFromCDB(), and cl::utfsm::acs::acg::core::AlarmManager::updateFaultFamily().
| Category cl::utfsm::acs::acg::core::CategoryManager::getCategoryByPath | ( | String | path | ) | [inline] |
References _categoryList.
Referenced by cl::utfsm::acs::acg::gui::AlarmsView::createFFWidgets(), cl::utfsm::acs::acg::gui::CategoriesView::createViewWidgets(), cl::utfsm::acs::acg::gui::CategoriesView::fillCategoryInfo(), saveToCDB(), cl::utfsm::acs::acg::core::CategoryManagerTest::testGetCategoryByPath(), and cl::utfsm::acs::acg::gui::CategoriesView::updateName().
| static CategoryManager cl::utfsm::acs::acg::core::CategoryManager::getInstance | ( | CategoryDAO | categoryDAO | ) | [inline, static] |
References _instance, and CategoryManager().
Referenced by cl::utfsm::acs::acg::core::AlarmManager::AlarmManager(), cl::utfsm::acs::acg::core::AlarmSystemManager::getCategoryManager(), cl::utfsm::acs::acg::gui::CategoriesView::refreshContents(), cl::utfsm::acs::acg::gui::AlarmsView::refreshContents(), and cl::utfsm::acs::acg::core::CategoryManagerTest::testGetInstance().
| void cl::utfsm::acs::acg::core::CategoryManager::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 _categoryDAO, _categoryList, and _objState.
Referenced by cl::utfsm::acs::acg::core::AlarmSystemManager::loadFromCDB(), cl::utfsm::acs::acg::core::CategoryManagerTest::setUp(), cl::utfsm::acs::acg::core::CategoryManagerTest::testGetAllCategories(), cl::utfsm::acs::acg::core::CategoryManagerTest::testGetCategoryByPath(), and cl::utfsm::acs::acg::core::CategoryManagerTest::testLoadFromCDB().
| void cl::utfsm::acs::acg::core::CategoryManager::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 _categoryDAO, _categoryList, _objState, cl::utfsm::acs::acg::core::ObjectState::getAction(), and getCategoryByPath().
Referenced by cl::utfsm::acs::acg::core::AlarmSystemManager::saveToCDB().
| void cl::utfsm::acs::acg::core::CategoryManager::updateCategory | ( | Category | c, | |
| Category | ci | |||
| ) | throws NullPointerException, IllegalOperationException [inline] |
References _categoryList, _objState, cl::utfsm::acs::acg::core::ObjectState::create(), cl::utfsm::acs::acg::core::ObjectState::delete(), and cl::utfsm::acs::acg::core::ObjectState::update().
Referenced by cl::utfsm::acs::acg::gui::CategoriesView::createViewWidgets(), cl::utfsm::acs::acg::core::AlarmManager::deleteFaultFamily(), cl::utfsm::acs::acg::core::AlarmManager::updateFaultFamily(), and cl::utfsm::acs::acg::gui::CategoriesView::updateName().
| void cl::utfsm::acs::acg::core::CategoryManager::updateDefaultCategory | ( | Category | c | ) | [inline] |
References _categoryList.
Referenced by cl::utfsm::acs::acg::gui::CategoriesView::createViewWidgets().
Referenced by CategoryManager(), loadFromCDB(), and saveToCDB().
List<Category> cl::utfsm::acs::acg::core::CategoryManager::_categoryList [private] |
CategoryManager cl::utfsm::acs::acg::core::CategoryManager::_instance [static, private] |
The singleton instance shared across the project
Referenced by destroy(), and getInstance().
HashMap<String, ObjectState> cl::utfsm::acs::acg::core::CategoryManager::_objState [private] |
Referenced by addCategory(), CategoryManager(), deleteCategory(), loadFromCDB(), saveToCDB(), and updateCategory().
1.6.2