| Home >> All >> com >> opencms |
Page 1 2
| | com.opencms.template.* (39) | | com.opencms.util.* (8) | | com.opencms.workplace.* (150) |
Package Samples:
com.opencms.template.cache: The OpenCms XMLTemplate mechanism is implemented in this package.
com.opencms.workplace
com.opencms.util
com.opencms.template
Classes:
CmsShowContent: Generic class for showing information encapsulated by contentdefinition objects. There are mainly two user methods in this template class for this purpose: getEntry and getList. The getEntry method accepts an id or read it from the url parameters (it has to be named id to be found) if given and set datablocks inside the template with values returned by all public get-methods of the contentdefinition that returns a String and have no parameters. This method must be called in the template before acccessing any of this data with process tags. The getList method builds a list of contentdefinition entries. ...
CmsJspTagInfo: Provides access to OpenCms and System related information. This tag supports the following special "property" values: opencms.version returns the current OpenCms version, e.g. 5.0 Kaitain opencms.url returns the current request URL, e.g. http://localhost:8080/opencms/opencms/index.jsp opencms.uri returns the current request URI, e.g. /opencms/opencms/index.jsp opencms.webapp returns the name of the OpenCms web application, e.g. opencms opencms.webbasepath returns the name of system path to the OpenCms web application, e.g. C:\Java\Tomcat\webapps\opencms\ opencms.request.uri returns the name of ...
CmsResourceTranslator: This class provides a resource name translation facility. Resource name translation is required for backward compatibility to the old OpenCms (pre 5.0 beta 2) directory layout. It can also be used to translate special characters or names automatically. It is also used for translating new resource names that contain illegal chars to legal names. This feature is most useful (and currently only used) for uploaded files. It is also applied to uploded ZIP directories that are extracted after upload. The translations can be configured in the opencms.properties. The default directory translation setting ...
CmsJspTagProperty: Provides access to the properties of a resource in the OpenCms VFS . Of particular importance is the setting of the file attribute, which can take the following values. This attribute allows you to specify where to search for the property. The following values are supported: uri (default) Look up the property on the file with the uri requested by the user. search.uri or search Look up the property by also checking all parent folders for the property, starting with the file with uri requested by the user and going "upward" if the property was not found there. element.uri Look up the property on ...
CmsFlexCache: This class implements the FlexCache. The data structure used is a two-level hashtable. This is optimized for the structure of the keys that are used to describe the caching behaviour of the entries. The first hash-level is calculated from the resource name, i.e. the name of the resource as it is referred to in the VFS of OpenCms. A suffix [online] or [offline] is appended to te resource name to distinguish between the online and offline projects of OpenCms. The second hash-level is calculated from the cache-key of the resource, which also is a String representing the specifc variation of the cached ...
I_CmsResourceLoader: This interface describes a resource loader for OpenCms, a class that can load a resource from the VFS, process it's contents and deliver the result to the user. The I_CmsResourceLoader operates with Request and Response in much the same way as a standard Java web application. The I_CmsResourceLoader is closely related to the com.opencms.launcher.I_CmsLauncher interface. In essence, both interfaces serve the same purpose. However, the I_ResourceLoader is much closer related to the standard Java Servlet API then the I_CmsLauncher, which makes it easier to understand for the novice OpenCms programmer. ...
CmsMail: This class is used to send a mail using the JavaMail package. Sun's mail.jar and activation.jar are required, if this class should be used in any OpenCms class. Sender and recipients addresses may be given as String or as CmsUser objects. Different constructors for setting additional CC and BCC addresses are provided. Attachments can be added using the addAttachment() method. If the current HTTP request is a multipart/form-data request and contains uploaded files, all these files will be sent as attachments, too. For performance reasons, this classes uses threads for sending mails. Mail threads ...
A_CmsXmlContent: Abstract class for OpenCms files with XML content. This class implements basic functionality for OpenCms XML files. For each XML file content type (e.g. XML template files, XML control files, XML news article files, ...) a customized class extending this abstract class has to be implemented. The functionality of this class is: control the XML parser recognize and handle special XML tags used in OpenCms environment cache parsed documents, so that that they can be re-used provide methods to access XML data After creating a new instance of the children of this class it has to be initialized by calling ...
OpenCmsHttpServlet: This the main servlet of the OpenCms system. From here, all other operations are invoked. Any incoming request is handled in multiple steps: The requesting user is authenticated and a CmsObject with the user information is created. The CmsObject is used to access all functions of OpenCms, limited by the authenticated users permissions. If the user is not identified, it is set to the default (guest) user. The requested document is loaded into OpenCms and depending on its type (and the users persmissions to display or modify it), it is send to one of the OpenCms launchers do be processed. The loaded ...
CmsRequestHttpServlet: Implementation of the I_CmsRequest interface which wraps a HttpServletRequest and includes handling of multipart - requests. This implementation uses a HttpServletRequest as original request to create a CmsRequestHttpServlet. This either can be a normal HttpServletRequest or a CmsMultipartRequest which is used to upload file into the OpenCms. This class contains a modification of the MultipartRequest published in the O'Reilly book Java Servlet Programming by J. Junte, www.servlets.com It Constructs a new MultipartRequest to handle the specified request, saving any uploaded files to the given directory, ...
CmsFlexLruCache: Implements an LRU (last recently used) cache. The idea of this cache to separate the caching policy from the data structure where the cached objects are stored. The advantage of doing so is, that the CmsFlexLruCache can identify the last-recently-used object in O(1), whereas you would need at least O(n) to traverse the data structure that stores the cached objects. Second, you can easily use the CmsFlexLruCache to get an LRU cache, no matter what data structure is used to store your objects. The cache policy is affected by the "costs" of the objects being cached. Valuable cache costs might be the ...
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 ...
Encoder: The OpenCms Encoder class provides static methods to decode and encode data. The methods in this class are substitutes for java.net.URLEncoder.encode() and java.net.URLDecoder.decode() . Use the methods from this class in all OpenCms core classes to ensure the encoding is always handled the same way. The de- and encoding uses the same coding mechanism as JavaScript, special characters are replaxed with %hex where hex is a two digit hex number. Note: On the client side (browser) instead of using corresponding escape and unescape JavaScript functions, better use encodeURIComponent and decodeURIComponent ...
A_CmsBackoffice: Abstract class for generic backoffice display. It automatically generates the head section with filters and buttons, body section with the table data, lock states of the entries. if there are any, delete dialog, lock dialog. calls the edit dialog of the calling backoffice class new dialog of the calling backoffice class using the content definition class defined by the getContentDefinition method. The methods and data provided by the content definition class is accessed by reflection. This way it is possible to re-use this class for any content definition class, that just has to extend the A_CmsContentDefinition ...
I_CmsEventListener: Implement this interface in case your class has to react to CmsEvents that are thrown by system. In order to recieve system events, your class must register with the OpenCms event mechanism. This can be done in the constructor of a class like this: com.opencms.core.A_OpenCms.addCmsEventListener(this); A typical implementation might look like this: public void cmsEvent(com.opencms.flex.CmsEvent event) { switch (event.getType()) { case com.opencms.flex.I_CmsEventListener.EVENT_PUBLISH_PROJECT: case com.opencms.flex.I_CmsEventListener.EVENT_CLEAR_CACHES: // do something break; case com.opencms.flex.I_CmsEventListener.EVENT_LOGIN_USER: ...
CmsFlexCacheEntry: Contains the contents of a cached resource. It is basically a list of pre-generated output, include() calls to other resources (with request parameters) and http headers that this resource requires to be set. A CmsFlexCacheEntry might also describe a redirect-call, but in this case nothing else will be cached. The pre-generated output is saved in byte[] arrays. The include() calls are saved as Strings of the included resource name, the parameters for the calls are saved in a HashMap. The headers are saved in a HashMap. In case of a redirect, the redircet target is cached in a String. The CmsFlexCacheEntry ...
CmsJspActionElement: Bean to be used in JSP scriptlet code that provides direct access to the functionality offered by the opencms taglib. By instanciating a bean of this type and accessing the methods provided by the instance, all functionality of the OpenCms JSP taglib can be easily used from within JSP scriplet code, Initialize this bean at the beginning of your JSP like this: <jsp:useBean id="cms" class="com.opencms.flex.jsp.CmsJspActionElement"> <% cms.init(pageContext, request, response); %> </jsp:useBean> All exceptions that occur when calling any method of this class are catched and written ...
CmsXmlTemplateLoader: Implementation of the I_CmsResourceLoader and the com.opencms.launcher.I_CmsLauncher interface for XMLTemplates. This implementation can deliver XMLTemplates directly since it extends the com.opencms.launcher.CmsXmlLauncher . It is also usable to include XMLTemplates as sub-elements on a JSP page since it implements the I_CmsResourceLoader interface.
A_CmsLauncher: Abstract OpenCms launcher class. This class implements basic functionality for all OpenCms launchers. For each relevant file type (e.g. XML control files, plain text files, JavaScript files,...) a customized launcher has to be implemented. Every extending class has to implement the abstract methods getLauncherId() to indicate the type of the launcher launch() to be called by initlaunch The functionality of this class is provide a global cache for template class results receive the system's launcher call, do some relevant initial things and call the launch() method provide some utility methods
CmsUUID: Generates a UUID using spatial and temporal uniqueness. Spatial uniqueness is derived from ethernet address (MAC, 802.1); temporal from system clock. For more information about the algorith used, please see draft-leach-uuids-guids-01.txt . Because Java is unable to read the MAC address of the machine (without using JNI), the MAC address has to be provided first by using the static init(String) 55 method. This class is just a facade wrapper for the "real" UUID implementation.
CmsResourceTypeLink: Implementation of a resource type for links between resources in the virtual file system (VFS). A VFS link is nothing else but a text file of a certain resource type. The content of this file is the name/path of the target resource of the link, including the site root (which is at least "/default/vfs/"). VFS links and their target resources are tracked by the RESOURCE_FLAGS table attribute. Each VFS link saves there the ID of it's target resource. Each resource that has VFS links saves the count of it's VFS links (to fix wheter it has VFS links at all or not). All resource types are created by ...
I_CmsXmlTemplate: Interface for OpenCms XML template classes. All methods extending the functionality of the common template class interface to the special behaviour of XML template classes may be defined here. Primarily, this interface is important for the launcher, NOT for the template engine. The CmsXmlLauncher can launch all templates that implement the I_CmsXmlTemplate interface. For subtemplates, the I_CmsTemplate interface is all that must be implemented, so you can load all kind of templates (eg. type I_CmsDumpTemplate) as subtemplate.
CmsMessages: Reads localized resource Strings from a java.util.ResourceBundle and provides convenience methods to access the Strings from a template. This class is to be used from JSP templates. Because of that, throwing of exceptions related to the access of the resource bundle are suppressed so that a template always execute. The class provides an isInitialized() 55 method that can be checked to see if the instance was properly initialized.
CmsCoreSession: This class implements a session storage which is mainly used to count the currently logged in OpenCms users. It is required for user authentification of OpenCms. For each active user, its name and other additional information (like the current user group) are stored in a hashtable, useing the session Id as key to them. When the session gets destroyed, the user will removed from the storage. One of the main purposes of this stored user session list is the sendBroadcastMessage() method.
CmsElementCache: This is the starting class for OpenCms element cache. Element cache was implemented for performance issues. The idea is to create a flat hirarchie of elements that can be accessed fast and efficient for the frontend users in the online project. On publishing-time the data in the element cache area will be created or updated. All inefficiant XML-files are changed to the efficient element cache data structure. For createing the content no XML-parsing and DOM-accessing is neccessairy.
| Home | Contact Us | Privacy Policy | Terms of Service |