Package org.alfresco.repo.solr
Class SOLRTrackingComponentImpl
- java.lang.Object
-
- org.alfresco.repo.solr.SOLRTrackingComponentImpl
-
- All Implemented Interfaces:
SOLRTrackingComponent
public class SOLRTrackingComponentImpl extends java.lang.Object implements SOLRTrackingComponent
Component providing data for SOLR tracking- Since:
- 4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classSOLRTrackingComponentImpl.NodeMetaDataQueryRowHandlerClass that passes results from a result entity into the client callbackprotected classSOLRTrackingComponentImpl.NodeQueryRowHandlerClass that passes results from a result entity into the client callback-
Nested classes/interfaces inherited from interface org.alfresco.repo.solr.SOLRTrackingComponent
SOLRTrackingComponent.NodeMetaDataQueryCallback, SOLRTrackingComponent.NodeQueryCallback
-
-
Constructor Summary
Constructors Constructor Description SOLRTrackingComponentImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.alfresco.service.cmr.repository.NodeRefconvertVersionNodeRefToVersionedNodeRef(org.alfresco.service.cmr.repository.NodeRef versionNodeRef)java.util.List<AclChangeSet>getAclChangeSets(java.lang.Long minAclChangeSetId, java.lang.Long fromCommitTime, java.lang.Long maxAclChangeSetId, java.lang.Long toCommitTime, int maxResults)Get the ACL changesets for given range parametersjava.util.List<Acl>getAcls(java.util.List<java.lang.Long> aclChangeSetIds, java.lang.Long minAclId, int maxResults)Get the ACLs with paging options for a specific ACL ChangeSetjava.util.List<AclReaders>getAclsReaders(java.util.List<java.lang.Long> aclIds)Get the ACL readers ("authorities who can read this ACL") for a given set of ACL IDslonggetCRC(java.lang.Long nodeId)Compute the CRC for the parent associations to this node that can cause its PATH to change - primary & secondary associations and virtual associations from categories.java.lang.LonggetMaxChangeSetCommitTime()java.lang.LonggetMaxChangeSetId()java.lang.LonggetMaxTxnCommitTime()Get the last transaction timestamp from the repojava.lang.LonggetMaxTxnId()Get the last transaction id from the repoAlfrescoModelgetModel(org.alfresco.service.namespace.QName modelName)Returns the Alfresco model given by the name modelNamejava.util.List<AlfrescoModelDiff>getModelDiffs(java.util.Map<org.alfresco.service.namespace.QName,java.lang.Long> models)Returns a list of diffs representing differences between the current Repository models and those passed in the models parameter.voidgetNodes(NodeParameters nodeParameters, SOLRTrackingComponent.NodeQueryCallback callback)Get the nodes satisfying the constraints in nodeParametersvoidgetNodesMetadata(NodeMetaDataParameters nodeMetaDataParameters, MetaDataResultsFilter resultFilter, SOLRTrackingComponent.NodeMetaDataQueryCallback callback)Returns metadata for a set of node idsprotected java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable>getProperties(java.lang.Long nodeId)ShardRegistrygetShardRegistry()Get the shard registryjava.util.List<Transaction>getTransactions(java.lang.Long minTxnId, java.lang.Long fromCommitTime, java.lang.Long maxTxnId, java.lang.Long toCommitTime, int maxResults)Get the transactions from either minTxnId or fromCommitTime, optionally limited to maxResultsvoidinit()InitializebooleanisEnabled()voidregisterShardState(org.alfresco.repo.index.shard.ShardState shardState)Register and update a shard statevoidsetAclDAO(AclDAO aclDAO)voidsetAspectIndexFilter(AspectIndexFilter aspectIndexFilter)voidsetCacheAncestors(boolean cacheAncestors)voidsetDictionaryDAO(org.alfresco.repo.dictionary.DictionaryDAO dictionaryDAO)voidsetDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)voidsetEnabled(boolean enabled)voidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)voidsetNodeDAO(NodeDAO nodeDAO)voidsetOwnableService(OwnableService ownableService)voidsetPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)voidsetQnameDAO(QNameDAO qnameDAO)voidsetShardRegistry(ShardRegistry shardRegistry)voidsetSolrDAO(SOLRDAO solrDAO)voidsetTenantService(org.alfresco.repo.tenant.TenantService tenantService)voidsetTypeIndexFilter(TypeIndexFilter typeIndexFilter)
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceSOLRTrackingComponent- Returns:
- boolean
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabledin interfaceSOLRTrackingComponent- Parameters:
enabled- boolean
-
setCacheAncestors
public void setCacheAncestors(boolean cacheAncestors)
- Parameters:
cacheAncestors- the cacheAncestors to set
-
setSolrDAO
public void setSolrDAO(SOLRDAO solrDAO)
-
setNodeDAO
public void setNodeDAO(NodeDAO nodeDAO)
-
setQnameDAO
public void setQnameDAO(QNameDAO qnameDAO)
-
setPermissionService
public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
-
setOwnableService
public void setOwnableService(OwnableService ownableService)
-
setTenantService
public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
-
setDictionaryService
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
-
setAclDAO
public void setAclDAO(AclDAO aclDAO)
-
setDictionaryDAO
public void setDictionaryDAO(org.alfresco.repo.dictionary.DictionaryDAO dictionaryDAO)
-
setTypeIndexFilter
public void setTypeIndexFilter(TypeIndexFilter typeIndexFilter)
-
setAspectIndexFilter
public void setAspectIndexFilter(AspectIndexFilter aspectIndexFilter)
-
setShardRegistry
public void setShardRegistry(ShardRegistry shardRegistry)
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
-
init
public void init()
Initialize
-
getAclChangeSets
public java.util.List<AclChangeSet> getAclChangeSets(java.lang.Long minAclChangeSetId, java.lang.Long fromCommitTime, java.lang.Long maxAclChangeSetId, java.lang.Long toCommitTime, int maxResults)
Description copied from interface:SOLRTrackingComponentGet the ACL changesets for given range parameters- Specified by:
getAclChangeSetsin interfaceSOLRTrackingComponent- Parameters:
minAclChangeSetId- minimum ACL changeset ID - (inclusive and optional)fromCommitTime- minimum ACL commit time - (inclusive and optional)maxAclChangeSetId- max ACL changeset ID - (exclusive and optional)toCommitTime- max ACL commit time - (exclusive and optional)maxResults- limit the results. 0 or Integer.MAX_VALUE does not limit the results- Returns:
- list of ACL changesets
-
getAcls
public java.util.List<Acl> getAcls(java.util.List<java.lang.Long> aclChangeSetIds, java.lang.Long minAclId, int maxResults)
Description copied from interface:SOLRTrackingComponentGet the ACLs with paging options for a specific ACL ChangeSet- Specified by:
getAclsin interfaceSOLRTrackingComponent- Parameters:
aclChangeSetIds- the ACL ChangeSet IDsminAclId- the minimum ACL ID - (inclusive and optional).maxResults- the maximum number of results (must be greater than zero and less than MAX)- Returns:
- list of ACLs
-
getAclsReaders
public java.util.List<AclReaders> getAclsReaders(java.util.List<java.lang.Long> aclIds)
Description copied from interface:SOLRTrackingComponentGet the ACL readers ("authorities who can read this ACL") for a given set of ACL IDs- Specified by:
getAclsReadersin interfaceSOLRTrackingComponent- Parameters:
aclIds- the ACL IDs- Returns:
- Returns the list of ACL readers (includes original ACL IDs)
-
getTransactions
public java.util.List<Transaction> getTransactions(java.lang.Long minTxnId, java.lang.Long fromCommitTime, java.lang.Long maxTxnId, java.lang.Long toCommitTime, int maxResults)
Description copied from interface:SOLRTrackingComponentGet the transactions from either minTxnId or fromCommitTime, optionally limited to maxResults- Specified by:
getTransactionsin interfaceSOLRTrackingComponent- Parameters:
minTxnId- greater than or equal to minTxnIdfromCommitTime- greater than or equal to transaction commit timemaxTxnId- less than maxTxnIdtoCommitTime- less then toCommitTimeintmaxResults- limit the results. 0 or Integer.MAX_VALUE does not limit the results- Returns:
- list of transactions
-
getNodes
public void getNodes(NodeParameters nodeParameters, SOLRTrackingComponent.NodeQueryCallback callback)
Get the nodes satisfying the constraints in nodeParameters- Specified by:
getNodesin interfaceSOLRTrackingComponent- Parameters:
nodeParameters- set of constraints for which nodes to returncallback- a callback to receive the results
-
getProperties
protected java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> getProperties(java.lang.Long nodeId)
-
getCRC
public long getCRC(java.lang.Long nodeId)
Description copied from interface:SOLRTrackingComponentCompute the CRC for the parent associations to this node that can cause its PATH to change - primary & secondary associations and virtual associations from categories.- Specified by:
getCRCin interfaceSOLRTrackingComponent- Returns:
-
getNodesMetadata
public void getNodesMetadata(NodeMetaDataParameters nodeMetaDataParameters, MetaDataResultsFilter resultFilter, SOLRTrackingComponent.NodeMetaDataQueryCallback callback)
Returns metadata for a set of node ids- Specified by:
getNodesMetadatain interfaceSOLRTrackingComponent- Parameters:
nodeMetaDataParameters- NodeMetaDataParametersresultFilter- MetaDataResultsFiltercallback- a callback to receive the results
-
convertVersionNodeRefToVersionedNodeRef
protected org.alfresco.service.cmr.repository.NodeRef convertVersionNodeRefToVersionedNodeRef(org.alfresco.service.cmr.repository.NodeRef versionNodeRef)
-
getModel
public AlfrescoModel getModel(org.alfresco.service.namespace.QName modelName)
Returns the Alfresco model given by the name modelName- Specified by:
getModelin interfaceSOLRTrackingComponent- Parameters:
modelName- the name of the model- Returns:
- the model plus a checksum
-
getModelDiffs
public java.util.List<AlfrescoModelDiff> getModelDiffs(java.util.Map<org.alfresco.service.namespace.QName,java.lang.Long> models)
Returns a list of diffs representing differences between the current Repository models and those passed in the models parameter.- Specified by:
getModelDiffsin interfaceSOLRTrackingComponent- Parameters:
models- a set of mappings of model names to checksums- Returns:
- a list of diffs between those in the repository and those passed in the models parameter
-
getMaxTxnCommitTime
public java.lang.Long getMaxTxnCommitTime()
Description copied from interface:SOLRTrackingComponentGet the last transaction timestamp from the repo- Specified by:
getMaxTxnCommitTimein interfaceSOLRTrackingComponent- Returns:
- Long
-
getMaxTxnId
public java.lang.Long getMaxTxnId()
Description copied from interface:SOLRTrackingComponentGet the last transaction id from the repo- Specified by:
getMaxTxnIdin interfaceSOLRTrackingComponent- Returns:
- Long
-
getMaxChangeSetCommitTime
public java.lang.Long getMaxChangeSetCommitTime()
- Specified by:
getMaxChangeSetCommitTimein interfaceSOLRTrackingComponent- Returns:
- Long
-
getMaxChangeSetId
public java.lang.Long getMaxChangeSetId()
- Specified by:
getMaxChangeSetIdin interfaceSOLRTrackingComponent- Returns:
- Long
-
registerShardState
public void registerShardState(org.alfresco.repo.index.shard.ShardState shardState)
Description copied from interface:SOLRTrackingComponentRegister and update a shard state- Specified by:
registerShardStatein interfaceSOLRTrackingComponent
-
getShardRegistry
public ShardRegistry getShardRegistry()
Description copied from interface:SOLRTrackingComponentGet the shard registry- Specified by:
getShardRegistryin interfaceSOLRTrackingComponent- Returns:
- the shard registry or null if one is not registered. This is an optional feature.
-
-