com.filenet.api.engine

Interface DocumentClassifier



  • public interface DocumentClassifier
    An interface to be implemented to automatically classify documents of a particular content type. When a document of the targeted content type is checked in with AUTO_CLASSIFY specified, the implementation assigns the applicable Content Engine class to the document. A DocumentClassifier implementation runs on the server.

    When implementing a document classifier, consider the following points:

    • A document classifier runs asynchronously.
    • An exception thrown by a document classifier will be logged to the server, and the asynchronous action will remain in the QueueItem and retried as often as set in the RetryCount property.
    • To update a source object, you must first fetch the persisted instance of the source object before updating it. Do not update the source object passed to the document classifier.
    • You can implement a document classifier as a Java or JavaScript component. You can check in a Java document classifier as a CodeModule object, or you can specify a Java document classifier in the classpath of the application server where the Content Engine is running.
    See Also:
    DocumentClassificationAction, checkin, Document Classification Concepts, Action Handlers: Restrictions and Best Practices
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void classify(Document doc)
      Assigns a Content Engine class to the Document object passed to the method.
    • Method Detail

      • classify

        void classify(Document doc)
                      throws EngineRuntimeException
        Assigns a Content Engine class to the Document object passed to the method. Typically, this involves parsing the content of the document and mapping metadata from the content to properties of the Content Engine class. This method is executed by the server when both of the following events occur:
        • The document specified by the doc parameter is checked in by calling its checkin method with the autoClassify parameter set to AUTO_CLASSIFY.
        • A DocumentClassificationAction object exists whose MimeType property value is identical to that of the MimeType property of the checked-in document.
        Parameters:
        doc - A Document object that specifies the document to auto-classify during check-in.
        Throws:
        EngineRuntimeException

© Copyright IBM Corporation 2006, 2013. All rights reserved.