Package org.alfresco.solr.client
Class SOLRAPIClient
- java.lang.Object
-
- org.alfresco.solr.client.SOLRAPIClient
-
- Direct Known Subclasses:
SOLRAPIQueueClient
public class SOLRAPIClient extends java.lang.ObjectHttp client to handle SOLR-Alfresco remote calls.- Since:
- 4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSOLRAPIClient.GetNodesMetaDataResponsestatic classSOLRAPIClient.GetNodesResponsestatic classSOLRAPIClient.GetTextContentResponsestatic classSOLRAPIClient.GetTransactionsResponsestatic classSOLRAPIClient.SolrApiContentStatus
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.LoggerLOGGER
-
Constructor Summary
Constructors Constructor Description SOLRAPIClient(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()AclChangeSetsgetAclChangeSets(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.AlfrescoModelgetModel(java.lang.String coreName, org.alfresco.service.namespace.QName modelName)java.util.List<AlfrescoModelDiff>getModelsDiff(java.lang.String coreName, java.util.List<AlfrescoModel> currentModels)java.lang.LonggetNextTxCommitTime(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.GetTextContentResponsegetTextContent(java.lang.Long nodeId, org.alfresco.service.namespace.QName propertyQName, java.lang.Long modifiedSince)TransactionsgetTransactions(java.lang.Long fromCommitTime, java.lang.Long minTxnId, java.lang.Long toCommitTime, java.lang.Long maxTxnId, int maxResults)TransactionsgetTransactions(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.
-
-
-
Constructor Detail
-
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 Detail
-
getAclChangeSets
public AclChangeSets getAclChangeSets(java.lang.Long fromCommitTime, java.lang.Long minAclChangeSetId, java.lang.Long toCommitTime, java.lang.Long maxAclChangeSetId, int maxResults) throws org.alfresco.httpclient.AuthenticationException, java.io.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.AuthenticationExceptionjava.io.IOExceptionorg.json.JSONException
-
getAcls
public java.util.List<Acl> getAcls(java.util.List<AclChangeSet> aclChangeSets, java.lang.Long minAclId, int maxResults) throws org.alfresco.httpclient.AuthenticationException, 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.- 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.AuthenticationExceptionjava.io.IOExceptionorg.json.JSONException
-
getAclReaders
public java.util.List<AclReaders> getAclReaders(java.util.List<Acl> acls) throws org.alfresco.httpclient.AuthenticationException, java.io.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.AuthenticationExceptionjava.io.IOExceptionorg.json.JSONException
-
getTransactions
public Transactions getTransactions(java.lang.Long fromCommitTime, java.lang.Long minTxnId, java.lang.Long toCommitTime, java.lang.Long maxTxnId, int maxResults) throws org.alfresco.httpclient.AuthenticationException, java.io.IOException, org.json.JSONException
- Throws:
org.alfresco.httpclient.AuthenticationExceptionjava.io.IOExceptionorg.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 org.alfresco.httpclient.AuthenticationException, java.io.IOException, org.json.JSONException, org.apache.commons.codec.EncoderException
- Throws:
org.alfresco.httpclient.AuthenticationExceptionjava.io.IOExceptionorg.json.JSONExceptionorg.apache.commons.codec.EncoderException
-
getNodes
public java.util.List<Node> getNodes(GetNodesParameters parameters, int maxResults) throws org.alfresco.httpclient.AuthenticationException, java.io.IOException, org.json.JSONException
- Throws:
org.alfresco.httpclient.AuthenticationExceptionjava.io.IOExceptionorg.json.JSONException
-
getNodesMetaData
public java.util.List<NodeMetaData> getNodesMetaData(NodeMetaDataParameters params) throws org.alfresco.httpclient.AuthenticationException, java.io.IOException, org.json.JSONException
- Throws:
org.alfresco.httpclient.AuthenticationExceptionjava.io.IOExceptionorg.json.JSONException
-
getTextContent
public SOLRAPIClient.GetTextContentResponse getTextContent(java.lang.Long nodeId, org.alfresco.service.namespace.QName propertyQName, java.lang.Long modifiedSince) throws org.alfresco.httpclient.AuthenticationException, java.io.IOException
- Throws:
org.alfresco.httpclient.AuthenticationExceptionjava.io.IOException
-
getModel
public AlfrescoModel getModel(java.lang.String coreName, org.alfresco.service.namespace.QName modelName) throws org.alfresco.httpclient.AuthenticationException, java.io.IOException
- Throws:
org.alfresco.httpclient.AuthenticationExceptionjava.io.IOException
-
getModelsDiff
public java.util.List<AlfrescoModelDiff> getModelsDiff(java.lang.String coreName, java.util.List<AlfrescoModel> currentModels) throws org.alfresco.httpclient.AuthenticationException, java.io.IOException, org.json.JSONException
- Throws:
org.alfresco.httpclient.AuthenticationExceptionjava.io.IOExceptionorg.json.JSONException
-
getNextTxCommitTime
public java.lang.Long getNextTxCommitTime(java.lang.String coreName, java.lang.Long fromCommitTime) throws org.alfresco.httpclient.AuthenticationException, java.io.IOException, java.lang.NoSuchMethodExceptionReturns the next commit time from a given commit time.- Parameters:
coreName- alfresco, archivefromCommitTime- initial transaction commit time- Returns:
- Time of the next transaction
- Throws:
java.io.IOExceptionorg.alfresco.httpclient.AuthenticationExceptionjava.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) throws org.alfresco.httpclient.AuthenticationException, java.io.IOException, java.lang.NoSuchMethodExceptionReturns 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:
java.io.IOExceptionorg.alfresco.httpclient.AuthenticationExceptionjava.lang.NoSuchMethodException
-
close
public void close()
-
-