org.archive.wayback.proxy
Class ProxyArchivalRequestParser

java.lang.Object
  extended by org.archive.wayback.requestparser.BaseRequestParser
      extended by org.archive.wayback.requestparser.CompositeRequestParser
          extended by org.archive.wayback.proxy.ProxyArchivalRequestParser
All Implemented Interfaces:
RequestParser

public class ProxyArchivalRequestParser
extends CompositeRequestParser

Version:
$Date: 2011-01-03 13:40:21 -0800 (Mon, 03 Jan 2011) $, $Revision: 3365 $
Author:
brad

Field Summary
 
Fields inherited from class org.archive.wayback.requestparser.BaseRequestParser
DEFAULT_MAX_RECORDS, QUERY_BASE, REPLAY_BASE, XQUERY_BASE
 
Constructor Summary
ProxyArchivalRequestParser()
           
 
Method Summary
 List<String> getLocalhostNames()
           
protected  RequestParser[] getRequestParsers()
           
 boolean isAddDefaults()
           
 WaybackRequest parse(javax.servlet.http.HttpServletRequest httpRequest, AccessPoint wbContext)
          attempt to transform an incoming HttpServletRequest into a WaybackRequest object.
 void setAddDefaults(boolean addDefaults)
           
 void setLocalhostNames(List<String> localhostNames)
           
 
Methods inherited from class org.archive.wayback.requestparser.CompositeRequestParser
init
 
Methods inherited from class org.archive.wayback.requestparser.BaseRequestParser
getEarliestTimestamp, getLatestTimestamp, getMaxRecords, setEarliestTimestamp, setLatestTimestamp, setMaxRecords
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyArchivalRequestParser

public ProxyArchivalRequestParser()
Method Detail

getRequestParsers

protected RequestParser[] getRequestParsers()
Specified by:
getRequestParsers in class CompositeRequestParser

getLocalhostNames

public List<String> getLocalhostNames()

setLocalhostNames

public void setLocalhostNames(List<String> localhostNames)

parse

public WaybackRequest parse(javax.servlet.http.HttpServletRequest httpRequest,
                            AccessPoint wbContext)
                     throws BadQueryException,
                            BetterRequestException
Description copied from interface: RequestParser
attempt to transform an incoming HttpServletRequest into a WaybackRequest object. returns null if there is missing information.

Specified by:
parse in interface RequestParser
Overrides:
parse in class CompositeRequestParser
Parameters:
httpRequest - ServletHttpRequest being handled
wbContext - AccessPoint which is attempting to parse the request
Returns:
populated WaybackRequest object if successful, null otherwise.
Throws:
BadQueryException - if the request could match this AccessPoint, but is malformed: invalid datespec, URL, or flags
BetterRequestException - if the request should be redirected to provide better user feedback (corrected URL/date in address bar)

isAddDefaults

public boolean isAddDefaults()
Returns:
the addDefaults

setAddDefaults

public void setAddDefaults(boolean addDefaults)
Parameters:
addDefaults - the addDefaults to set


Copyright © 2005-2011 Internet Archive. All Rights Reserved.