org.alfresco.repo.solr
Class SOLRTrackingComponentImpl

java.lang.Object
  extended by 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
protected  class SOLRTrackingComponentImpl.NodeMetaDataQueryRowHandler
          Class that passes results from a result entity into the client callback
protected  class SOLRTrackingComponentImpl.NodeQueryRowHandler
          Class 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
SOLRTrackingComponentImpl()
           
 
Method Summary
 java.util.List getAclChangeSets(java.lang.Long minAclChangeSetId, java.lang.Long fromCommitTime, int maxResults)
          Get the ACL changesets for given range parameters
 java.util.List getAcls(java.util.List aclChangeSetIds, java.lang.Long minAclId, int maxResults)
          Get the ACLs with paging options for a specific ACL ChangeSet
 java.util.List getAclsReaders(java.util.List aclIds)
          Get the ACL readers ("authorities who can read this ACL") for a given set of ACL IDs
 java.lang.Long getMaxTxnCommitTime()
          Get the last transaction timestamp from the repo
 AlfrescoModel getModel(org.alfresco.service.namespace.QName modelName)
          Returns the Alfresco model given by the name modelName
 java.util.List getModelDiffs(java.util.Map models)
          Returns a list of diffs representing differences between the current Repository models and those passed in the models parameter.
 void getNodes(NodeParameters nodeParameters, SOLRTrackingComponent.NodeQueryCallback callback)
          Get the nodes satisfying the constraints in nodeParameters
 void getNodesMetadata(NodeMetaDataParameters nodeMetaDataParameters, MetaDataResultsFilter resultFilter, SOLRTrackingComponent.NodeMetaDataQueryCallback callback)
          Returns metadata for a set of node ids
 java.util.List getTransactions(java.lang.Long minTxnId, java.lang.Long fromCommitTime, int maxResults)
          Get the transactions from either minTxnId or fromCommitTime, optionally limited to maxResults
 void init()
          Initialize
 boolean isEnabled()
           
 void setAclDAO(AclDAO aclDAO)
           
 void setDictionaryDAO(org.alfresco.repo.dictionary.DictionaryDAO dictionaryDAO)
           
 void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
           
 void setEnabled(boolean enabled)
           
 void setNodeDAO(NodeDAO nodeDAO)
           
 void setOwnableService(OwnableService ownableService)
           
 void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
           
 void setQnameDAO(QNameDAO qnameDAO)
           
 void setSolrDAO(SOLRDAO solrDAO)
           
 void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SOLRTrackingComponentImpl

public SOLRTrackingComponentImpl()
Method Detail

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface SOLRTrackingComponent
Returns:

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface SOLRTrackingComponent

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)

init

public void init()
Initialize


getAclChangeSets

public java.util.List getAclChangeSets(java.lang.Long minAclChangeSetId,
                                       java.lang.Long fromCommitTime,
                                       int maxResults)
Description copied from interface: SOLRTrackingComponent
Get the ACL changesets for given range parameters

Specified by:
getAclChangeSets in interface SOLRTrackingComponent
Parameters:
minAclChangeSetId - minimum ACL changeset ID - (inclusive and optional)
fromCommitTime - minimum ACL commit time - (inclusive 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 getAcls(java.util.List aclChangeSetIds,
                              java.lang.Long minAclId,
                              int maxResults)
Description copied from interface: SOLRTrackingComponent
Get the ACLs with paging options for a specific ACL ChangeSet

Specified by:
getAcls in interface SOLRTrackingComponent
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 java.util.List getAclsReaders(java.util.List aclIds)
Description copied from interface: SOLRTrackingComponent
Get the ACL readers ("authorities who can read this ACL") for a given set of ACL IDs

Specified by:
getAclsReaders in interface SOLRTrackingComponent
Parameters:
aclIds - the ACL IDs
Returns:
Returns the list of ACL readers (includes original ACL IDs)

getTransactions

public java.util.List getTransactions(java.lang.Long minTxnId,
                                      java.lang.Long fromCommitTime,
                                      int maxResults)
Description copied from interface: SOLRTrackingComponent
Get the transactions from either minTxnId or fromCommitTime, optionally limited to maxResults

Specified by:
getTransactions in interface SOLRTrackingComponent
Parameters:
minTxnId - greater than or equal to minTxnId
fromCommitTime - greater than or equal to transaction commit time
maxResults - 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:
getNodes in interface SOLRTrackingComponent
Parameters:
nodeParameters - set of constraints for which nodes to return
callback - a callback to receive the results

getNodesMetadata

public void getNodesMetadata(NodeMetaDataParameters nodeMetaDataParameters,
                             MetaDataResultsFilter resultFilter,
                             SOLRTrackingComponent.NodeMetaDataQueryCallback callback)
Returns metadata for a set of node ids

Specified by:
getNodesMetadata in interface SOLRTrackingComponent
callback - a callback to receive the results

getModel

public AlfrescoModel getModel(org.alfresco.service.namespace.QName modelName)
Returns the Alfresco model given by the name modelName

Specified by:
getModel in interface SOLRTrackingComponent
Parameters:
modelName - the name of the model
Returns:
the model plus a checksum

getModelDiffs

public java.util.List getModelDiffs(java.util.Map 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 SOLRTrackingComponent
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: SOLRTrackingComponent
Get the last transaction timestamp from the repo

Specified by:
getMaxTxnCommitTime in interface SOLRTrackingComponent
Returns:


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.