We apologize for untranslated text, you can use the Google Translation button to get an automatic translation of the web page in the language of your choice.

JCMS 5.5: New Features

1. More interaction for users

1.1 Faster sites

The performance of JCMS sites was already substantially improved with releases 5.0.1 and 5.0.2, and JCMS continues to guarantee high performance – even with very large volumes of data, for example, several hundred thousand publications.

The White Paper Evaluation of JCMS 5.0.1 Performance (in french) analyzes performance according to several criteria (data volumes, allocated memory, caches used, etc.) and it gives design and architectural recommendations to optimize performance.

In addition to shorter internal processing times, JCMS supports two new and highly efficient types of cache for sites visited by many non-authenticated users:

  • Global cache for visitors only: this type of cache uses a global cache (high performance) for non-authenticated users.
  • Cache for each member session plus a global cache for visitors: this type of cache combines the previous one and a cache for each session for authenticated users.

1.2 New search engine

JCMS 5.5 includes a new text search engine based on the Lucene indexing library. Lucene enables searching in very large volumes of publications (several hundred thousand) yet guarantees an excellent response time and low memory use.

Moreover, this engine brings new functionalities such as the search suggestion, sorting by pertinence and advanced searches.

1.2.1 Search suggestion

Following the example of Google and Yahoo Search, JCMS 5.5 proposes search suggestions when few hits are made due to a spelling mistake. For example, if a user inputs "ibiscus" on a site dedicated to gardening, JCMS will propose to search for "hibiscus" when it discovers that this produces many more results.

1.2.2 Sorting by pertinence

During a text search, JCMS 5.5 sorts the results according to their level of pertinence. The pertinence calculation is based on the frequency of the designated term in a publication relative to its frequency in all the publications. During this calculation, the particularities of publications are also taken into account. For instance, the presence of the term in a title, an abstract or the categories will increase the pertinence score of a publication.

Display of pertinence in the search results.

1.2.3 Search by fields

The advanced search interface of JCMS 5.5 includes new range options: searches on titles, on abstracts or on all the fields.

New options on the text search interface.

Moreover, it is possible to form elaborate text search queries using the Lucene syntax.

Search by named field

The name of a field corresponds to the Java name (e.g. "myField" if the label is "My field").
There are two exceptions:

  • title for titles
  • abstract for abstracts

Examples:

Query Description
description:JCMS Search for content whose description field contains the word "JCMS".
abstract: "JCMS Universal" Search for content whose abstract field contains the phrase "JCMS Universal".

Range search

It is possible to make searches on intervals, which is particular useful with date fields.

Example :

Query Description
pdate:[20060101 TO 20060131] Search for content published between 1st and 31st January 2006.

Fuzzy search

It is possible to perform searches using approximate terms.

Query Description
eror~ Search for content containing text very similar to the string "erors".

Boolean search

Several criteria can be combined using AND and OR operators.

Query Description
(title:(JCMS 4*) OR
title:(JCMS 5*)) AND
title:(training*)
Search for content whose title contains "JCMS 4" or "JCMS 5" and the string "training"

1.2.4 Search by union or intersection of categories

The advanced search interface allows you to say whether the search by category should be made selecting publications referenced by all the categories (as in the previous JCMS releases) or by at least one of the categories selected. It is also possible to say whether the search must be performed on the descendants of the selected categories.

New option on the category search interface.

1.3 New interface for forums

The forums interface has been reviewed. It now makes better use of the available space and a column has been added in the discussions list to enable you to see rapidly the discussions you are following.

New forum interface.

2. More tools for contributors

2.1 Front-Office Edition

In order to make the contribution functions accessible to more people, JCMS 5.5 now features new interfaces for front-office publication. These enable contributors to publish content directly on the site without having to use back-office workspaces. The editing is done in a popup window. For modifications the user can either access the complete form or edit field by field.

Edition front-office champ par champ

2.2 Choosing validators

When defining workflow roles, the administrator of a workspace can allow contributors to choose which member can intervene in a given role. To do this, the role must be declared "open".

Declaring a role open.

The contributor then chooses, from an imposed list in the "Roles assignment" tab, the members assigned to open roles. When a member is assigned to a role for a publication, he/she is the only person to be notified about the publication and able to validate it.

Assigning roles.

2.3 Enriched language features

2.3.1 Support of non-Latin languages

JCMS 5.5 now enables content to be input and distributed in all languages, including non-Latin ones such as Greek, Japanese, Chinese and Russian, and even languages written from right to left, such as Hebrew and Arab.

