| java.lang.Object org.opencms.main.OpenCms
Field Summary | |
final public static int | RUNLEVEL_0_OFFLINE Runlevel 0: System is offline. | final public static int | RUNLEVEL_1_CORE_OBJECT Runlevel 1: Core object created, no database (some test cases run in this level). | final public static int | RUNLEVEL_2_INITIALIZING Runlevel 2: Initializing the system, required since this may take some seconds because of database connections. | final public static int | RUNLEVEL_3_SHELL_ACCESS Runlevel 3: Shell access to the database possible, but no servlet context available. | final public static int | RUNLEVEL_4_SERVLET_ACCESS Runlevel 4: Final runlevel where database and servlet are initialized. |
Method Summary | |
public static void | addCmsEventListener(I_CmsEventListener listener) | public static void | addCmsEventListener(I_CmsEventListener listener, int[] eventTypes) | public static void | fireCmsEvent(CmsEvent event) | public static void | fireCmsEvent(int type, Map data) | public static I_CmsAuthorizationHandler | getAuthorizationHandler() | public static List | getDefaultFiles() | public static CmsDefaultUsers | getDefaultUsers() | public static CmsEventManager | getEventManager() | public static Set | getExportPoints() | public static CmsImportExportManager | getImportExportManager() | public static CmsLinkManager | getLinkManager() | public static CmsLocaleManager | getLocaleManager() | public static Log | getLog(Object obj) Returns the log for the selected object.
If the provided object is a String, this String will
be used as channel name. | public static CmsLoginManager | getLoginManager() | public static CmsMemoryMonitor | getMemoryMonitor() | public static CmsModuleManager | getModuleManager() | public static CmsOrgUnitManager | getOrgUnitManager() | public static I_CmsPasswordHandler | getPasswordHandler() | public static CmsPublishManager | getPublishManager() | public static CmsRepositoryManager | getRepositoryManager() | public static CmsResourceManager | getResourceManager() | public static CmsRoleManager | getRoleManager() | public static int | getRunLevel() Returns the current OpenCms run level.
The following runlevels are defined:
- Runlevel
OpenCms.RUNLEVEL_0_OFFLINE :
-
OpenCms is in the process of being shut down, the system is offline.
- Runlevel
OpenCms.RUNLEVEL_1_CORE_OBJECT :
-
OpenCms instance available, but configuration has not been processed.
| public static Object | getRuntimeProperty(Object key) | public static CmsScheduleManager | getScheduleManager() | public static CmsSearchManager | getSearchManager() | public static CmsSessionManager | getSessionManager() | public static CmsSiteManagerImpl | getSiteManager() | public static CmsSqlManager | getSqlManager() | public static CmsStaticExportManager | getStaticExportManager() | public static CmsSystemInfo | getSystemInfo() | public static List | getSystemRoles() | public static CmsThreadStore | getThreadStore() | public static I_CmsValidationHandler | getValidationHandler() | public static CmsWorkplaceManager | getWorkplaceManager() | public static CmsXmlContentTypeManager | getXmlContentTypeManager() | public static CmsObject | initCmsObject(CmsObject cms) Returns an independent copy of the provided CmsObject.
This can be useful in case a permanent reference to a CmsObject is stored. | public static CmsObject | initCmsObject(CmsObject adminCms, CmsContextInfo contextInfo) Returns an initialized CmsObject with the user and context initialized as provided.
Note: Only if the provided adminCms CmsObject has admin permissions,
this method allows the creation a CmsObject for any existing user. | public static CmsObject | initCmsObject(String user) Returns an initialized CmsObject (OpenCms user context) with the user initialized as provided,
with the "Online" project selected and "/" set as the current site root.
Note: Only the default users 'Guest' and 'Export' can initialized with
this method, all other user names will throw an Exception.
In order to initialize another user (for example, the
CmsDefaultUsers.getUserAdmin ),
you need to get the 'Guest' user context first, then login the target user with
his user name and password, using
CmsObject.loginUser(StringString) .
There is no way to obtain a user context other then the 'Guest' or 'Export' user
without the users password. | public static CmsResource | initResource(CmsObject cms, String resourceName, HttpServletRequest req, HttpServletResponse res) Reads the requested resource from the OpenCms VFS,
and in case a directory name is requested, the default files of the
directory will be looked up and the first match is returned.
The resource that is returned is always a
org.opencms.file.CmsFile ,
even though the content will usually not be loaded in the result. | public static void | removeCmsEventListener(I_CmsEventListener listener) | public static void | setRuntimeProperty(Object key, Object value) This method adds an Object to the OpenCms runtime properties. | public static void | writeConfiguration(Class clazz) |
RUNLEVEL_0_OFFLINE | final public static int RUNLEVEL_0_OFFLINE(Code) | | Runlevel 0: System is offline.
|
RUNLEVEL_1_CORE_OBJECT | final public static int RUNLEVEL_1_CORE_OBJECT(Code) | | Runlevel 1: Core object created, no database (some test cases run in this level).
|
RUNLEVEL_2_INITIALIZING | final public static int RUNLEVEL_2_INITIALIZING(Code) | | Runlevel 2: Initializing the system, required since this may take some seconds because of database connections.
|
RUNLEVEL_3_SHELL_ACCESS | final public static int RUNLEVEL_3_SHELL_ACCESS(Code) | | Runlevel 3: Shell access to the database possible, but no servlet context available.
|
RUNLEVEL_4_SERVLET_ACCESS | final public static int RUNLEVEL_4_SERVLET_ACCESS(Code) | | Runlevel 4: Final runlevel where database and servlet are initialized.
|
addCmsEventListener | public static void addCmsEventListener(I_CmsEventListener listener)(Code) | | Add a cms event listener that listens to all events.
Parameters: listener - the listener to add |
addCmsEventListener | public static void addCmsEventListener(I_CmsEventListener listener, int[] eventTypes)(Code) | | Add a cms event listener that listens only to particular events.
Parameters: listener - the listener to add Parameters: eventTypes - the events to listen for |
fireCmsEvent | public static void fireCmsEvent(CmsEvent event)(Code) | | Notify all event listeners that a particular event has occurred.
Parameters: event - a CmsEvent |
fireCmsEvent | public static void fireCmsEvent(int type, Map data)(Code) | | Notify all event listeners that a particular event has occurred.
The event will be given to all registered
I_CmsEventListener objects.
Parameters: type - event type Parameters: data - event data |
getAuthorizationHandler | public static I_CmsAuthorizationHandler getAuthorizationHandler()(Code) | | Returns the configured authorization handler.
the configured authorization handler |
getDefaultFiles | public static List getDefaultFiles()(Code) | | Returns the configured list of default directory file names (instances of
String ).
Caution: This list can not be modified.
the configured list of default directory file names |
getDefaultUsers | public static CmsDefaultUsers getDefaultUsers()(Code) | | Returns the default user and group name configuration.
the default user and group name configuration |
getEventManager | public static CmsEventManager getEventManager()(Code) | | Returns the event manger that handles all OpenCms events.
the event manger that handles all OpenCms events |
getExportPoints | public static Set getExportPoints()(Code) | | Returns the configured export points,
the returned set being an unmodifiable set.
an unmodifiable set of the configured export points |
getImportExportManager | public static CmsImportExportManager getImportExportManager()(Code) | | Returns the initialized import/export manager,
which contains information about how to handle imported resources.
the initialized import/export manager |
getLinkManager | public static CmsLinkManager getLinkManager()(Code) | | Returns the link manager to resolve links in <link> tags.
the link manager to resolve links in <link> tags |
getLocaleManager | public static CmsLocaleManager getLocaleManager()(Code) | | Returns the locale manager used for obtaining the current locale.
the locale manager |
getLog | public static Log getLog(Object obj)(Code) | | Returns the log for the selected object.
If the provided object is a String, this String will
be used as channel name. Otherwise the objects
class name will be used as channel name.
Parameters: obj - the object channel to use the log for the selected object channel |
getLoginManager | public static CmsLoginManager getLoginManager()(Code) | | Returns the login manager used to check if a login is possible.
the login manager |
getMemoryMonitor | public static CmsMemoryMonitor getMemoryMonitor()(Code) | | Returns the memory monitor.
the memory monitor |
getModuleManager | public static CmsModuleManager getModuleManager()(Code) | | Returns the module manager.
the module manager |
getOrgUnitManager | public static CmsOrgUnitManager getOrgUnitManager()(Code) | | Returns the organizational unit manager.
the organizational unit manager |
getPasswordHandler | public static I_CmsPasswordHandler getPasswordHandler()(Code) | | Returns the password handler.
the password handler |
getPublishManager | public static CmsPublishManager getPublishManager()(Code) | | Returns the core publish manager class.
the publish manager instance |
getRepositoryManager | public static CmsRepositoryManager getRepositoryManager()(Code) | | Returns the repository manager.
the repository manager |
getResourceManager | public static CmsResourceManager getResourceManager()(Code) | | Returns the resource manager.
the resource manager |
getRoleManager | public static CmsRoleManager getRoleManager()(Code) | | Returns the role manager.
the role manager |
getRunLevel | public static int getRunLevel()(Code) | | Returns the current OpenCms run level.
The following runlevels are defined:
- Runlevel
OpenCms.RUNLEVEL_0_OFFLINE :
-
OpenCms is in the process of being shut down, the system is offline.
- Runlevel
OpenCms.RUNLEVEL_1_CORE_OBJECT :
-
OpenCms instance available, but configuration has not been processed.
No database or VFS available.
- Runlevel
OpenCms.RUNLEVEL_2_INITIALIZING :
-
OpenCms is initializing, but the process is not finished.
The database with the VFS is currently being connected but can't be accessed.
- Runlevel
OpenCms.RUNLEVEL_3_SHELL_ACCESS :
-
OpenCms database and VFS available, but http processing (i.e. servlet) not initialized.
This is the runlevel the OpenCms shell operates in.
- Runlevel
OpenCms.RUNLEVEL_4_SERVLET_ACCESS :
-
OpenCms fully initialized, servlet and database available.
This is the "default" when OpenCms is in normal operation.
the OpenCms run level |
getRuntimeProperty | public static Object getRuntimeProperty(Object key)(Code) | | Looks up a value in the runtime property Map.
Parameters: key - the key to look up in the runtime properties the value for the key, or null if the key was not found |
getScheduleManager | public static CmsScheduleManager getScheduleManager()(Code) | | Returns the configured schedule manager.
the configured schedule manager |
getSearchManager | public static CmsSearchManager getSearchManager()(Code) | | Returns the initialized search manager,
which provides indexing and searching operations.
the initialized search manager |
getSessionManager | public static CmsSessionManager getSessionManager()(Code) | | Returns the session manager that keeps track of the active users.
the session manager that keeps track of the active users |
getSiteManager | public static CmsSiteManagerImpl getSiteManager()(Code) | | Returns the initialized site manager,
which contains information about all configured sites.
the initialized site manager |
getSqlManager | public static CmsSqlManager getSqlManager()(Code) | | Returns an instance of the common sql manager.
an instance of the common sql manager |
getStaticExportManager | public static CmsStaticExportManager getStaticExportManager()(Code) | | Returns the properties for the static export.
the properties for the static export |
getSystemInfo | public static CmsSystemInfo getSystemInfo()(Code) | | Returns the system information storage.
the system information storage |
getSystemRoles | public static List getSystemRoles()(Code) | | Returns the list of system defined roles (instances of
CmsRole ).
Caution: This list can not be modified.
the list of system defined roles |
getThreadStore | public static CmsThreadStore getThreadStore()(Code) | | Returns the OpenCms Thread store.
the OpenCms Thread store |
getValidationHandler | public static I_CmsValidationHandler getValidationHandler()(Code) | | Returns the runtime validation handler.
the validation handler |
getWorkplaceManager | public static CmsWorkplaceManager getWorkplaceManager()(Code) | | Returns the initialized workplace manager,
which contains information about the global workplace settings.
the initialized workplace manager |
getXmlContentTypeManager | public static CmsXmlContentTypeManager getXmlContentTypeManager()(Code) | | Returns the XML content type manager.
the XML content type manager |
initResource | public static CmsResource initResource(CmsObject cms, String resourceName, HttpServletRequest req, HttpServletResponse res) throws CmsException(Code) | | Reads the requested resource from the OpenCms VFS,
and in case a directory name is requested, the default files of the
directory will be looked up and the first match is returned.
The resource that is returned is always a
org.opencms.file.CmsFile ,
even though the content will usually not be loaded in the result. Folders are never returned since
the point of this method is really to load the default file if just a folder name is requested.
The URI stored in the given OpenCms user context will be changed to the URI of the resource
that was found and returned.
Implementing and configuring an
I_CmsResourceInit handler
allows to customize the process of default resource selection.
Parameters: cms - the current users OpenCms context Parameters: resourceName - the path of the requested resource in the OpenCms VFS Parameters: req - the current http request Parameters: res - the current http response the requested resource read from the VFS throws: CmsException - in case the requested file does not exist or the user has insufficient access permissions |
removeCmsEventListener | public static void removeCmsEventListener(I_CmsEventListener listener)(Code) | | Removes a cms event listener.
Parameters: listener - the listener to remove |
setRuntimeProperty | public static void setRuntimeProperty(Object key, Object value)(Code) | | 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.
Parameters: key - the key to add the Object with Parameters: value - the value of the Object to add |
writeConfiguration | public static void writeConfiguration(Class clazz)(Code) | | Writes the XML configuration for the provided configuration class.
Parameters: clazz - the configuration class to write the XML for |
|
|