|
|||||||||
| 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 A_OpenCms

java.lang.Objectcom.opencms.core.A_OpenCms
- All Implemented Interfaces:
- com.opencms.boot.I_CmsLogChannels
- Direct Known Subclasses:
- OpenCms
- public abstract class A_OpenCms
- extends java.lang.Object
- implements com.opencms.boot.I_CmsLogChannels
- extends java.lang.Object
Abstract class for the OpenCms "operating system" that provides public static methods which can be used by other classes to access basic features of OpenCms like logging etc.
- Version:
- $Revision: 1.35 $ $Date: 2003/04/10 15:54:53 $
| Field Summary | |
private source.org.apache.java.util.Configurations |
m_conf
The OpenCms configuration read from opencms.properties |
private static java.lang.String |
m_defaultEncoding
Default encoding, can be overwritten in "opencms.properties" |
private static java.util.ArrayList |
m_listeners
List to save the event listeners in |
private static java.lang.String |
m_logfile
The filename of the log file |
private static java.lang.String |
m_openCmsContext
The OpenCms context and servlet path, e.g. |
protected static com.opencms.file.I_CmsResourceBroker |
m_resourceBroker
The resource-broker to access the database |
private static java.util.Map |
m_runtimeProperties
A Map for the storage of various runtime properties |
private static int |
m_userDefaultaccessFlags
The default setting for the user access flags |
private static java.lang.String |
m_userDefaultLanguage
The default setting for the user language |
private static java.lang.String |
m_versionName
The version name (including version number) of this OpenCms installation |
private static java.lang.String |
m_versionNumber
The version number of this OpenCms installation |
| 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 | |
A_OpenCms()
|
|
| Method Summary | |
static void |
addCmsEventListener(com.opencms.flex.I_CmsEventListener listener)
Add a cms event listener. |
(package private) abstract void |
destroy()
Destructor, should be called when the the class instance is shut down. |
static void |
fireCmsEvent(com.opencms.flex.CmsEvent event)
Notify all container event listeners that a particular event has occurred for this Container. |
static void |
fireCmsEvent(com.opencms.file.CmsObject cms,
int type,
java.util.Map data)
Notify all container event listeners that a particular event has occurred for this Container. |
source.org.apache.java.util.Configurations |
getConfiguration()
This method returns the runtime configuration. |
static java.lang.String |
getDefaultEncoding()
Return the OpenCms default character encoding. |
static java.lang.String |
getLogFileName()
Returns the filename of the logfile. |
static java.lang.String |
getOpenCmsContext()
Returns the OpenCms request context. |
static com.opencms.file.I_CmsRegistry |
getRegistry()
Returns the registry to read values from it. |
static java.lang.Object |
getRuntimeProperty(java.lang.Object key)
This method looks up a value in the runtime property Map. |
java.util.Map |
getRuntimePropertyMap()
This method returns the complete runtime property Map. |
static int |
getUserDefaultAccessFlags()
Returns the value for the default user access flags. |
static java.lang.String |
getUserDefaultLanguage()
Returns the value of the user default language. |
static java.lang.String |
getVersionName()
Returns a String containing the version information (version name and version number) of this OpenCms system. |
static java.lang.String |
getVersionNumber()
Returns a String containing the version number of this OpenCms system. |
static void |
initializeServletLogging(source.org.apache.java.util.Configurations config)
Initializes the logging mechanism of OpenCms. |
(package private) static void |
initVersion(java.lang.Object o)
Initializes the version for this OpenCms, will be called by CmsHttpServlet or CmsShell upon system startup. |
static boolean |
isLogging()
Checks if the system logging is active. |
static boolean |
isLogging(java.lang.String channel)
Checks if the system logging is active for the selected channel. |
static void |
log(java.lang.String channel,
java.lang.String message)
Logs a message into the OpenCms logfile. |
static void |
removeCmsEventListener(com.opencms.flex.I_CmsEventListener listener)
Remove a cms event listener. |
(package private) abstract java.util.Hashtable |
restoreSession(java.lang.String oldSessionId)
This method loads old sessiondata from the database. |
void |
setConfiguration(source.org.apache.java.util.Configurations conf)
This method sets the runtime configuration. |
protected void |
setDefaultEncoding(java.lang.String encoding)
Sets the default encoding to the value specified. |
protected static void |
setOpenCmsContext(java.lang.String value)
Sets the OpenCms request context. |
(package private) abstract 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. |
void |
setRuntimeProperty(java.lang.Object key,
java.lang.Object value)
This method adds an Object to the OpenCms runtime properties. |
protected static void |
setUserDefaultAccessFlags(int flags)
Seats the value of the user default access flags. |
protected static void |
setUserDefaultLanguage(java.lang.String language)
Sets the value of the user default language. |
abstract 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) abstract void |
startScheduleJob(CmsCronEntry entry)
Starts a schedule job with a correct instantiated CmsObject. |
(package private) abstract void |
storeSession(java.lang.String sessionId,
java.util.Hashtable sessionData)
This method stores sessiondata into the database. |
(package private) abstract void |
updateCronTable()
Reads the current crontable entries from the database and updates the crontable with them. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
m_resourceBroker
protected static com.opencms.file.I_CmsResourceBroker m_resourceBroker
- The resource-broker to access the database
m_logfile
private static java.lang.String m_logfile
- The filename of the log file
m_listeners
private static java.util.ArrayList m_listeners
- List to save the event listeners in
m_runtimeProperties
private static java.util.Map m_runtimeProperties
- A Map for the storage of various runtime properties
m_conf
private source.org.apache.java.util.Configurations m_conf
- The OpenCms configuration read from
opencms.properties
m_defaultEncoding
private static java.lang.String m_defaultEncoding
- Default encoding, can be overwritten in "opencms.properties"
m_versionName
private static java.lang.String m_versionName
- The version name (including version number) of this OpenCms installation
m_versionNumber
private static java.lang.String m_versionNumber
- The version number of this OpenCms installation
m_openCmsContext
private static java.lang.String m_openCmsContext
- The OpenCms context and servlet path, e.g.
/opencms/opencms
m_userDefaultLanguage
private static java.lang.String m_userDefaultLanguage
- The default setting for the user language
m_userDefaultaccessFlags
private static int m_userDefaultaccessFlags
- The default setting for the user access flags
| Constructor Detail |
A_OpenCms
public A_OpenCms()
| Method Detail |
destroy
abstract void destroy()
throws CmsException
- Destructor, should be called when the the class instance is shut down.
initializeServletLogging
public static void initializeServletLogging(source.org.apache.java.util.Configurations config)
- Initializes the logging mechanism of OpenCms.
getLogFileName
public static java.lang.String getLogFileName()
- Returns the filename of the logfile.
isLogging
public static boolean isLogging()
- Checks if the system logging is active.
isLogging
public static boolean isLogging(java.lang.String channel)
- Checks if the system logging is active for the selected channel.
log
public static void log(java.lang.String channel, java.lang.String message)
- Logs a message into the OpenCms logfile.
If the logfile was not initialized (e.g. due tue a missing ServletConfig while working with the console) any log output will be written to
System.err.
setResponse
abstract 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".
showResource
public abstract 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.
storeSession
abstract void storeSession(java.lang.String sessionId, java.util.Hashtable sessionData) throws CmsException
- This method stores sessiondata into the database. It is used
for sessionfailover.
restoreSession
abstract java.util.Hashtable restoreSession(java.lang.String oldSessionId) throws CmsException
- This method loads old sessiondata from the database. It is used
for sessionfailover.
updateCronTable
abstract void updateCronTable()
- Reads the current crontable entries from the database and updates the
crontable with them.
startScheduleJob
abstract void startScheduleJob(CmsCronEntry entry)
- Starts a schedule job with a correct instantiated CmsObject.
setRuntimeProperty
public void setRuntimeProperty(java.lang.Object key, java.lang.Object value)
- This method adds an Object to the OpenCms runtime properties.
The runtime properties can be used to store Objects that are shared
in the whole system.
- Since:
- FLEX alpha 1
getRuntimeProperty
public static java.lang.Object getRuntimeProperty(java.lang.Object key)
- This method looks up a value in the runtime property Map.
- Since:
- FLEX alpha 1
getRuntimePropertyMap
public java.util.Map getRuntimePropertyMap()
- This method returns the complete runtime property Map.
- Since:
- FLEX alpha 1
setConfiguration
public void setConfiguration(source.org.apache.java.util.Configurations conf)
- This method sets the runtime configuration.
- Since:
- FLEX alpha 1
getConfiguration
public source.org.apache.java.util.Configurations getConfiguration()
- This method returns the runtime configuration.
- Since:
- FLEX alpha 1
fireCmsEvent
public static void fireCmsEvent(com.opencms.file.CmsObject cms, int type, java.util.Map data)
- Notify all container event listeners that a particular event has
occurred for this Container. The default implementation performs
this notification synchronously using the calling thread.
- Since:
- FLEX alpha 1
fireCmsEvent
public static void fireCmsEvent(com.opencms.flex.CmsEvent event)
- Notify all container event listeners that a particular event has
occurred for this Container. The default implementation performs
this notification synchronously using the calling thread.
- Since:
- FLEX beta 1
addCmsEventListener
public static void addCmsEventListener(com.opencms.flex.I_CmsEventListener listener)
- Add a cms event listener.
- Since:
- FLEX alpha 1
removeCmsEventListener
public static void removeCmsEventListener(com.opencms.flex.I_CmsEventListener listener)
- Remove a cms event listener.
- Since:
- FLEX alpha 1
getDefaultEncoding
public static java.lang.String getDefaultEncoding()
- Return the OpenCms default character encoding.
The default is set in the "opencms.properties" file.
If this is not set in "opencms.properties" the default
is "ISO-8859-1".
setDefaultEncoding
protected void setDefaultEncoding(java.lang.String encoding)
- Sets the default encoding to the value specified.
getVersionName
public static java.lang.String getVersionName()
- Returns a String containing the version information (version name and version number)
of this OpenCms system.
getVersionNumber
public static java.lang.String getVersionNumber()
- Returns a String containing the version number
of this OpenCms system.
initVersion
static void initVersion(java.lang.Object o)
- Initializes the version for this OpenCms, will be called by
CmsHttpServlet or CmsShell upon system startup.
setOpenCmsContext
protected static void setOpenCmsContext(java.lang.String value)
- Sets the OpenCms request context.
getOpenCmsContext
public static java.lang.String getOpenCmsContext()
- Returns the OpenCms request context.
getUserDefaultLanguage
public static java.lang.String getUserDefaultLanguage()
- Returns the value of the user default language.
setUserDefaultLanguage
protected static void setUserDefaultLanguage(java.lang.String language)
- Sets the value of the user default language.
getUserDefaultAccessFlags
public static int getUserDefaultAccessFlags()
- Returns the value for the default user access flags.
setUserDefaultAccessFlags
protected static void setUserDefaultAccessFlags(int flags)
- Seats the value of the user default access flags.
getRegistry
public static com.opencms.file.I_CmsRegistry getRegistry() throws CmsException
- Returns the registry to read values from it.
You don't have the permissions to write values. This is useful for modules to read module-parameters.
|
|||||||||
| Home >> All >> com >> opencms >> [ core overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.opencms.core.A_OpenCms