Multilingual editing form.

2.3.2 Choosing the main language

In JCMS the main language plays a double role:

  1. It is used for backup if a text field has not been input in the user language;
  2. If a multilingual field is mandatory, it must be input at least in the main language.

In previous releases of JCMS the main language was defined for all content. If for example the main language was French, content could not be input entirely in English since all the mandatory fields had to be input in French.

With JCMS 5.5, it is possible to state the main language for each content item (Advanced tab). By default, the language will be the main language of the site.

The site's main language is no longer necessarily in the first position in the list of languages presented on the site.

2.3.3 Translation copy

Work copies have been enriched to enable several contributors to rework the same content at the same time in different languages. During the merge, the multilingual fields are merged in such a manner that the previous merges are not overwritten.
Example: a document is first published in English on the site. Then two work copies are made in order to make French and German translations; the two translators can now work at the own speed. However the merges are performed the final content will incorporate the three languages.

On the other hand, with JCMS 5.5 deletion of content in languages other than the main language must be done directly on the original publication.

Integrity checks have been added to work copies in order to prevent deletion of the original publication if work copies exist (or to force the deletion of work copies along with the original). The list of the work copies associated with a publication is displayed in the Advanced tab of the publication editor.

Finally, during the merge, the original author of the publication is preserved (in earlier JCMS versions it was replaced by the author of the work copy).

2.4 New caddy functionalities

In the publication manager, the addition of the selection in the caddy is available at all times (in previous releases, it appeared only after having selected a publication type). New functions are now provided:

  • The icon is used to delete the listed publications from the caddy;
  • The icon is used to display the content of the caddy filtered by the selected criteria (categories, types, workflow status, etc.);
  • The icon deactivates the filtering of the caddy;
  • The icon replaces the content of the caddy by the current selection;
  • The icon adds the selection to the caddy.

2.5 Media Browser

The Media Browser replaces the Image Browser. It manages not only images but audio, video and flash files too. Moreover, the interface has been improved to make it easier to use and allow browsing by category.

The Media Browser.

2.6 WebDAV

JCMS 5.5 supports the WebDAV (Web-based Distributed Authoring and Versioning) protocol which is an extension of http and enables navigation in JCMS as in the content of a shared folder using the Windows (or MacOSX) file explorer. The sub-folders correspond to categories and the files to documents managed by JCMS.

Thanks to WebDAV, users can now add new documents by simple drag-drop. They can modify existing documents by opening them directly from the WebDAV explorer. Finally, if a document is moved or copied into a folder, it is automatically recategorized.

Access to WebDAV is protected at several levels:

  1. WebDAV access must be authorized for the site;
  2. It is possible to define ranges of authorized IP addresses for WebDAV access;
  3. Users must be authenticated and have WebDAV management rights.
The WebDAV explorer.

For more details, see the article JCMS 5.5 : WebDAV Access (in french).

2.7 Intuitive URLs

It is sometimes necessary to inform people of the precise access URLs of parts or publications of a site, for example in the case of a site including several autonomous sub-sites. If such URLs are to be quoted in non-interactive media (paper, radio, television, etc.), they must be easy to type, explicit and preferably easy to remember. However, JCMS native URLs are mostly composed of a call to the JSP display.jsp and an identifier, which makes them neither explicit nor easy to recall.

To resolve this problem, JCMS 5.5 introduces the "friendly URL". An easy-to-recall character string is attached to a publication or category. For example, on JaliosXperience the URL "/faq" is associated with the FAQs concerning JCMS installation. This publication is therefore accessible via the URL faq.

These URLs can also be structured just like a file pathname and it is possible to associate several friendly URLs with the same publication. For example, the FAQ page on JaliosXperience is also accessible via documentations/faq.

The friendly URLs are declared in the Categories Editor or when editing a content (Advanced tab).

Declaring the friendly URLs of a category.

Administrators have an interface enabling them to see all the friendly URLs declared in a workspace and on the whole site.

List of friendly URLs.

For more details, see the article JCMS 5.5: Implementing Friendly URLs (in french).

2.8 Interface with databases

JCMS 5.5 enables a publication to be associated with data from external databases. To do this, contributors now have two new types of field: "SQL Query" and "DB Record". A third type of field, SQL query results, is used for the display.

The "SQL Query" type field allows the user to input an SQL query. Such fields will be used by contributors familiar with both SQL language and the data model of the database being interrogated.

SQL Query field.

