Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.alfresco.service.cmr.search
Interface CategoryService

@org.alfresco.api.AlfrescoPublicApi
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
Author:
Andy Hind

Method Summary
createCategory(NodeRef parent, String name)
          Create a new category.
createClassification(StoreRef storeRef, QName aspectName, String attributeName)
          Create a new category.
createRootCategory(StoreRef storeRef, QName aspectName, 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
getCategories(StoreRef storeRef, QName aspectQName, org.alfresco.service.cmr.search.CategoryService.Depth depth)
          Get a list of all the categories appropriate for a given property.
getCategory(NodeRef parent, QName aspectName, String name)
          Looks up a category by name under its immediate parent.
getChildren(NodeRef categoryRef, org.alfresco.service.cmr.search.CategoryService.Mode mode, org.alfresco.service.cmr.search.CategoryService.Depth depth)
          Get the children of a given category node
getClassificationAspects()
          Get all the types that represent categories
getClassifications(StoreRef storeRef)
          Get all the classification entries
getRootCategories(StoreRef storeRef, QName aspectName)
          Get the root categories for an aspect/classification
getRootCategories(StoreRef storeRef, QName aspectName, PagingRequest pagingRequest, boolean sortByName)
          Get a paged list of the root categories for an aspect/classification
getRootCategories(StoreRef storeRef, QName aspectName, PagingRequest pagingRequest, boolean sortByName, String filter)
          Get a paged list of the root categories for an aspect/classification
getRootCategories(StoreRef storeRef, QName aspectName, String filter)
          Get the root categories for an aspect/classification with names that start with filter
getRootCategories(StoreRef storeRef, QName aspectName, String name, boolean create)
          Gets root categories by name, optionally creating one if one does not exist.
getTopCategories(StoreRef storeRef, QName aspectName, int count)
          Get the most polular categories
Method Detail
getChildren
@Auditable(parameters={
  "categoryRef",
  "mode",
  "depth"
})
Collection<ChildAssociationRefgetChildren(NodeRef categoryRef,
                                            org.alfresco.service.cmr.search.CategoryService.Mode mode,
                                            org.alfresco.service.cmr.search.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(parameters={
  "storeRef",
  "aspectQName",
  "depth"
})
Collection<ChildAssociationRefgetCategories(StoreRef storeRef,
                                              QName aspectQName,
                                              org.alfresco.service.cmr.search.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:
storeRef - StoreRef
aspectQName - QName
depth - - the enumeration depth for what level to recover
Returns:
a collection of all the nodes found identified by their ChildAssocRef's

getClassifications
@Auditable(parameters="storeRef")
Collection<ChildAssociationRefgetClassifications(StoreRef storeRef)
Get all the classification entries
Returns:
Collection

getRootCategories
@Auditable(parameters={
  "storeRef",
  "aspectName"
})
Collection<ChildAssociationRefgetRootCategories(StoreRef storeRef,
                                                  QName aspectName)
Get the root categories for an aspect/classification
Parameters:
storeRef - StoreRef
aspectName - QName
Returns:
Collection

getRootCategories
@Auditable(parameters={
  "storeRef",
  "aspectName",
  "pagingRequest",
  "sortByName"
})
PagingResults<ChildAssociationRefgetRootCategories(StoreRef storeRef,
                                                     QName aspectName,
                                                     PagingRequest pagingRequest,
                                                     boolean sortByName)
Get a paged list of the root categories for an aspect/classification
Parameters:
storeRef - StoreRef
aspectName - QName
pagingRequest - PagingRequest
sortByName - boolean
Returns:
PagingResults

getRootCategories
@Auditable(parameters={
  "storeRef",
  "aspectName",
  "pagingRequest",
  "sortByName",
  "filter"
})
PagingResults<ChildAssociationRefgetRootCategories(StoreRef storeRef,
                                                     QName aspectName,
                                                     PagingRequest pagingRequest,
                                                     boolean sortByName,
                                                     String filter)
Get a paged list of the root categories for an aspect/classification

getRootCategories
@Auditable(parameters={
  "storeRef",
  "aspectName"
})
Collection<ChildAssociationRefgetRootCategories(StoreRef storeRef,
                                                  QName aspectName,
                                                  String filter)
Get the root categories for an aspect/classification with names that start with filter
Parameters:
storeRef - StoreRef
aspectName - QName
filter - String
Returns:
Collection

getCategory
@Auditable(parameters={
  "storeRef",
  "aspectName",
  "name"
})
ChildAssociationRef getCategory(NodeRef parent,
                                QName aspectName,
                                String name)
Looks up a category by name under its immediate parent. Index-independent so can be used for cluster-safe existence checks.
Parameters:
parent - the parent
aspectName - the aspect name
name - the category name
Returns:
the category child association reference

getRootCategories
@Auditable(parameters={
  "storeRef",
  "aspectName",
  "name",
  "create"
})
Collection<ChildAssociationRefgetRootCategories(StoreRef storeRef,
                                                  QName aspectName,
                                                  String name,
                                                  boolean create)
Gets root categories by name, optionally creating one if one does not exist. Index-independent so can be used for cluster-safe existence checks.
Parameters:
storeRef - the store ref
aspectName - the aspect name
name - the aspect name
create - should a category node be created if one does not exist?
Returns:
the root categories

getClassificationAspects
@Auditable
Collection<QNamegetClassificationAspects()
Get all the types that represent categories
Returns:
Collection

createClassification
@Auditable(parameters={
  "storeRef",
  "aspectName",
  "attributeName"
})
NodeRef createClassification(StoreRef storeRef,
                             QName aspectName,
                             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:
storeRef - StoreRef
aspectName - QName
attributeName - String

createRootCategory
@Auditable(parameters={
  "storeRef",
  "aspectName",
  "name"
})
NodeRef createRootCategory(StoreRef storeRef,
                           QName aspectName,
                           String name)
Create a new root category in the given classification
Parameters:
storeRef - StoreRef
aspectName - QName
name - String
Returns:
NodeRef

createCategory
@Auditable(parameters={
  "parent",
  "name"
})
NodeRef createCategory(NodeRef parent,
                       String name)
Create a new category.
Parameters:
parent - NodeRef
name - String
Returns:
NodeRef

deleteClassification
@Auditable(parameters={
  "storeRef",
  "aspectName"
})
void deleteClassification(StoreRef storeRef,
                          QName aspectName)
Delete a classification
Parameters:
storeRef - StoreRef
aspectName - QName

deleteCategory
@Auditable(parameters="nodeRef")
void deleteCategory(NodeRef nodeRef)
Delete a category
Parameters:
nodeRef - NodeRef

getTopCategories
@Auditable(parameters={
  "storeRef",
  "aspectName",
  "count"
})
List<Pair<NodeRef,Integer>> getTopCategories(StoreRef storeRef,
                                             QName aspectName,
                                             int count)
Get the most polular categories
Parameters:
storeRef - StoreRef
aspectName - QName
count - int
Returns:
List

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2018 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.