001    package com.khubla.pragmatach.examples.facebookexample;
002    
003    import com.khubla.pragmatach.framework.annotation.Controller;
004    import com.khubla.pragmatach.framework.annotation.Route;
005    import com.khubla.pragmatach.framework.annotation.Route.HttpMethod;
006    import com.khubla.pragmatach.framework.annotation.View;
007    import com.khubla.pragmatach.framework.api.PragmatachException;
008    import com.khubla.pragmatach.framework.api.Response;
009    import com.khubla.pragmatach.plugin.facebook.FacebookLoginController;
010    
011    @Controller(name = "IndexController")
012    @View(view = "index.html")
013    public class IndexController extends FacebookLoginController {
014       /**
015        * ctor
016        */
017       public IndexController() throws PragmatachException {
018          super("/");
019       }
020    
021       /**
022        * the main view
023        */
024       @Route(uri = "/")
025       public Response render() throws PragmatachException {
026          return super.render();
027       }
028    
029       /**
030        * the FB callback
031        */
032       @Route(uri = "plugins/facebook/dologin/", method = HttpMethod.get)
033       public Response doLogin() throws PragmatachException {
034          return super.doLogin();
035       }
036    }