The "DB Record" field is used to associate a database record with a JCMS publication. When inputting the publication, the contributor chooses the record by clicking on the icon that lists in a new window all the records corresponding to the criteria described in the field by the designer of the publication type.

DB Record field.

For more details, see the article JCMS 5.5 : Interfacing with external Databases (in french).

2.9 New presentation of the changes history

The presentation of the changes history has been revised to make it more legible. Fields that have not changed are grayed. We perceive more rapidly the versions that have undergone significant change (status, rights, categories, etc.). For the versions corresponding to a change of status, an icon indicates whether this change of status was accompanied by a comment (if there is one, it can be seen by moving the mouse pointer over the icon).

Changes concerning reading and modification rights are shown in detail. The deletion date of deleted publications is shown.

New presentation of the change history.

2.10 Support of large volumes of categories

It is now possible to have several tens of thousands of categories without any degradation of performance (in previous releases the limit was a few thousand categories). To do this, in JCMS 5.5 the category tree structures exploit AJAX technology which enables the content of branches to be loaded dynamically as they are opened.

2.11 Image fields

When declaring a field, it is possible to define a size for images. In this case, a thumbnail corresponding to the chosen dimensions will be generated in the detailed template display.

Image fields can also receive a declaration zone of a clickable image map.

Image fields can once again have access to the file explorer (this option was removed in JCMS 5.0).

New options for image fields.

2.12 New Wiki tags

Wiki text zones support two new tags:

  1. [verbatim]…[/verbatim]: preserves the text content in the tag;
  2. [quote]…[/quote]: cites the text content in the tag.
New rendering for Wiki fields with the [quote] and [verbatim] tags.

2.13 Control of weak links (Wiki and internal URLs)

Since its very first version JCMS ensures the consistency of link-type fields. These links are said to be "strong" since they link two objects structurally and appear in the Java class as a reference. For this reason you cannot delete a FAQ if there exist FAQ entries referencing it.

JCMS 5.5 extends this principle to references contained in text fields. These references are said to be "weak" since they are not structural but implicit. Thanks to this principle, if a Wiki text field or a rich text field contains a link to content this can no longer be deleted accidentally. Moreover, the list of referring content is displayed in the Advanced tab of each publication.

The contributor can nevertheless force the deletion of a referenced publication by clicking the "Force the deletion" box, in which case the weak links present in the Wiki fields will no longer appear and those present in the rich text fields will lead to the site's home page.

Alert before deletion of a publication referenced by links in text fields.

3. More tools for non-technical administrators

3.1 New administration interface

The administration interface has been entirely redesigned to make it easier to use and more appropriate for business managers.

New administration interface of a workspace.

3.2 Extended global operations

It is now possible to perform global operations on groups, members, categories and workspaces. JCMS manages a caddy for each data type.

A caddy of members.

Moreover, the global operations on publications have been enriched: workspace administrators can change the writers of publications, and all contributors can perform search/replace operations on publication titles.

Search/replace in the titles of publications in the caddy.

3.3 Properties on publication types

Functional administrators can configure finely each type of publication they use in their workspace. In addition to the choice of workflow, they can choose:

  • Default rights;
  • Default categories;
  • Display templates to use;
  • Tabs to be displayed or masked;
  • The CSSs to use for rich text fields;
  • Whether or not forums or opinions can be attached to content.

3.4 Workflow

3.4.1 Alerts / Reminders

In order to accelerate the validation circuit it is possible to declare for each status a reminder frequency. On the due date all the incoming actions are re-executed. Moreover, a new action has been added: "notify workspace administrators".

Setting the reminder frequency.

3.4.2 Dashboard for workflows

Work administrators now have a dashboard for publications in the process of being written. Two views are presented:

View by status: for each status the publications are listed.

Dashboard of workflows presented by status.

View by role: for each role the publications that must be processed by the members of this role are listed (depending on the workflow structure, a given publication may appear for several roles).

Dashboard of workflow presented by role.

For both these views, it is possible to filter by workflow model and publication type. For each publication listed, an icon indicates the current overrun (if this publication is in a status with a reminder). This is an estimation based on the reminder frequency. The icon can be used to remind contributors manually.

As a complement to the dashboard, the tasks list has been reviewed in order to present lists consistent with the content list and the dashboard lists.

Tasks list.

3.4.3 More flexible editing

In JCMS 5.5, modifications made to workflows are taken into account only when the "Save and apply" button is clicked. Moreover, as in the Types Editor, a color is associated with each type of change: red for new features, blue for modifications.

