Class AbstractCategoryServiceImpl

    • Constructor Detail

      • AbstractCategoryServiceImpl

        public AbstractCategoryServiceImpl()
    • Method Detail

      • setNodeService

        public void setNodeService​(NodeService nodeService)
        Set the node service
        Parameters:
        nodeService - NodeService
      • setPublicNodeService

        public void setPublicNodeService​(NodeService publicNodeService)
        Set the public node service
        Parameters:
        publicNodeService - NodeService
      • setTenantService

        public void setTenantService​(TenantService tenantService)
        Set the tenant service
        Parameters:
        tenantService - TenantService
      • setNamespacePrefixResolver

        public void setNamespacePrefixResolver​(NamespacePrefixResolver namespacePrefixResolver)
        Set the service to map prefixes to uris
        Parameters:
        namespacePrefixResolver - NamespacePrefixResolver
      • setDictionaryService

        public void setDictionaryService​(DictionaryService dictionaryService)
        Set the dictionary service
        Parameters:
        dictionaryService - DictionaryService
      • setIndexerAndSearcher

        public void setIndexerAndSearcher​(IndexerAndSearcher indexerAndSearcher)
        Set the indexer and searcher
        Parameters:
        indexerAndSearcher - IndexerAndSearcher
      • setQueryFetchSize

        public void setQueryFetchSize​(int queryFetchSize)
      • getCategories

        public Collection<ChildAssociationRef> getCategories​(StoreRef storeRef,
                                                             QName aspectQName,
                                                             CategoryService.Depth depth)
        Description copied from interface: CategoryService
        Get a list of all the categories appropriate for a given property. The full list of categories that may be assigned for this aspect.
        Specified by:
        getCategories in interface CategoryService
        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
      • createClassification

        public NodeRef createClassification​(StoreRef storeRef,
                                            QName typeName,
                                            String attributeName)
        Description copied from interface: CategoryService
        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.
        Specified by:
        createClassification in interface CategoryService
        Parameters:
        storeRef - StoreRef
        typeName - QName
        attributeName - String
      • getRootCategories

        public org.alfresco.query.PagingResults<ChildAssociationRef> getRootCategories​(StoreRef storeRef,
                                                                                       QName aspectName,
                                                                                       org.alfresco.query.PagingRequest pagingRequest,
                                                                                       boolean sortByName)
        Description copied from interface: CategoryService
        Get a paged list of the root categories for an aspect/classification
        Specified by:
        getRootCategories in interface CategoryService
        Parameters:
        storeRef - StoreRef
        aspectName - QName
        pagingRequest - PagingRequest
        sortByName - boolean
      • getCategory

        public ChildAssociationRef getCategory​(NodeRef parent,
                                               QName aspectName,
                                               String name)
        Description copied from interface: CategoryService
        Looks up a category by name under its immediate parent. Index-independent so can be used for cluster-safe existence checks.
        Specified by:
        getCategory in interface CategoryService
        Parameters:
        parent - the parent
        aspectName - the aspect name
        name - the category name
        Returns:
        the category child association reference
      • getRootCategories

        public Collection<ChildAssociationRef> getRootCategories​(StoreRef storeRef,
                                                                 QName aspectName,
                                                                 String name,
                                                                 boolean create)
        Description copied from interface: CategoryService
        Gets root categories by name, optionally creating one if one does not exist. Index-independent so can be used for cluster-safe existence checks.
        Specified by:
        getRootCategories in interface CategoryService
        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