Closed r-narayanan closed 4 years ago
Probably it isn't the best idea. Your code isn't reusable. What if you need to send a notification that you have been added/removed from group? In my view, you should consider to create enum with message codes and create localized messages for every language. In addition, you should create list or map for params.
public class Notification{
private MessageCode msgCode;
private List<String> params;
private User user;
.
.
.
}
And you will have for example sample message.
project.add.success="You have been added to project {0}"
In params list you can store for instance id for the project. And add name programmatically via simple String operations.
No response. Closed.
Adding a skeleton for #40