Interface SolrFacetService
-
- All Known Implementing Classes:
SolrFacetServiceImpl
public interface SolrFacetServiceSolr 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 classSolrFacetService.SyntheticPropertyDefinitionThis 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 typecm:content.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.alfresco.service.cmr.repository.NodeRefcreateFacetNode(SolrFacetProperties facetProperties)Creates a new facet.voiddeleteFacet(java.lang.String filterID)Deletes the specified facet permanentlySolrFacetPropertiesgetFacet(java.lang.String filterID)Gets the facet by filter Id.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.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.java.util.List<SolrFacetService.SyntheticPropertyDefinition>getFacetableSyntheticProperties()This method gets all synthetic, facetable properties across all content models in the repository.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.org.alfresco.service.cmr.repository.NodeRefgetFacetNodeRef(java.lang.String filterID)Gets the facet'sNodeRefby filter Id.java.util.List<SolrFacetProperties>getFacets()Gets all the available facets.booleanisSearchAdmin(java.lang.String userName)Indicates whether the specified user is a search-administrator or not.voidreorderFacets(java.util.List<java.lang.String> filterIds)Reorders existing facets to the provided order.voidupdateFacet(SolrFacetProperties facetProperties)Updates the existing facet.
-
-
-
Method Detail
-
getFacets
java.util.List<SolrFacetProperties> getFacets()
Gets all the available facets.- Returns:
- List of
SolrFacetPropertiesor 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:
SolrFacetPropertiesobject 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'sNodeRefby filter Id.- Parameters:
filterID- the filter Id- Returns:
- facet's
NodeRefor 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 isnull.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.
-
-