Do It The jAPS Way
Copyright © 2011 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".
2011-03-03
| Revision History | ||
|---|---|---|
| Revision 1.5 | 2011-03-03 | MEM |
|
Update for jAPS 2.0 entando, version 2.2.0 | ||
| Revision 1.4 | 2010-03-17 | MEM |
Revision for the jAPS 2.0.10 release | ||
| Revision 1.3 | 2009-03-09 | RQ |
|
English and docbook adoption This revision will be finished when the document Pattern Integrazione Servizi will be correctly translated and referenced | ||
| Revision 1.2 | 2009-02-09 | ES |
First public release | ||
Abstract
This document describes the conceptual model of jAPS 2.0 entando. This guide is recommended for technical and non-users.
Table of Contents
List of Examples
Table of Contents
Describes the conceptual model of jAPS 2.0 entando. This guide is recommended for technical and non-users.
Additional informations may be obtained through the official mailing-lists:
<japs-platform@googlegroups.com>, "japs-platform" Google Group, the jAPS 2.0 entando official Mailing List
Is it also possible to refer to the documentation found in the:
Table of Contents
Table of Contents
In jAPS the content is a set of information (Content Attributes) organized in a structure that define the "Content Type". The contents, as defined below, shall be considered only as pure information, not contain indications of how the information will be displayed.
The information are multilanguage or monolanguage, depending on information that we consider.
Indications how the contents will be displayed are defined in content models. For each type of content can be defined more content models. Structure and informations are stored in the database in XML format.
The Content Type groups together all the contents with a similar structure that use the same set of editing operations (in the administration area) and the same content model (in front -end).
An example of content type can be a News, an Article, etc. Each content type is defined, in the system configuration, by set of attributes (id, description, etc.) and by the list of content attributes.
The content types available in the system must be declared and defined in xml in the table
sysconfig, item contentTypes. The structure of the content type is:
<contenttypes> <contenttype typecode="____" typedescr="____" viewpage="____" listmodel="___" defaultmodel="___" > <attributes> <attribute name="____" attributetype="____" /> .............. <list name="_____" attributetype="____" nestedtype="___" /> .............. </attributes> </contenttype> <contenttype .......... > ......... </contenttype> ........ </contenttypes>
For each Content Type are defined:
typecode: code (which should be 3 alphanumeric characters);typedescr: description;viewpage: the code of the page displaying the complete content;listmodel: code of Content Model displaying the content lists of that type;defaultmodel: default model;
The two models identified by listmodel and defaultmodel are
the extremes , which displays the contents of that type; the defaultmodel displays the
full content, while listmodel displays only the minimum elements to interpret the content within the list.
Example 3.1. Generic Content
<contenttypes> <contenttype typecode="CNG" typedescr="Generic Content" viewpage="contentview" listmodel="11" defaultmodel="1"> <attributes> <attribute name="Title" attributetype="Text" indexingtype="text"/> <attribute name="Abstract" attributetype="Longtext" indexingtype="text"/> <attribute name="TextBody" attributetype="Hypertext" indexingtype="text"/> <attribute name="Image_1" attributetype="Image" /> <attribute name="Image_2" attributetype="Image" /> <list name="RelatedLinks" attributetype="Monolist" nestedtype="Link"/> <list name="Attachments" attributetype="Monolist" nestedtype="Attach"/>/> </attributes> </contenttype> <contenttype typecode="NEW" typedescr="News" viewpage="newsview" listmodel="12" defaultmodel="2"> </contenttype> <contenttype typecode="SCC" typedescr="Contacts" viewpage="contentview" listmodel="13" defaultmodel="3"> </contenttype> </contenttypes>
Can be configured (without writing new JAVA code) new content types, based on existing attribute types.
A Content Attribute is the basic information which forms the content. Each content attribute is identified, within the content, by a unique name defined during configuration.
For example, the content type Generic Content of Portal Example consists of
the following content attributes:
Title: multilanguage text typeAbstract: multilanguage textarea typeTextBody: hypertext typeImage_1: image typeImage_1: image typeRelatedLinks: monolist link typeAttachments: monolist document/attach type
In addition, there are other content attributes (for example, attributes of type
Date, Number etc.) useful to define custom content types.
The attribute content types available in the system are defined in specific system configuration files.
Configuring the content types, the XML that specifies the content attribute
must contains the XML attributes name and attributetype;
<attribute|list|table name="ATTRIBUTECODE"
attributetype="ATTRIBUTECODETYPE" />
In addition to these two XML attributes may be present others, characteristic of particular attribute content type (for example attribute of type "Monolist").
It is possible to add a configuration for required fields: required = "true | false" (default value: false).
During editing, imposition of required configuration involves different effects depending on the attribute type in question.
It is possible to add a configuration for searcheable fields: searcheable="true|false" (default value: false).
Setting "true" the attribute value is replicated in a table where you can search SQL.
This option is used by jAPS, for example, providing a list of contents filtered by attribute values.
Below it is described the configuration of each content attribute types. The Content Attributes are divided into two types: simple attributes and composite attributes.
The Content Attributes are divided into two types: basic (monolanguage and multilanguage) and complex.
jAPS has a formatting engine for the contents based on models. The information in the contents must be formatted in different ways. For each contents type are available different models.
The models define how the content will display in the pages of the Portal.
The Content Model is a formatting scheme for a specific content type. For each content type can be defined more content models. The formatting engine receives as input a content and a model, and produces in output a formatted content.
Table of Contents
The page in jAPS is like a blank sheet, uniquely defined by its code and title. The pages are related to eachother in a hierarchical "tree", with no exceptions.
The pages in jAPS consist of 3 main elements:
- Model
- Property
- Showlet configuration
Page = Model + Property + Showlet Configuration
The Page Model defines a characterization for the pages. Within a Portal jAPS You can configure multiple page models. Each page has a single model. The Model is characterize by two elements:
- Scheme: split of the page in area
- Decoration: look and feel of the page
jAPS is a system that operates on a centralized set of services through components called showlets. Each showlet provides part of markup that must be incorporated in the final layout. The engine portal contains the logic control and aggregation of showlets and services. The showlets provide the ideal link between services and portal. The showlets are a simplification of portlet.
The Showlet is an object that allows to display informations and functionality (services) on the pages of the Portal. Can be configured a Showlet in each of the areas on the page defined by the associated page model.
Note
Showlets in jAPS are similar to portlet (JSR 168 standard), but are simpler and do not follow standard. Therefore they have a different name.
Showlet = JSP model + Logic + Configuration
Table of Contents
Resources usually corresponds to information on file, which you can attach to content. Resources can be of different types (eg images, documents, etc.). Each type of resource provides a repository and tools to manage it. A resource, in general, includes several files (eg the same image in different sizes, or a document in several languages) and also support attributes (eg file name, extension, etc..).
A resource is a set of objects on file that form a logical unit. The different files of a resource represent different "instances" or "views" or "versions", for example, different sizes or cuttings of a picture.
The concept of "multiple files for the same resource" is reserved for the following cases:
the end user is allowed to access a single resource-file per time;
the context defines which resource-file have be used.
Resources type
Image: multidimensional image (resource characterized by a number of instances/views composed by the original image and those obtained from resize).
Attach: word document, pdf, txt or similar (resource characterized by a single instance).
The resource types are defined in XML format on the sysconfig table:
Example 5.1. Resource Type Definition
<resourcetypes> <resourcetype code="Image" folder="cms/images" class="com.agiletec.aps.cms.model.resource.ImageResource" /> <resourcetype code="Attach" folder="cms/documents" class="com.agiletec.aps.cms.model.resource.AttachResource" /> </resourcetypes>
Example 5.2. XML example of a Image resource:
<resource id="444" typecode="Image"> <descr>descrizione</descr> <categories/> <instance> <size>0<size> <filename>fotografia_0.jpg</filename> <mimetype>image/jpeg</mimetype> <lenght>2.8Kb</lenght> </instance> <instance> <size>1<size> <filename>fotografia_1.jpg</filename> <mimetype>image/jpeg</mimetype> <lenght>3.8Kb</lenght> </instance> </resource>
Example 5.3. XML example of a Document resource:
<resource id="448" typecode="Attach"> <descr>descrizione</descr> <categories/> <instance> <size>0</size> <filename>schema.pdf</filename> <mimetype>application/pdf</mimetype> <lenght>440 Kb</lenght> </instance> </resource>
Table of Contents
With categories you can classify arbitrarily informations; this classification is useful to present aggregates of informations to the final users.
A Category is a label that can be assigned to the informations so to satisfy the need to aggregate them regardless of the type in a flexible manner.
Each category has a code and a title that can be specified for every language configured in the system
Every Category is inserted in a hierarchical structure organised in
a tree, namely Categorie Tree. It's possible to create other categories
and branches of nested Categories.
The ability to group together similar informations by argument, makes possible to enlarge the concept of archive by creating sets of selected informations.
Ai Contenti possono essere applicate le Categorie per la realizzazione di speciali raggruppamenti. Category are normally applied to Contents so to create special sets.
The most common use of the categories is to prepare Contents for automatic publishing: the Contents are automatically grouped by category and then shown in the portal pages.
A real use case is represented by a portal page that presents to the users all the Contents whose topic is "Sport". First a category "Sport" must be created if not available in the category tree; then you must associate the category to the target Contents. Finally you have to publish the Showlet configured to show all the contents whose topic is "Sport". The list is automatically refreshed whenever a new Content is labeled with the "Sport" category.
Table of Contents
The access to informations and the ability to use services and perform operations
are mediated by the Permissions, the Roles and the Groups
associated to the current user.
A User in jAPS represents an entity which has the ability to perform operations and to access to the informations.
The action allowed to a certain user is given by the combination of the Roles and Groups.
A Permission represents the authorisation to perform a certain action in the
portal.
jAPS has a number of built-in permissions that restrict the access to the CMS functions: Content Editing e Supervision of Contents, Operations on Pages, Operations on Resources e Operations on Categories related to the management of informations.
There are also a more generic Permissions like Access to Administration Area that affects the entire system; one of them, All functions, grants access to all the system services.
Note
It's important to understand that Permission are not arranged hierarchically. They only express the ability to perform a certain action.
Each Permission may appear in several Roles and new ones can be further added when the system grows with its functionalities.
Single Permissions cannot be directly assigned to the users, but must be grouped in a Role.
A Role is a set of Permissions. You can associate
several Roles to a User using the CMS administration interface.
Mixing together Permissions and Roles it is possible to finely tune the accesses and the interaction of the users with services and informations.
Like for Permissions, the Roles are mutually independent and cannot be hierarchically arranged.
A Group is a container of Users.
Groups are used to restrict or grant the access to informations and services independently of the Roles of the single Users.
Users may belong to several Groups; the access to the functionalities is performed on Group basis.
Groups play a prominent role in the Content Redaction and in thePages Tree. For more informations consult Chapter 3, Contents and Chapter 4, Pages.
Table of Contents
A jAPS-Plugin is a module that adds new functionalities to jAPS. The application services are implemented as Plugins.
A Plugin can be classified as:
- PurePlugin
- Modification
Several Plugins may be installed in jAPS; the way they interact is explained in the “jAPS 2.0 entando - Pattern for application services creation and integration”.
The Plugins allow to faster develop new functionalities of the system; furthermore they are integrated seamlessly with the underlying system.
The plugin introducing new functionalities without affecting in any manner
the existing core functionalities are said to be PurePlugin.
