Interface SolrFacetService

  • All Known Implementing Classes:
    SolrFacetServiceImpl

    public interface SolrFacetService
    Solr Facet service configuration API.
    Since:
    5.0
    Author:
    Jamal Kaabi-Mofrad, Neil Mc Erlean
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  SolrFacetService.SyntheticPropertyDefinition
      This class represents a special case of a property, examples being file size and MIME type, which are not modelled as Alfresco content model properties, but are instead stored as components within properties of type cm:content.
    • Method Detail

      • getFacets

        java.util.List<SolrFacetProperties> getFacets()
        Gets all the available facets.
        Returns:
        List of SolrFacetProperties or an empty list if none exists
      • getFacet

        SolrFacetProperties getFacet​(java.lang.String filterID)
        Gets the facet by filter Id.
        Parameters:
        filterID - the filter Id
        Returns:
        SolrFacetProperties object or null if there is no facet with the specified Id
      • getFacetNodeRef

        org.alfresco.service.cmr.repository.NodeRef getFacetNodeRef​(java.lang.String filterID)
        Gets the facet's NodeRef by filter Id.
        Parameters:
        filterID - the filter Id
        Returns:
        facet's NodeRef or null if there is no facet with the specified Id
      • isSearchAdmin

        boolean isSearchAdmin​(java.lang.String userName)
        Indicates whether the specified user is a search-administrator or not.

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

        Parameters:
        userName - The user name
        Returns:
        true if the specified user is a search-administrator, false otherwise
      • createFacetNode

        org.alfresco.service.cmr.repository.NodeRef createFacetNode​(SolrFacetProperties facetProperties)
        Creates a new facet.
        Parameters:
        facetProperties - the facet's properties
        Returns:
        the created facet's NodeRef
      • updateFacet

        void updateFacet​(SolrFacetProperties facetProperties)
        Updates the existing facet.
        Parameters:
        facetProperties - the facet's properties
      • deleteFacet

        void deleteFacet​(java.lang.String filterID)
        Deletes the specified facet permanently
        Parameters:
        filterID - the filter Id
      • reorderFacets

        void reorderFacets​(java.util.List<java.lang.String> filterIds)
        Reorders existing facets to the provided order.
        Parameters:
        filterIds - an ordered sequence of filter IDs.
        Throws:
        java.lang.NullPointerException - if filterIds is null.
        Exceptions.MissingFacetId - if the list is empty.
        Exceptions.DuplicateFacetId - if there is a duplicate filter ID in the list.
      • getFacetableProperties

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

        java.util.List<org.alfresco.service.cmr.dictionary.PropertyDefinition> getFacetableProperties​(org.alfresco.service.namespace.QName contentClass)
        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.
        Parameters:
        contentClass - the QName of an aspect or type, whose facetable properties are sought.
        Returns:
        a collection of facetable PropertyDefinitions.
        See Also:
        Facetable
      • getFacetableSyntheticProperties

        java.util.List<SolrFacetService.SyntheticPropertyDefinition> getFacetableSyntheticProperties()
        This method gets all synthetic, facetable properties across all content models in the repository.
      • getFacetableSyntheticProperties

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