public class LuceneCategoryServiceImpl extends Object implements CategoryService
CategoryService.Depth, CategoryService.Mode| Modifier and Type | Field and Description |
|---|---|
protected DictionaryService |
dictionaryService |
protected IndexerAndSearcher |
indexerAndSearcher |
protected NamespacePrefixResolver |
namespacePrefixResolver |
protected NodeService |
nodeService |
protected NodeService |
publicNodeService |
protected int |
queryFetchSize |
protected TenantService |
tenantService |
| Constructor and Description |
|---|
LuceneCategoryServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
NodeRef |
createCategory(NodeRef parent,
String name)
Create a new category.
|
NodeRef |
createClassification(StoreRef storeRef,
QName typeName,
String attributeName)
Create a new category.
|
NodeRef |
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
|
Collection<ChildAssociationRef> |
getCategories(StoreRef storeRef,
QName aspectQName,
CategoryService.Depth depth)
Get a list of all the categories appropriate for a given property.
|
ChildAssociationRef |
getCategory(NodeRef parent,
QName aspectName,
String name)
Looks up a category by name under its immediate parent.
|
Collection<ChildAssociationRef> |
getChildren(NodeRef categoryRef,
CategoryService.Mode mode,
CategoryService.Depth depth)
Get the children of a given category node
|
Collection<ChildAssociationRef> |
getChildren(NodeRef categoryRef,
CategoryService.Mode mode,
CategoryService.Depth depth,
String filter) |
Collection<QName> |
getClassificationAspects()
Get all the types that represent categories
|
Collection<ChildAssociationRef> |
getClassifications(StoreRef storeRef)
Get all the classification entries
|
Collection<ChildAssociationRef> |
getRootCategories(StoreRef storeRef,
QName aspectName)
Get the root categories for an aspect/classification
|
PagingResults<ChildAssociationRef> |
getRootCategories(StoreRef storeRef,
QName aspectName,
PagingRequest pagingRequest,
boolean sortByName)
Get a paged list of the root categories for an aspect/classification
|
PagingResults<ChildAssociationRef> |
getRootCategories(StoreRef storeRef,
QName aspectName,
PagingRequest pagingRequest,
boolean sortByName,
String filter)
Get a paged list of the root categories for an aspect/classification
|
Collection<ChildAssociationRef> |
getRootCategories(StoreRef storeRef,
QName aspectName,
String filter)
Get the root categories for an aspect/classification with names that start with filter
|
Collection<ChildAssociationRef> |
getRootCategories(StoreRef storeRef,
QName aspectName,
String name,
boolean create)
Gets root categories by name, optionally creating one if one does not exist.
|
List<Pair<NodeRef,Integer>> |
getTopCategories(StoreRef storeRef,
QName aspectName,
int count)
Get the most polular categories
|
void |
setDictionaryService(DictionaryService dictionaryService)
Set the dictionary service
|
void |
setIndexerAndSearcher(IndexerAndSearcher indexerAndSearcher)
Set the indexer and searcher
|
void |
setNamespacePrefixResolver(NamespacePrefixResolver namespacePrefixResolver)
Set the service to map prefixes to uris
|
void |
setNodeService(NodeService nodeService)
Set the node service
|
void |
setPublicNodeService(NodeService publicNodeService)
Set the public node service
|
void |
setQueryFetchSize(int queryFetchSize) |
void |
setTenantService(TenantService tenantService)
Set the tenant service
|
protected NodeService nodeService
protected NodeService publicNodeService
protected TenantService tenantService
protected NamespacePrefixResolver namespacePrefixResolver
protected DictionaryService dictionaryService
protected IndexerAndSearcher indexerAndSearcher
protected int queryFetchSize
public void setNodeService(NodeService nodeService)
nodeService - NodeServicepublic void setPublicNodeService(NodeService publicNodeService)
publicNodeService - NodeServicepublic void setTenantService(TenantService tenantService)
tenantService - TenantServicepublic void setNamespacePrefixResolver(NamespacePrefixResolver namespacePrefixResolver)
namespacePrefixResolver - NamespacePrefixResolverpublic void setDictionaryService(DictionaryService dictionaryService)
dictionaryService - DictionaryServicepublic void setIndexerAndSearcher(IndexerAndSearcher indexerAndSearcher)
indexerAndSearcher - IndexerAndSearcherpublic void setQueryFetchSize(int queryFetchSize)
public Collection<ChildAssociationRef> getChildren(NodeRef categoryRef, CategoryService.Mode mode, CategoryService.Depth depth)
CategoryServicegetChildren in interface CategoryServicecategoryRef - - the category nodemode - - the enumeration mode for what to recoverdepth - - the enumeration depth for what level to recoverpublic Collection<ChildAssociationRef> getChildren(NodeRef categoryRef, CategoryService.Mode mode, CategoryService.Depth depth, String filter)
public Collection<ChildAssociationRef> getCategories(StoreRef storeRef, QName aspectQName, CategoryService.Depth depth)
CategoryServicegetCategories in interface CategoryServicestoreRef - StoreRefaspectQName - QNamedepth - - the enumeration depth for what level to recoverpublic Collection<ChildAssociationRef> getClassifications(StoreRef storeRef)
CategoryServicegetClassifications in interface CategoryServicepublic Collection<QName> getClassificationAspects()
CategoryServicegetClassificationAspects in interface CategoryServicepublic NodeRef createClassification(StoreRef storeRef, QName typeName, String attributeName)
CategoryServicecreateClassification in interface CategoryServicestoreRef - StoreReftypeName - QNameattributeName - Stringpublic PagingResults<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName, PagingRequest pagingRequest, boolean sortByName)
CategoryServicegetRootCategories in interface CategoryServicestoreRef - StoreRefaspectName - QNamepagingRequest - PagingRequestsortByName - booleanpublic PagingResults<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName, PagingRequest pagingRequest, boolean sortByName, String filter)
CategoryServicegetRootCategories in interface CategoryServicepublic Collection<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName)
CategoryServicegetRootCategories in interface CategoryServicestoreRef - StoreRefaspectName - QNamepublic Collection<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName, String filter)
CategoryServicegetRootCategories in interface CategoryServicestoreRef - StoreRefaspectName - QNamefilter - Stringpublic ChildAssociationRef getCategory(NodeRef parent, QName aspectName, String name)
CategoryServicegetCategory in interface CategoryServiceparent - the parentaspectName - the aspect namename - the category namepublic Collection<ChildAssociationRef> getRootCategories(StoreRef storeRef, QName aspectName, String name, boolean create)
CategoryServicegetRootCategories in interface CategoryServicestoreRef - the store refaspectName - the aspect namename - the aspect namecreate - should a category node be created if one does not exist?public NodeRef createCategory(NodeRef parent, String name)
CategoryServicecreateCategory in interface CategoryServiceparent - NodeRefname - Stringpublic NodeRef createRootCategory(StoreRef storeRef, QName aspectName, String name)
CategoryServicecreateRootCategory in interface CategoryServicestoreRef - StoreRefaspectName - QNamename - Stringpublic void deleteCategory(NodeRef nodeRef)
CategoryServicedeleteCategory in interface CategoryServicenodeRef - NodeRefpublic void deleteClassification(StoreRef storeRef, QName aspectName)
CategoryServicedeleteClassification in interface CategoryServicestoreRef - StoreRefaspectName - QNamepublic List<Pair<NodeRef,Integer>> getTopCategories(StoreRef storeRef, QName aspectName, int count)
CategoryServicegetTopCategories in interface CategoryServicestoreRef - StoreRefaspectName - QNamecount - intCopyright © 2005–2021 Alfresco Software. All rights reserved.