// Path: src/com/govu/Govu.java
// public class Govu {
// 
//     public static String VERSION = "0.0.4";
//     public static String root;
//     public static String dbRoot;
//     public static String webRoot;
//     public static Logger logger;
//     public static int PORT;
//     public static Set<WebApplication> apps = new HashSet<>();
//     public static Config config;
//     private DB db;
// 
//     /**
//      * @param args the command line arguments
//      */
//     public static void main(String[] args) {
//         if (args.length > 0) {
//             String command = args[0].toLowerCase();
//             if (command.equals("deploy")) {
//                 new DeployCommand().process(args);
//             } else if (command.equals("delete")) {
//                 new DeleteCommand().process(args);
//             } else {
//                 System.out.println("Unknown govu command: " + args[0]);
//             }
//         } else {
//             //Start govu web server
//             Govu govu = new Govu();
//         }
//     }
// 
//     public Govu() {
//         logger = Logger.getLogger("govu");
//         root = System.getProperty("user.dir");
//         dbRoot = root + "/db";
//         webRoot = root + "/web";
//         logger.debug("Staring Govu Server " + VERSION + "...");
// 
//         try {
//             config = new Config();
//             config.readProperties();
//         } catch (IOException | InterruptedException ex) {
//             logger.error("Error reading config file", ex);
//         }
// 
// 
//         File webDir = new File(webRoot);
//         if (!webDir.exists()) {
//             logger.debug("Creating web base directory");
//             webDir.mkdir();
//         }
// 
//         File dbDir = new File(dbRoot);
//         if (!dbDir.exists()) {
//             logger.debug("Creating database base directory");
//             dbDir.mkdir();
//         }
// 
//         //Init Database Provider
//         db = new DB(new DB4OProvider());
// 
//         //Init http server
//         ServerBootstrap httpBootStrap = new ServerBootstrap(new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
//         httpBootStrap.setOption("child.tcpNoDelay", true);
//         httpBootStrap.setPipelineFactory(new HttpServerPipelineFactory());
//         httpBootStrap.bind(new InetSocketAddress(PORT));
// 
//         logger.debug("Govu started successfully. Happy coding!");
//     }
// 
//     public static WebApplication getWebApp(String host, String path) {
//         for (Iterator<WebApplication> it = apps.iterator(); it.hasNext();) {
//             WebApplication app = it.next();
//             if ((app.getDomain() != null && app.getDomain().equals(host))
//                     || (app.getDomain() == null && path.startsWith(app.getRootPath()))) {
//                 return app;
//             }
//         }
//         return null;
//     }
//     
//     public static WebApplication getWebApp(String name) {
//         for (Iterator<WebApplication> it = apps.iterator(); it.hasNext();) {
//             WebApplication app = it.next();
//             if (app.getName().equals(name)){
//                 return app;
//             }
//         }
//         return null;
//     }
// }


import com.db4o.collections.ActivatableHashMap;
import com.govu.Govu;
import java.net.HttpCookie;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.UUID;
import org.jboss.netty.handler.codec.http.Cookie;
        return null;
    }

    public void setSession(String key, Object value) {
        if (!sessionContainer.containsKey(getSessionID())) {
            sessionContainer.put(getSessionID(), new ActivatableHashMap<String, Object>());
        }
        sessionContainer.get(getSessionID()).put(key, value);
    }

    public Object getSession(String key) {
        if (sessionContainer.containsKey(getSessionID())) {
            return sessionContainer.get(getSessionID()).get(key);
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRootPath() {
        return rootPath;
    }

    public String getAbsolutePath() {
// Path: src/com/govu/Govu.java
// public class Govu {
// 
//     public static String VERSION = "0.0.4";
//     public static String root;
//     public static String dbRoot;
//     public static String webRoot;
//     public static Logger logger;
//     public static int PORT;
//     public static Set<WebApplication> apps = new HashSet<>();
//     public static Config config;
//     private DB db;
// 
//     /**
//      * @param args the command line arguments
//      */
//     public static void main(String[] args) {
//         if (args.length > 0) {
//             String command = args[0].toLowerCase();
//             if (command.equals("deploy")) {
//                 new DeployCommand().process(args);
//             } else if (command.equals("delete")) {
//                 new DeleteCommand().process(args);
//             } else {
//                 System.out.println("Unknown govu command: " + args[0]);
//             }
//         } else {
//             //Start govu web server
//             Govu govu = new Govu();
//         }
//     }
// 
//     public Govu() {
//         logger = Logger.getLogger("govu");
//         root = System.getProperty("user.dir");
//         dbRoot = root + "/db";
//         webRoot = root + "/web";
//         logger.debug("Staring Govu Server " + VERSION + "...");
// 
//         try {
//             config = new Config();
//             config.readProperties();
//         } catch (IOException | InterruptedException ex) {
//             logger.error("Error reading config file", ex);
//         }
// 
// 
//         File webDir = new File(webRoot);
//         if (!webDir.exists()) {
//             logger.debug("Creating web base directory");
//             webDir.mkdir();
//         }
// 
//         File dbDir = new File(dbRoot);
//         if (!dbDir.exists()) {
//             logger.debug("Creating database base directory");
//             dbDir.mkdir();
//         }
// 
//         //Init Database Provider
//         db = new DB(new DB4OProvider());
// 
//         //Init http server
//         ServerBootstrap httpBootStrap = new ServerBootstrap(new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
//         httpBootStrap.setOption("child.tcpNoDelay", true);
//         httpBootStrap.setPipelineFactory(new HttpServerPipelineFactory());
//         httpBootStrap.bind(new InetSocketAddress(PORT));
// 
//         logger.debug("Govu started successfully. Happy coding!");
//     }
// 
//     public static WebApplication getWebApp(String host, String path) {
//         for (Iterator<WebApplication> it = apps.iterator(); it.hasNext();) {
//             WebApplication app = it.next();
//             if ((app.getDomain() != null && app.getDomain().equals(host))
//                     || (app.getDomain() == null && path.startsWith(app.getRootPath()))) {
//                 return app;
//             }
//         }
//         return null;
//     }
//     
//     public static WebApplication getWebApp(String name) {
//         for (Iterator<WebApplication> it = apps.iterator(); it.hasNext();) {
//             WebApplication app = it.next();
//             if (app.getName().equals(name)){
//                 return app;
//             }
//         }
//         return null;
//     }
// }


// Path: src/com/govu/application/WebApplication.java
import com.db4o.collections.ActivatableHashMap;
import com.govu.Govu;
import java.net.HttpCookie;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.UUID;
import org.jboss.netty.handler.codec.http.Cookie;

        return null;
    }

    public void setSession(String key, Object value) {
        if (!sessionContainer.containsKey(getSessionID())) {
            sessionContainer.put(getSessionID(), new ActivatableHashMap<String, Object>());
        }
        sessionContainer.get(getSessionID()).put(key, value);
    }

    public Object getSession(String key) {
        if (sessionContainer.containsKey(getSessionID())) {
            return sessionContainer.get(getSessionID()).get(key);
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRootPath() {
        return rootPath;
    }

    public String getAbsolutePath() {
        return Govu.webRoot + getRootPath();