Interface Design Problem: Storing Result of Transactions
Posted
by jboyd
on Stack Overflow
See other posts from Stack Overflow
or by jboyd
Published on 2010-04-27T13:09:34Z
Indexed on
2010/04/27
13:33 UTC
Read the original article
Hit count: 364
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
© Stack Overflow or respective owner