API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jottools.actions. ConfigView View Javadoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package net.jottools.actions;

import java.io.OutputStream;
import java.util.Hashtable;
import net.jot.JOTInitializer;

/**
 *
 * @author thibautc
 */
public abstract class ConfigView {
    Hashtable attributes=new Hashtable();
    
    public void writePage(OutputStream out, Hashtable parameters)
    {
        //String workspace=getWorkspace();
        //if(workspace!=null)
        //    attributes.put("workspace",workspace);
        
        String content=getPageContent(parameters);
        try
        {
            out.write("HTTP/1.0 200 OK\r\n".getBytes());
            //out.write(("Content-Length: "+content.length()+"\n").getBytes());
            out.write(("Content-Type: text/html; charset=utf-8\r\n").getBytes());
            out.write(("\r\n").getBytes());
                        
            out.write(content.getBytes());
            out.flush();
        }
        catch(Exception e){}
    }
    
    public String getJotHeader()
    {
        return "<center><a href='/home'>JavaOnTracks "+JOTInitializer.VERSION+" config tool.</a></center><br>Workspace(Projects root): <input type='text' size='40' name='workspace'/><input type='submit' value='Update'/><hr/>";
    }
    
    /**
     *  get the html inner page
     *  
     */
    public abstract String getPageContent(Hashtable parameters);

    /*private String getWorkspace()
    {
         
    }*/
    
}

Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar