[freenet-cvs] r12150 - trunk/freenet/src/freenet/pluginmanager

nextgens at freenetproject.org nextgens at freenetproject.org
Thu Mar 15 23:54:06 UTC 2007


Author: nextgens
Date: 2007-03-15 23:54:05 +0000 (Thu, 15 Mar 2007)
New Revision: 12150

Modified:
   trunk/freenet/src/freenet/pluginmanager/PluginRespirator.java
Log:
reapply r12151: add a few additionnal method to PluginRespirator

Modified: trunk/freenet/src/freenet/pluginmanager/PluginRespirator.java
===================================================================
--- trunk/freenet/src/freenet/pluginmanager/PluginRespirator.java	2007-03-15 21:56:22 UTC (rev 12149)
+++ trunk/freenet/src/freenet/pluginmanager/PluginRespirator.java	2007-03-15 23:54:05 UTC (rev 12150)
@@ -3,18 +3,22 @@
 import java.net.URISyntaxException;
 
 import freenet.client.HighLevelSimpleClient;
+import freenet.clients.http.PageMaker;
 import freenet.clients.http.filter.FilterCallback;
 import freenet.node.Node;
 import freenet.node.RequestStarter;
+import freenet.support.HTMLNode;
 import freenet.support.URIPreEncoder;
 
 public class PluginRespirator {
-	private HighLevelSimpleClient hlsc = null;
-	private Node node;
+	private final HighLevelSimpleClient hlsc;
+	private final Node node;
+	private final PageMaker pageMaker;
 	
 	public PluginRespirator(Node node, PluginManager pm) {
 		this.node = node;
 		this.hlsc = node.clientCore.makeClient(RequestStarter.INTERACTIVE_PRIORITY_CLASS);
+		this.pageMaker = new PageMaker("clean");
 	}
 	
 	//public HighLevelSimpleClient getHLSimpleClient() throws PluginSecurityException {
@@ -33,4 +37,18 @@
 			throw new Error(e);
 		}
 	}
+	
+	public PageMaker getPageMaker(){
+		return pageMaker;
+	}
+	
+	public HTMLNode addFormChild(HTMLNode parentNode, String target, String name) {
+		HTMLNode formNode =
+			parentNode.addChild("form", new String[] { "action", "method", "enctype", "id", "name", "accept-charset" }, 
+					new String[] { target, "post", "multipart/form-data", name, name, "utf-8"} );
+		formNode.addChild("input", new String[] { "type", "name", "value" }, 
+				new String[] { "hidden", "formPassword", node.clientCore.formPassword });
+		
+		return formNode;
+	}
 }




More information about the cvs mailing list