Class SOLRTrackingComponentImpl

java.lang.Object
org.alfresco.repo.solr.SOLRTrackingComponentImpl
All Implemented Interfaces:
SearchTrackingComponent

public class SOLRTrackingComponentImpl extends Object implements SearchTrackingComponent
Component providing data for SOLR tracking
Since:
4.0
  • Constructor Details

    • SOLRTrackingComponentImpl

      public SOLRTrackingComponentImpl()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface SearchTrackingComponent
      Returns:
      boolean
    • setEnabled

      public void setEnabled(boolean enabled)
      Specified by:
      setEnabled in interface SearchTrackingComponent
      Parameters:
      enabled - boolean
    • setCacheAncestors

      public void setCacheAncestors(boolean cacheAncestors)
      Parameters:
      cacheAncestors - the cacheAncestors to set
    • setSearchDAO

      public void setSearchDAO(SearchDAO searchDAO)
    • setNodeDAO

      public void setNodeDAO(NodeDAO nodeDAO)
    • setQnameDAO

      public void setQnameDAO(QNameDAO qnameDAO)
    • setPermissionService

      public void setPermissionService(PermissionService permissionService)
    • setOwnableService

      public void setOwnableService(OwnableService ownableService)
    • setTenantService

      public void setTenantService(TenantService tenantService)
    • setDictionaryService

      public void setDictionaryService(DictionaryService dictionaryService)
    • setAclDAO

      public void setAclDAO(AclDAO aclDAO)
    • setDictionaryDAO

      public void setDictionaryDAO(DictionaryDAO dictionaryDAO)
    • setTypeIndexFilter

      public void setTypeIndexFilter(TypeIndexFilter typeIndexFilter)
    • setAspectIndexFilter

      public void setAspectIndexFilter(AspectIndexFilter aspectIndexFilter)
    • setShardRegistry

      public void setShardRegistry(ShardRegistry shardRegistry)
    • setNamespaceService

      public void setNamespaceService(NamespaceService namespaceService)
    • init

      public void init()
      Initialize
    • getAclChangeSets

      public List<AclChangeSet> getAclChangeSets(Long minAclChangeSetId, Long fromCommitTime, Long maxAclChangeSetId, Long toCommitTime, int maxResults)
      Description copied from interface: SearchTrackingComponent
      Get the ACL changesets for given range parameters
      Specified by:
      getAclChangeSets in interface SearchTrackingComponent
      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 List<Acl> getAcls(List<Long> aclChangeSetIds, Long minAclId, int maxResults)
      Description copied from interface: SearchTrackingComponent
      Get the ACLs with paging options for a specific ACL ChangeSet
      Specified by:
      getAcls in interface SearchTrackingComponent
      Parameters:
      aclChangeSetIds - the ACL ChangeSet IDs
      minAclId - 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 List<AclReaders> getAclsReaders(List<Long> aclIds)
      Description copied from interface: SearchTrackingComponent
      Get the ACL readers ("authorities who can read this ACL") for a given set of ACL IDs
      Specified by:
      getAclsReaders in interface SearchTrackingComponent
      Parameters:
      aclIds - the ACL IDs
      Returns:
      Returns the list of ACL readers (includes original ACL IDs)
    • getTransactions

      public List<Transaction> getTransactions(Long minTxnId, Long fromCommitTime, Long maxTxnId, Long toCommitTime, int maxResults)
      Description copied from interface: SearchTrackingComponent
      Get the transactions from either minTxnId or fromCommitTime, optionally limited to maxResults
      Specified by:
      getTransactions in interface SearchTrackingComponent
      Parameters:
      minTxnId - greater than or equal to minTxnId
      fromCommitTime - greater than or equal to transaction commit time
      maxTxnId - less than maxTxnId
      toCommitTime - less then toCommitTimeint
      maxResults - limit the results. 0 or Integer.MAX_VALUE does not limit the results
      Returns:
      list of transactions
    • getNodes

      public void getNodes(NodeParameters nodeParameters, SearchTrackingComponent.NodeQueryCallback callback)
      Get the nodes satisfying the constraints in nodeParameters
      Specified by:
      getNodes in interface SearchTrackingComponent
      Parameters:
      nodeParameters - set of constraints for which nodes to return
      callback - a callback to receive the results
    • getProperties

      protected Map<QName,Serializable> getProperties(Long nodeId)
      Get properties that we want to be indexed.
    • getCRC

      public long getCRC(Long nodeId)
      Description copied from interface: SearchTrackingComponent
      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.
      Specified by:
      getCRC in interface SearchTrackingComponent
      Returns:
    • getNodesMetadata

      public void getNodesMetadata(NodeMetaDataParameters nodeMetaDataParameters, MetaDataResultsFilter resultFilter, SearchTrackingComponent.NodeMetaDataQueryCallback callback)
      Returns metadata for a set of node ids
      Specified by:
      getNodesMetadata in interface SearchTrackingComponent
      Parameters:
      nodeMetaDataParameters - NodeMetaDataParameters
      resultFilter - MetaDataResultsFilter
      callback - a callback to receive the results
    • convertVersionNodeRefToVersionedNodeRef

      protected NodeRef convertVersionNodeRefToVersionedNodeRef(NodeRef versionNodeRef)
    • getModel

      public AlfrescoModel getModel(QName modelName)
      Returns the Alfresco model given by the name modelName
      Specified by:
      getModel in interface SearchTrackingComponent
      Parameters:
      modelName - the name of the model
      Returns:
      the model plus a checksum
    • getModelDiffs

      public List<AlfrescoModelDiff> getModelDiffs(Map<QName,Long> models)
      Returns a list of diffs representing differences between the current Repository models and those passed in the models parameter.
      Specified by:
      getModelDiffs in interface SearchTrackingComponent
      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 Long getMaxTxnCommitTime()
      Description copied from interface: SearchTrackingComponent
      Get the last transaction timestamp from the repo
      Specified by:
      getMaxTxnCommitTime in interface SearchTrackingComponent
      Returns:
      Long
    • getMaxTxnId

      public Long getMaxTxnId()
      Description copied from interface: SearchTrackingComponent
      Get the last transaction id from the repo
      Specified by:
      getMaxTxnId in interface SearchTrackingComponent
      Returns:
      Long
    • getMaxChangeSetCommitTime

      public Long getMaxChangeSetCommitTime()
      Specified by:
      getMaxChangeSetCommitTime in interface SearchTrackingComponent
      Returns:
      Long
    • getMaxChangeSetId

      public Long getMaxChangeSetId()
      Specified by:
      getMaxChangeSetId in interface SearchTrackingComponent
      Returns:
      Long
    • registerShardState

      public void registerShardState(ShardState shardState)
      Description copied from interface: SearchTrackingComponent
      Register and update a shard state
      Specified by:
      registerShardState in interface SearchTrackingComponent
    • getShardRegistry

      public ShardRegistry getShardRegistry()
      Description copied from interface: SearchTrackingComponent
      Get the shard registry
      Specified by:
      getShardRegistry in interface SearchTrackingComponent
      Returns:
      the shard registry or null if one is not registered. This is an optional feature.