public class SolrFacetServiceImpl extends org.springframework.extensions.surf.util.AbstractLifecycleBean implements SolrFacetService, NodeServicePolicies.OnCreateNodePolicy, NodeServicePolicies.BeforeDeleteNodePolicy
SolrFacetService.SyntheticPropertyDefinition
Policy.Arg
Modifier and Type | Field and Description |
---|---|
static String |
ALFRESCO_SEARCH_ADMINISTRATORS_AUTHORITY
The authority that needs to contain the users allowed to administer the faceted-search config.
|
static String |
GROUP_ALFRESCO_SEARCH_ADMINISTRATORS_AUTHORITY |
protected org.alfresco.service.cmr.repository.NodeService |
nodeService |
QNAME
QNAME
Constructor and Description |
---|
SolrFacetServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Called before a node is deleted.
|
org.alfresco.service.cmr.repository.NodeRef |
createFacetNode(SolrFacetProperties facetProperties)
Creates a new facet.
|
void |
deleteFacet(String filterID)
Deletes the specified facet permanently
|
SolrFacetProperties |
getFacet(String filterID)
Gets the facet by filter Id.
|
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.
|
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.
|
List<SolrFacetService.SyntheticPropertyDefinition> |
getFacetableSyntheticProperties()
This method gets all synthetic, facetable properties across all content models in the repository.
|
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.NodeRef |
getFacetNodeRef(String filterID)
Gets the facet's
NodeRef by filter Id. |
List<String> |
getFacetOrder()
Gets the filter IDs in display order.
|
List<SolrFacetProperties> |
getFacets()
Gets all the available facets.
|
org.alfresco.service.cmr.repository.NodeRef |
getFacetsRoot()
Gets the
NodeRef of the srft:facets folder, if it exists. |
boolean |
isSearchAdmin(String userName)
Indicates whether the specified user is a search-administrator or not.
|
protected void |
onBootstrap(org.springframework.context.ApplicationEvent event) |
void |
onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
Called when a new node has been created.
|
protected void |
onShutdown(org.springframework.context.ApplicationEvent event) |
void |
reorderFacets(List<String> facetIds)
Reorders existing facets to the provided order.
|
void |
setAuthorityService(AuthorityService authorityService) |
void |
setBehaviourFilter(BehaviourFilter behaviourFilter) |
void |
setBootstrapView(Properties bootstrapView) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setFacetConfig(SolrFacetConfig facetConfig) |
void |
setFacetNodeRefCache(org.alfresco.repo.cache.SimpleCache<String,org.alfresco.service.cmr.repository.NodeRef> facetNodeRefCache) |
void |
setFacetsRootChildName(String facetsRootChildName) |
void |
setFacetsRootXPath(String facetsRootXPath) |
void |
setImporterBootstrap(ImporterBootstrap importer) |
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPolicyComponent(PolicyComponent policyComponent) |
void |
setRepositoryHelper(Repository repository) |
void |
setRetryingTransactionHelper(RetryingTransactionHelper retryingTransactionHelper) |
void |
setSearchService(org.alfresco.service.cmr.search.SearchService searchService) |
void |
setSingletonCache(org.alfresco.repo.cache.SimpleCache<String,Object> singletonCache) |
void |
updateFacet(SolrFacetProperties facetProperties)
Updates the existing facet.
|
public static final String ALFRESCO_SEARCH_ADMINISTRATORS_AUTHORITY
public static final String GROUP_ALFRESCO_SEARCH_ADMINISTRATORS_AUTHORITY
protected org.alfresco.service.cmr.repository.NodeService nodeService
public void setAuthorityService(AuthorityService authorityService)
authorityService
- the authorityService to setpublic void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService
- the dictionaryService to setpublic void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService
- the nodeService to setpublic void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
namespaceService
- the namespaceService to setpublic void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
searchService
- the searchService to setpublic void setRetryingTransactionHelper(RetryingTransactionHelper retryingTransactionHelper)
retryingTransactionHelper
- the retryingTransactionHelper to setpublic void setBehaviourFilter(BehaviourFilter behaviourFilter)
behaviourFilter
- the behaviourFilter to setpublic void setPolicyComponent(PolicyComponent policyComponent)
policyComponent
- the policyComponent to setpublic void setRepositoryHelper(Repository repository)
public void setFacetConfig(SolrFacetConfig facetConfig)
facetConfig
- the facetConfig to setpublic void setFacetsRootXPath(String facetsRootXPath)
facetsRootXPath
- the facetsRootXPath to setpublic void setFacetsRootChildName(String facetsRootChildName)
public void setImporterBootstrap(ImporterBootstrap importer)
public void setBootstrapView(Properties bootstrapView)
public void setSingletonCache(org.alfresco.repo.cache.SimpleCache<String,Object> singletonCache)
singletonCache
- the singletonCache to setpublic void setFacetNodeRefCache(org.alfresco.repo.cache.SimpleCache<String,org.alfresco.service.cmr.repository.NodeRef> facetNodeRefCache)
facetNodeRefCache
- the facetNodeRefCache to setpublic boolean isSearchAdmin(String userName)
SolrFacetService
Note: The super/repo admin is considered to be a search-administrator too.
isSearchAdmin
in interface SolrFacetService
userName
- The user namepublic List<SolrFacetProperties> getFacets()
SolrFacetService
getFacets
in interface SolrFacetService
SolrFacetProperties
or an empty list if none existspublic List<String> getFacetOrder()
null
.public SolrFacetProperties getFacet(String filterID)
SolrFacetService
getFacet
in interface SolrFacetService
filterID
- the filter IdSolrFacetProperties
object or null if there is no facet with the specified Idpublic org.alfresco.service.cmr.repository.NodeRef getFacetNodeRef(String filterID)
SolrFacetService
NodeRef
by filter Id.getFacetNodeRef
in interface SolrFacetService
filterID
- the filter IdNodeRef
or null if there is no facet with the specified Idpublic org.alfresco.service.cmr.repository.NodeRef createFacetNode(SolrFacetProperties facetProperties)
SolrFacetService
createFacetNode
in interface SolrFacetService
facetProperties
- the facet's propertiesNodeRef
public void updateFacet(SolrFacetProperties facetProperties)
SolrFacetService
updateFacet
in interface SolrFacetService
facetProperties
- the facet's propertiespublic void deleteFacet(String filterID)
SolrFacetService
deleteFacet
in interface SolrFacetService
filterID
- the filter Idpublic org.alfresco.service.cmr.repository.NodeRef getFacetsRoot()
NodeRef
of the srft:facets
folder, if it exists.NodeRef
if it exists, else null
.protected void onBootstrap(org.springframework.context.ApplicationEvent event)
onBootstrap
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
protected void onShutdown(org.springframework.context.ApplicationEvent event)
onShutdown
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
public void onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
NodeServicePolicies.OnCreateNodePolicy
onCreateNode
in interface NodeServicePolicies.OnCreateNodePolicy
childAssocRef
- the created child association referencepublic void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
NodeServicePolicies.BeforeDeleteNodePolicy
beforeDeleteNode
in interface NodeServicePolicies.BeforeDeleteNodePolicy
nodeRef
- the node referencepublic void reorderFacets(List<String> facetIds)
SolrFacetService
reorderFacets
in interface SolrFacetService
facetIds
- an ordered sequence of filter IDs.public List<org.alfresco.service.cmr.dictionary.PropertyDefinition> getFacetableProperties()
SolrFacetService
getFacetableProperties
in interface SolrFacetService
PropertyDefinition
s.Facetable
public List<org.alfresco.service.cmr.dictionary.PropertyDefinition> getFacetableProperties(org.alfresco.service.namespace.QName contentClass)
SolrFacetService
getFacetableProperties
in interface SolrFacetService
contentClass
- the QName of an aspect or type, whose facetable properties are sought.PropertyDefinition
s.Facetable
public List<SolrFacetService.SyntheticPropertyDefinition> getFacetableSyntheticProperties()
SolrFacetService
getFacetableSyntheticProperties
in interface SolrFacetService
public List<SolrFacetService.SyntheticPropertyDefinition> getFacetableSyntheticProperties(org.alfresco.service.namespace.QName contentClass)
SolrFacetService
getFacetableSyntheticProperties
in interface SolrFacetService
contentClass
- the QName of an aspect or type, whose synthetic, facetable properties are sought.Copyright © 2005–2017 Alfresco Software. All rights reserved.