|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.fh_mannheim.mm.dms.framework.CategoryManager
This class organizes all categories.
| Constructor Summary | |
CategoryManager(Config cfg)
Constructor. |
|
| Method Summary | |
boolean |
addCategory(Category cat)
Add a new category. |
boolean |
deleteCategory(int nID)
Delete category. |
boolean |
existsCategory(int nCategoryID)
Check if category exists. |
boolean |
existsCategory(java.lang.String strCategory)
Check if category exists. |
boolean |
exportCategories(java.lang.String strFilename)
Export categories to xml file. |
CategoryList |
getAllCategories()
Get all names of categories. |
Category |
getCategory(int nCategoryID)
Get a category by id. |
Category |
getCategory(java.lang.String strCategory)
Get a category by name. |
int |
getCategoryNum()
Count all categories. |
int |
importCategories(java.lang.String strFilename)
Import categories from xml file.. |
org.w3c.dom.Document |
produceReport()
Generate xml document. |
org.w3c.dom.Element |
toElement(org.w3c.dom.Document doc)
Write information of categories in a xml element. |
org.w3c.dom.Element |
toElement(org.w3c.dom.Element element,
org.w3c.dom.Document doc)
Write information of categories in a xml element. |
boolean |
updateCategory(Category editedCategory)
Update an existing category. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.fh_mannheim.mm.dms.framework.IElement |
toString |
| Constructor Detail |
public CategoryManager(Config cfg)
cfg - Config| Method Detail |
public boolean addCategory(Category cat)
throws DuplicateCategoryException
cat - Category
DuplicateCategoryException - if category already existspublic boolean deleteCategory(int nID)
nID - ID of category
public boolean existsCategory(int nCategoryID)
nCategoryID - ID of category
public boolean existsCategory(java.lang.String strCategory)
strCategory - Name of category
public boolean exportCategories(java.lang.String strFilename)
throws java.io.IOException
strFilename - Filename of xml file
java.io.IOException - When file could not be savedpublic CategoryList getAllCategories()
public Category getCategory(int nCategoryID)
nCategoryID - ID of categorypublic Category getCategory(java.lang.String strCategory)
strCategory - Name of categorypublic int getCategoryNum()
public int importCategories(java.lang.String strFilename)
strFilename - Filename of xmlfile
public org.w3c.dom.Document produceReport()
produceReport in interface IProducerpublic org.w3c.dom.Element toElement(org.w3c.dom.Document doc)
toElement in interface IElementdoc - XML Document
public org.w3c.dom.Element toElement(org.w3c.dom.Element element,
org.w3c.dom.Document doc)
toElement in interface IElementelement - Root elementdoc - XML Document
public boolean updateCategory(Category editedCategory)
editedCategory - Category, which should be edited
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||