001    package com.khubla.pragmatach.plugin.adminapp;
002    
003    import java.util.Map;
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.PragmatachException;
009    import com.khubla.pragmatach.framework.api.Response;
010    import com.khubla.pragmatach.framework.plugin.PluginDescriptor;
011    import com.khubla.pragmatach.framework.plugin.PluginDescriptors;
012    
013    /**
014     * @author tome
015     */
016    @Controller(name = "pragmatachShowPluginsController")
017    @View(view = "pragmatach/admin/plugins.html")
018    public class ShowPluginsController extends SecuredAdminController {
019       /**
020        * plugins
021        */
022       private Map<String, PluginDescriptor> plugins;
023    
024       public Map<String, PluginDescriptor> getPlugins() {
025          return plugins;
026       }
027    
028       @Route(uri = "/pragmatach/admin/plugins")
029       public Response render() throws PragmatachException {
030          plugins = PluginDescriptors.getPlugins();
031          return super.render();
032       }
033    
034       public void setPlugins(Map<String, PluginDescriptor> plugins) {
035          this.plugins = plugins;
036       }
037    }