jAPS 2.0 entando - Database

Do It The jAPS Way

Eugenio Santoboni

First and complete version in Italian 
Chief Solution Engineer
AgileTec s.r.l.

Roberta Quaresima

Porting to DocBook 4.5 and translation to English 
jAPS Chief Marketing Officier
Tzente s.r.l.

Legal Notice

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the Appendix entitled "GNU Free Documentation License".

The copyright holders make no representation about the suitability of this Document for any purpose. It is provided “as is” without expressed or implied warranty. If you modify this Document in any way, identify your resulting Document as a variant of this Document.

2011-03-03

Revision History
Revision 1.62011-03-03MEM

Update for jAPS 2.0 entando version 2.2.0

Revision 1.52010-03-16MEM

Update for jAPS 2.0 entando version 2.0.10

Revision 1.42009-10-30ES

Update for jAPS 2.0 entando version 2.0.8

Revision 1.32009-03-09RQ

English and docbook adoption

Revision 1.22009-02-09ES

First public release

Abstract

The document describes the databases structure of jAPS 2.0 entando.


List of Examples

4.1. XML Title Example
4.2. XML Title Example

Chapter 1. Scope of the document

Introduction

The document describes the structure of databases used by jAPS 2.0 entando.

Target audience

This document is for developers aiming to build portal using jAPS 2.0 entando.

Prerequisites

In order to take the maximum advantage of the present document, it is necessary to have basic knowledge about PosgreSQL DBMS.

Resources

Additional informations may be obtained through the official mailing-lists:

Is it also possible to refer to the documentation found in the:

jAPS 2.0 entando Project - Developer Website

Chapter 2. Scope of the document

Introduction

The document describes the structure of databases used by jAPS 2.0 entando.

Target audience

This document is for developers aiming to build portal using jAPS 2.0 entando.

Prerequisites

In order to take the maximum advantage of the present document, it is necessary to have basic knowledge about PosgreSQL DBMS.

Resources

Additional informations may be obtained through the official mailing-lists:

Is it also possible to refer to the documentation found in the:

jAPS 2.0 entando Project - Developer Website

Chapter 3. What is jAPS2.0

jAPS 2.0 entando is an Open Source, professional "Enterprise Accessible Information Platform" that makes easier aggregation, publishing, access, customization and integration of information, services, processes and resources, complying with accessibility requirements of W3C WCAG standards.

jAPS 2.0 entando Platform provides performance, reliability and scalability features typical of enterprise software (“Enterprise”), allows users with disabilities to access and manage information and services ("Accessible"), seeks to simplify content management ("Information") and it can be used as a framework ("Platform") to build vertical applications based on contents (Content Enabled Vertical Application).

Chapter 4. jAPS 2.0 entando Database

jAPS 2.0 entando includes 2 database

  • jAPS2.0Serv: services database
  • jAPS2.0Port: portal database

Services Database

The services database consists of 8 tables.

jAPS2.0Serv

The jAPS2.0Serv database

The following paragraphs describes the individual tables.

Table authgroups

The table contains the list of groups. The group defines what components (pages, content, resources, services, applications, etc. ..) the user belonging to that group can access.

The table authgroups is composed by:

  • groupname: group name
  • descr: description of the group

Table authpermission

The table contains all permissions. New permission may be entered directly in the table; the new permission will be available in the permission list to create a new roles.

The table authpermissions is composed by:

  • permissionname: permission name
  • descr: description of the permission

Table authrolepermissions

Defines the roles of users and permissions associated with roles. The data is manageable through the administration interface of the system.

The table authrolepermissions is composed by:

  • rolename: role name
  • permissionname: permission name associated to the role

Table authroles

Defines the roles to be assigned to users. The roles are manageable through the administration interface of the system.

The table authroles is composed by:

  • rolename: role name
  • descr: description of the role

Table authusergroups

Defines the groups associated to individual users. The data is manageable through the administration interface of the system.

The table authusergroups is composed by:

  • username: user name
  • groupname: group name associated to user

Table authuserroles

Defines the role associated to individual users. The data is manageable through the administration interface of the system.

The table authuserroles is composed by:

  • username: user name
  • rolename: role name associated to user

Table authuser

Defines the user registered in the system.

The table authuser is composed by:

  • username: user name
  • passwd: password associated to user
  • registrationdate: user registration/creation date
  • lastaccess: last access date
  • lastpasswordchange: date of last password change
  • active: specify the user state

Table authusershortcuts

This table contains the shortcuts configured for each user in the start page.

The table authusershortcuts has the following columns:

  • username: the username
  • config: the XML containig the definition of the shortcuts

Portal Database

The portal database consists of 16 tables.

jAPS2.0Port

The jAPS2.0Port database

The following paragraphs describes the individual tables.

Table

jAPS allow to categorize the information. The defined categories are stored on the table categories.

The table categories is composed by:

  • catcode: category code
  • parentcode: parent category code
  • titles: xml of category title

The titles of the categories are multilanguage and are described through an XML stored in the field titles.

Example 4.1. XML Title Example

<?xml version="1.0" encoding="UTF-8"?>
<properties>
<property key="en">Home</property>
<property key="it">Home</property>
</properties>
				

Table contentmodels

Contains the content models. These are models built with Velocity.

The table contentmodels is composed by:

  • modelid: unique identifier of content model
  • contenttype: content type associated to the model
  • descr: content model description
  • model: model
  • stylesheet: stylesheet associated to model

Table contentrelations

