com.sun.slamd.admin
Class RequestInfo

java.lang.Object
  extended by com.sun.slamd.admin.RequestInfo

public class RequestInfo
extends java.lang.Object

This class defines a set of variables that are used to hold variables used in the process of handling an individual request in the admin interface.

Author:
Neil A. Wilson

Constructor Summary
RequestInfo(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Creates a new set of request state information using the provided request and response.
 
Method Summary
 boolean generateHTML()
          Indicates whether the response to the end user will be generated from the information in the HTML body string buffer.
 boolean generateSidebar()
          Indicates whether the response generated based on the information in the HTML body string buffer will include the navigation sidebar.
 java.lang.StringBuffer getHTMLBody()
          Retrieves the string buffer containing the main content that will be included in the HTML page generated and returned to the end user.
 java.lang.StringBuffer getInfoMessage()
          Retrieves the string buffer containing the informational message that will be displayed at the top of the page to provide a warning, error, or notice to the end user in a prominent form.
 javax.servlet.http.HttpServletRequest getRequest()
          Retrieves information about the request received from the end user.
 javax.servlet.http.HttpServletResponse getResponse()
          Retrieves information about the response to send to the end user.
 java.lang.String getServletBaseURI()
          Retrieves the base URI for the request.
 java.lang.String getUserIdentifier()
          Retrieves the user identifier associated with the current user.
 void setGenerateHTML(boolean generateHTML)
          Specifies whether the response to the end user should be generated from the information in the HTML body string buffer.
 void setGenerateSidebar(boolean generateSidebar)
          Specifies whether the response generated based on the information in the HTML body string buffer should include the navigation sidebar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestInfo

public RequestInfo(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
Creates a new set of request state information using the provided request and response.

Parameters:
request - Information about the HTTP request issued by the client.
response - Information about the HTTP response that will be returned to the client.
Method Detail

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Retrieves information about the request received from the end user.

Returns:
Information about the request received from the end user.

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Retrieves information about the response to send to the end user.

Returns:
Information about the response to send to the end user.

getServletBaseURI

public java.lang.String getServletBaseURI()
Retrieves the base URI for the request.

Returns:
The base URI for the request.

getUserIdentifier

public java.lang.String getUserIdentifier()
Retrieves the user identifier associated with the current user.

Returns:
The user identifier associated with the current user, or null if that is not available.

generateHTML

public boolean generateHTML()
Indicates whether the response to the end user will be generated from the information in the HTML body string buffer.

Returns:
true if the response to the end user will be generated from the information in the HTML body string buffer, or false if the response will be generated by directly accessing the servlet response.

setGenerateHTML

public void setGenerateHTML(boolean generateHTML)
Specifies whether the response to the end user should be generated from the information in the HTML body string buffer.

Parameters:
generateHTML - Specifies whether the response to the end user should be generated from the information in the HTML body string buffer.

generateSidebar

public boolean generateSidebar()
Indicates whether the response generated based on the information in the HTML body string buffer will include the navigation sidebar. This is only applicable if generateHTML() returns true.

Returns:
true if the response generated will include the navigation sidebar, or false if it will not.

setGenerateSidebar

public void setGenerateSidebar(boolean generateSidebar)
Specifies whether the response generated based on the information in the HTML body string buffer should include the navigation sidebar.

Parameters:
generateSidebar - Specifies whether the response generated should include the navigation sidebar.

getHTMLBody

public java.lang.StringBuffer getHTMLBody()
Retrieves the string buffer containing the main content that will be included in the HTML page generated and returned to the end user. Additional content may be included by appending to this string buffer.

Returns:
The string buffer containing the main content that will be included in the HTML page generated and returned to the end user.

getInfoMessage

public java.lang.StringBuffer getInfoMessage()
Retrieves the string buffer containing the informational message that will be displayed at the top of the page to provide a warning, error, or notice to the end user in a prominent form. Additional content may be included by appending to this string buffer.

Returns:
The string buffer containing the informational message that will be displayed at the top of the page.