Package thredds.server.config
Class TdsContext
java.lang.Object
thredds.server.config.TdsContext
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.web.context.ServletContextAware
@Component("TdsContext")
public final class TdsContext
extends Object
implements org.springframework.web.context.ServletContextAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
TDScontext implements ServletContextAware so it gets a ServletContext and performs most initial THREDDS set up:
- checks version
- check for latest stable and development release versions
- sets the content directory
- reads persistent user defined params and runs ThreddsConfig.init
- creates, if don't exist, log and public dirs in content directory
- Get default and jsp dispatchers from servletContext
- Creates and initializes the TdsConfigMapper
- check for debug flags to enable
LOOK would be nice to make Immutable
- Since:
- 4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddestroy()Return the context path under which this web app is running (e.g., "/thredds").jakarta.servlet.RequestDispatcherDeprecated.no longer support tds.download.dir propertyDeprecated.no longer support tds.download.form propertygetPropertyDir(String prop, String key, boolean create) Deprecated.no longer need this helper functiongetPropertyFile(String prop, String key, boolean writeable) Deprecated.no longer need this helper functionjakarta.servlet.ServletContextReturn the web apps root directory (i.e., getRealPath( "/")).Return File for content directory (exists() may be false).Deprecated.no longer support tds.upload.dir propertyDeprecated.no longer support tds.upload.form propertyReturn the full version string (. . . )* voidsetContentRootPathProperty(String contentRootPathProperty) voidsetDownloadDirProperty(String downloadDirProperty) Deprecated.no longer support tds.download.dir propertyvoidsetDownloadFormProperty(String downloadFormProperty) Deprecated.no longer support tds.download.form propertyvoidsetServletContext(jakarta.servlet.ServletContext servletContext) voidsetUploadDirProperty(String uploadDirProperty) Deprecated.no longer support tds.upload.dir propertyvoidsetUploadFormProperty(String uploadFormProperty) Deprecated.no longer support tds.upload.form propertytoString()
-
Constructor Details
-
TdsContext
public TdsContext()
-
-
Method Details
-
setServletContext
public void setServletContext(jakarta.servlet.ServletContext servletContext) - Specified by:
setServletContextin interfaceorg.springframework.web.context.ServletContextAware
-
getServletContext
public jakarta.servlet.ServletContext getServletContext() -
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
toString
-
getContextPath
Return the context path under which this web app is running (e.g., "/thredds").- Returns:
- the context path.
-
getWebappVersion
Return the full version string (. . . )* - Returns:
- the full version string.
-
getTdsVersionBuildDate
-
getVersionInfo
-
getWebappDisplayName
- Returns:
- the name of the webapp as given by the display-name element in web.xml.
-
getServletRootDirectory
Return the web apps root directory (i.e., getRealPath( "/")). Typically {tomcat}/webapps/thredds- Returns:
- the root directory for the web app.
-
getTomcatLogDirectory
-
getThreddsDirectory
Return File for content directory (exists() may be false).- Returns:
- a File to the content directory.
-
getContentRootDir
-
getPublicContentDirSource
-
getDefaultRequestDispatcher
public jakarta.servlet.RequestDispatcher getDefaultRequestDispatcher() -
getContentRootPathProperty
-
getConfigFileProperty
-
getUploadDir
Deprecated.no longer support tds.upload.dir property -
getDownloadDir
Deprecated.no longer support tds.download.dir property -
getUploadForm
Deprecated.no longer support tds.upload.form property -
getDownloadForm
Deprecated.no longer support tds.download.form property -
getTdsDebugFlags
-
setContentRootPathProperty
-
setUploadDirProperty
Deprecated.no longer support tds.upload.dir property -
setDownloadDirProperty
Deprecated.no longer support tds.download.dir property -
setUploadFormProperty
Deprecated.no longer support tds.upload.form property -
setDownloadFormProperty
Deprecated.no longer support tds.download.form property -
getPropertyDir
Deprecated.no longer need this helper function -
getPropertyFile
Deprecated.no longer need this helper function
-