Java Doc for CmsSystemInfo.java in  » Content-Management-System » opencms » org » opencms » main » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » opencms » org.opencms.main 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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  StringFILE_PROPERTIES
     The name of the opencms.properties file.
final public static  StringFOLDER_CONFIG
     Path to the "config" folder relative to the "WEB-INF" directory of the application.
final public static  StringFOLDER_MODULES
     The name of the module folder in the package path.
final public static  StringFOLDER_PACKAGES
     Path to the "packages" folder relative to the "WEB-INF" directory of the application.
final public static  StringFOLDER_WEBINF
     Path to the "WEB-INF" folder relative to the directory of the application.

Constructor Summary
public  CmsSystemInfo()
    

Method Summary
public  StringgetAbsoluteRfsPathRelativeToWebApplication(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  StringgetAbsoluteRfsPathRelativeToWebInf(String path)
    
public  StringgetConfigurationFileRfsPath()
    
public  StringgetContextPath()
     Returns the web application context path, e.g.
public  StringgetDefaultEncoding()
     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  StringgetDefaultWebApplicationName()
    
public  intgetHistoryVersions()
    
public  intgetHistoryVersionsAfterDeletion()
    
public  CmsHttpAuthenticationSettingsgetHttpAuthenticationSettings()
    
public  StringgetLogFileRfsPath()
    
public  CmsMailSettingsgetMailSettings()
    
public  StringgetNotificationProject()
    
public  intgetNotificationTime()
    
public  StringgetOpenCmsContext()
     Returns the OpenCms request context, e.g.
public  StringgetPackagesRfsPath()
    
public  StringgetRequestErrorPageAttribute()
    
public  longgetRuntime()
    
public  StringgetServerName()
     Returns the OpenCms server name, e.g.
public  StringgetServletContainerName()
    
public  StringgetServletPath()
     Returns the OpenCms servlet path, e.g.
public  longgetStartupTime()
    
public  StringgetVersion()
    
public  StringgetVersionName()
    
public  StringgetVersionNumber()
    
public  StringgetWebApplicationName()
     Returns the OpenCms web application name, e.g.
public  StringgetWebApplicationRfsPath()
    
public  StringgetWebInfRfsPath()
    
protected  voidinit(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  booleanisFailedInitializationThrowsException()
    
public  booleanisHistoryEnabled()
    
public  booleanisPreventFlushResponse()
    
public  booleanisTagsReleaseAfterEndTag()
    
protected  voidsetDefaultEncoding(String encoding)
    
protected  voidsetHttpAuthenticationSettings(CmsHttpAuthenticationSettings httpAuthenticationSettings)
    
protected  voidsetMailSettings(CmsMailSettings mailSettings)
    
public  voidsetNotificationProject(String notificationProject)
    
public  voidsetNotificationTime(int notificationTime)
    
protected  voidsetServerName(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  voidsetVersionHistorySettings(boolean historyEnabled, int historyVersions, int historyVersionsAfterDeletion)
    

Field Detail
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.




Constructor Detail
CmsSystemInfo
public CmsSystemInfo()(Code)
Creates a new system info container.





Method Detail
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




getRequestErrorPageAttribute
public String getRequestErrorPageAttribute()(Code)
Returns the request error page attribute name to use if javax.servlet.http.HttpServletRequest.getPathInfo is not working properly, like in BEA WLS 9.x.

the request error page attribute name




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




getServletPath
public String getServletPath()(Code)
Returns the OpenCms servlet path, e.g. "/opencms".

From the Java Servlet Specification v2.4:
Servlet Path: The path section that directly corresponds to the mapping which activated this request. This path starts with a?/? character except in the case where the request is matched with the ?/*? pattern, in which case it is the empty string.

the OpenCms servlet path
See Also:   CmsSystemInfo.getContextPath()
See Also:   CmsSystemInfo.getWebApplicationName()
See Also:   CmsSystemInfo.getOpenCmsContext()




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




getWebApplicationName
public String getWebApplicationName()(Code)
Returns the OpenCms web application name, e.g. "opencms" or "ROOT" (no leading or trailing "/").

The web application name is stored for informational purposes only. If you want to construct an URI, use either CmsSystemInfo.getContextPath() and CmsSystemInfo.getServletPath() , or for links to the OpenCms VFS use CmsSystemInfo.getOpenCmsContext() .

the OpenCms web application name
See Also:   CmsSystemInfo.getContextPath()
See Also:   CmsSystemInfo.getServletPath()
See Also:   CmsSystemInfo.getOpenCmsContext()




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




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.