Currently, there are at least four constants:
There are also mismatches in the Javadoc. See the review comments in CR-EJBCA-2038
In my own opinion, it would make most sense to have these in EndEntityProfile and CertificateProfile classes, or maybe in SecConst (which has a lot of constants already).
And there should be different constants for end entity profiles and certificate profiles, because now it's hard to tell what a "PROFILE_NO_PROFILE" means in the code.
These constants are used in a lot of places (and there might also be some places where a literal 0 is still being used), but it is mostly simple "search and replace" work.