From 547f1ae8483a459c6db62c36eb3745c898f6a0fd Mon Sep 17 00:00:00 2001 From: pb Date: Sun, 7 Apr 2013 15:04:00 +0000 Subject: [PATCH] Moved content type decision tree from Camden contrib to main trunk. Update script incomplete! git-svn-id: https://svn.libreccm.org/ccm/trunk@2119 8810af33-2d31-482b-a856-94f89814c4df --- ccm-cms-types-decisiontree/.classpath | 8 + ccm-cms-types-decisiontree/.project | 17 + ccm-cms-types-decisiontree/application.xml | 25 ++ .../cms/contenttypes/DecisionTree.pdl | 97 +++++ .../oracle-se-create.sql | 22 ++ .../postgres-create.sql | 22 ++ .../default/1.0.3-6.6.0/doAnotherThing.sql | 94 +++++ .../default/1.0.3-6.6.0/doSomething.sql | 47 +++ .../1.0.3-6.6.0/ren_decisiontree_tables.sql | 94 +++++ .../upgrade/default/1.0.3-6.6.0/upd_inits.sql | 28 ++ .../default/1.0.3-6.6.0/upd_system_tables.sql | 37 ++ .../upgrade/oracle-se-1.0.3-6.6.0.sql | 23 ++ .../upgrade/postgres-1.0.3-6.6.0.sql | 27 ++ .../cms/contenttypes/DecisionTree.xml | 42 +++ .../cms/contenttypes/DecisionTree.xml | 124 ++++++ .../src/ccm-cms-types-decisiontree.config | 5 + .../src/ccm-cms-types-decisiontree.load | 16 + .../src/ccm-cms-types-decisiontree.upgrade | 10 + .../cms/contenttypes/DecisionTree.java | 289 ++++++++++++++ .../contenttypes/DecisionTreeInitializer.java | 109 ++++++ .../cms/contenttypes/DecisionTreeLoader.java | 39 ++ .../DecisionTreeOptionTarget.java | 176 +++++++++ .../DecisionTreeOptionTargetCollection.java | 72 ++++ .../DecisionTreeResources.properties | 44 +++ .../DecisionTreeResources_de.properties | 44 +++ .../DecisionTreeResources_en.properties | 44 +++ .../DecisionTreeResources_fr.properties | 44 +++ .../cms/contenttypes/DecisionTreeSection.java | 185 +++++++++ .../DecisionTreeSectionCollection.java | 71 ++++ .../DecisionTreeSectionOption.java | 113 ++++++ .../DecisionTreeSectionOptionCollection.java | 70 ++++ .../DecisionTreeTraversalAdapter.java | 100 +++++ .../cms/contenttypes/DecisionTreeUtil.java | 42 +++ .../ui/DecisionTreeOptionDeleteForm.java | 131 +++++++ .../ui/DecisionTreeOptionEditForm.java | 278 ++++++++++++++ .../ui/DecisionTreeOptionTable.java | 276 ++++++++++++++ ...onTreeParameterNameValidationListener.java | 78 ++++ .../ui/DecisionTreePropertiesForm.java | 117 ++++++ .../ui/DecisionTreePropertiesStep.java | 78 ++++ .../ui/DecisionTreeSectionDeleteForm.java | 126 +++++++ .../ui/DecisionTreeSectionEditForm.java | 305 +++++++++++++++ .../ui/DecisionTreeSectionTable.java | 219 +++++++++++ .../ui/DecisionTreeTargetDeleteForm.java | 119 ++++++ .../ui/DecisionTreeTargetEditForm.java | 355 ++++++++++++++++++ .../ui/DecisionTreeTargetTable.java | 221 +++++++++++ .../ui/DecisionTreeViewOptions.java | 315 ++++++++++++++++ .../ui/DecisionTreeViewSections.java | 260 +++++++++++++ .../ui/DecisionTreeViewTargets.java | 271 +++++++++++++ .../heirloom/contenttypes/DecisionTree.xsl | 77 ++++ 49 files changed, 5406 insertions(+) create mode 100644 ccm-cms-types-decisiontree/.classpath create mode 100644 ccm-cms-types-decisiontree/.project create mode 100644 ccm-cms-types-decisiontree/application.xml create mode 100644 ccm-cms-types-decisiontree/pdl/com/arsdigita/cms/contenttypes/DecisionTree.pdl create mode 100644 ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/oracle-se-create.sql create mode 100644 ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/postgres-create.sql create mode 100644 ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/doAnotherThing.sql create mode 100644 ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/doSomething.sql create mode 100644 ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/ren_decisiontree_tables.sql create mode 100644 ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/upd_inits.sql create mode 100644 ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/upd_system_tables.sql create mode 100644 ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/oracle-se-1.0.3-6.6.0.sql create mode 100644 ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/postgres-1.0.3-6.6.0.sql create mode 100644 ccm-cms-types-decisiontree/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/DecisionTree.xml create mode 100644 ccm-cms-types-decisiontree/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/DecisionTree.xml create mode 100644 ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.config create mode 100644 ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.load create mode 100644 ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.upgrade create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTree.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeInitializer.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeLoader.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeOptionTarget.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeOptionTargetCollection.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources.properties create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_de.properties create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_en.properties create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeResources_fr.properties create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeSection.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeSectionCollection.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeSectionOption.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeSectionOptionCollection.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeTraversalAdapter.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/DecisionTreeUtil.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreeOptionDeleteForm.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreeOptionEditForm.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreeOptionTable.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreeParameterNameValidationListener.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreePropertiesForm.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreePropertiesStep.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreeSectionDeleteForm.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreeSectionEditForm.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreeSectionTable.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreeTargetDeleteForm.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreeTargetEditForm.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreeTargetTable.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreeViewOptions.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreeViewSections.java create mode 100644 ccm-cms-types-decisiontree/src/com/arsdigita/cms/contenttypes/ui/DecisionTreeViewTargets.java create mode 100644 ccm-cms-types-decisiontree/web/themes/heirloom/contenttypes/DecisionTree.xsl diff --git a/ccm-cms-types-decisiontree/.classpath b/ccm-cms-types-decisiontree/.classpath new file mode 100644 index 000000000..c22b63dc9 --- /dev/null +++ b/ccm-cms-types-decisiontree/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/ccm-cms-types-decisiontree/.project b/ccm-cms-types-decisiontree/.project new file mode 100644 index 000000000..2088df49f --- /dev/null +++ b/ccm-cms-types-decisiontree/.project @@ -0,0 +1,17 @@ + + + cm-ldn-camden-decisiontree + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/ccm-cms-types-decisiontree/application.xml b/ccm-cms-types-decisiontree/application.xml new file mode 100644 index 000000000..006c2b84d --- /dev/null +++ b/ccm-cms-types-decisiontree/application.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + The decision Tree Content Type for the Red Hat CCM CMS, previously part of + Camden contributed tree, relocated to main trunk. + + diff --git a/ccm-cms-types-decisiontree/pdl/com/arsdigita/cms/contenttypes/DecisionTree.pdl b/ccm-cms-types-decisiontree/pdl/com/arsdigita/cms/contenttypes/DecisionTree.pdl new file mode 100644 index 000000000..61f9a0b6e --- /dev/null +++ b/ccm-cms-types-decisiontree/pdl/com/arsdigita/cms/contenttypes/DecisionTree.pdl @@ -0,0 +1,97 @@ +// +// Copyright (C) 2007 Red Hat Inc. 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$ + +model com.arsdigita.cms.contenttypes; + +import com.arsdigita.cms.*; + +object type DecisionTree extends ContentPage { + + String[0..1] cancelURL = ct_decisiontrees.cancel_url; + DecisionTreeSection[0..1] firstSection = + join ct_decisiontrees.first_section to ct_decisiontree_sections.section_id; + + reference key (ct_decisiontrees.tree_id); + +} + +object type DecisionTreeSection extends ContentPage { + + String[1..1] parameterName = ct_decisiontree_sections.parameter_name; + component TextAsset[0..1] instructions = + join ct_decisiontree_sections.instructions to cms_text.text_id; + + reference key (ct_decisiontree_sections.section_id); + +} + +association { + // Association between a tree and its sections + + DecisionTree[1..1] tree = + join ct_decisiontree_sections.tree_id to ct_decisiontrees.tree_id; + component DecisionTreeSection[0..n] sections = + join ct_decisiontrees.tree_id to ct_decisiontree_sections.tree_id; + +} + +object type DecisionTreeSectionOption extends ContentItem { + + Integer[1..1] rank = ct_decisiontree_section_options.rank; + String[1..1] label = ct_decisiontree_section_options.label; + String[1..1] value = ct_decisiontree_section_options.value; + + reference key (ct_decisiontree_section_options.option_id); + +} + +association { + // Association between a section and its options + + composite DecisionTreeSection[1..1] treeSection = + join ct_decisiontree_section_options.section_id + to ct_decisiontree_sections.section_id; + component DecisionTreeSectionOption[0..n] sectionOptions = + join ct_decisiontree_sections.section_id + to ct_decisiontree_section_options.section_id; + +} + +object type DecisionTreeOptionTarget extends ContentItem { + + String[0..1] targetURL = ct_decisiontree_option_targets.target_url; + DecisionTreeSection[0..1] targetSection = + join ct_decisiontree_option_targets.target_section + to ct_decisiontree_sections.section_id; + + reference key (ct_decisiontree_option_targets.target_id); + +} + +association { + // Association between an option and its target + + composite DecisionTreeSectionOption[1..1] matchOption = + join ct_decisiontree_option_targets.match_option + to ct_decisiontree_section_options.option_id; + component DecisionTreeOptionTarget[0..1] optionTarget = + join ct_decisiontree_section_options.option_id + to ct_decisiontree_option_targets.match_option; + +} diff --git a/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/oracle-se-create.sql b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/oracle-se-create.sql new file mode 100644 index 000000000..405203fdb --- /dev/null +++ b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/oracle-se-create.sql @@ -0,0 +1,22 @@ +-- +-- Copyright (C) 2007 Red Hat Inc. 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-create.sql 1494 2007-03-19 14:58:34Z apevec $ + +@@ ddl/oracle-se/create.sql + +@@ ddl/oracle-se/deferred.sql diff --git a/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/postgres-create.sql b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/postgres-create.sql new file mode 100644 index 000000000..5c823ba42 --- /dev/null +++ b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/postgres-create.sql @@ -0,0 +1,22 @@ +-- +-- Copyright (C) 2007 Red Hat Inc. 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: postgres-create.sql 1494 2007-03-19 14:58:34Z apevec $ + +\i ddl/postgres/create.sql + +\i ddl/postgres/deferred.sql diff --git a/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/doAnotherThing.sql b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/doAnotherThing.sql new file mode 100644 index 000000000..650ab45c9 --- /dev/null +++ b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/doAnotherThing.sql @@ -0,0 +1,94 @@ +-- +-- Copyright (C) 2012 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: upd_system_tables.sql pboy $ + +-- rename ccm-cms-types-contact to ccm-ldn-types-contact +-- adjust various system tables to the new name of content type + +-- -------------------------------------------- +-- !!! REPLACE BY REQUIRED SQL COMMANDS !!! +-- -------------------------------------------- + +alter table init_requirements drop constraint init_requirements_init_f_cmmdn ; +alter table init_requirements drop constraint init_require_requ_init_f_i6rgg ; + +update inits + set class_name='com.arsdigita.london.contenttypes.ESDServiceInitializer' + where class_name='com.arsdigita.cms.contenttypes.ESDServiceInitializer' ; + +update init_requirements + set init='com.arsdigita.london.contenttypes.ESDServiceInitializer' + where init='com.arsdigita.cms.contenttypes.ESDServiceInitializer' ; + +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 content_types + set object_type='com.arsdigita.london.contenttypes.ESDService', + label='ESD Service', + description='An ESDService', + classname='com.arsdigita.london.contenttypes.ESDService' + where classname='com.arsdigita.cms.contenttypes.ESDService' ; + +update authoring_steps + set label_key='ESD Service Properties', + label_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + description_key='Edit the basic ESDService properties', + description_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + component='com.arsdigita.london.contenttypes.ui.ESDServicePropertiesStep' + where component='com.arsdigita.cms.contenttypes.ui.ESDServicePropertiesStep' ; + +update authoring_steps + set label_key='ESD Service Contact', + label_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + description_key='Edit/Choose the associated Contact object', + description_bundle='com.arsdigita.london.contenttypes.ESDServiceResources', + component='com.arsdigita.london.contenttypes.ui.ESDServiceChooseContactStep' + where component='com.arsdigita.cms.contenttypes.ui.ESDServiceChooseContactStep' ; + + + +update acs_objects + set (object_type,default_domain_class) = + ('com.arsdigita.london.contenttypes.ESDService' , + 'com.arsdigita.london.contenttypes.ESDService' ) + where default_domain_class like 'com.arsdigita.cms.contenttypes.ESDService' ; + +update lucene_docs + set type='com.arsdigita.london.contenttypes.ESDService' + where type='com.arsdigita.cms.contenttypes.ESDService' ; + +update vcx_generic_operations + set value=replace(value,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where value like '%cms.contenttypes.ESDService%'; + +update vcx_obj_changes + set obj_id=replace(obj_id,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where obj_id like '%cms.contenttypes.ESDService%'; + +update vcx_tags + set tagged_oid=replace(tagged_oid,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService') + where tagged_oid like '%cms.contenttypes.ESDService%'; + diff --git a/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/doSomething.sql b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/doSomething.sql new file mode 100644 index 000000000..7875940af --- /dev/null +++ b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/doSomething.sql @@ -0,0 +1,47 @@ +-- +-- Copyright (C) 2012 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: ren_esdservice_table.sql pboy $ + +-- rename ct_esdservice table to ct_ldn_esdservice table following +-- ccm naming conventions to make maintenance tasks easier + + +-- -------------------------------------------- +-- !!! REPLACE BY REQUIRED SQL COMMANDS !!! +-- -------------------------------------------- + + + +-- if we could figure out the old names we could rename constraints too +-- alter table ct_esdservice drop constraint ... ; +-- alter table ct_esdservice drop constraint ... ; +-- alter table ct_esdservice drop constraint ... ; + +alter table ct_esdservice RENAME TO ct_ldn_esdservice ; + +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_serv_id_p_5dac0 PRIMARY KEY(service_id); +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_cont_id_f_r4d1z FOREIGN KEY (contact_id) +-- references ct_ldn_contacts (contact_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; +-- alter table ct_ldn_esdservice +-- add constraint ct_ldn_esdserv_serv_id_f_tfkqn FOREIGN KEY (service_id) +-- references cms_articles (article_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; + diff --git a/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/ren_decisiontree_tables.sql b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/ren_decisiontree_tables.sql new file mode 100644 index 000000000..bff428656 --- /dev/null +++ b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/ren_decisiontree_tables.sql @@ -0,0 +1,94 @@ +-- +-- Copyright (C) 2012 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: ren_domainprovider_table.sql pboy $ + +-- rename ct_contact_* tables to ct_ldn_contact_* tables following +-- ccm naming conventions to make maintenance tasks easier + + +-- if we could figure out the old names we could rename constraints too +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + +alter table ct_contacts RENAME TO ct_ldn_contacts ; + +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + + +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + +alter table ct_contact_address RENAME TO ct_ldn_contact_address ; + +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_p_y5yhy PRIMARY KEY (address_id) ; +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_f_bfcho FOREIGN KEY (address_id) +-- REFERENCES cms_items (item_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; + + +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + +alter table ct_contact_phones RENAME TO ct_ldn_contact_phones ; + +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_p_y5yhy PRIMARY KEY (address_id) ; +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_f_bfcho FOREIGN KEY (address_id) +-- REFERENCES cms_items (item_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; + + +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; +-- alter table ct_contacts drop constraint ... ; + +alter table ct_contact_types RENAME TO ct_ldn_contact_types ; + +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_p_y5yhy PRIMARY KEY (address_id) ; +-- alter table ct_ldn_contact_address +-- add constraint ct_ldn_con_add_addr_id_f_bfcho FOREIGN KEY (address_id) +-- REFERENCES cms_items (item_id) MATCH SIMPLE +-- ON UPDATE NO ACTION ON DELETE NO ACTION; + + +alter table contact_content_item_map drop constraint cont_con_ite_map_ite_i_p_scqe9 ; +alter table contact_content_item_map drop constraint cont_con_ite_map_con_i_f_lanid ; +alter table contact_content_item_map drop constraint cont_con_ite_map_ite_i_f_fr0po ; + +alter table contact_content_item_map RENAME TO ct_ldn_contact_content_item_map ; + +alter table ct_ldn_contact_content_item_map + add constraint ct_ldn_con_con_ite_map_p_nannu PRIMARY KEY(item_id) ; +alter table ct_ldn_contact_content_item_map + add constraint ct_ldn_con_con_ite_map_f_g9mgi foreign key (contact_id) + references ct_ldn_contacts (contact_id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; +alter table ct_ldn_contact_content_item_map + add constraint ct_ldn_con_con_ite_map_f_a0qiy foreign key (item_id) + references cms_items(item_id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION; + diff --git a/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/upd_inits.sql b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/upd_inits.sql new file mode 100644 index 000000000..c30cce0dc --- /dev/null +++ b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/upd_inits.sql @@ -0,0 +1,28 @@ +-- +-- Copyright (C) 2013 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: upd_inits.sql $ + +-- Adjust the class name of the Initializer +update inits + set class_name='com.arsdigita.cms.contenttypes.DecisionTreeInitializer' + where class_name='com.arsdigita.camden.cms.contenttypes.DecisionTreeInitializer' ; + +-- Adjust the class name of the Initializer in init-requirements +update init_requirements + set init='com.arsdigita.cms.contenttypes.DecisionTreeInitializer' + where init='com.arsdigita.camden.cms.contenttypes.DecisionTreeInitializer' ; \ No newline at end of file diff --git a/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/upd_system_tables.sql b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/upd_system_tables.sql new file mode 100644 index 000000000..f9ddedd7b --- /dev/null +++ b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/default/1.0.3-6.6.0/upd_system_tables.sql @@ -0,0 +1,37 @@ +-- +-- Copyright (C) 2013 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: upd_acs_objects.sql $ + +-- Adjust the class name in acs-objects for all DecisionTree instances +update acs_objects + set (object_type,default_domain_class) = + ('com.arsdigita.cms.contenttypes.DecisionTree' , + 'com.arsdigita.cms.contenttypes.DecisionTree' ) + where default_domain_class + like 'com.arsdigita.camden.cms.contenttypes.DecisionTree' ; + +--Adjust content type decisiontree in contenttype directory table +update content_types + set (object_type,classname) = + ('com.arsdigita.cms.contenttypes.DecisionTree' , + 'com.arsdigita.cms.contenttypes.DecisionTree' ) + where object_type + like 'com.arsdigita.camden.cms.contenttypes.DecisionTree' ; + +--Adjust content type decisiontree in authoring_steps directory table +update authoring_steps diff --git a/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/oracle-se-1.0.3-6.6.0.sql b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/oracle-se-1.0.3-6.6.0.sql new file mode 100644 index 000000000..d9fd79b9b --- /dev/null +++ b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/oracle-se-1.0.3-6.6.0.sql @@ -0,0 +1,23 @@ +-- +-- Copyright (C) 2013 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.0-6.6.1.sql 293 2011-01-07 15:10:39Z pboy $ + +PROMPT Red Hat Enterprise types-decisiontree 1.0.3 -> 6.6.0 Upgrade Script (Oracle) + +@@ default/1.0.3-6.6.0/drop_constraints_ct_addresses.sql + diff --git a/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/postgres-1.0.3-6.6.0.sql b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/postgres-1.0.3-6.6.0.sql new file mode 100644 index 000000000..4f0aaf6aa --- /dev/null +++ b/ccm-cms-types-decisiontree/sql/ccm-cms-types-decisiontree/upgrade/postgres-1.0.3-6.6.0.sql @@ -0,0 +1,27 @@ +-- +-- 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: 2013/04/07 23:15:09 $ + +\echo Red Hat Enterprise types-decisiontree 1.0.3 -> 6.6.0 Upgrade Script (PostgreSQL) + +begin; + +\i default/1.0.3-6.6.0/drop_constraints_ct_adresses.sql + + +commit; diff --git a/ccm-cms-types-decisiontree/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/DecisionTree.xml b/ccm-cms-types-decisiontree/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/DecisionTree.xml new file mode 100644 index 000000000..294afa30d --- /dev/null +++ b/ccm-cms-types-decisiontree/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/DecisionTree.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + diff --git a/ccm-cms-types-decisiontree/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/DecisionTree.xml b/ccm-cms-types-decisiontree/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/DecisionTree.xml new file mode 100644 index 000000000..fd623fa0a --- /dev/null +++ b/ccm-cms-types-decisiontree/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/DecisionTree.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.config b/ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.config new file mode 100644 index 000000000..c97ac9ae6 --- /dev/null +++ b/ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.load b/ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.load new file mode 100644 index 000000000..79aee3119 --- /dev/null +++ b/ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.load @@ -0,0 +1,16 @@ + + + +
+
+ + + +
+ + + + + + + diff --git a/ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.upgrade b/ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.upgrade new file mode 100644 index 000000000..1569cdf65 --- /dev/null +++ b/ccm-cms-types-decisiontree/src/ccm-cms-types-decisiontree.upgrade @@ -0,0 +1,10 @@ + + + + + +

+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+
+ + + + + + + +

DECISIONTREE >

+
+ +