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.DisposableBeanTDScontext 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 enableLOOK would be nice to make Immutable
- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description TdsContext()
-
Method Summary
-
-
-
Method Detail
-
setServletContext
public void setServletContext(javax.servlet.ServletContext servletContext)
- Specified by:
setServletContextin interfaceorg.springframework.web.context.ServletContextAware
-
getServletContext
public javax.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
-
getContextPath
public String getContextPath()
Return the context path under which this web app is running (e.g., "/thredds").- Returns:
- the context path.
-
getWebappVersion
public String getWebappVersion()
Return the full version string (. . . )* - Returns:
- the full version string.
-
getTdsVersionBuildDate
public String getTdsVersionBuildDate()
-
getVersionInfo
public String getVersionInfo()
-
getWebappDisplayName
public String getWebappDisplayName()
- Returns:
- the name of the webapp as given by the display-name element in web.xml.
-
getServletRootDirectory
public File getServletRootDirectory()
Return the web apps root directory (i.e., getRealPath( "/")). Typically {tomcat}/webapps/thredds- Returns:
- the root directory for the web app.
-
getTomcatLogDirectory
public File getTomcatLogDirectory()
-
getThreddsDirectory
public File getThreddsDirectory()
Return File for content directory (exists() may be false).- Returns:
- a File to the content directory.
-
getContentRootDir
public File getContentRootDir()
-
getPublicContentDirSource
public FileSource getPublicContentDirSource()
-
getDefaultRequestDispatcher
public javax.servlet.RequestDispatcher getDefaultRequestDispatcher()
-
getContentRootPathProperty
public String getContentRootPathProperty()
-
getConfigFileProperty
public String getConfigFileProperty()
-
getUploadDir
public File getUploadDir()
-
getDownloadDir
public File getDownloadDir()
-
getUploadForm
public File getUploadForm()
-
getDownloadForm
public File getDownloadForm()
-
getTdsDebugFlags
public String getTdsDebugFlags()
-
setContentRootPathProperty
public void setContentRootPathProperty(String contentRootPathProperty)
-
setUploadDirProperty
public void setUploadDirProperty(String uploadDirProperty)
-
setDownloadDirProperty
public void setDownloadDirProperty(String downloadDirProperty)
-
setUploadFormProperty
public void setUploadFormProperty(String uploadFormProperty)
-
setDownloadFormProperty
public void setDownloadFormProperty(String downloadFormProperty)
-
-