|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.opencms.core.A_OpenCms
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.
OpenCms| Field Summary | |
protected static I_CmsResourceBroker |
m_resourceBroker
The resource-broker to access the database |
| 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(I_CmsEventListener listener)
Add a cms event listener. |
static void |
fireCmsEvent(CmsEvent event)
Notify all container event listeners that a particular event has occurred for this Container. |
static void |
fireCmsEvent(CmsObject cms,
int type,
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 String |
getDefaultEncoding()
Return the OpenCms default character encoding. |
static String |
getLogFileName()
Returns the filename of the logfile. |
static String |
getOpenCmsContext()
Returns the OpenCms request context. |
static I_CmsRegistry |
getRegistry()
Returns the registry to read values from it. |
static Object |
getRuntimeProperty(Object key)
This method looks up a value in the runtime property Map. |
Map |
getRuntimePropertyMap()
This method returns the complete runtime property Map. |
static int |
getUserDefaultAccessFlags()
Returns the value for the default user access flags. |
static String |
getUserDefaultLanguage()
Returns the value of the user default language. |
static String |
getVersionName()
Returns a String containing the version information (version name and version number) of this OpenCms system. |
static 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. |
static boolean |
isLogging()
Checks if the system logging is active. |
static boolean |
isLogging(String channel)
Checks if the system logging is active for the selected channel. |
static void |
log(String channel,
String message)
Logs a message into the OpenCms logfile. |
static void |
removeCmsEventListener(I_CmsEventListener listener)
Remove a cms event listener. |
void |
setConfiguration(source.org.apache.java.util.Configurations conf)
This method sets the runtime configuration. |
protected void |
setDefaultEncoding(String encoding)
Sets the default encoding to the value specified. |
protected static void |
setOpenCmsContext(String value)
Sets the OpenCms request context. |
void |
setRuntimeProperty(Object key,
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(String language)
Sets the value of the user default language. |
abstract void |
showResource(CmsObject cms,
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static I_CmsResourceBroker m_resourceBroker
| Constructor Detail |
public A_OpenCms()
| Method Detail |
public static void initializeServletLogging(source.org.apache.java.util.Configurations config)
config - The configurations read from opencms.propertiespublic static String getLogFileName()
public static boolean isLogging()
true if the logging is active, false otherwise.public static boolean isLogging(String channel)
true if the logging is active for the channel, false otherwise.
public static void log(String channel,
String message)
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.
channel - The channel the message is logged intomessage - The message to be logged.
public abstract void showResource(CmsObject cms,
CmsFile file)
throws CmsException
cms - CmsObject containing all document and user informationfile - CmsFile object representing the selected file.
CmsException - In case of problems acessing the resource.
public void setRuntimeProperty(Object key,
Object value)
key - The key to add the Object with.value - The value of the Object to add.public static Object getRuntimeProperty(Object key)
key - The key to look up in the runtime properties.
public Map getRuntimePropertyMap()
public void setConfiguration(source.org.apache.java.util.Configurations conf)
public source.org.apache.java.util.Configurations getConfiguration()
public static void fireCmsEvent(CmsObject cms,
int type,
Map data)
cms - An initialized CmsObjecttype - Event typedata - Event datapublic static void fireCmsEvent(CmsEvent event)
event - A CmsEventpublic static void addCmsEventListener(I_CmsEventListener listener)
listener - The listener to addpublic static void removeCmsEventListener(I_CmsEventListener listener)
listener - The listener to addpublic static String getDefaultEncoding()
protected void setDefaultEncoding(String encoding)
encoding - The value to set, e.g. "UTF-8" or "ISO-8859-1".public static String getVersionName()
public static String getVersionNumber()
protected static void setOpenCmsContext(String value)
value - the OpenCms request contextpublic static String getOpenCmsContext()
public static String getUserDefaultLanguage()
protected static void setUserDefaultLanguage(String language)
language - the new value of the user default languagepublic static int getUserDefaultAccessFlags()
protected static void setUserDefaultAccessFlags(int flags)
flags - the new value of the user default access flags
public static I_CmsRegistry getRegistry()
throws CmsException
You don't have the permissions to write values. This is useful for modules to read module-parameters.
CmsException, - if the registry can not be returned.
CmsException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||