The OOTB messages are mostly picked from the different resource bundles which are present under resource.jar of various modules. E.g. you can find variants of the "invalid password" message in the resources.jar/atg/userprofiling/ProfileResources.properties under DPS\lib. Now if you want these messages also to be controlled through MessageRepository you would have to extend the specific OOTB classes (FormHandlers, Tools & Manager classes) using those resource bundles and override the methods to lookup the message from MessageRepository instead of using ResourceBundle.
There is no list of methods for retrieving user messages. ATG's form handlers follow a few different patterns depending on things like when they were written, by whom, and what packages they're in.
What's your motivation for moving user messages from resource bundles to a repository? Are you planning to let business users edit the messages? Depending on how you set things up, you may make it more difficult to absorb new ATG releases, which often add messages to existing bundles. You may also make it difficult to benefit from translations into new languages as Oracle/ATG rolls them out. Also, if you start overriding methods that retrieve messages, you have to be careful not to break error messages and info messages, which I assume will continue to live in resource bundles.
Thanks for the reply. I understand the depth of the problem. The business team wants to be able to override any error message from the system. So I thought of putting together the possible list of classes which they have to override to make the error lookup based on the repository like the formatUserMessage.
My question is why the overridden messages have to live in a repository rather than in an override resource bundle. It's a straightforward process to override resourced messages. Changing a message requires restarting the ATG servers, but overrides don't usually happen often enough for that to be a problem.