Class SOLRAPIQueueClient


  • public class SOLRAPIQueueClient
    extends SOLRAPIClient
    A client that reads from an internal queue. This is used for test cases.
    • Field Detail

      • ACL_CHANGE_SET_QUEUE

        public static java.util.List<AclChangeSet> ACL_CHANGE_SET_QUEUE
      • ACL_MAP

        public static java.util.Map<java.lang.Long,​java.util.List<Acl>> ACL_MAP
      • ACL_READERS_MAP

        public static java.util.Map<java.lang.Long,​AclReaders> ACL_READERS_MAP
      • TRANSACTION_QUEUE

        public static java.util.List<Transaction> TRANSACTION_QUEUE
      • NODE_MAP

        public static java.util.Map<java.lang.Long,​java.util.List<Node>> NODE_MAP
      • NODE_META_DATA_MAP

        public static java.util.Map<java.lang.Long,​NodeMetaData> NODE_META_DATA_MAP
      • NODE_CONTENT_MAP

        public static java.util.Map<java.lang.Long,​java.lang.String> NODE_CONTENT_MAP
    • Constructor Detail

      • SOLRAPIQueueClient

        public SOLRAPIQueueClient​(org.alfresco.repo.dictionary.NamespaceDAO namespaceDAO)
    • 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 org.alfresco.httpclient.AuthenticationException,
                                              java.io.IOException,
                                              org.json.JSONException
        Description copied from class: SOLRAPIClient
        Get the ACL ChangeSets
        Overrides:
        getAclChangeSets in class SOLRAPIClient
        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
        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 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 the ACL ChangeSets.
        Overrides:
        getAcls in class SOLRAPIClient
        Parameters:
        aclChangeSets - the ACL ChangeSets to include
        minAclId - 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
        java.io.IOException
        org.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
        Overrides:
        getAclReaders in class SOLRAPIClient
        Parameters:
        acls - the ACLs
        Returns:
        the readers for the ACLs
        Throws:
        org.alfresco.httpclient.AuthenticationException
        java.io.IOException
        org.json.JSONException
      • 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
        Overrides:
        getModelsDiff in class SOLRAPIClient
        Throws:
        org.alfresco.httpclient.AuthenticationException
        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)
                                     throws org.alfresco.httpclient.AuthenticationException,
                                            java.io.IOException,
                                            org.json.JSONException
        Overrides:
        getTransactions in class SOLRAPIClient
        Throws:
        org.alfresco.httpclient.AuthenticationException
        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 org.alfresco.httpclient.AuthenticationException,
                                            java.io.IOException,
                                            org.json.JSONException,
                                            org.apache.commons.codec.EncoderException
        Overrides:
        getTransactions in class SOLRAPIClient
        Throws:
        org.alfresco.httpclient.AuthenticationException
        java.io.IOException
        org.json.JSONException
        org.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
        Overrides:
        getNodes in class SOLRAPIClient
        Throws:
        org.alfresco.httpclient.AuthenticationException
        java.io.IOException
        org.json.JSONException
      • getNodesMetaData

        public java.util.List<NodeMetaData> getNodesMetaData​(NodeMetaDataParameters params)
                                                      throws org.alfresco.httpclient.AuthenticationException,
                                                             java.io.IOException,
                                                             org.json.JSONException
        Overrides:
        getNodesMetaData in class SOLRAPIClient
        Throws:
        org.alfresco.httpclient.AuthenticationException
        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 org.alfresco.httpclient.AuthenticationException,
                                                                   java.io.IOException
        Overrides:
        getTextContent in class SOLRAPIClient
        Throws:
        org.alfresco.httpclient.AuthenticationException
        java.io.IOException