Skip navigation links

OpenCms Core API, version 10.5.3

This is the API description for the OpenCms core, please read the introdution below to learn about the packages and functions of the API that are intended to be used in OpenCms application development.

See: Description

Packages 
Package Description
com.google.gwt.user.client.rpc
Contains the compile time classes required to allow synchronous RPC calls.
org.opencms.acacia.shared
Contains the acacia editor shared client/server classes.
org.opencms.acacia.shared.rpc
Contains the acacia editor RPC service interfaces.
org.opencms.ade.configuration
Contains the ade configuration classes.
org.opencms.ade.configuration.formatters  
org.opencms.ade.containerpage
Contains the container page editor service classes.
org.opencms.ade.containerpage.inherited
Contains classes used for reading and caching inheritance groups.
org.opencms.ade.containerpage.shared
Contains the shared container page editor classes.
org.opencms.ade.containerpage.shared.rpc
Contains the container page editor service interfaces.
org.opencms.ade.contenteditor
Contains server side classes for the XML content editor.
org.opencms.ade.contenteditor.shared
Contains data beans used on the server side as well as on the client side of the XML content editor.
org.opencms.ade.contenteditor.shared.rpc
Contains the RPC service interfaces used by the XML content editor.
org.opencms.ade.detailpage
Contains functions for the detail pages in OpenCms.
org.opencms.ade.editprovider  
org.opencms.ade.galleries
Contains server side classes for the gallery dialogs.
org.opencms.ade.galleries.preview  
org.opencms.ade.galleries.shared
Contains the shared client/server side gallery dialog classes.
org.opencms.ade.galleries.shared.rpc  
org.opencms.ade.postupload  
org.opencms.ade.postupload.shared  
org.opencms.ade.postupload.shared.rpc  
org.opencms.ade.properties  
org.opencms.ade.properties.shared  
org.opencms.ade.publish
This package contains the server-side classes for the publish module.
org.opencms.ade.publish.shared
Classes for the publish dialog which are used by both the client and the server.
org.opencms.ade.publish.shared.rpc
Classes to handle client-side GWT-RPC services.
org.opencms.ade.sitemap
Server side of the sitemap view.
org.opencms.ade.sitemap.shared
Shared Client-Server side of the sitemap view.
org.opencms.ade.sitemap.shared.rpc
Shared RPC interfaces.
org.opencms.ade.upload  
org.opencms.cache
Implementations of specialized caches used in OpenCms.
org.opencms.cmis  
org.opencms.configuration
Reads and writes the XML based OpenCms configuration files.
org.opencms.configuration.preferences
Classes to build the user preferences dialog.
org.opencms.db
Low-level database connection and access functionality.
org.opencms.db.as400
AS400 implementation of the OpenCms database connector.
org.opencms.db.db2
DB2 implementation of the OpenCms database connector.
org.opencms.db.generic
Generic (ANSI-SQL) implementation of the OpenCms database connector.
org.opencms.db.hsqldb
HSQLDB implementation of the OpenCms database connector.
org.opencms.db.jpa
JPA implementation of the OpenCms database connector.
org.opencms.db.jpa.persistence  
org.opencms.db.jpa.utils  
org.opencms.db.log
This package contains the implementation classes for the DB log.
org.opencms.db.mssql
MS SQL implementation of the OpenCms database connector.
org.opencms.db.mysql
MySQL4+ implementation of the OpenCms database connector.
org.opencms.db.oracle
Oracle9+ implementation of the OpenCms database connector.
org.opencms.db.postgresql
PostgreSql implementation of the OpenCms database connector.
org.opencms.db.urlname  
org.opencms.db.userpublishlist  
org.opencms.file
This important package provides the methods to access the OpenCms VFS repository with the permissions of an authenticated user.
org.opencms.file.collectors
Collectors allow to gather lists of OpenCms resources from the OpenCms VFS using specific rules.
org.opencms.file.history
This package contains the classes to deal with the OpenCms VFS history archive.
org.opencms.file.types
The implementations of the core resource types for the VFS are located here.
org.opencms.file.wrapper
This package contains classes and interfaces used to access OpenCms through a wrapped CmsObject.
org.opencms.flex
Provides low-level JSP integration funtionality for OpenCms, also implements the FlexCache, a declarative parameter-based cache.
org.opencms.gwt
Provides core support for GWT.
org.opencms.gwt.seo  
org.opencms.gwt.shared
Core shared stuff.
org.opencms.gwt.shared.alias  
org.opencms.gwt.shared.property  
org.opencms.gwt.shared.rpc
Shared RPC interfaces.
org.opencms.gwt.shared.sort  
org.opencms.i18n
Classes to handle internalization (i18n) and locale selection in OpenCms.
org.opencms.i18n.tools  
org.opencms.importexport
Contains functions to import and export resources from the OpenCms VFS.
org.opencms.jlan  
org.opencms.json
Classes to create JSON objects and arrays for JavaScript in OpenCms.
org.opencms.jsp
The implementation of the OpenCms JSP tag library, with some additional utility classes to help in JSP scriplet code and navigation building.
org.opencms.jsp.decorator
HTML postprocessor, used to tag single words or phrases in the HTML output.
org.opencms.jsp.jsonpart  
org.opencms.jsp.parse
API classes for the <cms:parse> tag.
org.opencms.jsp.search.config
API classes for the configuration of the search form support provided for server-side Solr search.
org.opencms.jsp.search.config.parser
API classes for the configuration parsers of the search form support provided for server-side Solr search.
org.opencms.jsp.search.controller
API classes for the controllers of the search form support provided for server-side Solr search.
org.opencms.jsp.search.result
API classes for the result of the search form support provided for server-side Solr search.
org.opencms.jsp.search.state
API classes for the state of the search form support provided for server-side Solr search.
org.opencms.jsp.util
Utility classes to be used for JSP pages.
org.opencms.loader
Low-level functions to manage the loading of resources from the OpenCms VFS.
org.opencms.lock
The lock state of the resources in the VFS is handled with these classes.
org.opencms.mail
Provides utility classes to generate email messages using the OpenCms email configuration.
org.opencms.main
Provides the main OpenCms "operating system".
org.opencms.module
OpenCms modules provide a powerful, standardized way to extend the core OpenCms functionality.
org.opencms.monitor
Contains functions to monitor the OpenCms system status.
org.opencms.newsletter
Contains classes to distribute newsletters.
org.opencms.notification
Contains classes for the automatical notification of outdated, expiring or released content.
org.opencms.pdftools  
org.opencms.pdftools.dtds  
org.opencms.publish
Classes to handle the OpenCms publish process.
org.opencms.relations
Classes to represent and validate the internal and external links/relations of resources in the OpenCms VFS.
org.opencms.report
Classes used to generate the OpenCms reports, which are displayed during publish, import, export etc.
org.opencms.repository
Package contains all classes and interfaces needed to create or use a repository to access the resources in the VFS.
org.opencms.scheduler
The OpenCms scheduler provides a facility to run jobs in a regular schedule, much like the "cron" faciltiy in UNIX systems.
org.opencms.scheduler.jobs
Some predefined implementations for often used scheduled job tasks.
org.opencms.search
Implements the main full text search and indexing functions available in OpenCms.
org.opencms.search.documents
Handles indexing different sorts of document and resource type from the OpenCms VFS for the full text search.
org.opencms.search.extractors
Contains a generic, low-level framework for extration of plain text content out of various popular file formats.
org.opencms.search.fields
These classes control the mapping of the OpenCms content to the Lucene search fields.
org.opencms.search.galleries
Implements the search functions for the OpenCms Gallery search index, which is used by the Advanced Direct Edit (ADE) functions.
org.opencms.search.solr  
org.opencms.search.solr.spellchecking
Contains the SOLR based spellcheck service classes.
org.opencms.security
Access control and security classes for the OpenCms ACL permission system.
org.opencms.site
Provides access to the multi-site configuration of OpenCms.
org.opencms.site.xmlsitemap  
org.opencms.staticexport
Contains the functionality for the static HTML page export.
org.opencms.synchronize
Classes used to synchronize the OpenCms VFS with the real file system.
org.opencms.ugc  
org.opencms.ugc.shared  
org.opencms.ugc.shared.rpc  
org.opencms.ui
General code for the Vaadin UI.
org.opencms.ui.actions
Contains classes for workplace actions.
org.opencms.ui.apps
Contains code for workplace apps.
org.opencms.ui.apps.projects  
org.opencms.ui.apps.scheduler  
org.opencms.ui.apps.search  
org.opencms.ui.components
Contains some reusable GUI components for Vaadin UI.
org.opencms.ui.components.codemirror  
org.opencms.ui.components.extensions
Contains Vaadin UI extensions.
org.opencms.ui.components.fileselect
Contains components for selecting resources.
org.opencms.ui.contextmenu
Contains code for workplace context menu.
org.opencms.ui.dataview  
org.opencms.ui.dialogs
Contains code for workplace dialogs.
org.opencms.ui.dialogs.availability
Contains code for the availability dialog.
org.opencms.ui.dialogs.embedded  
org.opencms.ui.dialogs.history
Contains code for the file history dialog.
org.opencms.ui.dialogs.history.diff
Contains code for the comparison view of the file history dialog.
org.opencms.ui.dialogs.permissions  
org.opencms.ui.editors  
org.opencms.ui.editors.messagebundle
The data bindings and logic for the translator editor.
org.opencms.ui.error  
org.opencms.ui.login
Contains the user interface components for the Vaadin-based login dialog.
org.opencms.ui.report  
org.opencms.ui.shared  
org.opencms.ui.shared.components
Contains Vaadin component state classes and other RPC classes.
org.opencms.ui.shared.login
Contains the user shared classes for the Vaadin-based login dialog.
org.opencms.ui.shared.rpc
Contains Vaadin RPC interfaces.
org.opencms.ui.sitemap
Vaadin GUI components and utilities for use in the sitemap editor.
org.opencms.ui.util
Utilities for Vaadin workplace code.
org.opencms.ui.util.table
Contains utility classes for dealing with Vaadin tables.
org.opencms.util
Utility functions for String manipulation and other often used tasks.
org.opencms.webdav
Provides a WebDAV access to OpenCms.
org.opencms.widgets
Contains the widget implementations, these are GUI elements used in editors and dialogs of the OpenCms workplace.
org.opencms.widgets.dataview  
org.opencms.workflow  
org.opencms.workplace
The base classes for the OpenCms Workplace (standard dialog, tab dialog, report based dialog) and the Workplace configuration classes are located here.
org.opencms.workplace.commons  
org.opencms.workplace.comparison
Utilities for comparing different versions of resources, used by both the classic workplace and the new Vaadin-based workplace.
org.opencms.workplace.editors
Base classes for the editors (WYSIWYG, plain text, XML content) used in the OpenCms Workplace.
org.opencms.workplace.editors.directedit
Used to control the generation of the HTML for the "direct edit" buttons.
org.opencms.workplace.explorer
Contains the functions that generate the Workplace "Explorer" view, also contains the "New resource" wizard.
org.opencms.workplace.explorer.menu
Contains the functions that generate the Workplace "Explorer" context menu entries.
org.opencms.workplace.galleries
Contains the various "Galleries" which are available in the editors and widgets of the OpenCms Workplace.
org.opencms.workplace.list  
org.opencms.workplace.threads
A collection of thread classes that are used in the OpenCms Workplace, usually in connection with a report.
org.opencms.workplace.tools
Contains the base classes for implementing a tool in the OpenCms Workplace "Administration" view.
org.opencms.workplace.tools.scheduler  
org.opencms.xml
Basic XML functionality and utilities used by OpenCms to maintain XML documents and content.
org.opencms.xml.containerpage
Contains functions for the ADE main pages, commonly called "Container Pages" in OpenCms.
org.opencms.xml.content
Contains functions for structured content storage using XML, commonly called "XML content" in OpenCms.
org.opencms.xml.page
Contains functions for unstructured content storage using XML, commonly called "XML pages" in OpenCms.
org.opencms.xml.types
Contains the basic XML content type definitions, used for XML content and XML pages.

