Melon News Component needs to be connected with the users of the web site. The implementation of the user module is different in the different web applications. To be reusable in all these web applications the component gives the possibility to the developers to implement NewsUserProvider abstract class by themselves. NewsUserProvider provides the interface between Melon News Component and user data sources.
Methods that should be implemented in NewsUserProvider:
- public abstract
NewsUser Load();
This method should return instance of class NewsUser which is initiated with details of the current logged user. Not all properties of NewsUser are required. The minimum set of news user properties is: UserName, Email.
- public abstract
NewsUserDataTable List(NewsUser
filter);
This method should return user details for these users which are corresponding to the search criteria set in the filter object.
If the component is configured to allow logged users to post comments to the news managed with Melon News Component then one more abstract class should be implemented: CommentUserProvider. This class gives information to the component to the users that post comments.
Methods that should be implemented in CommentUserProvider:
- public abstract
CommentUser Load();
This method should return instance of class CommentUser which is initiated with details of the current logged user who will post comments to news.
- public abstract
CommentUserDataTable List(List<string> lstNicknames);
This method should return user details for the users allowed to post news comments specified by their nicknames.