Editing a workflow model.

3.4.4 Richer structure

The structure of workflows is substantially enriched in JCMS 5.5. Apart from the addition of open roles enabling contributors to assign roles for each publication, it is now possible to choose the type of combination (AND/OR) for roles requiring multiple approval. It is therefore possible to define a role that involves one member of group G1 OR two members of group G2.

New options when defining workflow roles.

JCMS 5.5 proposes two types of workflow model: editorial workflow and application workflow. Editorial workflows systematically have the statuses Planned, Published, Expired and Archived. Application workflows impose only the Archived status. These are typically destined to manage the life cycle of non-editorial forms or content (examples: vacation request form, room reservation, commercial orders, etc.).

Editing an application workflow.

Finally, two new possibilities are introduced:

  1. Transversal groups can be used when defining roles;
  2. A user can be authorized to work in a given workflow status without giving him the right to change the publication's status.

3.5 Consultation profiles ("audiencing")

JCMS 5.5 introduces consultation profiles, a new way of managing access rights to content. The principle, sometimes referred to as "audiencing", consists in deducing the consultations rights by cross referencing the categories of a content and the categories of the member wishing to access the content. To do this, one or more branches of categories are defined as profile definition axes. Each axis represents one dimension of the content and the users (business, hierarchy, geographic area, etc.). The content is then accessible to a member only if the audience matches for all the axes.

For example, if a content item is placed in the categories Business>Purchase, Hierarchy>Director, Geography>World>Europe> France , it will be accessible only to members placed in these categories, in a parent category or in a child category, but not in neighboring categories.

Editing the consultation profile of a member.

To enable a publication type to be managed by consultation profiles, it must be indicated as such in the Types Editor. In the content manager a new column identifies profiled content and its scope (icon ).

Indicating profiled publications.

For more details, see the article JCMS 5.5 : Consultation profile (Audiencing) (in french).

3.6 Data dashboards

JCMS 5.5 provides technical and non-technical administrators with overviews of the data they manage in a workspace. These dashboards cover the categories, content and portlets of the workspace.

Data dashboard. Content tab.

The "Links external" tab lists all the external URLs referenced in text fields, rich text fields and URL of publications in this workspace.

Data dashboard. List of external links.

3.7 Better integrity checking

Any publication that does not respect its integrity criteria appears with the icon in the publications manager.

Indication of integrity violations.

Moreover, it is no longer possible to delete a category referenced in the fields or properties of such a content item.

3.8 Dublin Core metadata

JCMS 5.5 systematically generates Dublin Core metadata in the front-office pages by applying the following associations:

  1. DC.title: publication's localized title
  2. DC.creator: contributor's name
  3. DC.subject: publication categories
  4. DC.description: publication's localized abstract
  5. DC.publisher: site name
  6. DC.date: publication date
  7. DC.type: label of the publication type
  8. DC.identify: publication's JCMS identifier
  9. DC.language: language used for the localization

3.9 New terminology

The definitions of certain terms have been changed:

  • Publication authors are now known as writers;
  • Right to publish is now replaced by right to contribute.

4. More solidity for technical administrators

4.1 New administration area organization

The administration area interface has been completely reorganized. A clear separation is now made between functional administration, technical administration and development tools.

The technical administration is divided into three large sections:

  1. supervision tools: information on the site status, memory usage, store status, etc.
  2. configuration tools: properties editing;
  3. operating tools: stop/start writing, management of search indices and caches, etc.

The development tools (types management, changes management, store cleaning, etc.) have been separated to allow them to be masked on production instances (this is configurable in the Advanced tab of the properties editor).

New layout of the administration area.

4.2 Cleaning the store database

The cleaning interface and algorithm have been entirely revamped. Unlike in earlier JCMS releases, the cleaning algorithm no longer systematically loses the history of the data. It is now possible to define the scope of the cleaning and the rules to apply. In addition to the standard rules, new cleaning rules can be added (e.g. do not clean content that is being written, do not clean the last three modifications, etc.).

The cleaning scope is determined by start and end points that can be expressed in several ways:

  • date;
  • stamp;
  • store milestone;
  • sync stamp (placed by the DeployManager).

The standard rules proposed enable:

  • merging of successive updates on the same data item;
  • preservation of updates on publications' metadata (rights, categories, workflow, writer, etc.);
  • deletion of all operations on deleted objects.
Store cleaning interface.

4.3 Controls during start-up and operation

