org.vfny.geoserver.action
Class GeoServerAction

java.lang.Object
  extended byorg.apache.struts.action.Action
      extended byorg.vfny.geoserver.action.GeoServerAction
Direct Known Subclasses:
ConfigAction, DataStoreStatusAction, LogoutAction

public class GeoServerAction
extends org.apache.struts.action.Action

GeoServerAction is a common super class used by STRUTS Actions.

GeoServerAction is used to store shared services, such as looking up the GeoServer Application.

Capabilities: Example Use:

 class MyAction extends GeoServerAction {
   ...
 }
 

Please remember that Actions (like servlets) should never make use of instance variables in order to remain thread-safe.

The Services provided by this class are convience methods for the Services provided by the Requests utiltiy class.


Field Summary
 
Fields inherited from class org.apache.struts.action.Action
ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, defaultLocale, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, servlet, SERVLET_KEY, TRANSACTION_TOKEN_KEY
 
Constructor Summary
GeoServerAction()
           
 
Method Summary
protected  ApplicationState getApplicationState(javax.servlet.http.HttpServletRequest request)
          Access GeoServer Application State from the WebContainer.
 GeoServer getGeoServer(javax.servlet.http.HttpServletRequest request)
          Aquire GeoServer from Web Container.
 UserContainer getUserContainer(javax.servlet.http.HttpServletRequest request)
          Aquire type safe session information in a UserContainer.
 boolean isLoggedIn(javax.servlet.http.HttpServletRequest request)
          Tests if the user has logged onto the current Session
 void logOut(javax.servlet.http.HttpServletRequest request)
          Logs the user out from the current Session.
 
Methods inherited from class org.apache.struts.action.Action
execute, execute, generateToken, getDataSource, getDataSource, getLocale, getResources, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, perform, perform, resetToken, saveErrors, saveMessages, saveToken, setLocale, setServlet, toHex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoServerAction

public GeoServerAction()
Method Detail

logOut

public void logOut(javax.servlet.http.HttpServletRequest request)
Logs the user out from the current Session.

Parameters:
request - DOCUMENT ME!

isLoggedIn

public boolean isLoggedIn(javax.servlet.http.HttpServletRequest request)
Tests if the user has logged onto the current Session

Parameters:
request - DOCUMENT ME!
Returns:
DOCUMENT ME!

getUserContainer

public UserContainer getUserContainer(javax.servlet.http.HttpServletRequest request)
Aquire type safe session information in a UserContainer.

Please note that the UserContainer may be lazyly created.

Parameters:
request - Http Request used to aquire session reference
Returns:
UserContainer containing typesafe session information.

getGeoServer

public GeoServer getGeoServer(javax.servlet.http.HttpServletRequest request)
Aquire GeoServer from Web Container.

The GeoServer instance is create by a STRUTS plug-in and is available through the Web container. (Test cases may seed the request object with a Mock WebContainer and a Mock GeoServer)

Parameters:
request - HttpServletRequest used to aquire session reference
Returns:
GeoServer instance for this Web Application

getApplicationState

protected ApplicationState getApplicationState(javax.servlet.http.HttpServletRequest request)
Access GeoServer Application State from the WebContainer.

Parameters:
request - DOCUMENT ME!
Returns:
Configuration model for Catalog information.