Package org.alfresco.solr.client
Class SOLRAPIClient
java.lang.Object
org.alfresco.solr.client.SOLRAPIClient
- Direct Known Subclasses:
SOLRAPIQueueClient
Http client to handle SOLR-Alfresco remote calls.
- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
static class
static enum
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSOLRAPIClient
(org.alfresco.httpclient.AlfrescoHttpClient repositoryHttpClient, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.repo.dictionary.NamespaceDAO namespaceDAO) SOLRAPIClient
(org.alfresco.httpclient.AlfrescoHttpClient repositoryHttpClient, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.repo.dictionary.NamespaceDAO namespaceDAO, boolean compression) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
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.
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
SOLRAPIClient
public SOLRAPIClient(org.alfresco.httpclient.AlfrescoHttpClient repositoryHttpClient, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.repo.dictionary.NamespaceDAO namespaceDAO) -
SOLRAPIClient
public SOLRAPIClient(org.alfresco.httpclient.AlfrescoHttpClient repositoryHttpClient, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.repo.dictionary.NamespaceDAO namespaceDAO, boolean compression)
-
-
Method Details
-
getAclChangeSets
public AclChangeSets getAclChangeSets(Long fromCommitTime, Long minAclChangeSetId, Long toCommitTime, Long maxAclChangeSetId, int maxResults) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException Get the ACL ChangeSets- 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.AuthenticationException
IOException
org.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
.- 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.AuthenticationException
IOException
org.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- Parameters:
acls
- the ACLs- Returns:
- the readers for the ACLs
- Throws:
org.alfresco.httpclient.AuthenticationException
IOException
org.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 - Throws:
org.alfresco.httpclient.AuthenticationException
IOException
org.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 - Throws:
org.alfresco.httpclient.AuthenticationException
IOException
org.json.JSONException
org.apache.commons.codec.EncoderException
-
getNodes
public List<Node> getNodes(GetNodesParameters parameters, int maxResults) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException - Throws:
org.alfresco.httpclient.AuthenticationException
IOException
org.json.JSONException
-
getNodesMetaData
public List<NodeMetaData> getNodesMetaData(NodeMetaDataParameters params) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException - Throws:
org.alfresco.httpclient.AuthenticationException
IOException
org.json.JSONException
-
getTextContent
public SOLRAPIClient.GetTextContentResponse getTextContent(Long nodeId, org.alfresco.service.namespace.QName propertyQName, Long modifiedSince) throws org.alfresco.httpclient.AuthenticationException, IOException - Throws:
org.alfresco.httpclient.AuthenticationException
IOException
-
getModel
public AlfrescoModel getModel(String coreName, org.alfresco.service.namespace.QName modelName) throws org.alfresco.httpclient.AuthenticationException, IOException - Throws:
org.alfresco.httpclient.AuthenticationException
IOException
-
getModelsDiff
public List<AlfrescoModelDiff> getModelsDiff(String coreName, List<AlfrescoModel> currentModels) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException - Throws:
org.alfresco.httpclient.AuthenticationException
IOException
org.json.JSONException
-
getNextTxCommitTime
public Long getNextTxCommitTime(String coreName, Long fromCommitTime) throws org.alfresco.httpclient.AuthenticationException, IOException, NoSuchMethodException Returns the next commit time from a given commit time.- Parameters:
coreName
- alfresco, archivefromCommitTime
- initial transaction commit time- Returns:
- Time of the next transaction
- Throws:
IOException
org.alfresco.httpclient.AuthenticationException
NoSuchMethodException
-
getTxIntervalCommitTime
public org.alfresco.util.Pair<Long,Long> getTxIntervalCommitTime(String coreName, Long fromNodeId, Long toNodeId) throws org.alfresco.httpclient.AuthenticationException, IOException, NoSuchMethodException Returns the minimum and the maximum commit time for transactions in a node id range.- 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
- Throws:
IOException
org.alfresco.httpclient.AuthenticationException
NoSuchMethodException
-
close
public void close()
-