New controls have been added in order to assure smooth operation of the application. For example, during start-up JCMS stops if it detects an instance already loaded or if errors occur during compilation of the types generated.

JCMS 5.5 controls more finely the status of the store. During start-up or operation, if a writing problem occurs on the store or if the store.xml file is modified by another process then writing is stopped and an alert is sent by mail to all the site's administrators.

4.4 Writing suspension

The activation and suspension of writing is now directly controlled from the home page of the administration space. During suspension, the administrator can input a maintenance message that will appear as a scrolling band in the administration space and in workspaces. It is important to note that unlike previous releases of JCMS the writing suspension does not deactivate writing associated with JSync synchronizations (these can be stopped by deactivating replication in the properties editor).

4.5 XML view of site status

The JSP admin/statusXml.jsp, intended for external supervision processes, provides an XML view of the site status with information on the status of the site, the store and the replication.

4.6 Multiple Reverse Proxies

JCMS 5.5 enables several Reverse Proxy to be declared in order to support complex architectures: redundancy of load balancers, several DNS for a given Reverse Proxy, etc.

Reverse Proxy configuration interface.

4.7 List of class revisions

In addition to the list of the Java libraries loaded, the administrator can consult in detail the revisions of Java classes. This enables rapid identification of classes that are not the same as at the original distribution, for example following a correction.

4.8 Administration notes

The administrators can note or exchange information via a notes system. These notes are recorded in the file WEB-INF/data/adminNote.prop.

Administration notes.

4.9 Dashboards

Like the functional administrators, technical administrators also have dashboards but covering all the site's workspaces. They also have an interface listing all the friendly URLs used in the site.

Data dashboards.

4.10 Events journal

Technical administrators now have an interface in the administration area to consult the last 50 events recorded in the log file WEB-INF/data/jcms.log.

Events log.

5. Richer configuration for webmasters

5.1 New composition engine for the portal

The JCMS 5.5 portal uses by default a new composition engine that generates lighter pages. To do this, the composition in tables has been replaced by a composition in blocks (<div> tag); this is lighter and easier to rework with CSSs. Moreover, only the CSS style sheets and the javascript files actually necessary are included in the pages.

In the event of site migration, the existing parameter settings remain compatible by using the old composition engine. To do this, the property display.portal.behaviour.backcompatibility must be set to true in the file WEB-INF/data/webapp.prop. For sites that started with JCMS 5.5 the new rendering engine must be used.

5.2 Support of XHTML and UTF-8

The JCMS 5.5 front-office is XHTML compatible, with the exception of texts from the rich text editor that produces code conforming to HTML 4 (a future release of JCMS will include a new rich text editor that conforms to XHTML; the back-office already conforms partially to XHTML).

All the pages produced by JCMS 5.5 (front-office and back-office) are encoded in UTF-8. All the templates of content and portlet that have been re-worked must be encoded in UTF-8.

5.3 PDA detection

JCMS 5.5 detects browsers on PDAs. By default, if a PDA queries the home page of the site, it is re-directed to the mini-site dedicated to PDAs (custom/jcms/indexPDA.jsp). It is possible to direct to any portal adapted to PDAs by modifying the redirection in index.jsp.

5.4 Interface with databases

Very often JCMS is an essential brick of the enterprise information system. To integrate even better with other IS information sources, JCMS 5.5 introduces three new field types enabling information from a database to be presented during display of a JCMS publication:

  1. The SQL Query field is used to input an SQL query and display the corresponding results;
  2. The DB Record field is used to choose a record in a table (or a view) of the database;
  3. The SQL Result field displays the results of an SQL query whose parameters are taken from other fields of the publication.

PortletSQL is a new portlet that displays the results of an SQL query.

For more details, see the article JCMS 5.5: Interfacing with External Databases (in french).

5.5 New options for portlets

Portlet Navigation

The Portlet Navigate has a new template (vertical menu) that generates vertical browsing menus. This template exploits the category icons and their color (it generates intermediate colors for sub-categories).

Portlet Navigate vertical menu template.

Connected Members portlet

The Connected Members portlet displays coherent information on replicated environment (provided the application server handles replication of sessions).

Search portlet

The Search portlet has the same options as those of the advanced search interface (search in categories, archives, etc.).

Menu portlet

The Menu portlet can display the icon used to access user documentation.

Portal

The Exact Category option is used to indicate whether this portal can be used for categories situated beneath categories to which the portal is attached. This is particularly useful when a portal needs to be placed in a category C and the sub-categories of C need to be able to continue using a portal attached to a category above C.

