github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

thesmith / bbc-shindig-example

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 2
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Example of how to extend Shindig — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

updating README to link to blog post 
thesmith (author)
Sun Nov 22 14:27:17 -0800 2009
commit  d3168465d8a55a45ec9ff4215cdfe51a5e4c6adb
tree    ba003c140a6b29695c9f54b027adb6cf1f29675f
parent  2d1abe473e50c80c8bb36ff1d80f0d59c93564cb
bbc-shindig-example / src / main / java / bbc / social / shindig / example / GuiceModule.java src/main/java/bbc/social/shindig/example/GuiceModule.java
100644 54 lines (43 sloc) 2.025 kb
edit raw blame history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package bbc.social.shindig.example;
 
import java.util.Set;
 
import org.apache.shindig.social.core.config.SocialApiGuiceModule;
import org.apache.shindig.social.opensocial.oauth.OAuthDataStore;
import org.apache.shindig.social.opensocial.service.ActivityHandler;
import org.apache.shindig.social.opensocial.service.AppDataHandler;
import org.apache.shindig.social.opensocial.service.MessageHandler;
import org.apache.shindig.social.opensocial.spi.ActivityService;
import org.apache.shindig.social.opensocial.spi.AppDataService;
import org.apache.shindig.social.opensocial.spi.MessageService;
import org.apache.shindig.social.opensocial.spi.PersonService;
import org.apache.shindig.social.sample.oauth.SampleOAuthDataStore;
import org.apache.shindig.social.sample.oauth.SampleRealm;
 
import bbc.social.shindig.example.handler.PersonHandlerImpl;
import bbc.social.shindig.example.service.RelationshipService;
import bbc.social.shindig.example.service.impl.JsonDbServiceExample;
 
import com.google.common.collect.ImmutableSet;
import com.google.inject.name.Names;
 
/**
* Example GuiceModule binds everything together
*
* @author bens
*/
public class GuiceModule extends SocialApiGuiceModule {
 
  @Override
  protected void configure() {
    super.configure();
    bind(String.class).annotatedWith(Names.named("shindig.canonical.json.db"))
        .toInstance("sampledata/canonicaldb.json");
 
    bind(ActivityService.class).to(JsonDbServiceExample.class);
    bind(AppDataService.class).to(JsonDbServiceExample.class);
    bind(PersonService.class).to(JsonDbServiceExample.class);
    bind(MessageService.class).to(JsonDbServiceExample.class);
    bind(RelationshipService.class).to(JsonDbServiceExample.class);
 
    bind(OAuthDataStore.class).to(SampleOAuthDataStore.class);
 
    requestStaticInjection(SampleRealm.class);
  }
 
  @Override
  protected Set<Object> getHandlers() {
    return ImmutableSet.<Object> of(ActivityHandler.class,
        AppDataHandler.class, PersonHandlerImpl.class, MessageHandler.class);
  }
}
 
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server