SeamFramework.orgCommunity Documentation
Each OAuth Application needs a specific qualifier bearing the @ServiceRelated
Meta annotation.
Out of the box Seam Social provides one default OAuth application qualifier for each social services provides
(@Twitter
, @LinkedIn
, @Facebook
). Should you need to support more than one
application for a given service, you’d have to create a new service related qualifier (@TwitterMyApp
for instance). Please refer to the "Extending Seam Social" section to learn more about this.
Those qualifiers will be used on all the bean attached to a given OAuth application. They are useful to avoid
ambiguous injection in the generic part of the API :
@Inject @Twitter OAuthService twiterService;
and
@Inject @Facebook OAuthService fbService;
Inject two different beans implementing the same interface (OAuthService).
JSON exchanges are managed by two beans:
JsonMapper
which deals with the implementation of JSON parser (Right now Jackson)JsonService
which has a higher function and uses JsonMapper
to provide
decoupling from the Json parser.Seam social uses the Generic bean functionality provided by Solder. Thus when you write :
@OAuthApplication(apiKey = "FQzlQC49UhvbMZoxUIvHTQ", apiSecret = "VQ5CZHG4qUoAkUUmckPn4iN4yyjBKcORTW0wnok4r1k") @Twitter @Produces TwitterService twitterServiceProducer(TwitterService ts) { return ts; }
The Generic extension creates the followings CDI beans with the same qualifier as the produced services
(@Twitter
in the example above) for you :