Author: pboy Date: 2013-01-08 01:05:44 +0000 (Tue, 08 Jan 2013) New Revision: 2453 Added: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doAnotherThing.sql contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doSomething.sql contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.4-6.6.0.sql contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.0-1.0.1/ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.0-1.0.1/cam_consultations.sql contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.1-1.0.2/ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.1-1.0.2/authoring_kits.sql contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/postgres-1.0.4-6.6.0.sql contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/ui/ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/ui/FoiFilter.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/ui/FoiList.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/ui/FoiNavigationModel.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/ui/FoiTable.java Removed: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/oracle-se/ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiFilter.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiList.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiNavigationModel.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiTable.java Modified: contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/contenttypes/Foi.pdl contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/foi/FoiApp.pdl contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.0-1.0.1.sql contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.1-1.0.2.sql contrib/camden/ccm-lbc-foi/src/WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes/Foi.xml contrib/camden/ccm-lbc-foi/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Foi.xml contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.load contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.upgrade contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiInitializer.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiLoader.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiCreate.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesForm.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesStep.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeForm.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeStep.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/FoiApp.java contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/foi/Loader.java contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/admin/deleted.jsp contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/index.jsp contrib/camden/ccm-lbc-foi/web/templates/ccm-lbc-foi/navigation/foi-indexpage.jsp Log: Next part of migration to version 2.0. Module compiles, system starts, content-center works. Display of published item fails. Modified: contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/contenttypes/Foi.pdl =================================================================== --- contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/contenttypes/Foi.pdl 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/contenttypes/Foi.pdl 2013-01-08 01:05:44 UTC (rev 2453) @@ -15,7 +15,7 @@ // 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: Consultation.pdl 21 2005-08-02 14:10:20Z clasohm $ +// $Id: Foi.pdl 21 2005-08-02 14:10:20Z clasohm $ model com.arsdigita.camden.cms.contenttypes; Modified: contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/foi/FoiApp.pdl =================================================================== --- contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/foi/FoiApp.pdl 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/pdl/com/arsdigita/camden/cms/foi/FoiApp.pdl 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,5 +1,24 @@ -model com.arsdigita.camden.cms.contenttypes; +// +// Copyright (C) 2005 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: FoiApp.pdl 21 2005-08-02 14:10:20Z clasohm $ +model com.arsdigita.camden.cms.foi; + import com.arsdigita.web.Application; object type FoiApp extends Application { Added: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doAnotherThing.sql =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doAnotherThing.sql (rev 0) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doAnotherThing.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -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%'; + Added: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doSomething.sql =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doSomething.sql (rev 0) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/default/1.0.4-6.6.0/doSomething.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -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; + Copied: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.0-1.0.1/cam_consultations.sql (from rev 2448, contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/oracle-se/upgrade/1.0.0-1.0.1/cam_consultations.sql) =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.0-1.0.1/cam_consultations.sql (rev 0) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.0-1.0.1/cam_consultations.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -0,0 +1,13 @@ +alter table cam_consultations +add (alert_sent char(1)); + +alter table cam_consultations +add constraint cam_consultat_ale_sent_c_eri9a +check (alert_sent in ('0', '1')); + +update cam_consultations +set alert_sent = '0'; + +alter table cam_consultations +add constraint cam_consultat_ale_sent_c_nn +check (alert_sent is not null); Copied: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.1-1.0.2/authoring_kits.sql (from rev 2448, contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/oracle-se/upgrade/1.0.1-1.0.2/authoring_kits.sql) =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.1-1.0.2/authoring_kits.sql (rev 0) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se/1.0.1-1.0.2/authoring_kits.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -0,0 +1,6 @@ +update authoring_kits +set create_component = 'com.arsdigita.camden.cms.contenttypes.ui.ConsultationCreate' +where type_id = + (select type_id + from content_types + where object_type = 'com.arsdigita.camden.cms.contenttypes.Consultation'); Modified: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.0-1.0.1.sql =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.0-1.0.1.sql 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.0-1.0.1.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -1 +1 @@ -@ ../oracle-se/upgrade/1.0.0-1.0.1/cam_consultations.sql +@ oracle-se/1.0.0-1.0.1/cam_consultations.sql Modified: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.1-1.0.2.sql =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.1-1.0.2.sql 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.1-1.0.2.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -1 +1 @@ -@ ../oracle-se/upgrade/1.0.1-1.0.2/authoring_kits.sql +@ oracle-se/1.0.1-1.0.2/authoring_kits.sql Copied: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.4-6.6.0.sql (from rev 2451, contrib/camden/ccm-lbc-aplaws/sql/ccm-lbc-aplaws/upgrade/oracle-se-1.0.4-6.6.1.sql) =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.4-6.6.0.sql (rev 0) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/oracle-se-1.0.4-6.6.0.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -0,0 +1,21 @@ +-- +-- 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: oracle-se-1.0.4-6.6.1.sql pboy $ + +@@ default/1.0.4-6.6.1/doSomething.sql +@@ default/1.0.4-6.6.1/doAnotherThing.sql Copied: contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/postgres-1.0.4-6.6.0.sql (from rev 2451, contrib/camden/ccm-lbc-aplaws/sql/ccm-lbc-aplaws/upgrade/postgres-1.0.4-6.6.1.sql) =================================================================== --- contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/postgres-1.0.4-6.6.0.sql (rev 0) +++ contrib/camden/ccm-lbc-foi/sql/ccm-lbc-foi/upgrade/postgres-1.0.4-6.6.0.sql 2013-01-08 01:05:44 UTC (rev 2453) @@ -0,0 +1,27 @@ +-- +-- 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: postgres-6.6.0-6.6.1.sql pboy $ + +\echo APLAWS ldn esdservice 6.6.0 -> 6.6.1 Upgrade Script (PostgreSQL) + +begin; + +\i default/1.0.4-6.6.1/doSomething.sql +\i default/1.0.4-6.6.1/doAnotherThing.sql + +commit; Modified: contrib/camden/ccm-lbc-foi/src/WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes/Foi.xml =================================================================== --- contrib/camden/ccm-lbc-foi/src/WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes/Foi.xml 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes/Foi.xml 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,6 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> -<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> - <ctd:content-type label="Foi" description="Foi Content TypeType" objectType="com.arsdigita.camden.cms.contenttypes.Foi" classname="com.arsdigita.camden.cms.contenttypes.Foi"> +<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> + + <ctd:content-type label="Foi" + description="Foi Content TypeType" + objectType="com.arsdigita.camden.cms.contenttypes.Foi" + classname="com.arsdigita.camden.cms.contenttypes.Foi"> + <ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate"> <ctd:authoring-step labelKey="cms.contenttypes.shared.basic_properties.title" Modified: contrib/camden/ccm-lbc-foi/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Foi.xml =================================================================== --- contrib/camden/ccm-lbc-foi/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Foi.xml 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Foi.xml 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<xrd:adapters xmlns:xrd="http://xmlns.redhat.com/schemas/waf/xml-renderer-rules" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd"> +<xrd:adapters xmlns:xrd="http://xmlns.redhat.com/schemas/waf/xml-renderer-rules" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd"> + <!-- No need to list all the content types here. Only need to list a type if is adds associations that were not in the parent type, or to remove attributes Modified: contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.load =================================================================== --- contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.load 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.load 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> <load> <requires> <table name="inits"/> Modified: contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.upgrade =================================================================== --- contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.upgrade 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/ccm-lbc-foi.upgrade 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> <upgrade> </upgrade> Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiInitializer.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiInitializer.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiInitializer.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -39,7 +39,8 @@ * Constructor, just sets the PDL manifest file and object type string. */ public FoiInitializer() { - super("ccm-lbc-foi.pdl.mf", Foi.BASE_DATA_OBJECT_TYPE); + super("empty.pdl.mf", Foi.BASE_DATA_OBJECT_TYPE); + } // REMOVED without replacement, does nothing at all Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiLoader.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiLoader.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/FoiLoader.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -26,38 +26,55 @@ /** - * Loader. * + * Loader executes nonrecurring once at install time and loads the + * FOI contenttype package persistently into database. + * + * It uses the base class to create the database schema and the required + * table entries for the contenttype. + * * @author Rahul Shukla * @version $Id: FoiLoader.java 285 2006-11-05 00:29:02Z rahul shukla $ */ public class FoiLoader extends AbstractContentTypeLoader { - /** */ + /** Defines the xml file containing the EForm content types + * property definitions. */ private static final String[] TYPES = { "/WEB-INF/content-types/com/arsdigita/camden/cms/contenttypes/Foi.xml" }; /** + * Run method performs the loading tasks. * + * Overwrites the parent class's method to add funktionality: Register + * jsp template for Navigation index page. */ public void run(ScriptContext ctx) { - // execute super script to create type + /* Execute super script to create type and do standard stuff. */ super.run(ctx); new KernelExcursion() { protected void excurse() { setEffectiveParty(Kernel.getSystemParty()); - // register JSP as index page with navigation + + /* Additional function: register JSP as index page with + * navigation */ setupTemplate(); + } }.run(); } /** + * Provides the of FOI contenttype property definitions to the + * parent class Loader process implementing it's abstract method. * - * @return + * The file defines the types name as displayed in content center + * select box and the authoring steps. These are loaded into database. + * + * @return String Atring Array of fully qualified file names */ public String[] getTypes() { return TYPES; Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiCreate.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiCreate.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiCreate.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -22,8 +22,6 @@ import com.arsdigita.bebop.FormProcessException; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.event.FormSectionEvent; -// import com.arsdigita.camden.cms.contenttypes.FoiUtil; -// import com.arsdigita.categorization.Category; import com.arsdigita.cms.ContentBundle; import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.ContentSection; @@ -33,7 +31,6 @@ import com.arsdigita.cms.ui.authoring.PageCreate; import com.arsdigita.util.Assert; -import java.math.BigDecimal; import java.util.Date; Deleted: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiFilter.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiFilter.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiFilter.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,262 +0,0 @@ -/* - * Copyright (C) 2005 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 - * - */ -package com.arsdigita.camden.cms.contenttypes.ui; - - -import javax.servlet.ServletException; - -import com.arsdigita.bebop.Component; -import com.arsdigita.bebop.ControlLink; -import com.arsdigita.bebop.DimensionalNavbar; -import com.arsdigita.bebop.Label; -import com.arsdigita.bebop.PageState; -import com.arsdigita.camden.cms.contenttypes.FoiUtil; -import com.arsdigita.xml.Element; - -/** - * Filter widget to restrict the displayed Foi items - * by their status (past, current, forthcoming). - * - * - */ -public class FoiFilter extends DimensionalNavbar { - - public static final String EVENT_FILTER = "filter"; - public static final String FILTER_ALL = "all"; - - public static final String FILTER_categoryOption1="Adult care services"; - public static final String FILTER_categoryOption2="Children and families services"; - public static final String FILTER_categoryOption3="Community safety and emergencies"; - public static final String FILTER_categoryOption4="Consumer affairs"; - public static final String FILTER_categoryOption5="Council management"; - public static final String FILTER_categoryOption6="Council property"; - public static final String FILTER_categoryOption7="Democracy"; - public static final String FILTER_categoryOption8="Economic development"; - public static final String FILTER_categoryOption9="Education and skills"; - public static final String FILTER_categoryOption10="Environmental protection"; - public static final String FILTER_categoryOption11="Finance"; - public static final String FILTER_categoryOption12="Health and Safety"; - public static final String FILTER_categoryOption13="Housing"; - public static final String FILTER_categoryOption14="Employment, jobs, and careers"; - public static final String FILTER_categoryOption15="Information and communication technology"; - public static final String FILTER_categoryOption16="Information Management"; - public static final String FILTER_categoryOption17="Legal Services"; - public static final String FILTER_categoryOption18="Leisure and culture"; - public static final String FILTER_categoryOption19="Planning and building control"; - public static final String FILTER_categoryOption20="Procurement"; - public static final String FILTER_categoryOption21="Registration and coroners"; - public static final String FILTER_categoryOption22="Risk management and insurance"; - public static final String FILTER_categoryOption23="Transport and infrastructure"; - public static final String FILTER_categoryOption24="Waste Management"; - - - private FoiTable m_table; - - public FoiFilter() { - setDelimiter(" | "); - } - - public void addWidgets(final FoiTable table) { - m_table = table; - - ControlLink categoryOption1 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption1")), - FILTER_categoryOption1, - this); - add(categoryOption1); - - ControlLink categoryOption2 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption2")), - FILTER_categoryOption2, - this); - add(categoryOption2); - ControlLink categoryOption3 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption3")), - FILTER_categoryOption3, - this); - add(categoryOption3); - - ControlLink categoryOption4 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption4")), - FILTER_categoryOption4, - this); - add(categoryOption4); - - ControlLink categoryOption5 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption5")), - FILTER_categoryOption5, - this); - add(categoryOption5); - - ControlLink categoryOption6 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption6")), - FILTER_categoryOption6, - this); - add(categoryOption6); - - ControlLink categoryOption7 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption7")), - FILTER_categoryOption7, - this); - add(categoryOption7); - - ControlLink categoryOption8 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption8")), - FILTER_categoryOption8, - this); - add(categoryOption8); - - ControlLink categoryOption9 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption9")), - FILTER_categoryOption9, - this); - add(categoryOption9); - - ControlLink categoryOption10 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption10")), - FILTER_categoryOption10, - this); - add(categoryOption10); - - ControlLink categoryOption11 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption11")), - FILTER_categoryOption11, - this); - add(categoryOption11); - - ControlLink categoryOption12 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption12")), - FILTER_categoryOption12, - this); - add(categoryOption12); - - ControlLink categoryOption13 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption13")), - FILTER_categoryOption13, - this); - add(categoryOption13); - - ControlLink categoryOption14 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption14")), - FILTER_categoryOption14, - this); - add(categoryOption14); - - ControlLink categoryOption15 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption15")), - FILTER_categoryOption15, - this); - add(categoryOption15); - - ControlLink categoryOption16 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption16")), - FILTER_categoryOption16, - this); - add(categoryOption16); - - ControlLink categoryOption17 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption17")), - FILTER_categoryOption17, - this); - add(categoryOption17); - - - ControlLink categoryOption18 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption18")), - FILTER_categoryOption18, - this); - add(categoryOption18); - - ControlLink categoryOption19 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption19")), - FILTER_categoryOption19, - this); - add(categoryOption19); - - ControlLink categoryOption20 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption20")), - FILTER_categoryOption20, - this); - add(categoryOption20); - - - ControlLink categoryOption21 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption21")), - FILTER_categoryOption21, - this); - add(categoryOption21); - - ControlLink categoryOption22 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption22")), - FILTER_categoryOption22, - this); - add(categoryOption22); - - ControlLink categoryOption23 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption23")), - FILTER_categoryOption23, - this); - add(categoryOption23); - - - ControlLink categoryOption24 = new FilterLink( - new Label(FoiUtil.globalize("categoryFoiOption24")), - FILTER_categoryOption24, - this); - add(categoryOption24); - - } - - - public void respond(PageState state) throws ServletException { - if (EVENT_FILTER.equals(state.getControlEventName())) - m_table.setFilter(state, state.getControlEventValue()); - else - super.respond(state); - } - - - private class FilterLink extends ControlLink { - - private String m_linkFilter; - private FoiFilter m_parent; - - public FilterLink(Component child, String filter, FoiFilter parent) { - super(child); - m_linkFilter = filter; - m_parent = parent; - } - - public void setControlEvent(PageState s) { - s.setControlEvent(m_parent, EVENT_FILTER, m_linkFilter); - } - - public void generateXML(PageState state, Element parent) { - if (m_linkFilter.equals(m_table.getFilter(state))) { - // If this represents the current filter, don't display a link. - // Instead, display this link's child component. - firePrintEvent(state).getChild().generateXML(state, parent); - } else - super.generateXML(state, parent); - } - - - } - -} Deleted: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiList.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiList.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiList.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2005 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 - * - */ -package com.arsdigita.camden.cms.contenttypes.ui; - -// import com.arsdigita.camden.cms.contenttypes.Foi; -// import com.arsdigita.globalization.GlobalizedMessage; -// import com.arsdigita.kernel.ACSObject; -// import com.arsdigita.navigation.DataCollectionRenderer; -import com.arsdigita.navigation.Navigation; -import com.arsdigita.navigation.ui.AbstractObjectList; -import com.arsdigita.persistence.DataCollection; -// import com.arsdigita.persistence.DataObject; -import com.arsdigita.persistence.DataQuery; -import com.arsdigita.persistence.DataQueryDataCollectionAdapter; -import com.arsdigita.persistence.SessionManager; -import com.arsdigita.xml.Element; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * To be used as a component in a JSP page, this class displays the latest - * Foi content items, sorted by descending publication date. - * - * @author Rahul Shukla - * @version $Id: FoiList.java 31 2005-08-04 15:56:42Z rahul shukla $ - */ -public class FoiList extends AbstractObjectList { - - private int m_maxCount = 5; - - public FoiList() { - } - - /** - * Sets the maximum number of Foi items that will be displayed. - * Also sets the page size to ensure that no pagination occurs. - */ - public void setMaxCount(int maxCount) { - m_maxCount = maxCount; - getRenderer().setPageSize(m_maxCount); - } - - /** - * - * @param request - * @param response - * @return - */ - @Override - protected DataCollection getObjects(HttpServletRequest request, - HttpServletResponse response) { - - DataQuery query = SessionManager.getSession().retrieveQuery( - "com.arsdigita.camden.cms.contenttypes.getLatestFoi"); - - return new DataQueryDataCollectionAdapter(query, "foi") { - int i = 0; - @Override - public void reset() { - i = 0; - super.reset(); - } - @Override - public void rewind() { - i = 0; - super.rewind(); - } - @Override - public boolean next() { - boolean hasNext = super.next(); - if (++i > m_maxCount) { - close(); - hasNext = false; - } - return hasNext; - } - }; - } - - /** - * - * @param request - * @param response - * @return - */ - public Element generateXML(HttpServletRequest request, - HttpServletResponse response) { - Element content = Navigation.newElement("simpleObjectList"); - - content.addContent(generateObjectListXML(request, response)); - - return content; - } - -} Deleted: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiNavigationModel.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiNavigationModel.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiNavigationModel.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,113 +0,0 @@ -/* - * Copyright (C) 2005 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 - * - */ -package com.arsdigita.camden.cms.contenttypes.ui; - -import com.arsdigita.camden.cms.contenttypes.FoiUtil; -import com.arsdigita.camden.cms.foi.FoiApp; -import com.arsdigita.categorization.Category; -import com.arsdigita.categorization.CategoryCollection; -import com.arsdigita.kernel.ACSObject; -import com.arsdigita.navigation.AbstractNavigationModel; - -import java.lang.reflect.Array; - -/** - * <p>NavigationModel to be used by the Camden Fois JSPs. - * It provides the Fois category to the Path and Menu - * components from com.arsdigita.london.navigation.</p> - * - * <p>For this to work, a domain mapping has to be created for - * the Fois application at /ccm/admin/terms/. The - * Fois category has be created as a Term in this domain, - * and its name has to be set as the fois_term_name - * configuration parameter (default "Foi"). Finally, - * you have to map the Fois Index navigation template - * to the Fois category at /ccm/navigation/admin/</p> - * - * <p>When the term and the mapping are created, the server has to - * be restarted for the changes to take effect.</p> - * - * <p>In the JSP, use the static retrieve() method to get an - * instance of this class.</p> - * - */ -public class FoiNavigationModel extends AbstractNavigationModel { - - private Category m_rootCategory; - private Category m_tipCategory; - static private FoiNavigationModel m_model; - - private FoiNavigationModel() { - FoiApp app = FoiApp.retrieveApplication(); - - if (app != null) { - m_rootCategory = Category.getRootForObject(app); - } - - if (m_rootCategory != null) { - String foiTermUrl = - FoiUtil.getConfig().getFoiTermURL(); - - CategoryCollection cats = m_rootCategory.getDescendants(); - cats.addEqualsFilter(Category.URL, foiTermUrl); - if (cats.next()) { - m_tipCategory = cats.getCategory(); - cats.close(); - } - } - } - - protected ACSObject loadObject() { - return null; - } - - protected Category loadCategory() { - return m_tipCategory; - } - - protected Category[] loadCategoryPath() { - if (m_tipCategory == null) { - return null; - } - - CategoryCollection ascendants = - loadCategory().getDefaultAscendants(); - - Category[] result = - (Category[])Array.newInstance(Category.class, (int)ascendants.size()); - while (ascendants.next()) { - result[ascendants.getPosition()-1] = ascendants.getCategory(); - } - - return result; - } - - protected Category loadRootCategory() { - return m_rootCategory; - } - - static public FoiNavigationModel retrieve() { - if (m_model == null) { - m_model = new FoiNavigationModel(); - } - - return m_model; - } - -} Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesForm.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesForm.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesForm.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -16,9 +16,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ + package com.arsdigita.camden.cms.contenttypes.ui; -import java.util.Date; import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.Label; @@ -29,16 +29,11 @@ import com.arsdigita.bebop.event.FormSubmissionListener; import com.arsdigita.bebop.form.TextArea; import com.arsdigita.bebop.parameters.ParameterModel; -import com.arsdigita.bebop.parameters.StringInRangeValidationListener; import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.camden.cms.contenttypes.Foi; import com.arsdigita.camden.cms.contenttypes.FoiUtil; -import com.arsdigita.cms.ContentPage; -import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.BasicPageForm; -import com.arsdigita.cms.util.GlobalizationUtil; -import com.arsdigita.util.Assert; /** * CMS authoring form for the Camden Foi's content type. @@ -96,12 +91,14 @@ foi.setDescription( (String) data.get( DESCRIPTION ) ); foi.save(); } - if (m_step != null) + if (m_step != null) { m_step.maybeForwardToNextStep(state); + } } + @Override protected void addWidgets() { super.addWidgets(); Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesStep.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesStep.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPropertiesStep.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -50,7 +50,9 @@ BasicPageForm editSheet; editSheet = new FoiPropertiesForm( itemModel, this ); - add( EDIT_SHEET_NAME, "Edit", new WorkflowLockedComponentAccess(editSheet, itemModel), + add( EDIT_SHEET_NAME, + "Edit", + new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.getSaveCancelSection().getCancelButton() ); setDisplayComponent( getPropertySheet( itemModel ) ); @@ -65,12 +67,16 @@ * of the release */ public static Component getPropertySheet( ItemSelectionModel itemModel ) { - DomainObjectPropertySheet sheet = new DomainObjectPropertySheet( itemModel ); + DomainObjectPropertySheet sheet = + new DomainObjectPropertySheet( itemModel ); - sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"), ContentItem.NAME); + sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"), + ContentItem.NAME); //This is added for the description - sheet.add(GlobalizationUtil.globalize("Description"), Foi.DESCRIPTION); - sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"), ContentPage.TITLE); + sheet.add(GlobalizationUtil.globalize("Description"), + Foi.DESCRIPTION); + sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"), + ContentPage.TITLE); return sheet; } Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeForm.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeForm.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeForm.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -27,23 +27,20 @@ import com.arsdigita.bebop.event.FormProcessListener; import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.event.FormSubmissionListener; -import com.arsdigita.bebop.form.Date; -import com.arsdigita.bebop.form.MultipleSelect; -import com.arsdigita.bebop.form.Option; import com.arsdigita.bebop.form.SingleSelect; import com.arsdigita.bebop.form.TextField; import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.bebop.parameters.StringParameter; -import com.arsdigita.bebop.parameters.TrimmedStringParameter; import com.arsdigita.camden.cms.contenttypes.Foi; import com.arsdigita.camden.cms.contenttypes.FoiUtil; -import com.arsdigita.camden.cms.contenttypes.ui.FoiPublicationSchemeStep; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.BasicItemForm; /** * CMS authoring form for the Camden Foi content type. + * + * Usage defined in contenttype properties definition file (cf. FoiLoader). * * @author Rahul Shukla * @version $Id: FoiPublicationSchemeForm.java 27 2005-08-03 17:12:42Z rahul shukla $ @@ -103,8 +100,9 @@ foi.setCost(data.getString(Foi.COST)); - if (m_step != null) - m_step.maybeForwardToNextStep(state); + if (m_step != null) { + m_step.maybeForwardToNextStep(state); + } } @@ -136,6 +134,7 @@ } + @Override protected void addWidgets() { add(new Label(FoiUtil.globalize("categoryFoi"))); Modified: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeStep.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeStep.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiPublicationSchemeStep.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -16,10 +16,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ + package com.arsdigita.camden.cms.contenttypes.ui; -import java.util.Date; - import com.arsdigita.bebop.Component; import com.arsdigita.bebop.PageState; import com.arsdigita.camden.cms.contenttypes.Foi; @@ -29,13 +28,9 @@ import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; -import com.arsdigita.cms.util.GlobalizationUtil; import com.arsdigita.domain.DomainObject; -import com.arsdigita.globalization.GlobalizedMessage; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet.AttributeFormatter; -import com.arsdigita.xml.Formatter; -import com.arsdigita.xml.formatters.DateFormatter; /** * CMS authoring step for the Camden Fois content type. Deleted: contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiTable.java =================================================================== --- contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiTable.java 2013-01-07 22:06:54 UTC (rev 2452) +++ contrib/camden/ccm-lbc-foi/src/com/arsdigita/camden/cms/contenttypes/ui/FoiTable.java 2013-01-08 01:05:44 UTC (rev 2453) @@ -1,295 +0,0 @@ -/* - * Copyright (C) 2005 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 - * - */ - -package com.arsdigita.camden.cms.contenttypes.ui; - -import com.arsdigita.bebop.Component; -import com.arsdigita.bebop.Label; -import com.arsdigita.bebop.Link; -import com.arsdigita.bebop.Page; -import com.arsdigita.bebop.PageState; -import com.arsdigita.bebop.Paginator; -import com.arsdigita.bebop.Table; -import com.arsdigita.bebop.parameters.StringParameter; -import com.arsdigita.bebop.table.TableCellRenderer; -import com.arsdigita.camden.cms.contenttypes.Foi; -import com.arsdigita.camden.cms.contenttypes.FoiUtil; -import com.arsdigita.cms.ContentItem; -import com.arsdigita.cms.ContentPage; -import com.arsdigita.navigation.Navigation; -import com.arsdigita.persistence.DataQuery; -import com.arsdigita.persistence.OID; -import com.arsdigita.persistence.SessionManager; -import com.arsdigita.toolbox.ui.DataQueryBuilder; -import com.arsdigita.toolbox.ui.DataTable; -// import com.arsdigita.toolbox.ui.DateTableCellRenderer; -import com.arsdigita.toolbox.ui.QueryEvent; -import com.arsdigita.toolbox.ui.QueryListener; -import com.arsdigita.util.Assert; -import com.arsdigita.web.ParameterMap; -import com.arsdigita.web.URL; -import com.arsdigita.web.Web; - -import java.math.BigDecimal; - -import org.apache.log4j.Logger; - - -/** - * To be used as a component in a JSP page, this class displays all published - * Foi items in a sortable and paginated table. - * - * @author Rahul Shukla - * @version $Id: FoiTable.java 18 2006-11-10 09:17:28Z rahul shukla $ - */ -public class FoiTable extends DataTable { - private static final Logger s_log = - Logger.getLogger(FoiTable.class.getName()); - - public static final int DEFAULT_PAGE_SIZE =10; - - private StringParameter m_dirParam; - private StringParameter m_filter; - - public FoiTable() { - super(new DataQueryBuilder() { - private boolean m_locked = false; - - public String getKeyColumn() { - return Foi.ID; - } - - public DataQuery makeDataQuery(DataTable t, PageState s) { - DataQuery query = SessionManager.getSession().retrieve( - Foi.BASE_DATA_OBJECT_TYPE); - query.addEqualsFilter(ContentItem.VERSION, ContentItem.LIVE); - return query; - } - - public boolean isLocked() { - return m_locked; - } - - public void lock() { - m_locked = true; - } - }); - - m_dirParam = new StringParameter(DIRECTION); - m_dirParam.setDefaultValue(ASCENDING); - - setResourceBundle(FoiUtil.BUNDLE_NAME); - - - - - // In the Title column, we display a link - // to view the Foi item. - addColumn("Title", ContentPage.TITLE, true, - new TableCellRenderer() { - public Component getComponent(Table table, PageState state, - Object value, boolean isSelected, Object key, int row, int column) { - OID oid = - new OID(Foi.BASE_DATA_OBJECT_TYPE, (BigDecimal)key); - - - URL here = Web.getContext().getRequestURL(); - URL url = - new URL(here.getScheme(), - here.getServerName(), - here.getServerPort(), - "", - "", - Navigation.redirectURL(oid), - new ParameterMap()); - - return new Link((String) value, url); - } - }); - - - addColumn("availableFormat", Foi.AVAILABLE_FORMAT, true, new AvailableFormatCellRenderer()); - addColumn("contactDetail", Foi.CONTACT_DETAIL, true, new ContactDetailTableCellRenderer()); - addColumn("cost", Foi.COST); - - - setDefaultOrder(ContentPage.TITLE); - setDefaultOrderDirection(ASCENDING); - - m_filter = new StringParameter("filter"); - m_filter.setDefaultValue(FoiFilter.FILTER_ALL);// this means all the foi items would be displyed by default - - addQueryListener(new QueryListener() { - public void queryPending(QueryEvent e) { - - - DataQuery q = e.getDataQuery(); - PageState s = e.getPageState(); - String filter = (String)s.getValue(m_filter); - - //This is "like clause" which is been put into the query which filters out - //the result so that we can get the result according to the clicked PSCL/class which - //is displayed at the top of the table. - if (FoiFilter.FILTER_categoryOption1.equals(filter)) - q.addFilter("categoryFoi like '1'"); - else if (FoiFilter.FILTER_categoryOption2.equals(filter)) - q.addFilter("categoryFoi like '2'"); - else if (FoiFilter.FILTER_categoryOption3.equals(filter)) - q.addFilter("categoryFoi like '3'"); - else if (FoiFilter.FILTER_categoryOption4.equals(filter)) - q.addFilter("categoryFoi like '4'"); - else if (FoiFilter.FILTER_categoryOption5.equals(filter)) - q.addFilter("categoryFoi like '5'"); - else if (FoiFilter.FILTER_categoryOption6.equals(filter)) - q.addFilter("categoryFoi like '6'"); - else if (FoiFilter.FILTER_categoryOption7.equals(filter)) - q.addFilter("categoryFoi like '7'"); - else if (FoiFilter.FILTER_categoryOption8.equals(filter)) - q.addFilter("categoryFoi like '8'"); - else if (FoiFilter.FILTER_categoryOption9.equals(filter)) - q.addFilter("categoryFoi like '9'"); - else if (FoiFilter.FILTER_categoryOption10.equals(filter)) - q.addFilter("categoryFoi like '10'"); - else if (FoiFilter.FILTER_categoryOption11.equals(filter)) - q.addFilter("categoryFoi like '11'"); - else if (FoiFilter.FILTER_categoryOption12.equals(filter)) - q.addFilter("categoryFoi like '12'"); - else if (FoiFilter.FILTER_categoryOption13.equals(filter)) - q.addFilter("categoryFoi like '13'"); - else if (FoiFilter.FILTER_categoryOption14.equals(filter)) - q.addFilter("categoryFoi like '14'"); - else if (FoiFilter.FILTER_categoryOption15.equals(filter)) - q.addFilter("categ... [truncated message content] |