This is the API description for the OpenCms core, please read the introdution below to learn about the packages and functions of the API that are intended to be used in OpenCms application development.

Introduction to the OpenCms API

The OpenCms API contains several building blocks:

Not all packages defined in this API are considered "end user" API functions. For example, to access the OpenCms repository you should use an initialized instance of the CmsObject class, and never access the database directly with SQL. So the database functionalities in the org.opencms.db package are "low level" functions, used by the classes in the org.opencms.file package but usually not directly by an application.

How to start developing OpenCms applications

Here are some basic pointers that should help you identify importants parts in this API documentation that are usually required in OpenCms application development:

You should start with the template functions provided in the org.opencms.jsp package. This contains the OpenCms <cms:> taglib, as well as the CmsJspActionElement (for use with scriptlets). These allow you to easliy access the current users CmsObject from a JSP, and with this you can dynamically build OpenCms front end applications based on the users permissions.

For easy template navigation building, check out the methods CmsJspNavBuilder. You can build full-blown OpenCms applications with the functions from the org.opencms.jsp package and never bother about the rest of the API.

After you have mastered the basics of template development, you should take a closer look at the objects in the org.opencms.file package. These object are the "building blocks" for OpenCms applications, and it certainly helps to understand these in greater detail before moving on to more complex OpenCms applications. As already mentioned, the CmsObject is probably the most important class there.