Redirection portlet

The Redirection portlet has a new option enabling a redirection to be made to the first child of the chosen category.

5.6 Partitioning of portlet errors

Since exceptions occur during development and testing of new portlets, JCMS 5.5 provides better support for these exceptions by partitioning them within the portlet's home page zone so that they don't impact the whole page, and providing a stack trace (a listing of the execution stack of the exception).

Partitioning of portlet exceptions.

5.7 Other new features

The administrator can decide whether, during authentication, users can choose to have or not to have a persistent cookie.

It is possible to choose the order of the languages in the properties editor. This order is respected during the display of language menus. The webmaster can easily change the presentation of the languages in these menus (including the flag) by reworking the CSS css/jalios/misc.css.

The Wiki rendering has been improved to facilitate the formatting by CSS (see css/wiki.css).

6. More openness for developers

6.1 Development tools

The development tools have been grouped on the home page of the administration space:

  • Management of publication types,
  • Management of changes,
  • Cleaning of the store,
  • Portal Profiler.

6.1.1 The Portal Profiler

The Portal Profiler enables a developer to identify the portlets consuming the most resources. To do this, it measures the unit processing time of each portlet and their memory consumption. Once the profiling is terminated, a summary table displays the average processing times and memory usages.

Results of Portal Profiler analysis.

The memory usages shown are imprecise and should only be taken as rough estimates. Moreover, the information supplied by the Java APIs does not take into account unused objects that have not yet been freed. Also during the analysis of a portlet the garbage collector may start, causing misleading results.

The Profiler can also produce the results directly in the page analyzed.

In-context profiling display.

6.1.2 Cleaning and placing milestones in the store

JCMS 5.5 features a new store cleaning system (see §4.2). This tool is particularly useful for developers since it enables them to delete from the store all operations concerning test data before making a production delivery.

When working on a work copy obtained with DeployManager it is possible to request a cleaning covering only operations affecting the copy. In addition to store cleaning, JCMS 5.5 enables developers to place milestones in the store which are used to delimit cleaning areas.

Interface used to place milestones in the store.

6.1.3 Type Editor

The Type Editor can be used to transform any type of field into a hidden field. Such fields then no longer appear during editing by contributor, but they can be fed by a DataController during each submission. Only administrators have access to a button to make all hidden fields appear on an editing form.

The Type Editor is more robust and prevents deletion of a type if this is referenced in a link field of another type. The deletion of data referenced in the publication types (categories and groups) is also controlled.

Finally, the code generator now compiles the types even faster during start-up of the site.

6.2 New APIs

6.2.1 Access to http request and JcmsContext from any method

The channel.getCurrentServletRequest()method provides access to the current http request (if there is one). This enables, for example, the development of access controls based on contextual information (for example, to prevent consultation of certain content if the query is external to the intranet).

Similarly, the channel.getCurrentJcmsContext()method provides access to JCMS context (if it exists). The JcmsContext encapsulates a whole set of information relating to the processing of the request (authenticated user, browser type, client, language used, etc.)

6.2.2 DataController

Several new functionalities have been added to the DataController API.

Control of the calling order of DataControllers

For DataControllers derived from the BasicDataController class it is possible to indicate an order number by overriding the order field. This order number is respected during invocation of all the DataController's methods (checkIntegrity(), checkWrite(), beforeWrite() and afterWrite()).

Interrupting a write and forcing a redirection

It is possible to prevent a write even if all the controls are correct. For example, if JCMS is feeding an external database, it may be necessary to prevent writing in JCMS if the writing in the database fails. To meet this need, a DataController can interrupt a write in the store by invoking the beforeWrite()method (to do this, it must position the attribute DO_NOT_STORE to Boolean.TRUE in the context variable).

It is also possible to force the redirection, in the case of a write by a Web form, by placing the redirection URL in the forceRedirect attribute.

Example of use:

public static class NoWriteDataController extends BasicDataController {
  public void beforeWrite(Data data, int op, Member mbr, Map context) {
    // Prevent store write
    context.put(DO_NOT_STORE, Boolean.TRUE);
  
    // Redirect to the edit form
    HttpServletRequest req = Channel.getChannel().getCurrentServletRequest();
    if (req != null) {
      logger.warn("Do not store " + data);
      req.getSession().setAttribute(WARNING_MSG, "Data write failed. Please, retry later.");
      String url = ServletUtil.getAbsUrlWithRemovedParams(req, new String[] {"opCreate", "opUpdate", "opDelete"});
      req.setAttribute(FORCE_REDIRECT, url);
    }
  }
}

