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