|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.validation.model.CategoryManager
public class CategoryManager
Central point by which clients discover the available
categories
and constraints
in the system. The CategoryManager
is responsible for
loading and maintaining all Category
instances.
This class is intended to be used by clients of the validation framework.
Method Summary | |
---|---|
Category |
findCategory(Category parent,
String path)
Finds the category that has the specified path relative
to the specified parent category. |
Category |
findCategory(String path)
Finds the category that has the specified absolute path . |
Category |
getCategory(Category parent,
String path)
Obtains the category that has the specified path relative
to the specified parent category. |
Category |
getCategory(String path)
Obtains the category that has the specified absolute path . |
Category |
getDefaultCategory()
Retrieves the default category which contains all constraints that are not explicitly categorized. |
static CategoryManager |
getInstance()
Obtains the singleton instance of this class. |
Collection<Category> |
getMandatoryCategories()
Obtains all of the mandatory categories. |
SortedSet<Category> |
getTopLevelCategories()
The top-level categories. |
void |
removeCategory(Category category)
Removes the specified category from the category manager. |
void |
removeCategory(String path)
Removes the specified category from the category manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CategoryManager getInstance()
public SortedSet<Category> getTopLevelCategories()
Category
s, sorted by their
namespublic Category getDefaultCategory()
public Category getCategory(String path)
path
.
If this category does not yet exist, it is implicitly created.
path
- the absolute path of the category
null
)public Category getCategory(Category parent, String path)
path
relative
to the specified parent
category. If this category does
not yet exist, it is implicitly created.
parent
- the parent category, or null
to indicate that
the path is absolutepath
- the path relative to the parent
, or the absolute
path if parent == null
null
)public Category findCategory(String path)
path
.
Unlike the getCategory(String)
method, this method will not
implictly create the sought-after category.
path
- the absolute path of the category
null
if it is not foundpublic Category findCategory(Category parent, String path)
path
relative
to the specified parent
category. Unlike the
getCategory(Category, String)
method, this method will not
implictly create the sought-after category.
parent
- the parent category, or null
to indicate that
the path is absolutepath
- the path relative to the parent
, or the absolute
path if parent == null
null
if it is not foundpublic void removeCategory(Category category)
category
from the category manager.
Use extreme caution when invoking this method. This method recursively removes all descendent categories and their constraint from the category manager. The constraints will still operate as they did previously, but the user will not see them in the UI or be able to control their enablement. In general, you should only remove categories that you have added and whose constraints you control.
category
- the category to removeremoveCategory(String)
public void removeCategory(String path)
Use extreme caution when invoking this method. This method recursively removes all descendent categories and their constraint from the category manager. The constraints will still operate as they did previously, but the user will not see them in the UI or be able to control their enablement. In general, you should only remove categories that you have added and whose constraints you control.
path
- the ID path
of the category to
removeremoveCategory(Category)
public Collection<Category> getMandatoryCategories()
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |