|
|||||||||
| Home >> All >> com >> opencms >> [ core overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.opencms.core
Class OpenCms

java.lang.Objectcom.opencms.core.A_OpenCms
com.opencms.core.OpenCms
- All Implemented Interfaces:
- I_CmsConstants, com.opencms.boot.I_CmsLogChannels
- public class OpenCms
- extends A_OpenCms
- implements I_CmsConstants, com.opencms.boot.I_CmsLogChannels
- extends A_OpenCms
This class is the main class of the OpenCms system, think of it as the "operating system" of OpenCms.
Any request to an OpenCms resource will be processed by this class first. The class will try to map the request to a VFS (Virtual File System) resource, i.e. an URI. If the resource is found, it will be read anf forwarded to to a launcher, which is performs the output of the requested resource.
The OpenCms class is independent of access module to the OpenCms (e.g. Servlet, Command Shell), therefore this class is not responsible for user authentification. This is done by the access module to the OpenCms.
There will be only one instance of the OpenCms object created for any accessing class. This means that in the default configuration, where OpenCms is accessed through a servlet, there will be only one instance of this class running at a time.
- Version:
- $Revision: 1.124.2.1 $ $Date: 2004/01/06 12:45:53 $
| Field Summary | |
private static java.lang.String |
C_DEFAULT_MIMETYPE
The default mimetype |
private static com.opencms.template.cache.CmsElementCache |
c_elementCache
Reference to the CmsElementCache object containing locators for all URIs and elements in cache |
private static CmsStaticExportProperties |
c_exportProperties
The object to store the properties from the opencms.property file for the static export |
private static java.lang.String |
c_passwordValidatingClass
The name of the class used to validate a new password |
private static java.util.Hashtable |
c_variantDeps
In this hashtable the dependencies for all variants in the elementcache are stored. |
private java.util.List |
m_checkFile
Member variable to store instances to modify resources |
private static java.lang.String[] |
m_defaultFilenames
List of default file names (for directories, e.g, "index.html") |
private static com.opencms.flex.util.CmsResourceTranslator |
m_directoryTranslator
Directory translator, used to translate all access to resources |
private boolean |
m_enableElementCache
Indicates, if the element cache should be enabled by the configurations |
private static com.opencms.flex.util.CmsResourceTranslator |
m_fileTranslator
Filename translator, used only for the creation of new files |
private boolean |
m_isInitialized
Flag to indicate if the startup classes have already been initialized |
private com.opencms.launcher.CmsLauncherManager |
m_launcherManager
Reference to the OpenCms launcer manager |
private java.util.Hashtable |
m_mt
Hashtable with all available Mimetypes. |
private CmsCronScheduler |
m_scheduler
The cron scheduler to schedule the cronjobs |
private boolean |
m_sessionFailover
Indicates, if the session-failover should be enabled or not |
private boolean |
m_streaming
Indicates, if the streaming should be enabled by the configurations. |
private CmsCronTable |
m_table
The cron table to use with the scheduler |
| Fields inherited from class com.opencms.core.A_OpenCms |
m_resourceBroker |
| Fields inherited from interface com.opencms.boot.I_CmsLogChannels |
C_FLEX_CACHE, C_FLEX_LOADER, C_LOGGING, C_MODULE_CRITICAL, C_MODULE_DEBUG, C_MODULE_INFO, C_OPENCMS_CACHE, C_OPENCMS_CRITICAL, C_OPENCMS_CRONSCHEDULER, C_OPENCMS_DEBUG, C_OPENCMS_ELEMENTCACHE, C_OPENCMS_INFO, C_OPENCMS_INIT, C_OPENCMS_POOL, C_OPENCMS_STATICEXPORT, C_OPENCMS_STREAMING, C_PREPROCESSOR_IS_LOGGING |
| Constructor Summary | |
OpenCms(source.org.apache.java.util.Configurations conf)
Constructor to create a new OpenCms object. |
|
| Method Summary | |
private void |
createDynamicLinkRules()
Creates the dynamic linkrules. |
void |
destroy()
Destructor, called when the the servlet is shut down. |
com.opencms.flex.util.CmsResourceTranslator |
getFileTranslator()
Returns the file name translator this OpenCms has read from the opencms.properties. |
com.opencms.launcher.CmsLauncherManager |
getLauncherManager()
Returns the launcher manager used. |
static com.opencms.template.cache.CmsElementCache |
getOnlineElementCache()
Returns the ElementCache used for the online project. |
static java.lang.String |
getPasswordValidatingClass()
Returns the Class that is used for the password validation. |
static CmsStaticExportProperties |
getStaticExportProperties()
Returns the properties for the static export. |
static java.util.Hashtable |
getVariantDependencies()
Returns the hashtable with the variant dependencies used for the elementcache. |
(package private) com.opencms.file.CmsFile |
initResource(com.opencms.file.CmsObject cms)
This method reads the requested document from the OpenCms request context and returns it to the calling module, which will usually be the running OpenCmsHttpServlet. |
(package private) void |
initStartupClasses(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Initialize the startup classes of this OpenCms object. |
void |
initUser(com.opencms.file.CmsObject cms,
I_CmsRequest cmsReq,
I_CmsResponse cmsRes,
java.lang.String user,
java.lang.String group,
int project,
CmsCoreSession sessionStorage)
Inits a user and updates the given CmsObject withs this users information. |
(package private) java.util.Hashtable |
restoreSession(java.lang.String oldSessionId)
This method loads old sessiondata from the database. |
(package private) void |
setResponse(com.opencms.file.CmsObject cms,
com.opencms.file.CmsFile file)
Sets the mimetype of the response. |
void |
showResource(com.opencms.file.CmsObject cms,
com.opencms.file.CmsFile file)
Selects the appropriate launcher for a given file by analyzing the file's launcher id and calls the initlaunch() method to initiate the generating of the output. |
(package private) void |
startScheduleJob(CmsCronEntry entry)
Starts a schedule job with a correct instantiated CmsObject. |
(package private) void |
storeSession(java.lang.String sessionId,
java.util.Hashtable sessionData)
This method stores sessiondata into the database. |
(package private) void |
updateCronTable()
Reads the actual entries from the database and updates the Crontable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
C_DEFAULT_MIMETYPE
private static final java.lang.String C_DEFAULT_MIMETYPE
- The default mimetype
- See Also:
- Constant Field Values
m_scheduler
private CmsCronScheduler m_scheduler
- The cron scheduler to schedule the cronjobs
m_table
private CmsCronTable m_table
- The cron table to use with the scheduler
m_launcherManager
private com.opencms.launcher.CmsLauncherManager m_launcherManager
- Reference to the OpenCms launcer manager
m_mt
private java.util.Hashtable m_mt
- Hashtable with all available Mimetypes.
m_sessionFailover
private boolean m_sessionFailover
- Indicates, if the session-failover should be enabled or not
m_streaming
private boolean m_streaming
- Indicates, if the streaming should be enabled by the configurations.
c_passwordValidatingClass
private static java.lang.String c_passwordValidatingClass
- The name of the class used to validate a new password
m_enableElementCache
private boolean m_enableElementCache
- Indicates, if the element cache should be enabled by the configurations
c_elementCache
private static com.opencms.template.cache.CmsElementCache c_elementCache
- Reference to the CmsElementCache object containing locators for all
URIs and elements in cache
c_exportProperties
private static CmsStaticExportProperties c_exportProperties
- The object to store the properties from the opencms.property file for the
static export
c_variantDeps
private static java.util.Hashtable c_variantDeps
- In this hashtable the dependencies for all variants in the elementcache
are stored. The keys are Strings with resourceNames like "/siteX/cos/ContentClass/news4"
and the value is a Vector with strings (The elementvariants that depend on the keys)
like "ElementClass|ElementTemplate|VariantCacheKey"
m_directoryTranslator
private static com.opencms.flex.util.CmsResourceTranslator m_directoryTranslator
- Directory translator, used to translate all access to resources
m_fileTranslator
private static com.opencms.flex.util.CmsResourceTranslator m_fileTranslator
- Filename translator, used only for the creation of new files
m_defaultFilenames
private static java.lang.String[] m_defaultFilenames
- List of default file names (for directories, e.g, "index.html")
m_isInitialized
private boolean m_isInitialized
- Flag to indicate if the startup classes have already been initialized
m_checkFile
private java.util.List m_checkFile
- Member variable to store instances to modify resources
| Constructor Detail |
OpenCms
public OpenCms(source.org.apache.java.util.Configurations conf) throws java.lang.Exception
- Constructor to create a new OpenCms object.
It reads the configurations from the
opencms.propertiesfile in theconfig/subdirectory. With the information from this file is inits a ResourceBroker (Database access module), various caching systems and other options.This will only be done once per accessing class.
| Method Detail |
createDynamicLinkRules
private void createDynamicLinkRules()
- Creates the dynamic linkrules.
The CmsStaticExport class needs a CmsObject to create them.
initStartupClasses
void initStartupClasses(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws CmsException
- Initialize the startup classes of this OpenCms object.
A startup class has to be configured in the
registry.xmlfile of OpenCms. Startup classes are a way to create plug-in functions that required to be initialized once at OpenCms load time without the need to add initializing code to the constructor of this class.This must be done only once per running OpenCms object instance. Usually this will be done by the OpenCms servlet.
destroy
public void destroy()
throws CmsException
getLauncherManager
public com.opencms.launcher.CmsLauncherManager getLauncherManager()
- Returns the launcher manager used.
getOnlineElementCache
public static com.opencms.template.cache.CmsElementCache getOnlineElementCache()
- Returns the ElementCache used for the online project.
getPasswordValidatingClass
public static java.lang.String getPasswordValidatingClass()
- Returns the Class that is used for the password validation.
getStaticExportProperties
public static CmsStaticExportProperties getStaticExportProperties()
- Returns the properties for the static export.
getVariantDependencies
public static java.util.Hashtable getVariantDependencies()
- Returns the hashtable with the variant dependencies used for the elementcache.
getFileTranslator
public com.opencms.flex.util.CmsResourceTranslator getFileTranslator()
- Returns the file name translator this OpenCms has read from the opencms.properties.
initResource
com.opencms.file.CmsFile initResource(com.opencms.file.CmsObject cms) throws CmsException
- This method reads the requested document from the OpenCms request context
and returns it to the calling module, which will usually be
the running OpenCmsHttpServlet.
In case a directory name is requested, the default files of the directory will be looked up and the first match is returned.
initUser
public void initUser(com.opencms.file.CmsObject cms, I_CmsRequest cmsReq, I_CmsResponse cmsRes, java.lang.String user, java.lang.String group, int project, CmsCoreSession sessionStorage) throws CmsException
- Inits a user and updates the given CmsObject withs this users information.
setResponse
void setResponse(com.opencms.file.CmsObject cms, com.opencms.file.CmsFile file)
- Sets the mimetype of the response.
The mimetype is selected by the file extension of the requested document. If no available mimetype is found, it is set to the default "application/octet-stream".
- Specified by:
setResponsein classA_OpenCms
showResource
public void showResource(com.opencms.file.CmsObject cms, com.opencms.file.CmsFile file) throws CmsException
- Selects the appropriate launcher for a given file by analyzing the
file's launcher id and calls the initlaunch() method to initiate the
generating of the output.
- Specified by:
showResourcein classA_OpenCms
restoreSession
java.util.Hashtable restoreSession(java.lang.String oldSessionId) throws CmsException
- This method loads old sessiondata from the database. It is used
for session failover.
- Specified by:
restoreSessionin classA_OpenCms
storeSession
void storeSession(java.lang.String sessionId, java.util.Hashtable sessionData) throws CmsException
- This method stores sessiondata into the database. It is used
for session failover.
- Specified by:
storeSessionin classA_OpenCms
startScheduleJob
void startScheduleJob(CmsCronEntry entry)
- Starts a schedule job with a correct instantiated CmsObject.
- Specified by:
startScheduleJobin classA_OpenCms
updateCronTable
void updateCronTable()
- Reads the actual entries from the database and updates the Crontable
- Specified by:
updateCronTablein classA_OpenCms
|
|||||||||
| Home >> All >> com >> opencms >> [ core overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC