Class SolrFacetServiceImpl
java.lang.Object
org.springframework.extensions.surf.util.AbstractLifecycleBean
org.alfresco.repo.search.impl.solr.facet.SolrFacetServiceImpl
- All Implemented Interfaces:
EventListener,NodeServicePolicies.BeforeDeleteNodePolicy,NodeServicePolicies.OnCreateNodePolicy,ClassPolicy,Policy,SolrFacetService,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
public class SolrFacetServiceImpl
extends org.springframework.extensions.surf.util.AbstractLifecycleBean
implements SolrFacetService, NodeServicePolicies.OnCreateNodePolicy, NodeServicePolicies.BeforeDeleteNodePolicy
Solr Facet Service Implementation.
- Since:
- 5.0
- Author:
- Jamal Kaabi-Mofrad
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
Policy.ArgNested classes/interfaces inherited from interface org.alfresco.repo.search.impl.solr.facet.SolrFacetService
SolrFacetService.SyntheticPropertyDefinition -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe authority that needs to contain the users allowed to administer the faceted-search config.static final Stringprotected NodeServiceFields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
logFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy
QNAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeDeleteNode(NodeRef nodeRef) Called before a node is deleted.createFacetNode(SolrFacetProperties facetProperties) Creates a new facet.voiddeleteFacet(String filterID) Deletes the specified facet permanentlyGets the facet by filter Id.This method offers a convenient access point for getting all Facetable content properties defined in the repository.getFacetableProperties(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.This method gets all synthetic, facetable properties across all content models in the repository.getFacetableSyntheticProperties(QName contentClass) This method gets all synthetic, facetable properties defined on the specified content class (type or aspect) or any of its inherited properties.getFacetNodeRef(String filterID) Gets the facet'sNodeRefby filter Id.Gets the filter IDs in display order.Gets all the available facets.Gets theNodeRefof thesrft:facetsfolder, if it exists.booleanisSearchAdmin(String userName) Indicates whether the specified user is a search-administrator or not.protected voidonBootstrap(org.springframework.context.ApplicationEvent event) voidonCreateNode(ChildAssociationRef childAssocRef) Called when a new node has been created.protected voidonShutdown(org.springframework.context.ApplicationEvent event) voidreorderFacets(List<String> facetIds) Reorders existing facets to the provided order.voidsetAuthorityService(AuthorityService authorityService) voidsetBehaviourFilter(BehaviourFilter behaviourFilter) voidsetBootstrapView(Properties bootstrapView) voidsetDictionaryService(DictionaryService dictionaryService) voidsetFacetConfig(SolrFacetConfig facetConfig) voidsetFacetNodeRefCache(SimpleCache<String, NodeRef> facetNodeRefCache) voidsetFacetsRootChildName(String facetsRootChildName) voidsetFacetsRootXPath(String facetsRootXPath) voidsetImporterBootstrap(ImporterBootstrap importer) voidsetNamespaceService(NamespaceService namespaceService) voidsetNodeService(NodeService nodeService) voidsetPolicyComponent(PolicyComponent policyComponent) voidsetRepositoryHelper(Repository repository) voidsetRetryingTransactionHelper(RetryingTransactionHelper retryingTransactionHelper) voidsetSearchService(SearchService searchService) voidsetSingletonCache(SimpleCache<String, Object> singletonCache) voidupdateFacet(SolrFacetProperties facetProperties) Updates the existing facet.Methods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
getApplicationContext, onApplicationEvent, setApplicationContext
-
Field Details
-
ALFRESCO_SEARCH_ADMINISTRATORS_AUTHORITY
The authority that needs to contain the users allowed to administer the faceted-search config.- See Also:
-
GROUP_ALFRESCO_SEARCH_ADMINISTRATORS_AUTHORITY
- See Also:
-
nodeService
-
-
Constructor Details
-
SolrFacetServiceImpl
public SolrFacetServiceImpl()
-
-
Method Details
-
setAuthorityService
- Parameters:
authorityService- the authorityService to set
-
setDictionaryService
- Parameters:
dictionaryService- the dictionaryService to set
-
setNodeService
- Parameters:
nodeService- the nodeService to set
-
setNamespaceService
- Parameters:
namespaceService- the namespaceService to set
-
setSearchService
- Parameters:
searchService- the searchService to set
-
setRetryingTransactionHelper
- Parameters:
retryingTransactionHelper- the retryingTransactionHelper to set
-
setBehaviourFilter
- Parameters:
behaviourFilter- the behaviourFilter to set
-
setPolicyComponent
- Parameters:
policyComponent- the policyComponent to set
-
setRepositoryHelper
-
setFacetConfig
- Parameters:
facetConfig- the facetConfig to set
-
setFacetsRootXPath
- Parameters:
facetsRootXPath- the facetsRootXPath to set
-
setFacetsRootChildName
-
setImporterBootstrap
-
setBootstrapView
-
setSingletonCache
- Parameters:
singletonCache- the singletonCache to set
-
setFacetNodeRefCache
- Parameters:
facetNodeRefCache- the facetNodeRefCache to set
-
isSearchAdmin
Description copied from interface:SolrFacetServiceIndicates 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:
isSearchAdminin interfaceSolrFacetService- Parameters:
userName- The user name- Returns:
- true if the specified user is a search-administrator, false otherwise
-
getFacets
Description copied from interface:SolrFacetServiceGets all the available facets.- Specified by:
getFacetsin interfaceSolrFacetService- Returns:
- List of
SolrFacetPropertiesor an empty list if none exists
-
getFacetOrder
Gets the filter IDs in display order. Will not returnnull. -
getFacet
Description copied from interface:SolrFacetServiceGets the facet by filter Id.- Specified by:
getFacetin interfaceSolrFacetService- Parameters:
filterID- the filter Id- Returns:
SolrFacetPropertiesobject or null if there is no facet with the specified Id
-
getFacetNodeRef
Description copied from interface:SolrFacetServiceGets the facet'sNodeRefby filter Id.- Specified by:
getFacetNodeRefin interfaceSolrFacetService- Parameters:
filterID- the filter Id- Returns:
- facet's
NodeRefor null if there is no facet with the specified Id
-
createFacetNode
Description copied from interface:SolrFacetServiceCreates a new facet.- Specified by:
createFacetNodein interfaceSolrFacetService- Parameters:
facetProperties- the facet's properties- Returns:
- the created facet's
NodeRef
-
updateFacet
Description copied from interface:SolrFacetServiceUpdates the existing facet.- Specified by:
updateFacetin interfaceSolrFacetService- Parameters:
facetProperties- the facet's properties
-
deleteFacet
Description copied from interface:SolrFacetServiceDeletes the specified facet permanently- Specified by:
deleteFacetin interfaceSolrFacetService- Parameters:
filterID- the filter Id
-
getFacetsRoot
Gets theNodeRefof thesrft:facetsfolder, if it exists.- Returns:
- the
NodeRefif it exists, elsenull.
-
onBootstrap
protected void onBootstrap(org.springframework.context.ApplicationEvent event) - Specified by:
onBootstrapin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent event) - Specified by:
onShutdownin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
onCreateNode
Description copied from interface:NodeServicePolicies.OnCreateNodePolicyCalled when a new node has been created.- Specified by:
onCreateNodein interfaceNodeServicePolicies.OnCreateNodePolicy- Parameters:
childAssocRef- the created child association reference
-
beforeDeleteNode
Description copied from interface:NodeServicePolicies.BeforeDeleteNodePolicyCalled before a node is deleted.- Specified by:
beforeDeleteNodein interfaceNodeServicePolicies.BeforeDeleteNodePolicy- Parameters:
nodeRef- the node reference
-
reorderFacets
Description copied from interface:SolrFacetServiceReorders existing facets to the provided order.- Specified by:
reorderFacetsin interfaceSolrFacetService- Parameters:
facetIds- an ordered sequence of filter IDs.
-
getFacetableProperties
Description copied from interface:SolrFacetServiceThis method offers a convenient access point for getting all Facetable content properties defined in the repository.- Specified by:
getFacetablePropertiesin interfaceSolrFacetService- Returns:
- a collection of facetable
PropertyDefinitions. - See Also:
-
getFacetableProperties
Description copied from interface:SolrFacetServiceThis 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:
getFacetablePropertiesin interfaceSolrFacetService- Parameters:
contentClass- the QName of an aspect or type, whose facetable properties are sought.- Returns:
- a collection of facetable
PropertyDefinitions. - See Also:
-
getFacetableSyntheticProperties
Description copied from interface:SolrFacetServiceThis method gets all synthetic, facetable properties across all content models in the repository.- Specified by:
getFacetableSyntheticPropertiesin interfaceSolrFacetService
-
getFacetableSyntheticProperties
public List<SolrFacetService.SyntheticPropertyDefinition> getFacetableSyntheticProperties(QName contentClass) Description copied from interface:SolrFacetServiceThis method gets all synthetic, facetable properties defined on the specified content class (type or aspect) or any of its inherited properties.- Specified by:
getFacetableSyntheticPropertiesin interfaceSolrFacetService- Parameters:
contentClass- the QName of an aspect or type, whose synthetic, facetable properties are sought.
-