Class SolrFacetServiceImpl

    • Field Detail

      • ALFRESCO_SEARCH_ADMINISTRATORS_AUTHORITY

        public static final 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 String GROUP_ALFRESCO_SEARCH_ADMINISTRATORS_AUTHORITY
        See Also:
        Constant Field Values
    • Constructor Detail

      • SolrFacetServiceImpl

        public SolrFacetServiceImpl()
    • Method Detail

      • setAuthorityService

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

        public void setDictionaryService​(DictionaryService dictionaryService)
        Parameters:
        dictionaryService - the dictionaryService to set
      • setNodeService

        public void setNodeService​(NodeService nodeService)
        Parameters:
        nodeService - the nodeService to set
      • setNamespaceService

        public void setNamespaceService​(NamespaceService namespaceService)
        Parameters:
        namespaceService - the namespaceService to set
      • setSearchService

        public void setSearchService​(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​(String facetsRootXPath)
        Parameters:
        facetsRootXPath - the facetsRootXPath to set
      • setFacetsRootChildName

        public void setFacetsRootChildName​(String facetsRootChildName)
      • setImporterBootstrap

        public void setImporterBootstrap​(ImporterBootstrap importer)
      • setBootstrapView

        public void setBootstrapView​(Properties bootstrapView)
      • setSingletonCache

        public void setSingletonCache​(SimpleCache<String,​Object> singletonCache)
        Parameters:
        singletonCache - the singletonCache to set
      • setFacetNodeRefCache

        public void setFacetNodeRefCache​(SimpleCache<String,​NodeRef> facetNodeRefCache)
        Parameters:
        facetNodeRefCache - the facetNodeRefCache to set
      • isSearchAdmin

        public boolean isSearchAdmin​(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 List<String> getFacetOrder()
        Gets the filter IDs in display order. Will not return null.
      • getFacet

        public SolrFacetProperties getFacet​(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 NodeRef getFacetNodeRef​(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
      • deleteFacet

        public void deleteFacet​(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 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​(List<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 List<PropertyDefinition> getFacetableProperties​(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