More contextual information

When invoking each method, the DataControllers have access to contextual processing data via the context variable:

  • CTXT_IGNORE_INTEGRITY_CHECK: indicates that the checkIntegrity method will not be invoked (e.g. during deletion of a data item);
  • CTXT_WEBDAV: indicates that the write operation has been triggered following a WebDAV access;
  • CTXT_DOC_UPLOAD: indicates that the write operation has been triggered following a file deposition (via the web interface).

6.2.3 RightPolicy

The RightPolicy class is used to control most of the JCMS rights policies. In JCMS 5.5 all the canBeReadBy()methods and the canWorkOn()method are now called regardless of JCMS's internal control. They receive a first parameter isAuthorized that indicates the position of JCMS on this control. It therefore becomes possible to totally replace the internal rights management – when this determines that the access should be refused.

Moreover, the custom.RightPolicy class has been enriched with new methods relating to consultation profiling ("audiencing"):

  1. isAudienced() is used to indicate whether access to a publication must be managed by consultation profiles;
  2. checkAudienceRight(): is used to apply consultation profiling to the access control.

6.2.4 QueryFilter

The QueryFilters introduced in JCMS 5.0 are used to control searches by acting upstream on the parameters and downstream on the results.

The main improvement in JCMS 5.5 is to supply an API that enables the QueryFilters to describe themselves in order to be integrated in the search interfaces without having to modify the JSPs of these interfaces.

Like DataControllers, QueryFilters can be ordered in their processing, by overriding the order field.

Finally, the context systematically contains the initial data set (proposedDataSet) and the http request (request).

For more details, see the article JCMS 5.5: Developing Extended Searches with the QueryFilter API (in french).

6.2.5 Identificateur virtuel (Virtual ID)

Hard-coded data identifiers in specific developments or even publication types (default category, default groups) can cause problems when trying to reuse one JCMS webapp in another.

To relieve this problem JCMS 5.5 supports virtual identifiers that operate like variables. When a virtual identifier (a character string starting with the symbol '$') is fed to a JCMS API, it is resolved by seeking a property bearing this name.

Example of use:

In the file WEB-INF/data/webapp.prop we declare the identifier:

$id.FicheDocumentaire.Nomenclature : c_1234

We can then use this identifier to find the linked object:

Category cat = channel.getCategory("$id.FicheDocumentaire.Nomenclature") ;

6.2.6 Detecting mobile equipment (PDA, smartphone)

The Browser class in JCMS 5.0 can be used to get detailed information about the type of browser being used. JCMS 5.5 extends this principle by adding support for mobile equipment such as PDAs and smartphones.

The Browser class now allows new methods:

  • isPDA(): returns "true" if the terminal is a PDA;
  • getDeviceScreenWidth():returns the screen width;
  • getDeviceScreenHeight():returns the screen height;
  • getDeviceScreenDept():returns the screen depth;
  • getDeviceCPU():returns the terminal CPU type.

Such information is acquired by analyzing the http query headers. For PDAs, JCMS 5.5 exploits this information to redirect the access to the home page (index.jsp) of a specific sub-site (custom/jcms/indexPDA.jsp), but it is quite possible to redirect to another page, for example a portal page designed for a PDA screen. This information can also be used to control content consultation rights.

6.2.7 DBUtil

The DBUtil class is a class grouping utilities to access relational databases.

6.2.8 New LDAP API

The LDAP API has been entirely redesigned and is now based on the Netscape Directory SDK for Java library. This API is more robust and efficient than the previous version and supports certain particularities of LDAP servers better, notably character encoding.

6.2.9 New API extensions

JCMS 5.5 proposes new extension points on several JCMS internal components:

  • LuceneSearchEngineHooks: used to modify certain indexing settings, analyzers, weighting (boost);
  • TemplatePolicy: used to specify which templates (detailed display, summary display, editing) to use;
  • PortalPolicy: used in the choice of portal elements, CSSs, HTML headers and redirections;
  • WidgetPolicy: used to specialize the behavior of certain widgets (in particular the category tree, the rich text editor, widget icons, etc.);
  • TreeCatProxy: used to fine-tune the internal operation of the category tree;
  • StoreCleanFilter: this class is used to propose new store cleaning rules;
  • doDataReportCustom.jsp: this JSP is used to add data dashboards;
  • Data.getExtraInfoMap(): this Map present in each JCMS data item is used to store transitional information.

