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-09
| Diario delle Revisioni | ||
|---|---|---|
| Revisione 1.2 | 2011-03-09 | MEM |
|
Revision for the release of jAPS 2.0 entando version 2.2.0 | ||
| Revisione 1.1 | 2010-02-23 | MEM |
|
Revision for the release of jAPS 2.0.10 | ||
| Revisione 1.0 | 2009-10-26 | MEM |
|
Translation and adaptation of the Italian documentation | ||
Estratto
The aim of this document is to fully describe the structure of the Rss plugin.
Sommario
Lista delle Tabelle
Lista degli Esempi
The goal of this document is to fully describe the structure of the RSS(jprss) Plugin.
This document is for those who want to know more about the RSS plugin functionalities and are considering to install it in a production or development environment with the Eclipse IDE. This document is aimed at system administrators (responsible for jAPS 2.0 entando installations) and Java developers (with a basic comprehension of the jAPS 2.0 entando framework).
In order to take maximum advantage from the present document, it is necessary to have a basic knowledge about: the Java platform, the Eclipse IDE, the Apache Tomcat servlet container, the PosgreSQL DBMS and the jAPS 2.0 entando framework.
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:
The jprss plugin allows to serve the portal contents through RSS channels.
Tabella 2.1. Characteristics overview
| Code | Name | Type | Plugin version | Version of jAPS 2.0 entando |
|---|---|---|---|---|
| jprss | RSS | PurePlugin | 1.2 | 2.2.0 - |
| jprss | RSS | PurePlugin | 1.1 | 2.0.8 - 2.0.10 |
| jprss | RSS | PurePlugin | 1.0 | 2.0.6 |
This plugin requires the following dependencies to be satisfied:
jacms version 2.2.0
Since version 2.0.8 jacms is bundled with jAPS2 itself, requiring no actions to be taken by the final user.
This module offers:
A back-end interface used by the administrator to create and manage the contents served through RSS channel. This interface adheres strictly to the pre-existing back-end graphics and settings, and it is accessible from the
Pluginmenu item.A showlet for the front-end designed to serve the list of the links of the active channels.
The links to RSS contents served in the Front-end always follow this pattern:
http://ipaddress:8080/myportal/do/jprss/Rss/Feed/show.action?id
where 'ipaddress' is the ip of the 'myPortal' portal and the id is the ID of the served content.
Sommario
The jprss plugin serves the content of the portal in the RSS format.
This plugin is a PurePlugin, because the installation neither alters nor modifies pre existing functionalities of the system.
This package strictly adheres to the document jAPSPlugin Pattern so it contains all the directories
expected (such as the doc and src directories as well as the readme file)
Moreover, the src is structured as follows:
javadirectory. It contains the source files and the test suites of the plugin.sqldirectory. It contains the sql scripts to execute in theportandservdatabase, for the production, development and test environment.The
webappdirectory. This directory contains all the files needed by the web application. More specifically we have thejspfiles of the user interfaces and the related configuration files, thexmldeclaring the beans of the various services (both belonging to the jAPS 2.0 entando business logic layer and the Struts2 presentation layer), all the requiredjarlibraries (including the plugin itself!) and, finally, the static resources (css, images, js and so on).
From now on we refer to the application where the plugin is going to be deployed as myportal.
We also refer to the compressed file containing the all the plugin elements as 'package'.
To perform the installation in a production environment based on the jAPS 2.0 entando compatible with this plugin, the following steps must be taken:
Stop the servlet container
Copy the content of the
src/webapp/WEB-INF/libdirectory of the downloaded package inside themyportal/WEB-INF/lib/directory within the server container.Make sure that the
myportal/WEB-INF/plugins/directory exists, otherwise create it. Copy the content of thesrc/webapp/WEB-INF/pluginsdirectory of the plugin package inside themyportal/WEB-INF/plugins/directory within the server container.Copy the content of the directory
src/webapp/resources/plugins/of the plugin package in themyportal/resources/plugins/.Locate the SQL scripts in the
src/sqldirectory inside the plugin package. Execute the script (eg. using the free program PgAdmin) to update theportdatabase in production. The script has the parameterversionset toproduction, change it accordingly to your needs. Substitute with the appropriate values the following strings:CONTENT_TYPE,ATTRIBUTE_NAMEand finallyMAX_ITEMS.In the
src/sqldirectory, locate and execute the scriptservScript.sqlto update theservdatabase in production.
As a convention, we call the project where the plugin is about to be installed myproject.
To perform the installation of jprss in an Eclipse IDE, on a version of jAPS 2.0 entando compatible with the plugin, follow these steps:
Copy the content of the
src/webapp/WEB-INF/libdirectory of the plugin package in themyproject/WebContent/WEB-INF/lib/directory with the exclusion of the filejAPSPlugin-jprss-1.1.jar.Make sure that the
myproject/WEB-INF/plugins/directory exists, otherwise create it. Copy the content of thesrc/webapp/WEB-INF/pluginsdirectory in themyproject/WebContent/WEB-INF/plugins/directory.Copy the content of the directory
src/webapp/resources/pluginsof the plugin package in themyproject/WebContent/resources/plugins/directory.Execute the script
portScript.sql(found in thesrc/sqldirectory of the plugin package) to update the localportdatabase. The script has the version set toproduction, change it accordingly to your needs. Substitute with the appropriate values the following strings:CONTENT_TYPE,ATTRIBUTE_NAMEand finallyMAX_ITEMS.Execute the script
servScript.sql(found in thesrc/sqldirectory of the plugin package) to update your localservdatabase.Execute the script
portTestScript.sql(found in thesrc/sqldirectory of the plugin package) to update your localportdatabase used for tests.Execute the script
servTestScript.sql(found in thesrc/sqldirectory of the plugin package) to update your localservdatabase used for tests.Copy the content of the
src/java/main/comdirectory of the plugin package in themyproject/src/comof your project.Copy the content of the
src/java/test/testdirectory intomyproject/src/test.Copy the file
src/java/main/jprss_japs-struts-plugin.xmlinmyproject/src/. Look for a file namedjaps-struts-plugin.xmlunder thesrcdirectory of your Eclipse project: if it exists copy the content of the tag <struts> of the filejprss_japs-struts-plugin.xmlinside the existingjaps-struts-plugin.xmlfile, then deletejprss_japs-struts-plugin.xml. If thejaps-struts-plugin.xmldoes not exist rename the filejprss_japs-struts-plugin.xmlinjaps-struts-plugin.xml.Delete or comment out (using a java comment) the method
getSpringConfigFilePaths()of the classJpRssConfigTestUtils.javabelonging to thetest.com.agiletec.plugins.jprsspackage.Delete or comment out (using a java comment) the method
setInitParameters()of the classJpRssApsAdminBaseTestCase.javabelonging to the packagetest.com.agiletec.plugins.jprss.apsadmin.
Once the following steps are performed, restart your project and verify the presence of the
RSS menu item under the Plugin menu in the back-end interface.
Sommario
Note: the pictures shown below of the jAPS backend may actually differ from the actual, however the underlying logic is mostly unchanged from the previous versions. A brief paragraph highlighting the only configuration change that improves the entire configuration and installation process follows.
RSS plugins takes advantage of one of the new key core features of the jAPS 2.0 entando, the attributes roles. As a matter of fact the "jprss_config" configuration item in the table "sysconfig" has been dropped.
Before configuring the RSS channels you must decide what kind of contents are suitable for publishing. Now that the configuration item does not exist anymore the role is used to decide if the attribute will become, for example, the title of the rss feed.
To do so, you must edit the "entity type" of the contents you want to publish into RSS format: in the attribute list edit the attribute of your choice that will be, for example, the title of the rss. At this point under "Role" select you have to choose one of the roles for the attribute injected in the system by the plugin:
jprss:title - the attribute that contains the title of the rss content
jprss:description - the attribute that contains the description of the rss content
Confirm clicking the "Add" button, then proceed with the attribute configuration eventually pressing the "save" button. Once that each of the roles above are assigned you can enter the administration area of the plugin.
To enter the RSS administration interface follow these steps:
Enter the administration area of the portal
Plugin
RSS
The RSS welcome screen, with two icons, appears:
![]() |
The list of the RSS channels actually defined in the portal
Press on the New channel link to proceed as shown in the next figure:
![]() |
Choice of the content type to be served through a RSS channel (translator note: 'notizia' means 'news').
Once the content type has been selected, the fields showed below must be filled to complete the creation of the RSS channel.
![]() |
Fields of the RSS channel
Now the following information must be provided to complete the creation of the new channel:
The title of the RSS channel
A brief description of the RSS channel
Choose if the channel must be immediately served checking the 'Active' box
RSS compliancy standard of the channel
Definition of the Category this channel belongs to
Definition of the Filters (refer to the next paragraph on how to create Filters)
once the form is properly filled the RSS channel is ready to be exposed in the front-end.
Filters management: if the contents to be exposed through RSS must be filtered for any reason, just select Add in the filter box shown in the last picture. The following screen appears:
![]() |
Filter management for RSS channels
You may configure the filters depending on the attributes used in the Content Type used for the RSS channel.
Esempio 4.2. example of a Text-type filer
![]() |
Creation of a Text-type filter for a RSS channel (translator note: 'Titolo' means 'title')
Result expected if the filters shown above are added to a new RSS channel in the same way they are presented in this guide.
![]() |
Resulting RSS channel configuration







