Package org.alfresco.solr.client
Class SOLRAPIQueueClient
java.lang.Object
org.alfresco.solr.client.SOLRAPIClient
org.alfresco.solr.client.SOLRAPIQueueClient
A client that reads from an internal queue. This is used for test cases.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.alfresco.solr.client.SOLRAPIClient
SOLRAPIClient.GetNodesMetaDataResponse, SOLRAPIClient.GetNodesResponse, SOLRAPIClient.GetTextContentResponse, SOLRAPIClient.GetTransactionsResponse, SOLRAPIClient.SolrApiContentStatus -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<AclChangeSet>static final Map<Long,AclReaders> static final Map<Long,NodeMetaData> static final List<Transaction>Fields inherited from class org.alfresco.solr.client.SOLRAPIClient
LOGGER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getAclChangeSets(Long fromCommitTime, Long minAclChangeSetId, Long toCommitTime, Long maxAclChangeSetId, int maxResults) Get the ACL ChangeSetsgetAclReaders(List<Acl> acls) Get the ACL readers for a given list of ACLsgetAcls(List<AclChangeSet> aclChangeSets, Long minAclId, int maxResults) Get the ACLs associated with a given list of ACL ChangeSets.getModelsDiff(String coreName, List<AlfrescoModel> currentModels) getNextTxCommitTime(String coreName, Long fromCommitTime) Returns the next commit time from a given commit time.getNodes(GetNodesParameters parameters, int maxResults) getTextContent(Long nodeId, org.alfresco.service.namespace.QName propertyQName, Long modifiedSince) getTransactions(Long fromCommitTime, Long minTxnId, Long toCommitTime, Long maxTxnId, int maxResults) getTransactions(Long fromCommitTime, Long minTxnId, Long toCommitTime, Long maxTxnId, int maxResults, org.alfresco.repo.index.shard.ShardState shardState) getTxIntervalCommitTime(String coreName, Long fromNodeId, Long toNodeId) Returns the minimum and the maximum commit time for transactions in a node id range.static voidsetThrowException(boolean _throwException) Methods inherited from class org.alfresco.solr.client.SOLRAPIClient
getModel
-
Field Details
-
ACL_CHANGE_SET_QUEUE
-
ACL_MAP
-
ACL_READERS_MAP
-
TRANSACTION_QUEUE
-
NODE_MAP
-
NODE_META_DATA_MAP
-
NODE_CONTENT_MAP
-
-
Constructor Details
-
SOLRAPIQueueClient
public SOLRAPIQueueClient(org.alfresco.repo.dictionary.NamespaceDAO namespaceDAO)
-
-
Method Details
-
setThrowException
public static void setThrowException(boolean _throwException) -
getAclChangeSets
public AclChangeSets getAclChangeSets(Long fromCommitTime, Long minAclChangeSetId, Long toCommitTime, Long maxAclChangeSetId, int maxResults) throws IOException, org.json.JSONException Description copied from class:SOLRAPIClientGet the ACL ChangeSets- Overrides:
getAclChangeSetsin classSOLRAPIClient- Parameters:
fromCommitTime- the lowest commit time (optional)minAclChangeSetId- the lowest ChangeSet ID (optional)maxResults- the maximum number of results (a reasonable value only)- Returns:
- the ACL ChangeSets in order of commit time and ID
- Throws:
IOExceptionorg.json.JSONException
-
getAcls
public List<Acl> getAcls(List<AclChangeSet> aclChangeSets, Long minAclId, int maxResults) throws IOException, org.json.JSONException Get the ACLs associated with a given list of ACL ChangeSets. The ACLs may be truncated for the last ACL ChangeSet in the return values - the ACL count from theACL ChangeSets.- Overrides:
getAclsin classSOLRAPIClient- Parameters:
aclChangeSets- the ACL ChangeSets to includeminAclId- the lowest ACL ID (may be null)maxResults- the maximum number of results to retrieve- Returns:
- the ACLs (includes ChangeSet ID)
- Throws:
IOExceptionorg.json.JSONException
-
getAclReaders
Get the ACL readers for a given list of ACLs- Overrides:
getAclReadersin classSOLRAPIClient- Parameters:
acls- the ACLs- Returns:
- the readers for the ACLs
- Throws:
IOExceptionorg.json.JSONException
-
getModelsDiff
public List<AlfrescoModelDiff> getModelsDiff(String coreName, List<AlfrescoModel> currentModels) throws IOException, org.json.JSONException - Overrides:
getModelsDiffin classSOLRAPIClient- Throws:
IOExceptionorg.json.JSONException
-
getNextTxCommitTime
Description copied from class:SOLRAPIClientReturns the next commit time from a given commit time.- Overrides:
getNextTxCommitTimein classSOLRAPIClient- Parameters:
coreName- alfresco, archivefromCommitTime- initial transaction commit time- Returns:
- Time of the next transaction
- Throws:
NoSuchMethodException
-
getTxIntervalCommitTime
public org.alfresco.util.Pair<Long,Long> getTxIntervalCommitTime(String coreName, Long fromNodeId, Long toNodeId) Description copied from class:SOLRAPIClientReturns the minimum and the maximum commit time for transactions in a node id range.- Overrides:
getTxIntervalCommitTimein classSOLRAPIClient- Parameters:
coreName- alfresco, archivefromNodeId- Id of the initial nodetoNodeId- Id of the final node- Returns:
- Time of the first transaction, time of the last transaction
-
getTransactions
public Transactions getTransactions(Long fromCommitTime, Long minTxnId, Long toCommitTime, Long maxTxnId, int maxResults) throws IOException, org.json.JSONException - Overrides:
getTransactionsin classSOLRAPIClient- Throws:
IOExceptionorg.json.JSONException
-
getTransactions
public Transactions getTransactions(Long fromCommitTime, Long minTxnId, Long toCommitTime, Long maxTxnId, int maxResults, org.alfresco.repo.index.shard.ShardState shardState) throws IOException, org.json.JSONException - Overrides:
getTransactionsin classSOLRAPIClient- Throws:
IOExceptionorg.json.JSONException
-
getNodes
public List<Node> getNodes(GetNodesParameters parameters, int maxResults) throws IOException, org.json.JSONException - Overrides:
getNodesin classSOLRAPIClient- Throws:
IOExceptionorg.json.JSONException
-
getNodesMetaData
public List<NodeMetaData> getNodesMetaData(NodeMetaDataParameters params) throws IOException, org.json.JSONException - Overrides:
getNodesMetaDatain classSOLRAPIClient- Throws:
IOExceptionorg.json.JSONException
-
getTextContent
public SOLRAPIClient.GetTextContentResponse getTextContent(Long nodeId, org.alfresco.service.namespace.QName propertyQName, Long modifiedSince) throws IOException - Overrides:
getTextContentin classSOLRAPIClient- Throws:
IOException
-
close
public void close()- Overrides:
closein classSOLRAPIClient
-