Class MockSearchClient

    • Constructor Detail

      • MockSearchClient

        public MockSearchClient()
    • Method Detail

      • reset

        public void reset()
        Clear the documents and/or response returned on a search call
      • add

        public void add​(SearchDocument... docs)
        Add documents to be returned on a search call
        Parameters:
        docs -
      • setResponse

        public void setResponse​(QueryResponse response)
      • search

        public QueryResponse search​(QueryRequest query)
        Description copied from interface: SearchClient
        Sends the query to the Attivio search and returns the result.
        Specified by:
        search in interface SearchClient
        Parameters:
        query - the query to send
        Returns:
        query response
      • getDocumentById

        public SearchDocument getDocumentById​(java.lang.String documentId)
        Description copied from interface: SearchClient
        Gets a document by a specific document Id
        Specified by:
        getDocumentById in interface SearchClient
        Parameters:
        documentId - ID of the document that will be returned
        Returns:
        document that was requested or null if does not exist.
      • search

        public QueryResponse search​(java.lang.String query)
        Description copied from interface: SearchClient
        Searches using a query string only. The query is assumed to be in the simple Attivio query language.
        Specified by:
        search in interface SearchClient
        Parameters:
        query - the query to use
        Returns:
        the query response
      • getDefaultSchema

        public Schema getDefaultSchema()
        Description copied from interface: SearchClient
        Gets the schema named 'default' which is the most commonly one used throughout the system.
        Specified by:
        getDefaultSchema in interface SearchClient
      • getSchema

        public Schema getSchema​(java.lang.String schemaName)
        Description copied from interface: SearchClient
        Get a named schema in the system or null if it does not exist.
        Specified by:
        getSchema in interface SearchClient
      • setClientWorkflow

        public void setClientWorkflow​(java.lang.String workflow)
        Description copied from interface: SearchClient
        Sets the default client workflow to use for this search client.
        Specified by:
        setClientWorkflow in interface SearchClient
        Parameters:
        workflow - the workflow name to use