com.filenet.api.engine
Interface DocumentClassifier
-
public interface DocumentClassifierAn 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. ADocumentClassifierimplementation 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
QueueItemand 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
CodeModuleobject, or you can specify a Java document classifier in the classpath of the application server where the Content Engine is running.
-
-
Method Detail
-
classify
void classify(Document doc) throws EngineRuntimeException
Assigns a Content Engine class to theDocumentobject 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
docparameter is checked in by calling itscheckinmethod with theautoClassifyparameter set toAUTO_CLASSIFY. - A
DocumentClassificationActionobject exists whoseMimeTypeproperty value is identical to that of theMimeTypeproperty of the checked-in document.
- Parameters:
doc- ADocumentobject that specifies the document to auto-classify during check-in.- Throws:
EngineRuntimeException
- The document specified by the
-
-