class HtmlFormCredential extends Credential {
    private static final long serialVersionUID = -4L;

    private static final Logger logger =
        Logger.getLogger(HtmlFormCredential.class.getName());

    /**
     * Full URI of page that contains the HTML login form we're to apply these
     * credentials too: E.g. http://www.archive.org
     */
    protected String loginUri = "";
    public String getLoginUri() {
        return this.loginUri;
    }
    public void setLoginUri(String loginUri) {
        this.loginUri = loginUri;
    }
    
    /**
     * Form items.
     * 
     */
    protected Map<String, String> formItems = new TreeMap<String, String>();

    public Map<String, String> getFormItems() {
        return this.formItems;
    }

    public void setFormItems(Map<String, String> formItems) {
        this.formItems = formItems;
    }
    
    
    public enum Method {
        GET,
        POST
    }
    /**
     * GET or POST.
     */
    /** @deprecated ignored, always POST*/
    protected Method httpMethod = Method.POST;
    /** @deprecated ignored, always POST*/
    public Method getHttpMethod() {
        return this.httpMethod;
    }
    /** @deprecated ignored, always POST*/
    public void setHttpMethod(Method method) {
        this.httpMethod = method; 
    }

    /**
     * Constructor.
     */
    public HtmlFormCredential() {
    }

    public boolean isPrerequisite(final CrawlURI curi) {<FILL_FUNCTION_BODY>}

    public boolean hasPrerequisite(CrawlURI curi) {
        return getPrerequisite(curi) != null;
    }

    public String getPrerequisite(CrawlURI curi) {
        return getLoginUri();
    }

    public String getKey() {
        return getLoginUri();
    }

    public boolean isEveryTime() {
        // This authentication is one time only.
        return false;
    }

    public boolean isPost() {
        return Method.POST.equals(getHttpMethod());
    }
}

        boolean result = false;
        String curiStr = curi.getUURI().toString();
        String loginUri = getPrerequisite(curi);
        if (loginUri != null) {
            try {
                UURI uuri = UURIFactory.getInstance(curi.getUURI(), loginUri);
                if (uuri != null && curiStr != null &&
                    uuri.toString().equals(curiStr)) {
                    result = true;
                    if (!curi.isPrerequisite()) {
                        curi.setPrerequisite(true);
                        logger.fine(curi + " is prereq.");
                    }
                }
            } catch (URIException e) {
                logger.severe("Failed to uuri: " + curi + ", " +
                    e.getMessage());
            }
        }
        return result;
    
<methods>public void <init>() ,public void attach(org.archive.modules.CrawlURI) ,public boolean detach(org.archive.modules.CrawlURI) ,public boolean detachAll(org.archive.modules.CrawlURI) ,public java.lang.String getDomain() ,public abstract java.lang.String getKey() ,public abstract java.lang.String getPrerequisite(org.archive.modules.CrawlURI) ,public abstract boolean hasPrerequisite(org.archive.modules.CrawlURI) ,public abstract boolean isEveryTime() ,public abstract boolean isPost() ,public abstract boolean isPrerequisite(org.archive.modules.CrawlURI) ,public boolean rootUriMatch(org.archive.modules.net.ServerCache, org.archive.modules.CrawlURI) ,public void setDomain(java.lang.String) <variables>protected java.lang.String domain,private static final java.util.logging.Logger logger,private static final long serialVersionUID