This chapter covers implementation-oriented topics on datasources. See Section 4, “Datasources” to learn how to configure your datasources.
Datasources provide an easy and abstracted way to query and manage data, independent of the specific backend system using a common query language (expressions). Currently 2 types of datasource implementation exist: Gentics .Node ContentRepository datasources are often called enhanced relational databases, are stored in SQL92 compliant database systems in a fixed database layout, and bring several advantages against common relational SQL layouts. LDAP datasources are stored in LDAPv3 compliant directories.
See the Gentics Infoportal for a detailed list of database products which were successfully tested for compatibility.
Please also consult the Gentics Infoportal for a list of limitations in functionality for different datasources and/or datastore products.
A generic database scheme, used for storing content published by Gentics Content.Node;, all standard modules provided by Gentics and the Gentics .Node PortalConnector. The scheme is independent of your data structure, and must not be adapted for new attributes. See “ContentRepository” (Section 4.3) for more information.
The following datatypes are supported:
Table 4.169. Attribute Types
Type Id | Type | Java Representation | Type Description |
---|---|---|---|
1 | Text Short | String | A short text (maximum length 255 characters) |
2 | Object Link | Resolvable | Link to another object (the 1:n relation, the id to the linkedobject is stored in this attribute) |
3 | Integer | String | A normal-sized Integer (signed 32 bit integer). Will be returned as String for backward compatibility reasons. |
5 | Text Long | String | For example used for Page content in Gentics Content.Node; (Replaced the deprecated type 4) |
6 | Binary Content | byte array | Binary data (e.g. files) |
7 | Foreign Link | Collection of Resolvables | Reverse attribute to type 2. the n:1 relation. this attribute contains no data , it just points to the linkattribute of the foreignobject. |
8 | Long Integer | Long | A large integer (signed 64 bit integer). |
9 | Double | Double | A normal-size (double-precision) floating-point number. |
10 | Date | Timestamp | An attributetype which can hold a date and time. |
![]() | Note |
---|---|
If you retrieve a Multivalue attribute the result will be a Collection containing all values as described above (Except Object Links which will be retruend as |
The main difference between a Multichannelling ContentRepository and a ContentRepository is that when using a Multichannelling ContentRepository, the channel (or channels) to be used have to be selected.
Selecting channels can be done for each separate channel structure, that is published into the Multichannelling ContentRepository. A channel structure is a master node together with all its channels.
Initially, for each channel structure, the master node is selected.
The channel can be set using the mccr specific portal property path portal.datasources.[id].channel = [channelid]
. (See “Portal” (Section 8.1) portal property paths).
Selecting a channel using the portal property path will store this setting in the user session. Every datasource instance fetched by a portlet will now have the modified set of channels selected.
Alternatively, the channels may be set on a datasource instance, which will only affect this instance, e.g. like documented in “DatasourceQueryImp for MCCR datasources” (Section 1.7.3).
Meta Attributes are always present for all objects and can be used in filter rules.
Table 4.170. Multichannelling ContentRepository Meta Attributes
Name | Type | Description | |
---|---|---|---|
obj_type | Integer | Type of the object: 10002 for folders, 10007 for pages and 10008 for files | |
obj_id | Integer | Object ID | |
contentid | String | Composition of "[obj_type].[obj_id]" | |
channel_id | Integer | Channel ID of the object | |
channelset_id | Integer | Channelset ID of the object. The channelset_id is a unique identifier of an object in a channel. Objects in different channels with the same channelset_id are channel-specific variants of the same object. | |
updatetimestamp | Integer | Unix Timestamp of the last update to the object |