Interface DocumentPublisher

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void bulkUpdate​(BulkUpdate bulkUpdateMessage)
      Issue a bulk update.
      void delete​(java.lang.String... docIds)
      Delete a list of documents.
      void delete​(java.lang.String queryWorkflow, Query query)
      Delete all documents that match a query.
      void feed​(IngestDocument... doc)
      Feed one of more documents to Attivio.
      java.util.UUID getClientId()  
      boolean isInTestMode()
      Test mode is set by the user to quickly test that scanner can connect and fetch data.
      boolean isStopped()  
      void put​(IngestDocument doc, java.lang.String fieldName, java.lang.String id, java.io.InputStream is)
      Store the content stream in the content store an put a ContentPointer in the indicated document field.
      boolean waitForCompletion​(long timeoutMillis)
      Wait the specified number of milliseconds for all the documents to be processed.
    • Method Detail

      • getClientId

        java.util.UUID getClientId()
        Returns:
        the clientId used to feed content to Attivio.
      • put

        void put​(IngestDocument doc,
                 java.lang.String fieldName,
                 java.lang.String id,
                 java.io.InputStream is)
          throws AttivioException
        Store the content stream in the content store an put a ContentPointer in the indicated document field.
        Parameters:
        doc - the Attivio document where the ContentPointer should be placed.
        fieldName - to put the ContentPointer in.
        id - An id to identify the content in the content store. Could be any id that will guarantee uniqueness e.g. UUID.randomUUID().
        is - the stream of content.
        Throws:
        AttivioException
      • delete

        void delete​(java.lang.String... docIds)
             throws AttivioException
        Delete a list of documents.
        Parameters:
        docIds - the ids of the documents to delete.
        Throws:
        AttivioException
      • delete

        void delete​(java.lang.String queryWorkflow,
                    Query query)
             throws AttivioException
        Delete all documents that match a query.
        Parameters:
        queryWorkflow - to use for query processing
        query - the query that identifies documents to delete
        Throws:
        AttivioException
      • isStopped

        boolean isStopped()
        Returns:
        true if the scan has been stopped by user intervention.
      • waitForCompletion

        boolean waitForCompletion​(long timeoutMillis)
                           throws AttivioException
        Wait the specified number of milliseconds for all the documents to be processed. A timeout of
        <=0
        means to wait forever.
        Parameters:
        timeoutMillis - the max time to wait in milliseconds
        Returns:
        true if all document processing message results were received before the timeout.
        Throws:
        AttivioException
      • isInTestMode

        boolean isInTestMode()
        Test mode is set by the user to quickly test that scanner can connect and fetch data. It is typically used by the scanner to avoid changing the state of incremental scanning when in test mode.
        Returns:
        true if running in test mode; false if not running in test mode