org.archive.wayback.accesscontrol.ui
Class ExclusionResponse

java.lang.Object
  extended by org.archive.wayback.accesscontrol.ui.ExclusionResponse

public class ExclusionResponse
extends java.lang.Object

Abstraction for the result of an exclusion query, and generating the differentiating parts of an HTTP response. The original implementation returned XML. Without the XML, this class is really not needed, but as I suspect we'll return to an XML HTTML response in the future, including this for now.

Version:
$Date: 2007-07-26 14:42:35 -0700 (Thu, 26 Jul 2007) $, $Revision: 1893 $
Author:
brad

Field Summary
static java.lang.String EXLCUSION_AUTHORITATIVE
          Reponse is considered "authoritative"
static boolean EXLCUSION_AUTHORIZED
          Response indicates that access is granted
static java.lang.String EXLCUSION_NON_AUTHORITATIVE
          Response is not "authoritative" -- some assumptions may have been made
static boolean EXLCUSION_NOT_AUTHORIZED
          Response indicates that access is not granted
 
Constructor Summary
ExclusionResponse(java.lang.String hostname, java.lang.String responseType, boolean authorized)
          Constuctor
ExclusionResponse(java.lang.String hostname, java.lang.String responseType, boolean authorized, java.lang.String message)
          Constructor
 
Method Summary
 java.lang.String getContentText()
           
 java.lang.String getContentType()
           
 java.lang.String getMessage()
           
 boolean isAuthorized()
           
 void writeResponse(java.io.OutputStream os)
          Send the HTTP message body to requesting client, via the OutputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXLCUSION_AUTHORITATIVE

public static final java.lang.String EXLCUSION_AUTHORITATIVE
Reponse is considered "authoritative"

See Also:
Constant Field Values

EXLCUSION_NON_AUTHORITATIVE

public static final java.lang.String EXLCUSION_NON_AUTHORITATIVE
Response is not "authoritative" -- some assumptions may have been made

See Also:
Constant Field Values

EXLCUSION_AUTHORIZED

public static final boolean EXLCUSION_AUTHORIZED
Response indicates that access is granted

See Also:
Constant Field Values

EXLCUSION_NOT_AUTHORIZED

public static final boolean EXLCUSION_NOT_AUTHORIZED
Response indicates that access is not granted

See Also:
Constant Field Values
Constructor Detail

ExclusionResponse

public ExclusionResponse(java.lang.String hostname,
                         java.lang.String responseType,
                         boolean authorized,
                         java.lang.String message)
Constructor

Parameters:
hostname -
responseType -
authorized -
message -

ExclusionResponse

public ExclusionResponse(java.lang.String hostname,
                         java.lang.String responseType,
                         boolean authorized)
Constuctor

Parameters:
hostname -
responseType -
authorized -
Method Detail

writeResponse

public void writeResponse(java.io.OutputStream os)
Send the HTTP message body to requesting client, via the OutputStream

Parameters:
os -

getContentType

public java.lang.String getContentType()
Returns:
String HTTP Content-Type field: "text/xml" or "text/plain"

getContentText

public java.lang.String getContentText()
Returns:
String version of response

isAuthorized

public boolean isAuthorized()
Returns:
Returns the authorized.

getMessage

public java.lang.String getMessage()
Returns:
Returns the message.


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