001    package com.khubla.pragmatach.plugin.adminapp;
002    
003    import java.util.Set;
004    
005    import com.khubla.pragmatach.framework.annotation.Controller;
006    import com.khubla.pragmatach.framework.annotation.Route;
007    import com.khubla.pragmatach.framework.annotation.View;
008    import com.khubla.pragmatach.framework.api.I8NProvider;
009    import com.khubla.pragmatach.framework.api.PragmatachException;
010    import com.khubla.pragmatach.framework.api.Response;
011    import com.khubla.pragmatach.framework.i8n.I8NProviders;
012    
013    /**
014     * @author tome
015     */
016    @Controller(name = "pragmatachShowI8NController")
017    @View(view = "pragmatach/admin/i8n.html")
018    public class ShowI8NController extends SecuredAdminController {
019       /**
020        * i8n providers
021        */
022       private Set<I8NProvider> providers;
023    
024       public Set<I8NProvider> getProviders() {
025          return providers;
026       }
027    
028       @Route(uri = "/pragmatach/admin/i8n")
029       public Response render() throws PragmatachException {
030          providers = I8NProviders.getInstance().providers;
031          return super.render();
032       }
033    
034       public void setProviders(Set<I8NProvider> providers) {
035          this.providers = providers;
036       }
037    }