/* ResourceNotAvailableException
 *
 * $Id$
 *
 * Created on Nov 7, 2009.
 *
 * Copyright (C) 2007 Internet Archive.
 *
 * This file is part of wayback.
 *
 * wayback is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
 * any later version.
 *
 * wayback is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser Public License for more details.
 *
 * You should have received a copy of the GNU Lesser Public License
 * along with wayback-svn; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package org.archive.wayback.exception;

import javax.servlet.http.HttpServletResponse;

/**
 * Exception class for queries which matching resource is not presently
 * accessible
 *
 * @author brad
 * @version $Date$, $Revision$
 */
public class ResourceNotAvailableException extends WaybackException {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	protected static final String ID = "resourceNotAvailable";

	/**
	 * Constructor
	 * 
	 * @param message
	 */
	public ResourceNotAvailableException(String message) {
		super(message,"Resource not available");
		id = ID;
	}
	/**
	 * Constructor with message and details
	 * 
	 * @param message
	 * @param details
	 */
	public ResourceNotAvailableException(String message,String details) {
		super(message,"Resource not available",details);
		id = ID;
	}
	/**
	 * @return the HTTP status code appropriate to this exception class.
	 */
	public int getStatus() {
		return HttpServletResponse.SC_SERVICE_UNAVAILABLE;
	}
}

@@ -925,16 +925,118 @@
 ponse;%0A%0A
+import org.archive.wayback.core.CaptureSearchResults;%0Aimport org.archive.wayback.core.SearchResults;%0A%0A
 /**%0A * E
@@ -1365,16 +1365,55 @@
 ilable%22;
+%0A%09private CaptureSearchResults results;
 %0A%0A%09/**%0A%09
@@ -1905,16 +1905,16 @@
 tus() %7B%0A
-
 %09%09return
@@ -1961,10 +1961,215 @@
 BLE;%0A%09%7D%0A
+%09/**%0A%09 * @param results%0A%09 */%0A%09public void setCaptureSearchResults(CaptureSearchResults results) %7B%0A%09%09this.results = results;%0A%09%7D%0A%09public CaptureSearchResults getCaptureSearchResults() %7B%0A%09%09return results;%0A%09%7D%0A
 %7D%0A

add CaptureSearchResults to the exception if the problem is ResourceNotAvailable, allowing jsp to offer alternate versions.