diff --git a/ccm-cms-types-simpleorganization/application.xml b/ccm-cms-types-organization/application.xml similarity index 93% rename from ccm-cms-types-simpleorganization/application.xml rename to ccm-cms-types-organization/application.xml index b2e215147..1699a7255 100644 --- a/ccm-cms-types-simpleorganization/application.xml +++ b/ccm-cms-types-organization/application.xml @@ -1,8 +1,8 @@ diff --git a/ccm-cms-types-organization/pdl/com/arsdigita/content-types/Organization.pdl b/ccm-cms-types-organization/pdl/com/arsdigita/content-types/Organization.pdl new file mode 100644 index 000000000..7f3b8b04d --- /dev/null +++ b/ccm-cms-types-organization/pdl/com/arsdigita/content-types/Organization.pdl @@ -0,0 +1,12 @@ +model com.arsdigita.cms.contenttypes; + +import com.arsdigita.kernel.ACSObject; +import com.arsdigita.cms.*; + +object type Organization extends GenericOrganizationalUnit { + reference key (ct_organizations.organization_id); +} + +object type OrganizationBundle extends GenericOrganizationalUnitBundle { + reference key (ct_organization_bundles.bundle_id); +} \ No newline at end of file diff --git a/ccm-cms-types-simpleorganization/sql/ccm-cms-types-simpleorganization/oracle-se-create.sql b/ccm-cms-types-organization/sql/ccm-cms-types-organization/oracle-se-create.sql similarity index 100% rename from ccm-cms-types-simpleorganization/sql/ccm-cms-types-simpleorganization/oracle-se-create.sql rename to ccm-cms-types-organization/sql/ccm-cms-types-organization/oracle-se-create.sql diff --git a/ccm-cms-types-simpleorganization/sql/ccm-cms-types-simpleorganization/postgres-create.sql b/ccm-cms-types-organization/sql/ccm-cms-types-organization/postgres-create.sql similarity index 100% rename from ccm-cms-types-simpleorganization/sql/ccm-cms-types-simpleorganization/postgres-create.sql rename to ccm-cms-types-organization/sql/ccm-cms-types-organization/postgres-create.sql diff --git a/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/default/rename_simpleorga_to_orga.sql b/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/default/rename_simpleorga_to_orga.sql new file mode 100644 index 000000000..0c73e21f5 --- /dev/null +++ b/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/default/rename_simpleorga_to_orga.sql @@ -0,0 +1,68 @@ +-- +-- Copyright (C) 2014 Jens Pelzetter 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 + +-- Renaming ccm-cms-types-simpleorganization to ccm-cms-types-organization to keep the naming +-- schema + +-- Rename tables +ALTER TABLE ct_simpleorganizations TO ct_organizations; + +-- Update inits + +-- Drop constraints for init_requirements temporaly (otherwise we can't update +-- the tables) +ALTER TABLE init_requirements DROP CONSTRAINT init_requirements_init_f_cmmdn ; +ALTER TABLE init_requirements DROP CONSTRAINT init_require_requ_init_f_i6rgg ; + +-- Adjust the class name of the Initializer +UPDATE inits + SET class_name='com.arsdigita.cms.contenttypes.OrganizationInitializer' + WHERE class_name='com.arsdigita.cms.contenttypes.SimpleOrganizationInitializer'; + +-- Adjust the class name of the Initializer in init-requirements +UPDATE init_requirements + SET init='com.arsdigita.cms.contenttypes.OrganizationInitializer' + WHERE init='com.arsdigita.cms.contenttypes.SimpleOrganizationInitializer'; + +-- Restore the constraints for init_requirements +ALTER TABLE init_requirements + ADD CONSTRAINT init_requirements_init_f_cmmdn FOREIGN KEY (init) + REFERENCES inits (class_name) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; +ALTER TABLE init_requirements + ADD CONSTRAINT init_require_requ_init_f_i6rgg FOREIGN KEY (required_init) + REFERENCES inits (class_name) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; + +-- Update system tables + +-- Adjust the class name in acs-objects for all DecisionTree instances +UPDATE acs_objects + SET object_type = 'com.arsdigita.cms.contenttypes.Organization', + default_domain_class = 'com.arsdigita.cms.contenttypes.Organization' + WHERE default_domain_class = 'com.arsdigita.cms.contenttypes.SimpleOrganization'; + +--Adjust content type organization in contenttype directory table +UPDATE content_types + SET object_type = 'com.arsdigita.cms.contenttypes.Organization', + classname = 'com.arsdigita.cms.contenttypes.Organization' + WHERE object_type = 'com.arsdigita.cms.contenttypes.SimpleOrganization' ; + +--Adjust content type decisiontree in authoring_steps directory table +UPDATE authoring_steps + SET component = 'com.arsdigita.cms.contenttypes.ui.OrganizationPropertiesStep' + WHERE component = 'com.arsdigita.cms.contenttypes.ui.SimpleOrganizationPropertiesStep'; \ No newline at end of file diff --git a/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/oracle-se-6.6.6-6.6.7.sql b/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/oracle-se-6.6.6-6.6.7.sql new file mode 100644 index 000000000..3a7381897 --- /dev/null +++ b/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/oracle-se-6.6.6-6.6.7.sql @@ -0,0 +1,22 @@ +-- +-- Copyright (C) 2014 Jens Pelzetter 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.0-6.6.1.sql 293 2011-01-07 15:10:39Z pboy $ + +PROMPT LibreCCM types organization 6.6.6 -> 6.6.7 Upgrade Script (Oracle) + +@@ default/6.6.6-6.6.7/rename_simpleorga_to_orga.sql \ No newline at end of file diff --git a/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/postgres-6.6.6-6.6.7.sql b/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/postgres-6.6.6-6.6.7.sql new file mode 100644 index 000000000..3cf78bd25 --- /dev/null +++ b/ccm-cms-types-organization/sql/ccm-cms-types-organization/upgrade/postgres-6.6.6-6.6.7.sql @@ -0,0 +1,24 @@ +-- +-- Copyright (C) 2014 Jens Pelzetter 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 + +\echo LibreCMS types Organization 6.6.6 -> 6.6.7 Upgrade Script (PostgreSQL) + +begin; + +\i default/6.6.6-6.6.7/rename_simpleorga_to_orga.sql + +end; \ No newline at end of file diff --git a/ccm-cms-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Organization.xml b/ccm-cms-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Organization.xml new file mode 100644 index 000000000..68ba4863a --- /dev/null +++ b/ccm-cms-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Organization.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-cms-types-simpleorganization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SimpleOrganization.xml b/ccm-cms-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Organization.xml similarity index 86% rename from ccm-cms-types-simpleorganization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SimpleOrganization.xml rename to ccm-cms-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Organization.xml index d374db42a..8500cea13 100644 --- a/ccm-cms-types-simpleorganization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SimpleOrganization.xml +++ b/ccm-cms-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Organization.xml @@ -6,7 +6,8 @@ xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd"> - + diff --git a/ccm-cms-types-simpleorganization/src/ccm-cms-types-simpleorganization.config b/ccm-cms-types-organization/src/ccm-cms-types-organization.config similarity index 100% rename from ccm-cms-types-simpleorganization/src/ccm-cms-types-simpleorganization.config rename to ccm-cms-types-organization/src/ccm-cms-types-organization.config diff --git a/ccm-cms-types-organization/src/ccm-cms-types-organization.load b/ccm-cms-types-organization/src/ccm-cms-types-organization.load new file mode 100644 index 000000000..a4d29ceb0 --- /dev/null +++ b/ccm-cms-types-organization/src/ccm-cms-types-organization.load @@ -0,0 +1,16 @@ + + + +
+
+ + + +
+ + + + + + + \ No newline at end of file diff --git a/ccm-cms-types-organization/src/ccm-cms-types-organization.upgrade b/ccm-cms-types-organization/src/ccm-cms-types-organization.upgrade new file mode 100644 index 000000000..917e2e4e9 --- /dev/null +++ b/ccm-cms-types-organization/src/ccm-cms-types-organization.upgrade @@ -0,0 +1,5 @@ + + +