package com.bloatit.framework.webserver.url;

import com.bloatit.framework.utils.Parameters;
import com.bloatit.framework.utils.SessionParameters;

public abstract class UrlNode implements Iterable<UrlNode>, Cloneable {

    public UrlNode() {
        super();
    }

    @Override
    public abstract UrlNode clone() throws CloneNotSupportedException;

    public final String urlString() {
        final StringBuilder sb = new StringBuilder();
        constructUrl(sb);
        return sb.toString();
    }

    public abstract Messages getMessages();

    protected abstract void parseSessionParameters(final SessionParameters params);
    protected abstract void parseParameters(final Parameters params);

    /**
     * Begin with a '/' and no slash at the end.
     */
    protected abstract void constructUrl(final StringBuilder sb);

    @Deprecated
    public abstract void addParameter(String name, String value);
}
@@ -139,16 +139,68 @@
 ameters;
+%0Aimport com.bloatit.framework.xcgiserver.HttpHeader;
 %0A%0Apublic
@@ -550,24 +550,145 @@
 g();%0A    %7D%0A%0A
+    public final String externalUrlString(HttpHeader header) %7B%0A        return header.getHttpHost() + urlString();%0A    %7D%0A%0A
     public a
@@ -804,16 +804,17 @@
 arams);%0A
+%0A
     prot

add a external url builder