org.alfresco.service.cmr.search
Interface CategoryService

All Known Implementing Classes:
LuceneCategoryServiceImpl

@PublicService
public interface CategoryService

Category Service The service for querying and creating categories. All other management can be carried out using the node service. Classification - the groupings of categories. There is a one-to-one mapping with aspects. For example, Region. Root Category - the top level categories in a classification. For example, Northern Europe Category - any other category below a root category


Nested Class Summary
static class CategoryService.Depth
          Depth from which to get nodes.
static class CategoryService.Mode
          Enumeration for navigation control.
 
Method Summary
 NodeRef createCategory(NodeRef parent, java.lang.String name)
          Create a new category.
 NodeRef createClassification(StoreRef storeRef, QName aspectName, java.lang.String attributeName)
          Create a new category.
 NodeRef createRootCategory(StoreRef storeRef, QName aspectName, java.lang.String name)
          Create a new root category in the given classification
 void deleteCategory(NodeRef nodeRef)
          Delete a category
 void deleteClassification(StoreRef storeRef, QName aspectName)
          Delete a classification
 java.util.Collection getCategories(StoreRef storeRef, QName aspectQName, CategoryService.Depth depth)
          Get a list of all the categories appropriate for a given property.
 java.util.Collection getChildren(NodeRef categoryRef, CategoryService.Mode mode, CategoryService.Depth depth)
          Get the children of a given category node
 java.util.Collection getClassificationAspects()
          Get all the types that represent categories
 java.util.Collection getClassifications(StoreRef storeRef)
          Get all the classification entries
 java.util.Collection getRootCategories(StoreRef storeRef, QName aspectName)
          Get the root categories for an aspect/classification
 java.util.List getTopCategories(StoreRef storeRef, QName aspectName, int count)
          Get the most polular categories
 

Method Detail

getChildren

@Auditable(key=ARG_0,
           parameters={"categoryRef", "mode", "depth"})
java.util.Collection getChildren(NodeRef categoryRef,
                                                             CategoryService.Mode mode,
                                                             CategoryService.Depth depth)
Get the children of a given category node

Parameters:
categoryRef - - the category node
mode - - the enumeration mode for what to recover
depth - - the enumeration depth for what level to recover
Returns:
a collection of all the nodes found identified by their ChildAssocRef's

getCategories

@Auditable(key=ARG_0,
           parameters={"storeRef", "aspectQName", "depth"})
java.util.Collection getCategories(StoreRef storeRef,
                                                               QName aspectQName,
                                                               CategoryService.Depth depth)
Get a list of all the categories appropriate for a given property. The full list of categories that may be assigned for this aspect.

Parameters:
aspectQName -
depth - - the enumeration depth for what level to recover
Returns:
a collection of all the nodes found identified by their ChildAssocRef's

getClassifications

@Auditable(key=ARG_0,
           parameters="storeRef")
java.util.Collection getClassifications(StoreRef storeRef)
Get all the classification entries

Returns:

getRootCategories

@Auditable(key=ARG_0,
           parameters={"storeRef", "aspectName"})
java.util.Collection getRootCategories(StoreRef storeRef,
                                                                   QName aspectName)
Get the root categories for an aspect/classification

Parameters:
storeRef -
aspectName -
Returns:

getClassificationAspects

@Auditable
java.util.Collection getClassificationAspects()
Get all the types that represent categories

Returns:

createClassification

@Auditable(key=ARG_0,
           parameters={"storeRef", "aspectName", "attributeName"})
NodeRef createClassification(StoreRef storeRef,
                                                         QName aspectName,
                                                         java.lang.String attributeName)
Create a new category. This will extend the category types in the data dictionary All it needs is the type name and the attribute in which to store noderefs to categories.

Parameters:
aspectName -
attributeName -

createRootCategory

@Auditable(key=ARG_0,
           parameters={"storeRef", "aspectName", "name"})
NodeRef createRootCategory(StoreRef storeRef,
                                                       QName aspectName,
                                                       java.lang.String name)
Create a new root category in the given classification

Parameters:
storeRef -
aspectName -
name -
Returns:

createCategory

@Auditable(key=ARG_0,
           parameters={"parent", "name"})
NodeRef createCategory(NodeRef parent,
                                                   java.lang.String name)
Create a new category.

Parameters:
parent -
name -
Returns:

deleteClassification

@Auditable(key=ARG_0,
           parameters={"storeRef", "aspectName"})
void deleteClassification(StoreRef storeRef,
                                                      QName aspectName)
Delete a classification

Parameters:
storeRef -
aspectName -

deleteCategory

@Auditable(key=ARG_0,
           parameters="nodeRef")
void deleteCategory(NodeRef nodeRef)
Delete a category

Parameters:
nodeRef -

getTopCategories

java.util.List getTopCategories(StoreRef storeRef,
                                QName aspectName,
                                int count)
Get the most polular categories

Parameters:
storeRef -
aspectName -
count -
Returns:


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.