User's Manual

Chapter 11. Services Tutorials 125
An application may own more than one category root. Each association may be labeled with a unique
string, called a context.
Figure 11-3. Categorization contexts
In the above example, the application name is Content Section. It has two categorization schemes
identified by the contexts legal and marketing, respectively.
11.1.2. Classes
To use the categorization layer, you should become familiar with the following classes.
com.arsdigita.categorization.Category
http://rhea.redhat.com/documentation/api/ccm-core-
6.1.0/com/arsdigita/categorization/Category.html
A Category encapsulates a persistent category object. This object contains the name and de-
scription for the category, as well as information about whether the category is enabled. It also
provides an API for placing objects within this category, creating subcategories under the in-
stance category, and retrieving parent and child categories and objects.
This class has several notable methods that you should understand before beginning work with
categorization. The URLs have been line broken with a "\" for printing purposes:
addChild(ACSObject acsObject) is used to create subcategories under the instance Cat-
egory and to categorize objects within the instance Category.
http://rhea.redhat.com/documentation/api/ccm-core-
6.1.0/com/arsdigita/categorization/Category.html\
#addChild(com.arsdigita.kernel.ACSObject)
addRelatedCategory(Category category) is used to specify a related category, that is,
a category that is not necessarily a parent or a child, but is related in nature.
http://rhea.redhat.com/documentation/api/ccm-core-
6.1.0/com/arsdigita/categorization/Category.html\ #addRelatedCategory(Category)