I've created a custom "type" in my content model that models a file with a custom file format/extension.
I've configured Tika and Alfresco to recognize this file as a specific MIME type. Now, I would like to apply (setType) my custom model type to any file of this mime type added anywhere in the repository.
To that end, I've created a behavior that binds to onCreateNode for any cm:content. Unfortunately the mimetype is unavailable at this point in the lifecycle (throws NPE retrieving ContentData) and in any event, it appears that Tika runs *after* this point.
I've been looking at NodeMonitor and TransactionListener, but I'm not certain this is the right path either.
What would be an appropriate method for accomplishing what I want?
Thanks!