The table contentrelations describes the relationships between single contents and the pages, resources, other contents, categories and groups. In this way you could manage referential constraints on the content objects described in XML format.

Note that the relation in this tables belongs to published contents only

The table contentrelations is composed by:

  • contentid: unique identifier of content
  • refpage: page with references to the content
  • refcontent: content with references to the content
  • refresource: resource with references to the content
  • refcategory: category associated to the content
  • refgroup: group associated to the content

Table workcontentrelations

The table contentrelations describes the relationships between single contents and the categories, but limited to the unpublished contents. In this way you could manage referential constraints on the content objects described in XML format.

The table contentrelations is composed by:

  • contentid: unique identifier of content
  • refcategory: category associated to the content

Table contents

The table contents contains the content created by editors

The table contents is composed by:

  • contentid: unique identifier of content
  • contenttype: code of the content type
  • descr: description of the content
  • status: content status in the working area
  • workxml: XML description of the content in a different status regards the online version
  • created: content creation date in the format yyyyMMddhhmmss
  • lastmodified: last modification date in the format yyyyMMddhhmmss
  • onlinexml: XML description of the content in the online version
  • maingroup: identifier of owner content

Table contentsearch

The table contains references to all fields that have been declared searchable in the definition of the content types (see table sysconfig).

This table contains the references of the published contents only.

The table contentsearch is composed by:

  • contentid: unique identifier of content
  • attrname: attribute name
  • textvalue: text insert in attributes of type Text
  • datavalue: data insert in the attributes of type data
  • numvalue: number insert in the attribute of type Number
  • langcode: unique code of reference language (for text insert in the attribute of type Text)

Table workcontentsearch

The table contains references to all fields that have been declared searchable in the definition of the content types (see table sysconfig)

This table only contains the references of the contents not published: make a comparison with the table contentsearch above.

The table contentsearch is composed by:

  • contentid: unique identifier of content
  • attrname: attribute name
  • textvalue: text insert in attributes of type Text
  • datavalue: data insert in the attributes of type data
  • numvalue: number insert in the attribute of type Number
  • langcode: unique code of reference language (for text insert in the attribute of type Text)

Table localstrings

Allows to manage the internationalization and localization of strings, labels, etc.., of jAPS system.

The table localstrings is composed by:

  • keycode: key of the label
  • langcode: unique code of reference language
  • stringvalue: label value

Table pagemodels

Defines the page models. A page model is composed by a jsp and its configuration. The table initially contains only a temporary model, to be replaced as soon as create custom model. The code (column code) must match the name of the jsp that implements the page model.

The table pagemodels is composed by:

  • code: unique identifier of page model
  • descr: description of page model
  • frames: xml that describes the page organization divided into frames
  • plugincode: Plugin code owner

The frame should have positions numbered from 0 without intermediate holes. A single frame may have the attribute main= true; this attribute means that content published in that frame is considered as main content of the page.

Table pages

Defines the pages of the portal, connected in a hierarchical structure. The structure of the pages can be modified and complete later with special features. The page titles are multilanguage and are described through an XML stored in the field titles.

Example 4.2. XML Title Example

					
<?xml version="1.0" encoding="UTF-8"?>
<properties>
<property key="en">Home</property>
<property key="it">Home</property>
</properties>
					
				

The table pages is composed by:

  • code: unique identifier of page
  • parentcode: unique identifier of parent page
  • pos: position of the page in relation with the other page in the structure
  • modelcode: code of the page model associated to the page
  • titles: page titles in the defined languages
  • groupcode: unique code of the group associated to the page
  • showinmenu: defines if the page have to be inserted into dinamic menu
  • extraconfig: specifies if the extra titles must be used for that page

Table resourcerelations

The table resourcerelations is used to describe the relationship between resources and categories.

The table resourcerelations is composed by:

  • resid: unique code of resource
  • refcategory: category associated to the resource

Table resources

The table resources contains all the resources defined in the system.

The table resources is composed by:

  • resid: unique code of resource
  • restype: identifier of the resource type (Image or Attach)
  • descr: description of the resource
  • maingroup: name/code of the owner group of the resource
  • xml: xml description of the resource
  • masterfilename: the name of the file associated to the resource

In XML are present all the information of the resource and some of them (ID, type and description) are also present in specific columns in the db table.

Note

The resource position on the disk depends on 2 factors:

  • resource group
  • resource type (Image or Attach)

Table showletcatalog

The table contains the list of the showlet available in the system.

The table showletcatalog is composed by:

  • code: unique identifier of the showlet
  • titles: showlet titles in the defined languages
  • parameters: xml configuration: it is used to storage configuration parameters of the showlet
  • plugincode: Plugin code owner
  • parenttypecode: code of parent showlet (in case of logic showlet)
  • defaultconfig: xml configuration: the default config (in case of logic showlet)
  • locked: the showlet status (in case of logic showlet)

Table showletconfig

The table showletconfig is composed by:

  • pagecode: unique identifier of the page
  • frameposition: showlet position
  • showletcode: unique identifier of the showlet associated to the page
  • config: XML configuration
  • publishedcontent: unique code of the published content

Table sysconfig

It is the table of system configuration of jAPS. It contains information about system configuration. The table is designed to accommodate different configurations simultaneously.

The table sysconfig is composed by:

  • version: defines the version of each records
  • item: defines the information type
  • descr: description
  • config: contains the item value and can be a simple string or a XML test

Table uniquekeys

It contains the last value of a unique keys sequence. During installation must contains a record with id=1.

The table uniquekeys is composed by:

  • id: unique identifier
  • key value: key value