01: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
02: // Released under the terms of the GNU General Public License version 2 or later.
03: package fitnesse;
04:
05: import fitnesse.wiki.WikiPage;
06: import fitnesse.responders.ResponderFactory;
07: import fitnesse.responders.run.SocketDealer;
08: import fitnesse.components.Logger;
09: import fitnesse.html.HtmlPageFactory;
10: import fitnesse.authentication.*;
11:
12: public class FitNesseContext {
13: public FitNesse fitnesse;
14:
15: public int port = 80;
16:
17: public String rootPath = ".";
18:
19: public String rootPageName = "FitNesseRoot";
20:
21: public String rootPagePath = "";
22:
23: public WikiPage root;
24:
25: public ResponderFactory responderFactory = new ResponderFactory(
26: rootPagePath);
27:
28: public Logger logger;
29:
30: public SocketDealer socketDealer = new SocketDealer();
31:
32: public Authenticator authenticator = new PromiscuousAuthenticator();
33:
34: public HtmlPageFactory htmlPageFactory = new HtmlPageFactory();
35:
36: public FitNesseContext() {
37: }
38:
39: public FitNesseContext(WikiPage root) {
40: this .root = root;
41: }
42:
43: public String toString() {
44: String endl = System.getProperty("line.separator");
45: StringBuffer buffer = new StringBuffer();
46: buffer.append("\t").append("Port: ").append(port).append(endl);
47: buffer.append("\t").append("Repository: ").append(rootPagePath)
48: .append(endl);
49: //buffer.append("\t").append("logger: ").append(logger == null ? "none" : logger.toString())
50: // .append(endl);
51: //buffer.append("\t").append("authenticator: ").append(authenticator).append(endl);
52: //buffer.append("\t").append("html page factory: ").append(htmlPageFactory).append(endl);
53: return buffer.toString();
54: }
55: }
|