In case you want to use certain OpenCms "operating system" features, use the OpenCms singleton to gain access to the low level manager classes that handle the system runtime.

The org.opencms.module package contains the OpenCms module API. You do not usually need to "program" a module because a module is most often created using the OpenCms Workplace. However, in case you want to trigger certain module lifecyle events, have a look at the I_CmsModuleAction interface.

There are a couple of utility functions worth to mention here: In case you want to send emails from your application, check out the org.opencms.mail package. You can schedule recurring operations in OpenCms by implementing the I_CmsScheduledJob interface.

The basic OpenCms application design

OpenCms runs as a multi tier application. The database layer that contains the VFS is accessed only through the business logic provided by the CmsObject class. This runs totally independent of any servlet container, there is no database logic whatsoever in the "front end", for example the JSP templates. Check the CmsShell description to see how to access the VFS without a servlet container.

In normal operation, OpenCms runs as a servlet in a servlet container. On the startup of the container, OpenCms initializes itself from the configuration provided in the XML files. After the XML configuration has been read, a singleton instance of the OpenCms object provides access to all OpenCms functionality. This OpenCms singleton instance can be considered the "operating system" of OpenCms.

After the "operating system" is initialized and the OpenCms object is available, all requestes made to the OpenCmsServlet are directly passed to this for authorization. When a request is recieved, it's first authenticated to see which CmsUser has made the request. If the user has not been authenticated so far, the CmsUser object is initialized with "Guest" user permissions. With this user context, an instance of a CmsRequestContext is generated, and with that a CmsObject is initialized. This initialized CmsObject then provides the "users context" for all access operations to the OpenCms VFS. It can also be considered the "shell" of the user to the OpenCms VFS. All access operations to the VFS are done through the CmsObject, and this means that all access operations automatically are done with the authenticated users permissions.

Skip navigation links