6.2.10 New methods

Classe Méthodes Description
Channel getOrphanFileList() Returns the list of files in the upload zone that are not referenced by any publication.
Channel getCommonAlarmManager() Returns the common alarm manager.
Channel getTypeFieldEntry() Returns information on a field of a given type.
Channel getPublicationWithoutCategories() Returns all the non-categorized publications.

Classe Méthodes Description
Publication addAuthorizedMember()
removeAuthorizedMember()
addAuthorizedGroup()
removeAuthorizedGroup()

Adds/deletes a member/group authorize to consult this publication.
Publication getAllWikiText() Returns the content of all Wiki fields.
Publication getAllWysiwygText() Returns the content of all wysiwyg fields.
Publication getWeakRefererrerSet() Returns all publications referring via Wiki links or URLs.
Publication getExternalLinkSet() Returns all external URLs contained in this publication.
Publication isAudienced() Returns "true" if the publication is audienced
Publication hasAnyReadRights() Returns "true" if the publication has reading rights (replaces the former method hasReadRights()).
Publication hasNoReadRight() Returns "true" if the publication has no reading right.
Publication getWorkCopySet() Returns all the work copies of this publication.
Publication getRoleMap()
getMemberAssignedToRole()
isInRole()
Returns information on the members assigned to open roles of the publication's workflow.

6.3 New tags

6.3.1 <jalios:thumbnail/> tag

This tag generates a thumbnail image of a given image. It can also be used to generate a screen capture for a given URL (using an service external such as www.thumbshot.org).

Examples of use:

<jalios :thumbnail path=’upload/docs/image/jpg/picture.jpg’ width=’120’ height=’90’/>
<jalios :thumbnail url=’http://www.jalios.com/’ width=’120’ height=’90’/>

6.3.2 <jalios:pager/> tag

This tag has been entirely rewritten to make it more flexible and efficient.

Example of use:

<% Set set = channel.getPublicationSet(Content.class, loggedMember);%>
<jalios:pager name="myPager1" 
              declare='true' 
              action="init"
              size="<%= set.size() %>"/>
<jalios:foreach name='itPub' 
                type='Publication' 
                collection='<%= set %>'
                max='<%= myPager1.getPageSize() %>'
                skip='<%= myPager1.getStart() %>'>
<%= itPub %><br>
</jalios:foreach>
<jalios:pager name="myPager1" /><br>

6.3.3 <jalios:sqlquery/> tag

This tag performs an SQL query and produces an SQLQueryResult object.

Example of use:

<jalios:sqlquery name="resultSet" dataSource="jdbc/mydb" query="select * from DATA_TABLE" maxRows="10" />

6.3.4 <jalios:checkIntegrity/> tag

This tag checks the integrity of a data item (publication, category, group, etc.). If the data does not respect the integrity criteria it produces a warning icon (jcms55_icon_warnSmall).

Example of use:

<jalios:checkIntegrity data="<%= itPublication %>" />

6.3.5 <jalios:lock/> tag

This tag displays the padlock icon if the publication is undergoing editing by another contributor.

Example of use:

<jalios:lock data="<%= publication %>" />

7. Incompatibilities

7.1 Store

During migrations, the store must be converted into UTF-8 format. For this purpose JCMS 5.5 includes a converter (see Technical Notes for Evaluation of JCMS 5.5 Pre-versions (in french)). In addition, to ensure XHTML compatibility some portlet alignment attributes must be converted to lower-case (e.g. align= "Left" becomes align= "left").

7.2 Properties

The language properties have been modified:

  • channel.lang and channel.other-lang have been replaced by a single property channel.languages
  • channel.default-lang is introduced to define the site's default language.

7.3 JSP

JSPs that contain accentuated characters must be encoded in UTF-8 and include the directive:

<%@ page contentType=’text/html ; charset=UTF-8’ %>

7.4 Lucene indices

The Lucene indices of JCMS Universal and the archives have been moved. The JCMS Universal configuration files must therefore be updated:

  • JCMS Universal index: WEB-INF/data/lucene/FileIndex/
  • Archives index: WEB-INF/data/lucene/ArchivesIndex/

In brief...

This article provides an overview of the main new features of JCMS 5.5. These concern all JCMS users, from readers just consulting content to developers. Some of these features derive from the maintenance versions JCMS 5.0.1 and JCMS 5.0.2.

Subject
Products
Published

3/16/06

Writer
  • Olivier Dedieu