marcinadd / projecty-web

Project management software based on spring
GNU General Public License v3.0
74 stars 74 forks source link

Adding files for notifications #47

Closed r-narayanan closed 4 years ago

r-narayanan commented 4 years ago

Adding a skeleton for #40

marcinadd commented 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.

marcinadd commented 4 years ago

No response. Closed.