001 package com.khubla.pragmatach.examples.googleexample; 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.google.GoogleLoginController; 010 011 @Controller(name = "IndexController") 012 @View(view = "index.html") 013 public class IndexController extends GoogleLoginController { 014 /** 015 * ctor 016 */ 017 public IndexController() throws PragmatachException { 018 super("/"); 019 } 020 021 /** 022 * the FB callback 023 */ 024 @Route(uri = "plugins/google/dologin/", method = HttpMethod.get) 025 public Response doLogin() throws PragmatachException { 026 return super.doLogin(); 027 } 028 029 /** 030 * the main view 031 */ 032 @Route(uri = "/") 033 public Response render() throws PragmatachException { 034 return super.render(); 035 } 036 }