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    
011    /**
012     * @author tome
013     */
014    @Controller(name = "pragmatachEnvironmentController")
015    @View(view = "pragmatach/admin/environment.html")
016    public class ShowEnvironmentController extends SecuredAdminController {
017       /**
018        * env
019        */
020       private Map<String, String> environment;
021    
022       public Map<String, String> getEnvironment() {
023          return environment;
024       }
025    
026       @Route(uri = "/pragmatach/admin/environment")
027       public Response render() throws PragmatachException {
028          environment = System.getenv();
029          return super.render();
030       }
031    
032       public void setEnvironment(Map<String, String> environment) {
033          this.environment = environment;
034       }
035    }