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-04
| Revision History | ||
|---|---|---|
| Revision 1.0 | 2011-03-03 | MEM |
First public release | ||
Abstract
This document explains how to migrate your existing jAPS installation from the version 2.0.10[.1] to the 2.2.0
Table of Contents
Table of Contents
This documents explains how to migrate from version 2.0.10 to 2.2.0
In order to take maximum advantage from the present document, it is necessary to have basic knowledge about: the Java platform, the Eclipse IDE, the Apache Tomcat servlet engine, the PosgreSQL DBMS.
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
The definition that fits jAPS 2.0 entando is the one of a professional, open source "Enterprise Accessible Information Platform" that helps the aggregation, the publishing, the access and the customization of the informations, services and company resources. This is done in the full respect of the Italian Law "Stanca" as specified in the Accessibility requirements Attachment A - D.M. 8 July 2005 ( accesso dei soggetti disabili agli strumenti informatici, Italian only)
The jAPS 2.0 entando Platform incorporates in a unique solution all the Enterprise characteristics of performances, reliability and scalability proper of the professional Portal systems. Moreover it enables the users with disabilities to manage and consult their own informations in an accessible way. jAPS itself is strongly oriented to information handling with its powerful Content Management System that makes the entire framework the ideal platform to realize application based on contents (Content Enabled Vertical Application).
Table of Contents
As a convention we refer to MY_PROJECT as your existing installation of jAPS 2.0.10
in a way that the databases used by such application are <MY_PROJECT>Port
and <MY_PROJECT>Serv. Please note that this document refers to the upgrade
from jAPS 2.0.10 to 2.2.0 only: to update older versions please refer to the proper documentation
to make incremental upgrade(s) until the version 2.0.10. Furthermore, we refer to both jAPS 2.0.10 and
2.0.10.1 indistinctly.
Please also note that, except where otherwise specified, the word system
always refers to your jAPS 2.0 entando installation and not the underlying operating
system. Before proceeding with the installation process you are strongly advised to make a
full backup of the system databases and read the Changelog in the root
of the downloaded package.
Before starting the upgrade process make sure to have the <MY_PROJECT>Port and <MY_PROJECT>Serv databases properly installed.
rename the your project <MY_PROJECT> in <MY_PROJECT_OLD>
download the source package
jAPS2.0_entando-2.2.0-src-from SourceforgeThe package is inside the directory
jAPS 2.0 entando src/jAPS2.0_entando-2.2.0-src. Choose and download the version and the format the fits your needs.Use the task ant
admin/build_newPortal.xmlcreate a new project named <MY_PROJECT>In the directory
WebContentsubstitute the directoriesWEB-INF\aps\jsp\modelsandWEB-INF\aps\jsp\showletsin the package just created with the old ones of the project to update (in the <MY_PROJECT_OLD> the directories above are insidewebroot).In the directory
WebContentsubstitute the directoriesresources/cmsandresources/staticin the package just created with the old ones of the project to update (in the <MY_PROJECT_OLD> the directories above are insidewebroot).The scripts below are intended for the
PostgreSQLdatabase: those for theMySQLdatabase are provided in the next chapter.Update the
Portdatabase <MY_PROJECT>Port with the following queriesALTER TABLE pages ADD COLUMN extraconfig character varying; ALTER TABLE contents ALTER descr TYPE character varying(260); ALTER TABLE resources ALTER descr TYPE character varying(260); CREATE TABLE workcontentrelations ( contentid character varying(16) NOT NULL, refcategory character varying(30), CONSTRAINT workcontentrelations_contentid_fkey FOREIGN KEY (contentid) REFERENCES contents (contentid) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) WITH (OIDS=TRUE); ALTER TABLE resources ADD COLUMN masterfilename character varying(100); UPDATE resources SET masterfilename = 'temp'; ALTER TABLE resources ALTER COLUMN masterfilename SET NOT NULL; UPDATE sysconfig SET config = '<?xml version="1.0" encoding="UTF-8"?> <Params> <Param name="urlStyle">classic</Param> <Param name="hypertextEditor">fckeditor</Param> <Param name="treeStyle_page">classic</Param> <Param name="treeStyle_category">classic</Param> <Param name="startLangFromBrowser">false</Param> <SpecialPages> <Param name="notFoundPageCode">notfound</Param> <Param name="homePageCode">homepage</Param> <Param name="errorPageCode">errorpage</Param> <Param name="loginPageCode">login</Param> </SpecialPages> <ExtendendPrivacyModule> <Param name="extendedPrivacyModuleEnabled">false</Param> <Param name="maxMonthsSinceLastAccess">6</Param> <Param name="maxMonthsSinceLastPasswordChange">3</Param> </ExtendendPrivacyModule> </Params>' WHERE item = 'params'; ALTER TABLE contentsearch ALTER COLUMN contentid SET NOT NULL; ALTER TABLE contentsearch ALTER COLUMN attrname SET NOT NULL; ALTER TABLE contentrelations ALTER COLUMN contentid SET NOT NULL; CREATE INDEX contents_idx ON contents USING btree (contenttype, maingroup); CREATE INDEX contentrelations_idx ON contentrelations USING btree (contentid, refcategory, refgroup); CREATE INDEX contentsearch_idx ON contentsearch USING btree (contentid, attrname); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_BASIC','it','Normale'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_BASIC','en','Normal'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_MINT','it','Avanzata'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_MINT','en','Advanced'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_BASIC_GOTO','it','Accedi con client normale'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_BASIC_GOTO','en', 'Go to the administration with normal client'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_MINT_GOTO','it','Accedi con client avanzato'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_MINT_GOTO','en','Go to the administration with advanced client'); ALTER TABLE uniquekeys DROP CONSTRAINT sequence_pkey; ALTER TABLE uniquekeys ADD CONSTRAINT uniquekeys_pkey PRIMARY KEY(id);The scripts below are intended for the
PostgreSQLdatabase: those for theMySQLdatabase are provided in the next chapter.Upgrade the <MY_PROJECT>Serv with the following queries:
CREATE TABLE authusershortcuts ( username character varying(40) NOT NULL, config character varying NOT NULL, CONSTRAINT authusershortcuts_pkey PRIMARY KEY (username) ) WITH (OIDS=TRUE); INSERT INTO authusershortcuts(username, config) VALUES ('admin', '<shortcuts> <box pos="0">core.component.user.list</box> <box pos="1">core.component.categories</box> <box pos="2">core.component.labels.list</box> <box pos="3">jacms.content.new</box> <box pos="4">jacms.content.list</box> <box pos="5">jacms.contentType</box> <box pos="6">core.portal.pageTree</box> <box pos="7">core.portal.showletType</box> <box pos="8">core.tools.entities</box> <box pos="9">core.tools.setting</box> </shortcuts>');Access the administration interface then reload the content references. Please note that a restart of the project from the Eclipse IDE may result in a blank page shown in your browser: in this case you have to invoke the login action appending the following code to the resource base URL <BASE_URL>/do/login
Execute the following action <BASE_URL>/do/jacms/Resource/Porting22/intro
Table of Contents
The following update scripts are intended for MySQL database. After the database update process is complete, resume the porting process interrupted in the last chapter.
Update the
Portdatabase <MY_PROJECT>Port with the following queriesALTER TABLE pages ADD COLUMN extraconfig longtext; ALTER TABLE contents MODIFY descr character varying(260); ALTER TABLE resources MODIFY descr character varying(260); CREATE TABLE workcontentrelations ( contentid character varying(16) NOT NULL, refcategory character varying(30), CONSTRAINT workcontentrelations_contentid_fkey FOREIGN KEY (contentid) REFERENCES contents (contentid) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE resources ADD COLUMN masterfilename character varying(100) NOT NULL; UPDATE resources SET masterfilename = 'temp'; UPDATE sysconfig SET config = '<?xml version="1.0" encoding="UTF-8"?> <Params> <Param name="urlStyle">classic</Param> <Param name="hypertextEditor">fckeditor</Param> <Param name="treeStyle_page">classic</Param> <Param name="treeStyle_category">classic</Param> <Param name="startLangFromBrowser">false</Param> <SpecialPages> <Param name="notFoundPageCode">notfound</Param> <Param name="homePageCode">homepage</Param> <Param name="errorPageCode">errorpage</Param> <Param name="loginPageCode">login</Param> </SpecialPages> <ExtendendPrivacyModule> <Param name="extendedPrivacyModuleEnabled">false</Param> <Param name="maxMonthsSinceLastAccess">6</Param> <Param name="maxMonthsSinceLastPasswordChange">3</Param> </ExtendendPrivacyModule> </Params>' WHERE item = 'params'; ALTER TABLE contentsearch MODIFY contentid varchar(16) NOT NULL; ALTER TABLE contentsearch MODIFY attrname varchar(30) NOT NULL; ALTER TABLE contentrelations MODIFY contentid varchar(16) NOT NULL; ALTER TABLE contents ADD INDEX USING BTREE (contenttype, maingroup); ALTER TABLE contentrelations ADD INDEX USING BTREE (contentid, refcategory, refgroup); ALTER TABLE contentsearch ADD INDEX USING BTREE (contentid, attrname); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_BASIC','it','Normale'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_BASIC','en','Normal'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_MINT','it','Avanzata'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_MINT','en','Advanced'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_BASIC_GOTO','it','Accedi con client normale'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_BASIC_GOTO','en', 'Go to the administration with normal client'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_MINT_GOTO','it','Accedi con client avanzato'); INSERT INTO localstrings(keycode, langcode, stringvalue) VALUES ('ADMINISTRATION_MINT_GOTO','en', 'Go to the administration with advanced client'); ALTER TABLE uniquekeys MODIFY id INT DEFAULT '0';Update the
Portdatabase <MY_PROJECT>Serv with the following queriesCREATE TABLE authusershortcuts ( username character varying(40) NOT NULL, config longtext NOT NULL, CONSTRAINT authusershortcuts_pkey PRIMARY KEY (username) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO authusershortcuts(username, config) VALUES ('admin', '<shortcuts> <box pos="0">core.component.user.list</box> <box pos="1">core.component.categories</box> <box pos="2">core.component.labels.list</box> <box pos="3">jacms.content.new</box> <box pos="4">jacms.content.list</box> <box pos="5">jacms.contentType</box> <box pos="6">core.portal.pageTree</box> <box pos="7">core.portal.showletType</box> <box pos="8">core.tools.entities</box> <box pos="9">core.tools.setting</box> </shortcuts>');
