HiRISE

HiRISE.HiReport
Class DatabaseAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.apache.struts.actions.BaseAction
          extended by org.apache.struts.actions.DispatchAction
              extended by HiRISE.HiReport.DatabaseAction
Direct Known Subclasses:
AdvancedSearchAction, AnaglyphListAction, CtxListAction, CtxPageAction, EdrGapListAction, EdrInfoListAction, EdrPageAction, EdrPhotListAction, EdrStatsPageAction, EdrValListAction, GeometryOffsetAction, HiWishListAction, ImageExpandPageAction, JitInfoPageAction, MainPageAction, ObservationGeometryAction, ObservationNavigationAction, ObservationPageAction, OverlapAction, PipelineSourcesListAction, PipelineStatusAction, ProductStatusAction, PublicObservationPageAction, PublicSuggestionPageAction, RdrPageAction, ScienceThemeSummaryAction, StereoListAction, SuggestionPageAction, TagAction

public abstract class DatabaseAction
extends org.apache.struts.actions.DispatchAction

Base class for actions that may need to perform queries of the database.


Field Summary
static String ID
          CVS ID
protected static Logger logger
          Logger instance
 
Fields inherited from class org.apache.struts.actions.DispatchAction
clazz, log, methods, types
 
Fields inherited from class org.apache.struts.actions.BaseAction
messages
 
Fields inherited from class org.apache.struts.action.Action
servlet
 
Constructor Summary
DatabaseAction()
           
 
Method Summary
protected  String getBasePath()
          Get the absolute path to the base of the application.
 Connection getConnection(String host)
          Obtain a new database connection.
 
Methods inherited from class org.apache.struts.actions.DispatchAction
cancelled, dispatchMethod, execute, getMethod, getMethodName, getParameter, unspecified
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
CVS ID

See Also:
Constant Field Values

logger

protected static Logger logger
Logger instance

Constructor Detail

DatabaseAction

public DatabaseAction()
Method Detail

getConnection

public Connection getConnection(String host)
                         throws SQLException,
                                NamingException
Obtain a new database connection.

Parameters:
host - Request server name
Returns:
JDBC connection
Throws:
SQLException - Could not create new connection
NamingException - Could not locate JNDI reference

getBasePath

protected String getBasePath()
Get the absolute path to the base of the application.

Returns:
path to app base

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona