| java.lang.Object org.opencms.main.CmsSystemInfo
CmsSystemInfo | public class CmsSystemInfo (Code) | | Provides access to system wide "read only" information.
Regarding the naming conventions used, this comes straight from the Servlet Spec v2.4:
SRV.3.1 Introduction to the ServletContext Interface
[...] A ServletContext is rooted at a known path within a web server. For example
a servlet context could be located at http://www.mycorp.com/catalog. All
requests that begin with the /catalog request path, known as the context path, are
routed to the web application associated with the ServletContext.
author: Alexander Kandzior version: $Revision: 1.62 $ since: 6.0.0 |
Field Summary | |
final public static String | FILE_PROPERTIES The name of the opencms.properties file. | final public static String | FOLDER_CONFIG Path to the "config" folder relative to the "WEB-INF" directory of the application. | final public static String | FOLDER_MODULES The name of the module folder in the package path. | final public static String | FOLDER_PACKAGES Path to the "packages" folder relative to the "WEB-INF" directory of the application. | final public static String | FOLDER_WEBINF Path to the "WEB-INF" folder relative to the directory of the application. |
Method Summary | |
public String | getAbsoluteRfsPathRelativeToWebApplication(String path) Returns an absolute path (to a directory or a file in the "real" file system) from a path relative to
the web application folder of OpenCms.
If the provided path is already absolute, then it is returned unchanged. | public String | getAbsoluteRfsPathRelativeToWebInf(String path) | public String | getConfigurationFileRfsPath() | public String | getContextPath() Returns the web application context path, e.g. | public String | getDefaultEncoding() Return the OpenCms default character encoding.
The default is set in the opencms-system.xml file.
If this is not set in opencms-system.xml the default
is "UTF-8".
the default encoding, e.g. | public String | getDefaultWebApplicationName() | public int | getHistoryVersions() | public int | getHistoryVersionsAfterDeletion() | public CmsHttpAuthenticationSettings | getHttpAuthenticationSettings() | public String | getLogFileRfsPath() | public CmsMailSettings | getMailSettings() | public String | getNotificationProject() | public int | getNotificationTime() | public String | getOpenCmsContext() Returns the OpenCms request context, e.g. | public String | getPackagesRfsPath() | public String | getRequestErrorPageAttribute() | public long | getRuntime() | public String | getServerName() Returns the OpenCms server name, e.g. | public String | getServletContainerName() | public String | getServletPath() Returns the OpenCms servlet path, e.g. | public long | getStartupTime() | public String | getVersion() | public String | getVersionName() | public String | getVersionNumber() | public String | getWebApplicationName() Returns the OpenCms web application name, e.g. | public String | getWebApplicationRfsPath() | public String | getWebInfRfsPath() | protected void | init(String webInfRfsPath, String servletMapping, String webApplicationContext, String defaultWebApplication, String servletContainerName) Sets the OpenCms web application "WEB-INF" directory path (in the "real" file system).
Parameters: webInfRfsPath - the OpenCms web application "WEB-INF" path in the "real" file system) to set Parameters: servletMapping - the OpenCms servlet mapping (e.g. | public boolean | isFailedInitializationThrowsException() | public boolean | isHistoryEnabled() | public boolean | isPreventFlushResponse() | public boolean | isTagsReleaseAfterEndTag() | protected void | setDefaultEncoding(String encoding) | protected void | setHttpAuthenticationSettings(CmsHttpAuthenticationSettings httpAuthenticationSettings) | protected void | setMailSettings(CmsMailSettings mailSettings) | public void | setNotificationProject(String notificationProject) | public void | setNotificationTime(int notificationTime) | protected void | setServerName(String serverName) Sets the server name.
The server name is set in opencms.properties .
It is not related to any DNS name the server might also have.
The server name is useful e.g. | public void | setVersionHistorySettings(boolean historyEnabled, int historyVersions, int historyVersionsAfterDeletion) |
FILE_PROPERTIES | final public static String FILE_PROPERTIES(Code) | | The name of the opencms.properties file.
|
FOLDER_CONFIG | final public static String FOLDER_CONFIG(Code) | | Path to the "config" folder relative to the "WEB-INF" directory of the application.
|
FOLDER_MODULES | final public static String FOLDER_MODULES(Code) | | The name of the module folder in the package path.
|
FOLDER_PACKAGES | final public static String FOLDER_PACKAGES(Code) | | Path to the "packages" folder relative to the "WEB-INF" directory of the application.
|
FOLDER_WEBINF | final public static String FOLDER_WEBINF(Code) | | Path to the "WEB-INF" folder relative to the directory of the application.
|
CmsSystemInfo | public CmsSystemInfo()(Code) | | Creates a new system info container.
|
getAbsoluteRfsPathRelativeToWebApplication | public String getAbsoluteRfsPathRelativeToWebApplication(String path)(Code) | | Returns an absolute path (to a directory or a file in the "real" file system) from a path relative to
the web application folder of OpenCms.
If the provided path is already absolute, then it is returned unchanged.
If the provided path is a folder, the result will always end with a folder separator.
Parameters: path - the path (relative) to generate an absolute path from an absolute path (to a directory or a file) from a path relative to the web application folder of OpenCms |
getAbsoluteRfsPathRelativeToWebInf | public String getAbsoluteRfsPathRelativeToWebInf(String path)(Code) | | Returns an absolute path (to a directory or a file in the "real" file system) from a path relative to
the "WEB-INF" folder of the OpenCms web application.
If the provided path is already absolute, then it is returned unchanged.
Parameters: path - the path (relative) to generate an absolute path from an absolute path (to a directory or a file) from a path relative to the "WEB-INF" folder |
getConfigurationFileRfsPath | public String getConfigurationFileRfsPath()(Code) | | Returns the abolute path to the "opencms.properties" configuration file (in the "real" file system).
the abolute path to the "opencms.properties" configuration file |
getContextPath | public String getContextPath()(Code) | | Returns the web application context path, e.g. "" (empty String) if the web application
is the default web application (usually "ROOT"), or "/opencms" if the web application
is called "opencms".
From the Java Servlet Specification v2.4:
Context Path: The path prefix associated with the ServletContext that this
servlet is a part of. If this context is the "default" context rooted at the base of
the web server's URL name space, this path will be an empty string. Otherwise,
if the context is not rooted at the root of the server's name space, the path starts
with a "/" character but does not end with a "/" character.
the web application context path See Also: CmsSystemInfo.getWebApplicationName() See Also: CmsSystemInfo.getServletPath() See Also: CmsSystemInfo.getOpenCmsContext() |
getDefaultEncoding | public String getDefaultEncoding()(Code) | | Return the OpenCms default character encoding.
The default is set in the opencms-system.xml file.
If this is not set in opencms-system.xml the default
is "UTF-8".
the default encoding, e.g. "UTF-8" or "ISO-8859-1" |
getDefaultWebApplicationName | public String getDefaultWebApplicationName()(Code) | | Returns the default web application name (usually "ROOT").
the default web application name |
getHistoryVersions | public int getHistoryVersions()(Code) | | Returns the maximum number of versions that are kept per file in the VFS version history.
If the version history is disabled, this setting has no effect.
the maximum number of versions that are kept per file See Also: CmsSystemInfo.isHistoryEnabled() |
getHistoryVersionsAfterDeletion | public int getHistoryVersionsAfterDeletion()(Code) | | Returns the number of versions in the VFS version history that should be
kept after a resource is deleted.
the number versions in the VFS version history for deleted resources |
getHttpAuthenticationSettings | public CmsHttpAuthenticationSettings getHttpAuthenticationSettings()(Code) | | Returns the HTTP authentication settings.
the HTTP authentication settings |
getLogFileRfsPath | public String getLogFileRfsPath()(Code) | | Returns the filename of the log file (in the "real" file system).
If the method returns null , this means that the log
file is not managed by OpenCms.
the filename of the log file (in the "real" file system) |
getMailSettings | public CmsMailSettings getMailSettings()(Code) | | Returns the settings for the internal OpenCms email service.
the settings for the internal OpenCms email service |
getNotificationProject | public String getNotificationProject()(Code) | | Returns the project in which time stamps for the content notification are read.
the project in which time stamps for the content notification are read |
getNotificationTime | public int getNotificationTime()(Code) | | Returns the duration after which responsibles will be notified about out-dated content (in days).
the duration after which responsibles will be notified about out-dated content |
getOpenCmsContext | public String getOpenCmsContext()(Code) | | Returns the OpenCms request context, e.g. "/opencms/opencms".
The OpenCms context will always start with a "/" and never have a trailing "/".
The OpenCms context is identical to getContexPath() + getServletPath() .
the OpenCms request context, e.g. "/opencms/opencms" See Also: CmsSystemInfo.getContextPath() See Also: CmsSystemInfo.getServletPath() |
getPackagesRfsPath | public String getPackagesRfsPath()(Code) | | Returns the absolute path to the "packages" folder (in the "real" file system).
the absolute path to the "packages" folder |
getRuntime | public long getRuntime()(Code) | | Returns the time this OpenCms instance is running in milliseconds.
the time this OpenCms instance is running in milliseconds |
getServerName | public String getServerName()(Code) | | Returns the OpenCms server name, e.g. "OpenCmsServer".
The server name is set in opencms.properties .
It is not related to any DNS name the server might also have.
The server name is useful e.g. in a cluster to distinguish different servers,
or if you compare log files from multiple servers.
the OpenCms server name |
getServletContainerName | public String getServletContainerName()(Code) | | Returns the name of the servlet container running OpenCms.
the name of the servlet container running OpenCms |
getStartupTime | public long getStartupTime()(Code) | | Returns the time this OpenCms instance was started in miliseconds.
the time this OpenCms instance was started in miliseconds |
getVersion | public String getVersion()(Code) | | Returns the identifier "OpenCms/" plus the OpenCms version number.
This information is used for example to identify OpenCms in http response headers.
the identifier "OpenCms/" plus the OpenCms version number |
getVersionName | public String getVersionName()(Code) | | Returns the version name (that is the version number) of this OpenCms system, for example 7.0.0 .
the version name (that is the version number) of this OpenCms systemCmsSystemInfo.getVersionNumber() |
getVersionNumber | public String getVersionNumber()(Code) | | Returns the version number of this OpenCms system, for example 7.0.0 .
the version number of this OpenCms system since: 7.0.2 |
getWebApplicationRfsPath | public String getWebApplicationRfsPath()(Code) | | Returns the OpenCms web application folder in the servlet container.
the OpenCms web application folder in the servlet container |
getWebInfRfsPath | public String getWebInfRfsPath()(Code) | | Returns the OpenCms web application "WEB-INF" directory path.
the OpenCms web application "WEB-INF" directory path |
init | protected void init(String webInfRfsPath, String servletMapping, String webApplicationContext, String defaultWebApplication, String servletContainerName)(Code) | | Sets the OpenCms web application "WEB-INF" directory path (in the "real" file system).
Parameters: webInfRfsPath - the OpenCms web application "WEB-INF" path in the "real" file system) to set Parameters: servletMapping - the OpenCms servlet mapping (e.g. "/opencms/*") Parameters: webApplicationContext - the name/path of the OpenCms web application context (optional, will be calculated form the path if null) Parameters: defaultWebApplication - the default web application name (usually "ROOT") Parameters: servletContainerName - the name of the servlet container running OpenCms |
isFailedInitializationThrowsException | public boolean isFailedInitializationThrowsException()(Code) | | Checks if the servlet can throw an exception if initialization fails.
Some servlet containers like BEA WLS or Resin does not like it.
true if the servlet can throw an exception if initialization fails |
isHistoryEnabled | public boolean isHistoryEnabled()(Code) | | Returns if the VFS version history is enabled.
if the VFS version history is enabled |
isPreventFlushResponse | public boolean isPreventFlushResponse()(Code) | | Check if the flex response has to allow flushing the buffer.
For instance, Websphere does not allow to set headers afterwards, so we have to prevent it.
true if the flex response has to allow flushing the buffer |
isTagsReleaseAfterEndTag | public boolean isTagsReleaseAfterEndTag()(Code) | | Checks if the tags need to release after ending.
Depends on how the servlet container generates code for tags, for instance, this has to be prevented with Resin.
true if the tags need to release after ending |
setDefaultEncoding | protected void setDefaultEncoding(String encoding)(Code) | | Sets the default encoding, called after the configuration files have been read.
Parameters: encoding - the default encoding to set |
setHttpAuthenticationSettings | protected void setHttpAuthenticationSettings(CmsHttpAuthenticationSettings httpAuthenticationSettings)(Code) | | Sets the HTTP authentication settings.
Parameters: httpAuthenticationSettings - the HTTP authentication settings to set |
setMailSettings | protected void setMailSettings(CmsMailSettings mailSettings)(Code) | | Sets the settings for the internal OpenCms email service.
Parameters: mailSettings - the settings for the internal OpenCms email service to set |
setNotificationProject | public void setNotificationProject(String notificationProject)(Code) | | Sets the project in which time stamps for the content notification are read.
Parameters: notificationProject - the project in which time stamps for the content notification are read |
setNotificationTime | public void setNotificationTime(int notificationTime)(Code) | | Sets the duration after which responsibles will be notified about out-dated content (in days).
Parameters: notificationTime - the duration after which responsibles will be notified about out-dated content |
setServerName | protected void setServerName(String serverName)(Code) | | Sets the server name.
The server name is set in opencms.properties .
It is not related to any DNS name the server might also have.
The server name is useful e.g. in a cluster to distinguish different servers,
or if you compare log files from multiple servers.
Parameters: serverName - the server name to set |
setVersionHistorySettings | public void setVersionHistorySettings(boolean historyEnabled, int historyVersions, int historyVersionsAfterDeletion)(Code) | | VFS version history settings are set here.
Parameters: historyEnabled - if true the history is enabled Parameters: historyVersions - the maximum number of versions that are kept per VFS resource Parameters: historyVersionsAfterDeletion - the maximum number of versions that are kept for deleted resources |
|
|