org.vfny.geoserver.requests
Class Request

java.lang.Object
  extended byorg.vfny.geoserver.requests.Request
Direct Known Subclasses:
CapabilitiesRequest, WFSRequest, WMSRequest

public abstract class Request
extends java.lang.Object

Defines a general Request type and provides accessor methods for universal request information.

Also provides access to the HttpRequest that spawned this GeoServer Request. This HttpRequest is most often used to lookup information stored in the Web Container (such as the GeoServer Global information).


Field Summary
protected  javax.servlet.http.HttpServletRequest httpServletRequest
          HttpServletRequest responsible for generating this GeoServer Request.
protected  java.lang.String request
          Request type
protected  java.lang.String service
          Request service
protected  java.lang.String version
          Request version
 
Constructor Summary
protected Request(java.lang.String serviceType)
          ServiceConfig indentifying constructor.
protected Request(java.lang.String serviceType, java.lang.String requestType)
          ServiceConfig & Request indentifying constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getBaseUrl()
           
 GeoServer getGeoServer()
          Convience method for accessing GeoServer from the Web Container.
 javax.servlet.http.HttpServletRequest getHttpServletRequest()
          Retrive the ServletRequest that generated this GeoServer request.
 java.lang.String getRequest()
          Gets requested request type.
 java.lang.String getRootDir()
           
 java.lang.String getService()
          Gets requested service.
 ValidationProcessor getValidationProcessor()
           
 java.lang.String getVersion()
          Return version type.
 int hashCode()
          Generate a hashCode based on this Request Object.
 boolean isLoggedIn()
          Tests if user is Logged into GeoServer.
 void setHttpServletRequest(javax.servlet.http.HttpServletRequest servletRequest)
          Sets the servletRequest that generated this GeoServer request.
 void setRequest(java.lang.String requestType)
          Sets requested request type.
 void setService(java.lang.String service)
          Gets requested service.
 void setVersion(java.lang.String version)
          Sets version type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

httpServletRequest

protected javax.servlet.http.HttpServletRequest httpServletRequest
HttpServletRequest responsible for generating this GeoServer Request.


service

protected java.lang.String service
Request service


request

protected java.lang.String request
Request type


version

protected java.lang.String version
Request version

Constructor Detail

Request

protected Request(java.lang.String serviceType)
ServiceConfig indentifying constructor.

Parameters:
serviceType - Name of services (like wms)

Request

protected Request(java.lang.String serviceType,
                  java.lang.String requestType)
ServiceConfig & Request indentifying constructor.

Parameters:
serviceType - Name of services (like wfs)
requestType - Name of request (like Transaction)
Method Detail

getService

public java.lang.String getService()
Gets requested service.

Returns:
The requested service.

setService

public void setService(java.lang.String service)
Gets requested service.

Parameters:
service - The requested service.

getRequest

public java.lang.String getRequest()
Gets requested request type.

TODO: Could this bre renamed getType() for clarity?

Returns:
The type of request.

setRequest

public void setRequest(java.lang.String requestType)
Sets requested request type.


getVersion

public java.lang.String getVersion()
Return version type.

Returns:
The request type version.

setVersion

public void setVersion(java.lang.String version)
Sets version type.

Parameters:
version - The request type version.

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()
Generate a hashCode based on this Request Object.


getHttpServletRequest

public javax.servlet.http.HttpServletRequest getHttpServletRequest()
                                                            throws java.lang.ClassCastException
Retrive the ServletRequest that generated this GeoServer request.

The ServletRequest is often used to:


getGeoServer

public GeoServer getGeoServer()
Convience method for accessing GeoServer from the Web Container.

This method is used to replace calls to GeoServer.getInstnace().


getValidationProcessor

public ValidationProcessor getValidationProcessor()

getRootDir

public java.lang.String getRootDir()

getBaseUrl

public java.lang.String getBaseUrl()

isLoggedIn

public boolean isLoggedIn()
Tests if user is Logged into GeoServer.

Returns:
true if user is logged in

setHttpServletRequest

public void setHttpServletRequest(javax.servlet.http.HttpServletRequest servletRequest)
Sets the servletRequest that generated this GeoServer request.

The ServletRequest is often used to: