Package org.alfresco.solr.client
Class SOLRAPIQueueClient
- java.lang.Object
-
- org.alfresco.solr.client.SOLRAPIClient
-
- org.alfresco.solr.client.SOLRAPIQueueClient
-
public class SOLRAPIQueueClient extends SOLRAPIClient
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
Fields Modifier and Type Field Description static java.util.List<AclChangeSet>
ACL_CHANGE_SET_QUEUE
static java.util.Map<java.lang.Long,java.util.List<Acl>>
ACL_MAP
static java.util.Map<java.lang.Long,AclReaders>
ACL_READERS_MAP
static java.util.Map<java.lang.Long,java.util.Map<org.alfresco.service.namespace.QName,java.lang.String>>
NODE_CONTENT_MAP
static java.util.Map<java.lang.Long,java.util.List<Node>>
NODE_MAP
static java.util.Map<java.lang.Long,NodeMetaData>
NODE_META_DATA_MAP
static java.util.List<Transaction>
TRANSACTION_QUEUE
-
Fields inherited from class org.alfresco.solr.client.SOLRAPIClient
LOGGER
-
-
Constructor Summary
Constructors Constructor Description SOLRAPIQueueClient(org.alfresco.repo.dictionary.NamespaceDAO namespaceDAO)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
AclChangeSets
getAclChangeSets(java.lang.Long fromCommitTime, java.lang.Long minAclChangeSetId, java.lang.Long toCommitTime, java.lang.Long maxAclChangeSetId, int maxResults)
Get the ACL ChangeSetsjava.util.List<AclReaders>
getAclReaders(java.util.List<Acl> acls)
Get the ACL readers for a given list of ACLsjava.util.List<Acl>
getAcls(java.util.List<AclChangeSet> aclChangeSets, java.lang.Long minAclId, int maxResults)
Get the ACLs associated with a given list of ACL ChangeSets.java.util.List<AlfrescoModelDiff>
getModelsDiff(java.lang.String coreName, java.util.List<AlfrescoModel> currentModels)
java.lang.Long
getNextTxCommitTime(java.lang.String coreName, java.lang.Long fromCommitTime)
Returns the next commit time from a given commit time.java.util.List<Node>
getNodes(GetNodesParameters parameters, int maxResults)
java.util.List<NodeMetaData>
getNodesMetaData(NodeMetaDataParameters params)
SOLRAPIClient.GetTextContentResponse
getTextContent(java.lang.Long nodeId, org.alfresco.service.namespace.QName propertyQName, java.lang.Long modifiedSince)
Transactions
getTransactions(java.lang.Long fromCommitTime, java.lang.Long minTxnId, java.lang.Long toCommitTime, java.lang.Long maxTxnId, int maxResults)
Transactions
getTransactions(java.lang.Long fromCommitTime, java.lang.Long minTxnId, java.lang.Long toCommitTime, java.lang.Long maxTxnId, int maxResults, org.alfresco.repo.index.shard.ShardState shardState)
org.alfresco.util.Pair<java.lang.Long,java.lang.Long>
getTxIntervalCommitTime(java.lang.String coreName, java.lang.Long fromNodeId, java.lang.Long toNodeId)
Returns the minimum and the maximum commit time for transactions in a node id range.static void
setThrowException(boolean _throwException)
-
Methods inherited from class org.alfresco.solr.client.SOLRAPIClient
getModel
-
-
-
-
Field Detail
-
ACL_CHANGE_SET_QUEUE
public static final java.util.List<AclChangeSet> ACL_CHANGE_SET_QUEUE
-
ACL_MAP
public static final java.util.Map<java.lang.Long,java.util.List<Acl>> ACL_MAP
-
ACL_READERS_MAP
public static final java.util.Map<java.lang.Long,AclReaders> ACL_READERS_MAP
-
TRANSACTION_QUEUE
public static final java.util.List<Transaction> TRANSACTION_QUEUE
-
NODE_MAP
public static final java.util.Map<java.lang.Long,java.util.List<Node>> NODE_MAP
-
NODE_META_DATA_MAP
public static final java.util.Map<java.lang.Long,NodeMetaData> NODE_META_DATA_MAP
-
NODE_CONTENT_MAP
public static final java.util.Map<java.lang.Long,java.util.Map<org.alfresco.service.namespace.QName,java.lang.String>> NODE_CONTENT_MAP
-
-
Method Detail
-
setThrowException
public static void setThrowException(boolean _throwException)
-
getAclChangeSets
public AclChangeSets getAclChangeSets(java.lang.Long fromCommitTime, java.lang.Long minAclChangeSetId, java.lang.Long toCommitTime, java.lang.Long maxAclChangeSetId, int maxResults) throws java.io.IOException, org.json.JSONException
Description copied from class:SOLRAPIClient
Get the ACL ChangeSets- Overrides:
getAclChangeSets
in 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:
java.io.IOException
org.json.JSONException
-
getAcls
public java.util.List<Acl> getAcls(java.util.List<AclChangeSet> aclChangeSets, java.lang.Long minAclId, int maxResults) throws java.io.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:
getAcls
in 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:
java.io.IOException
org.json.JSONException
-
getAclReaders
public java.util.List<AclReaders> getAclReaders(java.util.List<Acl> acls) throws java.io.IOException, org.json.JSONException
Get the ACL readers for a given list of ACLs- Overrides:
getAclReaders
in classSOLRAPIClient
- Parameters:
acls
- the ACLs- Returns:
- the readers for the ACLs
- Throws:
java.io.IOException
org.json.JSONException
-
getModelsDiff
public java.util.List<AlfrescoModelDiff> getModelsDiff(java.lang.String coreName, java.util.List<AlfrescoModel> currentModels) throws java.io.IOException, org.json.JSONException
- Overrides:
getModelsDiff
in classSOLRAPIClient
- Throws:
java.io.IOException
org.json.JSONException
-
getNextTxCommitTime
public java.lang.Long getNextTxCommitTime(java.lang.String coreName, java.lang.Long fromCommitTime) throws java.lang.NoSuchMethodException
Description copied from class:SOLRAPIClient
Returns the next commit time from a given commit time.- Overrides:
getNextTxCommitTime
in classSOLRAPIClient
- Parameters:
coreName
- alfresco, archivefromCommitTime
- initial transaction commit time- Returns:
- Time of the next transaction
- Throws:
java.lang.NoSuchMethodException
-
getTxIntervalCommitTime
public org.alfresco.util.Pair<java.lang.Long,java.lang.Long> getTxIntervalCommitTime(java.lang.String coreName, java.lang.Long fromNodeId, java.lang.Long toNodeId)
Description copied from class:SOLRAPIClient
Returns the minimum and the maximum commit time for transactions in a node id range.- Overrides:
getTxIntervalCommitTime
in 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(java.lang.Long fromCommitTime, java.lang.Long minTxnId, java.lang.Long toCommitTime, java.lang.Long maxTxnId, int maxResults) throws java.io.IOException, org.json.JSONException
- Overrides:
getTransactions
in classSOLRAPIClient
- Throws:
java.io.IOException
org.json.JSONException
-
getTransactions
public Transactions getTransactions(java.lang.Long fromCommitTime, java.lang.Long minTxnId, java.lang.Long toCommitTime, java.lang.Long maxTxnId, int maxResults, org.alfresco.repo.index.shard.ShardState shardState) throws java.io.IOException, org.json.JSONException
- Overrides:
getTransactions
in classSOLRAPIClient
- Throws:
java.io.IOException
org.json.JSONException
-
getNodes
public java.util.List<Node> getNodes(GetNodesParameters parameters, int maxResults) throws java.io.IOException, org.json.JSONException
- Overrides:
getNodes
in classSOLRAPIClient
- Throws:
java.io.IOException
org.json.JSONException
-
getNodesMetaData
public java.util.List<NodeMetaData> getNodesMetaData(NodeMetaDataParameters params) throws java.io.IOException, org.json.JSONException
- Overrides:
getNodesMetaData
in classSOLRAPIClient
- Throws:
java.io.IOException
org.json.JSONException
-
getTextContent
public SOLRAPIClient.GetTextContentResponse getTextContent(java.lang.Long nodeId, org.alfresco.service.namespace.QName propertyQName, java.lang.Long modifiedSince) throws java.io.IOException
- Overrides:
getTextContent
in classSOLRAPIClient
- Throws:
java.io.IOException
-
close
public void close()
- Overrides:
close
in classSOLRAPIClient
-
-