Class SolrFacetServiceImpl

    • Field Detail

      • ALFRESCO_SEARCH_ADMINISTRATORS_AUTHORITY

        public static final java.lang.String ALFRESCO_SEARCH_ADMINISTRATORS_AUTHORITY
        The authority that needs to contain the users allowed to administer the faceted-search config.
        See Also:
        Constant Field Values
      • GROUP_ALFRESCO_SEARCH_ADMINISTRATORS_AUTHORITY

        public static final java.lang.String GROUP_ALFRESCO_SEARCH_ADMINISTRATORS_AUTHORITY
        See Also:
        Constant Field Values
      • nodeService

        protected org.alfresco.service.cmr.repository.NodeService nodeService
    • Constructor Detail

      • SolrFacetServiceImpl

        public SolrFacetServiceImpl()
    • Method Detail

      • setAuthorityService

        public void setAuthorityService​(AuthorityService authorityService)
        Parameters:
        authorityService - the authorityService to set
      • setDictionaryService

        public void setDictionaryService​(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
        Parameters:
        dictionaryService - the dictionaryService to set
      • setNodeService

        public void setNodeService​(org.alfresco.service.cmr.repository.NodeService nodeService)
        Parameters:
        nodeService - the nodeService to set
      • setNamespaceService

        public void setNamespaceService​(org.alfresco.service.namespace.NamespaceService namespaceService)
        Parameters:
        namespaceService - the namespaceService to set
      • setSearchService

        public void setSearchService​(org.alfresco.service.cmr.search.SearchService searchService)
        Parameters:
        searchService - the searchService to set
      • setRetryingTransactionHelper

        public void setRetryingTransactionHelper​(RetryingTransactionHelper retryingTransactionHelper)
        Parameters:
        retryingTransactionHelper - the retryingTransactionHelper to set
      • setBehaviourFilter

        public void setBehaviourFilter​(BehaviourFilter behaviourFilter)
        Parameters:
        behaviourFilter - the behaviourFilter to set
      • setPolicyComponent

        public void setPolicyComponent​(PolicyComponent policyComponent)
        Parameters:
        policyComponent - the policyComponent to set
      • setRepositoryHelper

        public void setRepositoryHelper​(Repository repository)
      • setFacetConfig

        public void setFacetConfig​(SolrFacetConfig facetConfig)
        Parameters:
        facetConfig - the facetConfig to set
      • setFacetsRootXPath

        public void setFacetsRootXPath​(java.lang.String facetsRootXPath)
        Parameters:
        facetsRootXPath - the facetsRootXPath to set
      • setFacetsRootChildName

        public void setFacetsRootChildName​(java.lang.String facetsRootChildName)
      • setImporterBootstrap

        public void setImporterBootstrap​(ImporterBootstrap importer)
      • setBootstrapView

        public void setBootstrapView​(java.util.Properties bootstrapView)
      • setSingletonCache

        public void setSingletonCache​(org.alfresco.repo.cache.SimpleCache<java.lang.String,​java.lang.Object> singletonCache)
        Parameters:
        singletonCache - the singletonCache to set
      • setFacetNodeRefCache

        public void setFacetNodeRefCache​(org.alfresco.repo.cache.SimpleCache<java.lang.String,​org.alfresco.service.cmr.repository.NodeRef> facetNodeRefCache)
        Parameters:
        facetNodeRefCache - the facetNodeRefCache to set
      • isSearchAdmin

        public boolean isSearchAdmin​(java.lang.String userName)
        Description copied from interface: SolrFacetService
        Indicates whether the specified user is a search-administrator or not.

        Note: The super/repo admin is considered to be a search-administrator too.

        Specified by:
        isSearchAdmin in interface SolrFacetService
        Parameters:
        userName - The user name
        Returns:
        true if the specified user is a search-administrator, false otherwise
      • getFacetOrder

        public java.util.List<java.lang.String> getFacetOrder()
        Gets the filter IDs in display order. Will not return null.
      • getFacet

        public SolrFacetProperties getFacet​(java.lang.String filterID)
        Description copied from interface: SolrFacetService
        Gets the facet by filter Id.
        Specified by:
        getFacet in interface SolrFacetService
        Parameters:
        filterID - the filter Id
        Returns:
        SolrFacetProperties object or null if there is no facet with the specified Id
      • getFacetNodeRef

        public org.alfresco.service.cmr.repository.NodeRef getFacetNodeRef​(java.lang.String filterID)
        Description copied from interface: SolrFacetService
        Gets the facet's NodeRef by filter Id.
        Specified by:
        getFacetNodeRef in interface SolrFacetService
        Parameters:
        filterID - the filter Id
        Returns:
        facet's NodeRef or null if there is no facet with the specified Id
      • createFacetNode

        public org.alfresco.service.cmr.repository.NodeRef createFacetNode​(SolrFacetProperties facetProperties)
        Description copied from interface: SolrFacetService
        Creates a new facet.
        Specified by:
        createFacetNode in interface SolrFacetService
        Parameters:
        facetProperties - the facet's properties
        Returns:
        the created facet's NodeRef
      • deleteFacet

        public void deleteFacet​(java.lang.String filterID)
        Description copied from interface: SolrFacetService
        Deletes the specified facet permanently
        Specified by:
        deleteFacet in interface SolrFacetService
        Parameters:
        filterID - the filter Id
      • getFacetsRoot

        public org.alfresco.service.cmr.repository.NodeRef getFacetsRoot()
        Gets the NodeRef of the srft:facets folder, if it exists.
        Returns:
        the NodeRef if it exists, else null.
      • onBootstrap

        protected void onBootstrap​(org.springframework.context.ApplicationEvent event)
        Specified by:
        onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBean
      • onShutdown

        protected void onShutdown​(org.springframework.context.ApplicationEvent event)
        Specified by:
        onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBean
      • reorderFacets

        public void reorderFacets​(java.util.List<java.lang.String> facetIds)
        Description copied from interface: SolrFacetService
        Reorders existing facets to the provided order.
        Specified by:
        reorderFacets in interface SolrFacetService
        Parameters:
        facetIds - an ordered sequence of filter IDs.
      • getFacetableProperties

        public java.util.List<org.alfresco.service.cmr.dictionary.PropertyDefinition> getFacetableProperties()
        Description copied from interface: SolrFacetService
        This method offers a convenient access point for getting all Facetable content properties defined in the repository.
        Specified by:
        getFacetableProperties in interface SolrFacetService
        Returns:
        a collection of facetable PropertyDefinitions.
        See Also:
        Facetable
      • getFacetableProperties

        public java.util.List<org.alfresco.service.cmr.dictionary.PropertyDefinition> getFacetableProperties​(org.alfresco.service.namespace.QName contentClass)
        Description copied from interface: SolrFacetService
        This method offers a convenient access point for getting all Facetable content properties defined on the specified content class (type or aspect) or any of its inherited properties.
        Specified by:
        getFacetableProperties in interface SolrFacetService
        Parameters:
        contentClass - the QName of an aspect or type, whose facetable properties are sought.
        Returns:
        a collection of facetable PropertyDefinitions.
        See Also:
        Facetable
      • getFacetableSyntheticProperties

        public java.util.List<SolrFacetService.SyntheticPropertyDefinition> getFacetableSyntheticProperties​(org.alfresco.service.namespace.QName contentClass)
        Description copied from interface: SolrFacetService
        This method gets all synthetic, facetable properties defined on the specified content class (type or aspect) or any of its inherited properties.
        Specified by:
        getFacetableSyntheticProperties in interface SolrFacetService
        Parameters:
        contentClass - the QName of an aspect or type, whose synthetic, facetable properties are sought.