Unless there are objections, let's add an enum for the various .msg types: post, note, contact etc. This is related to TIKA-2281.
r1784978 I accidentally got the naming right. I think. Thank you, Javen, for linking this. I'm not sure I got the preferred deprecation, tho. Let me know if I should fix that or anything else unsavory about the patch.
From Javen...for posterity: Add "@deprecated 3.16 beta 3. Use getMessageClassEnum instead...", @Deprecated, and @Removal(version="3.18")
Some comments, without looking at the code: Will we be able to remove/replace String getMessageClass() with getMessageClassEnum()? The enum version calls the string version (for now). This would mean we'd have to move some code around or rename public String getMessageClass () to private String getMessageClassString(). mainChunks.getMessageClass() looks like this method is part of an interface. Have we deprecated that method in the interface and all implementing classes?
Javen, I'm sorry for my delay. > Will we be able to remove/replace String getMessageClass() with getMessageClassEnum()? Yes, and then back again much later, right? The user can still get the underlying StringChunk if they want the literal chunk. > The enum version calls the string version (for now). This would mean we'd have to move some code around or rename public String getMessageClass () to private String getMessageClassString(). I fixed that. Thank you. > mainChunks.getMessageClass() looks like this method is part of an interface. Have we deprecated that method in the interface and all implementing classes? I don't think we should. That is a low-level call that returns the StringChunk. Advanced users should have access to that.