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 List<AclChangeSet>aclChangeSetQueuestatic Map<Long,List<Acl>>aclMapstatic Map<Long,AclReaders>aclReadersMapstatic Map<Long,String>nodeContentMapstatic Map<Long,List<Node>>nodeMapstatic Map<Long,NodeMetaData>nodeMetaDataMapstatic List<Transaction>transactionQueue-
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 voidclose()AclChangeSetsgetAclChangeSets(Long fromCommitTime, Long minAclChangeSetId, Long toCommitTime, Long maxAclChangeSetId, int maxResults)Get the ACL ChangeSetsList<AclReaders>getAclReaders(List<Acl> acls)Get the ACL readers for a given list of ACLsList<Acl>getAcls(List<AclChangeSet> aclChangeSets, Long minAclId, int maxResults)Get the ACLs associated with a given list of ACL ChangeSets.List<AlfrescoModelDiff>getModelsDiff(String coreName, List<AlfrescoModel> currentModels)List<Node>getNodes(GetNodesParameters parameters, int maxResults)List<NodeMetaData>getNodesMetaData(NodeMetaDataParameters params)SOLRAPIClient.GetTextContentResponsegetTextContent(Long nodeId, org.alfresco.service.namespace.QName propertyQName, Long modifiedSince)TransactionsgetTransactions(Long fromCommitTime, Long minTxnId, Long toCommitTime, Long maxTxnId, int maxResults)TransactionsgetTransactions(Long fromCommitTime, Long minTxnId, Long toCommitTime, Long maxTxnId, int maxResults, org.alfresco.repo.index.shard.ShardState shardState)static voidsetThrowException(boolean _throwException)-
Methods inherited from class org.alfresco.solr.client.SOLRAPIClient
getModel, getNextTxCommitTime, getTxIntervalCommitTime
-
-
-
-
Field Detail
-
aclChangeSetQueue
public static List<AclChangeSet> aclChangeSetQueue
-
aclReadersMap
public static Map<Long,AclReaders> aclReadersMap
-
transactionQueue
public static List<Transaction> transactionQueue
-
nodeMetaDataMap
public static Map<Long,NodeMetaData> nodeMetaDataMap
-
-
Method Detail
-
setThrowException
public static void setThrowException(boolean _throwException)
-
getAclChangeSets
public AclChangeSets getAclChangeSets(Long fromCommitTime, Long minAclChangeSetId, Long toCommitTime, Long maxAclChangeSetId, int maxResults) throws org.alfresco.httpclient.AuthenticationException, 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:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
getAcls
public List<Acl> getAcls(List<AclChangeSet> aclChangeSets, Long minAclId, int maxResults) throws org.alfresco.httpclient.AuthenticationException, 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:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
getAclReaders
public List<AclReaders> getAclReaders(List<Acl> acls) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException
Get the ACL readers for a given list of ACLs- Overrides:
getAclReadersin classSOLRAPIClient- Parameters:
acls- the ACLs- Returns:
- the readers for the ACLs
- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
getModelsDiff
public List<AlfrescoModelDiff> getModelsDiff(String coreName, List<AlfrescoModel> currentModels) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException
- Overrides:
getModelsDiffin classSOLRAPIClient- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
getTransactions
public Transactions getTransactions(Long fromCommitTime, Long minTxnId, Long toCommitTime, Long maxTxnId, int maxResults) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException
- Overrides:
getTransactionsin classSOLRAPIClient- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
getTransactions
public Transactions getTransactions(Long fromCommitTime, Long minTxnId, Long toCommitTime, Long maxTxnId, int maxResults, org.alfresco.repo.index.shard.ShardState shardState) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException, org.apache.commons.codec.EncoderException
- Overrides:
getTransactionsin classSOLRAPIClient- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONExceptionorg.apache.commons.codec.EncoderException
-
getNodes
public List<Node> getNodes(GetNodesParameters parameters, int maxResults) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException
- Overrides:
getNodesin classSOLRAPIClient- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
getNodesMetaData
public List<NodeMetaData> getNodesMetaData(NodeMetaDataParameters params) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException
- Overrides:
getNodesMetaDatain classSOLRAPIClient- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
getTextContent
public SOLRAPIClient.GetTextContentResponse getTextContent(Long nodeId, org.alfresco.service.namespace.QName propertyQName, Long modifiedSince) throws org.alfresco.httpclient.AuthenticationException, IOException
- Overrides:
getTextContentin classSOLRAPIClient- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOException
-
close
public void close()
- Overrides:
closein classSOLRAPIClient
-
-