Update Skript zu r1489 (content-center legacy free), Versionsnummer ccm-cms erhöht.
git-svn-id: https://svn.libreccm.org/ccm/trunk@1496 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c38abf9d30
commit
b122cb97d5
|
|
@ -2,7 +2,7 @@
|
||||||
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
||||||
name="ccm-cms"
|
name="ccm-cms"
|
||||||
prettyName="Red Hat CCM Content Management System"
|
prettyName="Red Hat CCM Content Management System"
|
||||||
version="6.6.5"
|
version="6.6.6"
|
||||||
release="1"
|
release="1"
|
||||||
webapp="ROOT">
|
webapp="ROOT">
|
||||||
<ccm:dependencies>
|
<ccm:dependencies>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,131 @@
|
||||||
|
--
|
||||||
|
-- Copyright (C) 2011 Peter Boy. All Rights Reserved.
|
||||||
|
--
|
||||||
|
-- This library is free software; you can redistribute it and/or
|
||||||
|
-- modify it under the terms of the GNU Lesser General Public License
|
||||||
|
-- as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
-- the License, or (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This library is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
-- Lesser General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU Lesser General Public
|
||||||
|
-- License along with this library; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
--
|
||||||
|
-- $Id: remove_legacy_entries.sql $
|
||||||
|
|
||||||
|
-- ccm-cms ContentSection is now initialized as a legacy free type of
|
||||||
|
-- application so entries in tables apm_package_types are no longer needed.
|
||||||
|
|
||||||
|
|
||||||
|
-- in case there may be several application instances!
|
||||||
|
|
||||||
|
-- delete from object_context all entries referring to node_id in site_nodes
|
||||||
|
delete from object_context
|
||||||
|
where object_id in
|
||||||
|
(select node_id from site_nodes object_id where object_id in
|
||||||
|
( select package_id from applications where application_type_id =
|
||||||
|
(select application_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like '%cms.ContentSection%')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
-- delete from acs_objects all entries referring to node_id in site_nodes
|
||||||
|
alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
|
||||||
|
delete from acs_objects
|
||||||
|
where object_id in
|
||||||
|
(select node_id from site_nodes where object_id in
|
||||||
|
( select package_id from applications where application_type_id =
|
||||||
|
(select application_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like '%cms.ContentSection%')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
-- delete all entries in site_nodes referring to a ContentSection instance
|
||||||
|
delete from site_nodes
|
||||||
|
where object_id in
|
||||||
|
(select package_id from applications where application_type_id =
|
||||||
|
(select application_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like '%cms.ContentSection%')
|
||||||
|
);
|
||||||
|
alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
|
||||||
|
FOREIGN KEY (node_id)
|
||||||
|
REFERENCES acs_objects (object_id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION ON DELETE NO ACTION ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- delete from object_context all entries referring to package_id in apm_packages
|
||||||
|
delete from object_context
|
||||||
|
where object_id in
|
||||||
|
(select package_id from apm_packages where package_type_id =
|
||||||
|
(select package_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like '%cms.ContentSection%')
|
||||||
|
);
|
||||||
|
|
||||||
|
-- delete from acs_objects all entries referring to package_id in apm_packages
|
||||||
|
alter table apm_packages drop constraint apm_package_package_id_f_46may ;
|
||||||
|
alter table applications drop constraint application_package_id_f_cdaho ;
|
||||||
|
delete from acs_objects
|
||||||
|
where object_id in
|
||||||
|
(select package_id from apm_packages where package_type_id =
|
||||||
|
(select package_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like '%cms.ContentSection%')
|
||||||
|
);
|
||||||
|
|
||||||
|
-- delete all entries for ContentSection instances in apm_packages
|
||||||
|
-- identified by package_type_id in application_types
|
||||||
|
delete from apm_packages
|
||||||
|
where package_type_id =
|
||||||
|
(select package_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like '%cms.ContentSection%') ;
|
||||||
|
|
||||||
|
-- there seem to be no intries for a apm_packages_types entry (row) in
|
||||||
|
-- acs_objects or object_context!
|
||||||
|
|
||||||
|
-- delete all entries for subsite in apm_package_types identified by
|
||||||
|
-- package_type_id in application_types
|
||||||
|
alter table application_types drop constraint applica_typ_pac_typ_id_f_v80ma ;
|
||||||
|
delete from apm_package_types
|
||||||
|
where package_type_id =
|
||||||
|
(select package_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like '%cms.ContentSection%') ;
|
||||||
|
|
||||||
|
|
||||||
|
-- set package_id to null for all entries referring to a ContentSection instance
|
||||||
|
-- (indicating a new legacy free application)
|
||||||
|
update applications
|
||||||
|
set package_id = null
|
||||||
|
where application_type_id =
|
||||||
|
(select application_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like '%cms.ContentSection%') ;
|
||||||
|
|
||||||
|
-- set package_id to null for all entries referring to a ContentSection instance
|
||||||
|
-- (indicating a new legacy free application)
|
||||||
|
update application_types
|
||||||
|
set package_type_id = null
|
||||||
|
where object_type like '%cms.ContentSection%' ;
|
||||||
|
|
||||||
|
alter table application_types add constraint applica_typ_pac_typ_id_f_v80ma
|
||||||
|
FOREIGN KEY (package_type_id)
|
||||||
|
REFERENCES apm_package_types (package_type_id)
|
||||||
|
MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ;
|
||||||
|
alter table applications add constraint application_package_id_f_cdaho
|
||||||
|
FOREIGN KEY (package_id)
|
||||||
|
REFERENCES apm_packages (package_id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION ON DELETE NO ACTION ;
|
||||||
|
alter table apm_packages add constraint apm_package_package_id_f_46may
|
||||||
|
FOREIGN KEY (package_id)
|
||||||
|
REFERENCES acs_objects (object_id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION ON DELETE NO ACTION ;
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
--
|
||||||
|
-- Copyright (C) 2011 Peter Boy All Rights Reserved.
|
||||||
|
--
|
||||||
|
-- This library is free software; you can redistribute it and/or
|
||||||
|
-- modify it under the terms of the GNU Lesser General Public License
|
||||||
|
-- as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
-- the License, or (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This library is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
-- Lesser General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU Lesser General Public
|
||||||
|
-- License along with this library; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
--
|
||||||
|
-- $Id: oracle-se-6.6.5-6.6.6.sql 2012-02-08 15:10:39Z pboy $
|
||||||
|
|
||||||
|
-- Update: content-section now loaded as legacy free application
|
||||||
|
PROMPT Red Hat Enterprise CMS 6.6.5 -> 6.6.6 Upgrade Script (Oracle)
|
||||||
|
|
||||||
|
@@ ../default/upgrade/6.6.5-6.6.6/remove_legacy_entries.sql
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
--
|
||||||
|
-- Copyright (C) 2011 Peter Boy All Rights Reserved.
|
||||||
|
--
|
||||||
|
-- This library is free software; you can redistribute it and/or
|
||||||
|
-- modify it under the terms of the GNU Lesser General Public License
|
||||||
|
-- as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
-- the License, or (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This library is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
-- Lesser General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU Lesser General Public
|
||||||
|
-- License along with this library; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
--
|
||||||
|
-- $DateTime: 2011/09/06 23:15:09 $
|
||||||
|
-- $Id: postgres-6.6.5-6.6.6.sql 2012-02-08 15:10:39Z pboy $
|
||||||
|
|
||||||
|
-- Update: content-section now loaded as legacy free application
|
||||||
|
\echo Red Hat Enterprise CMS 6.6.5 -> 6.6.6 Upgrade Script (PostgreSQL)
|
||||||
|
|
||||||
|
begin;
|
||||||
|
|
||||||
|
\i ../default/upgrade/6.6.5-6.6.6/remove_legacy_entries.sql
|
||||||
|
|
||||||
|
commit;
|
||||||
|
|
@ -53,4 +53,8 @@
|
||||||
<version from="6.6.4" to="6.6.5">
|
<version from="6.6.4" to="6.6.5">
|
||||||
<script class="com.arsdigita.cms.contenttypes.GenericContactPersonAssocUpgrade"/>
|
<script class="com.arsdigita.cms.contenttypes.GenericContactPersonAssocUpgrade"/>
|
||||||
</version>
|
</version>
|
||||||
|
<version from="6.6.5" to="6.6.6">
|
||||||
|
<!-- ContentSection now loaded as legacy free application -->
|
||||||
|
<script sql="ccm-cms/upgrade/::database::-6.6.5-6.6.6.sql"/>
|
||||||
|
</version>
|
||||||
</upgrade>
|
</upgrade>
|
||||||
|
|
|
||||||
|
|
@ -25,22 +25,17 @@ import com.arsdigita.cms.portlet.ContentDirectoryPortlet;
|
||||||
import com.arsdigita.cms.portlet.ContentItemPortlet;
|
import com.arsdigita.cms.portlet.ContentItemPortlet;
|
||||||
import com.arsdigita.cms.portlet.ContentSectionsPortlet;
|
import com.arsdigita.cms.portlet.ContentSectionsPortlet;
|
||||||
import com.arsdigita.cms.portlet.TaskPortlet;
|
import com.arsdigita.cms.portlet.TaskPortlet;
|
||||||
import com.arsdigita.domain.DomainObject;
|
|
||||||
import com.arsdigita.formbuilder.util.FormbuilderSetup;
|
import com.arsdigita.formbuilder.util.FormbuilderSetup;
|
||||||
import com.arsdigita.kernel.ACSObjectInstantiator;
|
|
||||||
import com.arsdigita.kernel.Kernel;
|
import com.arsdigita.kernel.Kernel;
|
||||||
import com.arsdigita.kernel.KernelExcursion;
|
import com.arsdigita.kernel.KernelExcursion;
|
||||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||||
import com.arsdigita.loader.PackageLoader;
|
import com.arsdigita.loader.PackageLoader;
|
||||||
import com.arsdigita.persistence.DataObject;
|
|
||||||
import com.arsdigita.persistence.DataQuery;
|
import com.arsdigita.persistence.DataQuery;
|
||||||
import com.arsdigita.persistence.SessionManager;
|
import com.arsdigita.persistence.SessionManager;
|
||||||
import com.arsdigita.runtime.ScriptContext;
|
import com.arsdigita.runtime.ScriptContext;
|
||||||
import com.arsdigita.util.parameter.Parameter;
|
import com.arsdigita.util.parameter.Parameter;
|
||||||
import com.arsdigita.util.parameter.StringArrayParameter;
|
import com.arsdigita.util.parameter.StringArrayParameter;
|
||||||
// import com.arsdigita.util.parameter.StringParameter;
|
|
||||||
import com.arsdigita.web.Application;
|
import com.arsdigita.web.Application;
|
||||||
import com.arsdigita.web.ApplicationSetup;
|
|
||||||
import com.arsdigita.web.ApplicationType;
|
import com.arsdigita.web.ApplicationType;
|
||||||
import com.arsdigita.xml.XML;
|
import com.arsdigita.xml.XML;
|
||||||
|
|
||||||
|
|
@ -58,8 +53,8 @@ import org.apache.log4j.Logger;
|
||||||
// ccm/admin/sitemap lists them appropriately.
|
// ccm/admin/sitemap lists them appropriately.
|
||||||
//
|
//
|
||||||
// Next Try
|
// Next Try
|
||||||
// Refactor using legacy compatible web/Application and ApplicationSetup DONE
|
// Refactor using legacy compatible web/Application and ApplicationSetup *DONE*
|
||||||
// Refactor content-section als legacy free application
|
// Refactor content-section als legacy free application *DONE*
|
||||||
// Refactor workspace (content-center) as a legacy free application
|
// Refactor workspace (content-center) as a legacy free application
|
||||||
// Refactor cms-service as a legacy free application
|
// Refactor cms-service as a legacy free application
|
||||||
|
|
||||||
|
|
@ -193,16 +188,15 @@ public class Loader extends PackageLoader {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads and instantiates the Workspace subpackage (content-center) in the
|
* Loads the Workspace subpackage (content-center) into the database.
|
||||||
* database.
|
*
|
||||||
* It is made public to be able to invoke it from the update script
|
* It is made public to be able to invoke it from the update script
|
||||||
* (e.g. 6.6.1-6.6.2). We need separate steps for loading and instantiating
|
* (e.g. 6.6.1-6.6.2). We need separate steps for loading and instantiating
|
||||||
* because update skript require.
|
* because update skript requires.
|
||||||
*/
|
*/
|
||||||
public static ApplicationType loadWorkspaceApplicationType() {
|
public static ApplicationType loadWorkspaceApplicationType() {
|
||||||
s_log.debug("Creating CMS Workspace...");
|
s_log.debug("Creating CMS Workspace...");
|
||||||
|
|
||||||
// ////////////// Current style to create app type ///////////////
|
|
||||||
/* Create new stype legacy compatible application type */
|
/* Create new stype legacy compatible application type */
|
||||||
ApplicationType type = ApplicationType
|
ApplicationType type = ApplicationType
|
||||||
.createApplicationType(Workspace.PACKAGE_KEY,
|
.createApplicationType(Workspace.PACKAGE_KEY,
|
||||||
|
|
@ -217,19 +211,28 @@ public class Loader extends PackageLoader {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Instantiates the Workspace subpackage (content-center) (in the database).
|
||||||
|
*
|
||||||
|
* It is made public to be able to invoke it from the update script
|
||||||
|
* (e.g. 6.6.1-6.6.2). We need separate steps for loading and instantiating
|
||||||
|
* because update skript requires.
|
||||||
|
*
|
||||||
* @param workspaceType
|
* @param workspaceType
|
||||||
*/
|
*/
|
||||||
public static void setupDefaultWorkspaceApplicationInstance(
|
public static void setupDefaultWorkspaceApplicationInstance(
|
||||||
ApplicationType workspaceType) {
|
ApplicationType workspaceType) {
|
||||||
// create legacy compatible application instance,
|
|
||||||
|
// create application instance
|
||||||
|
// Whether a legacy compatible or a legacy free application is
|
||||||
|
// created depends on the type of ApplicationType above. No need to
|
||||||
|
// modify anything here in the migration process
|
||||||
// old-style package key used as url fragment where to install the instance
|
// old-style package key used as url fragment where to install the instance
|
||||||
s_log.debug("Creating CMS Workspace instance ...");
|
s_log.debug("Creating CMS Workspace instance ...");
|
||||||
Workspace app = (Workspace) Application.createApplication(
|
Workspace app = (Workspace) Application.createApplication(
|
||||||
Workspace.BASE_DATA_OBJECT_TYPE, // type
|
Workspace.BASE_DATA_OBJECT_TYPE, // type
|
||||||
Workspace.PACKAGE_KEY, // url fragment
|
Workspace.PACKAGE_KEY, // url fragment
|
||||||
Workspace.INSTANCE_NAME,// title
|
Workspace.INSTANCE_NAME, // title
|
||||||
null); // parent
|
null); // parent
|
||||||
app.setDescription("The default CMS workspace instance.");
|
app.setDescription("The default CMS workspace instance.");
|
||||||
app.save();
|
app.save();
|
||||||
|
|
||||||
|
|
@ -340,7 +343,7 @@ public class Loader extends PackageLoader {
|
||||||
* It gets "urlized", i.e. trimming leading and trailing blanks and
|
* It gets "urlized", i.e. trimming leading and trailing blanks and
|
||||||
* replacing blanks between words and illegal characters with an
|
* replacing blanks between words and illegal characters with an
|
||||||
* hyphen and converted to lower case.
|
* hyphen and converted to lower case.
|
||||||
* "Content Section" will become "content-section". */
|
* "Content Section" will become "content-section". */
|
||||||
ApplicationType type = new ApplicationType(
|
ApplicationType type = new ApplicationType(
|
||||||
"Content Section",
|
"Content Section",
|
||||||
ContentSection.BASE_DATA_OBJECT_TYPE );
|
ContentSection.BASE_DATA_OBJECT_TYPE );
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,10 @@
|
||||||
#
|
#
|
||||||
#ccm.bundle.folder=${ccm.project.dir}/ccm-ifs-aplaws/bundles/devel
|
#ccm.bundle.folder=${ccm.project.dir}/ccm-ifs-aplaws/bundles/devel
|
||||||
|
|
||||||
#ccm.bundle.folder=${ccm.project.dir}/ccm-sci-bundle/bundles/devel
|
ccm.bundle.folder=${ccm.project.dir}/ccm-sci-bundle/bundles/devel
|
||||||
#ccm.bundle.folder=${ccm.project.dir}/ccm-sci-bundle/bundles/demo
|
#ccm.bundle.folder=${ccm.project.dir}/ccm-sci-bundle/bundles/demo
|
||||||
#ccm.bundle.folder=${ccm.project.dir}/ccm-sci-bundle/bundles/local/aap
|
#ccm.bundle.folder=${ccm.project.dir}/ccm-sci-bundle/bundles/local/aap
|
||||||
ccm.bundle.folder=${ccm.project.dir}/ccm-sci-bundle/bundles/local/iaw
|
#ccm.bundle.folder=${ccm.project.dir}/ccm-sci-bundle/bundles/local/iaw
|
||||||
|
|
||||||
#ccm.bundle.folder=${ccm.project.dir}/ccm-quasi-bundle/bundles/devel
|
|
||||||
|
|
||||||
|
|
||||||
## ====================================================================
|
## ====================================================================
|
||||||
|
|
@ -45,11 +43,23 @@ ccm.bundle.folder=${ccm.project.dir}/ccm-sci-bundle/bundles/local/iaw
|
||||||
# Reihenfolge: hier von OBEN nach UNTEN!
|
# Reihenfolge: hier von OBEN nach UNTEN!
|
||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Alle Versionen / Bundles:
|
||||||
|
# (hb r1496 Umbennen ccm-cms ContentSection loaded as legacy free application.
|
||||||
|
#ccm.upgrade.package=ccm-cms
|
||||||
|
#ccm.upgrade.from.version=6.6.5
|
||||||
|
#ccm.upgrade.to.version=6.6.6
|
||||||
|
|
||||||
|
# Alle Versionen / Bundles:
|
||||||
|
# (hb r1492 Umbennen ccm-cms Assiciations between generic content type updated.
|
||||||
|
#ccm.upgrade.package=ccm-cms
|
||||||
|
#ccm.upgrade.from.version=6.6.4
|
||||||
|
#ccm.upgrade.to.version=6.6.5
|
||||||
|
|
||||||
# Alle Versionen / Bundles:
|
# Alle Versionen / Bundles:
|
||||||
# (hb r1398 Umbennen ccm-ldn-shortcuts nach ccm-shortcuts und legacy free app)
|
# (hb r1398 Umbennen ccm-ldn-shortcuts nach ccm-shortcuts und legacy free app)
|
||||||
ccm.upgrade.package=ccm-shortcuts
|
#ccm.upgrade.package=ccm-shortcuts
|
||||||
ccm.upgrade.from.version=6.6.0
|
#ccm.upgrade.from.version=6.6.0
|
||||||
ccm.upgrade.to.version=6.6.1
|
#ccm.upgrade.to.version=6.6.1
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue