Interface Design Problem: Storing Result of Transactions
- by jboyd
Requirements:
multiple sources of input (social media content) into a system
multiple destinations of output (social media api's)
sources and destinations WILL be added
some pseudo:
IContentProvider contentProvider = context.getBean("contentProvider");
List<Content> toPost = contentProvider.getContent();
for (Content c : toPost) {
SocialMediaPresence smPresence = socialMediaService.getSMPresenceBySomeId(c.getDestId());
smPresence.hasTwitter(); smPresence.hasFacebook(); //just to show what this is
smPresence.postContent(c); //post content could fail for some SM platforms, but shoulnd't be lost forever
}
So now I run out of steam, I need to know what content has been successfully posted, and if it hasn't gone too all platforms, or if another platform were added in the future that content needs to go out for it as well (therefore my content provider will need to not only know if content has gone out, but for what platforms). I'm not looking for code, although sample/pseudo is fine... I'm looking for an approach to this problem that I can implement