You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(48) |
Dec
(31) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(22) |
Feb
(68) |
Mar
(185) |
Apr
(11) |
May
(21) |
Jun
(23) |
Jul
(46) |
Aug
(69) |
Sep
(211) |
Oct
(26) |
Nov
(51) |
Dec
(52) |
2006 |
Jan
(13) |
Feb
(13) |
Mar
(8) |
Apr
(21) |
May
(17) |
Jun
(100) |
Jul
(34) |
Aug
(23) |
Sep
(26) |
Oct
(16) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(66) |
Oct
(10) |
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(3) |
May
(8) |
Jun
(5) |
Jul
(31) |
Aug
(8) |
Sep
(11) |
Oct
(6) |
Nov
|
Dec
|
2012 |
Jan
(13) |
Feb
(2) |
Mar
(9) |
Apr
(6) |
May
(24) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(120) |
2013 |
Jan
(6) |
Feb
(35) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ssk...@vh...> - 2005-11-30 12:07:39
|
Author: sskracic Date: 2005-11-30 13:05:40 +0100 (Wed, 30 Nov 2005) New Revision: 1016 Modified: trunk/ccm-cms/src/com/arsdigita/cms/search/IntermediaQueryEngine.java Log: Integrated sourceforge patch [ 1368140 ] Search all items - not just cms. Modified: trunk/ccm-cms/src/com/arsdigita/cms/search/IntermediaQueryEngine.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/search/IntermediaQueryEngine.java 2005-11-30 11:18:57 UTC (rev 1015) +++ trunk/ccm-cms/src/com/arsdigita/cms/search/IntermediaQueryEngine.java 2005-11-30 12:05:40 UTC (rev 1016) @@ -51,19 +51,21 @@ addColumn("audited.modifying_user", "modifying_user"); addColumn("audited.creation_date", "creation_date"); addColumn("audited.creation_user", "creation_user"); - addTable("cms_items", "i"); // XXX: I am going to hell for the line below. I console myself only // because this is a hack to work around a terrible interface. // This line replaces the existing hash entry for 'search_content' and // abuses the alias to add a left outer join. // mb...@re... 02/02/2005 - addTable( "search_content", "c left outer join cms_pages p on ( p.item_id = c.object_id )" ); - - addTable("acs_auditing", "audited"); - addCondition("c.object_id = i.item_id"); - //addCondition("c.object_id = p.item_id"); - addCondition("c.object_id = audited.object_id"); + // + // amended to include (other) outer joins, otherwise you + // can't search for anything other than cms items + // cg - 11/10/2005 + // + // likewise going to hell. Seb - 30/11/2005 + addTable( "search_content", "c left outer join cms_pages p on ( p.item_id = c.object_id )" + + " left outer join cms_items i on (c.object_id = i.item_id )" + + " left outer join acs_auditing audited on (c.object_id = audited.object_id)" ); } protected void addFilter(DataQuery query, @@ -71,7 +73,7 @@ super.addFilter(query, filter); FilterType type = filter.getType(); - + if (ContentTypeFilterType.KEY.equals(type.getKey())) { addContentTypeFilter(query, (ContentTypeFilterSpecification)filter); } else if (VersionFilterType.KEY.equals(type.getKey())) { @@ -96,7 +98,7 @@ protected void addVersionFilter(DataQuery query, VersionFilterSpecification filter) { - Filter f = query.addFilter("version = :version"); + Filter f = query.addFilter("nvl(version,'" + filter.getVersion() + "') = :version"); f.set("version", filter.getVersion()); } @@ -124,14 +126,14 @@ String columnName) { Date start = filter.getStartDate(); Date end = filter.getEndDate(); - // XXX The query should actually be the commented out code at the + // XXX The query should actually be the commented out code at the // bottom of this method instead of the query that we are using // we have to comment it out because of a bug with persistence DateFormat format = new SimpleDateFormat("MM/dd/yyyy"); if (start != null) { - Filter f = query.addFilter(columnName + " >= :" + + Filter f = query.addFilter(columnName + " >= :" + columnName + "StartDate"); // we truncate the value using java because we cannot do it // using sql because of the persistence bug @@ -152,7 +154,7 @@ f.set(columnName + "StartDate", startCal.getTime()); } if (end != null) { - Filter f = query.addFilter(columnName + " < :" + + Filter f = query.addFilter(columnName + " < :" + columnName + "EndDate"); // we truncate the value using java because we cannot do it // using sql because of the persistence bug @@ -169,13 +171,13 @@ if (start != null) { // XXX persistence bug - can't deal with functions on fields - Filter f = query.addFilter("trunc(" + columnName + ") >= to_date('" + + Filter f = query.addFilter("trunc(" + columnName + ") >= to_date('" + format.format(start) + - "','MM/DD/YYYY')"); + "','MM/DD/YYYY')"); } if (end != null) { // XXX persistence bug - can't deal with functions on fields - Filter f = query.addFilter("trunc(" + columnName + ") <= to_date('" + + Filter f = query.addFilter("trunc(" + columnName + ") <= to_date('" + format.format(end) + "','MM/DD/YYYY')"); } @@ -198,7 +200,7 @@ // no parties match so we make sure to return no results query.addFilter("1=2"); } else { - Filter f = query.addFilter(columnName + " in :" + + Filter f = query.addFilter(columnName + " in :" + columnName + "parties"); f.set(columnName + "parties", partyIDs); } @@ -234,7 +236,7 @@ "object_id", "id", "com.arsdigita.cms.searchCategoryItems"); - + f.set("ids", ids); } } |
From: <ssk...@vh...> - 2005-11-30 11:20:54
|
Author: sskracic Date: 2005-11-30 12:18:57 +0100 (Wed, 30 Nov 2005) New Revision: 1015 Modified: trunk/ccm-ldn-search/src/com/arsdigita/london/search/ui/AdvancedQueryComponent.java trunk/ccm-ldn-search/src/com/arsdigita/london/search/ui/SimpleQueryComponent.java Log: Integrated sourceforge patch [ 1368140 ] Search all items - not just cms. Modified: trunk/ccm-ldn-search/src/com/arsdigita/london/search/ui/AdvancedQueryComponent.java =================================================================== --- trunk/ccm-ldn-search/src/com/arsdigita/london/search/ui/AdvancedQueryComponent.java 2005-11-30 11:10:55 UTC (rev 1014) +++ trunk/ccm-ldn-search/src/com/arsdigita/london/search/ui/AdvancedQueryComponent.java 2005-11-30 11:18:57 UTC (rev 1015) @@ -25,6 +25,7 @@ import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.parameters.ParameterData; +import com.arsdigita.kernel.permissions.PrivilegeDescriptor; import com.arsdigita.search.ui.BaseQueryComponent; import com.arsdigita.search.ui.filters.PermissionFilterComponent; import com.arsdigita.search.ui.filters.SimpleCategoryFilterWidget; @@ -61,7 +62,7 @@ // XXX READ instead of CMS_READ_ITEM if (Search.getConfig().isIntermediaEnabled()) { add(new PermissionFilterComponent( - SecurityManager.CMS_READ_ITEM)); + PrivilegeDescriptor.READ)); Application app = Web.getContext().getApplication(); Category root = Category.getRootForObject(app); Modified: trunk/ccm-ldn-search/src/com/arsdigita/london/search/ui/SimpleQueryComponent.java =================================================================== --- trunk/ccm-ldn-search/src/com/arsdigita/london/search/ui/SimpleQueryComponent.java 2005-11-30 11:10:55 UTC (rev 1014) +++ trunk/ccm-ldn-search/src/com/arsdigita/london/search/ui/SimpleQueryComponent.java 2005-11-30 11:18:57 UTC (rev 1015) @@ -24,8 +24,8 @@ import com.arsdigita.bebop.FormModel; import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.parameters.ParameterData; +import com.arsdigita.kernel.permissions.PrivilegeDescriptor; import com.arsdigita.london.search.SearchConfig; -import com.arsdigita.cms.SecurityManager; import com.arsdigita.cms.ui.search.VersionFilterComponent; import com.arsdigita.search.Search; import com.arsdigita.search.ui.BaseQueryComponent; @@ -55,7 +55,7 @@ // XXX READ instead of CMS_READ_ITEM if (Search.getConfig().isIntermediaEnabled()) { - add(new PermissionFilterComponent(SecurityManager.CMS_READ_ITEM)); + add(new PermissionFilterComponent(PrivilegeDescriptor.READ)); } if (Search.getConfig().isIntermediaEnabled() || |
From: <ssk...@vh...> - 2005-11-30 11:13:13
|
Author: sskracic Date: 2005-11-30 12:10:55 +0100 (Wed, 30 Nov 2005) New Revision: 1014 Added: trunk/ccm-cms/sql/ccm-cms/default/upgrade/6.3.0-6.3.1/ trunk/ccm-cms/sql/ccm-cms/default/upgrade/6.3.0-6.3.1/update-privilege-hierarchy.sql trunk/ccm-cms/sql/ccm-cms/upgrade/oracle-se-6.3.0-6.3.1.sql trunk/ccm-cms/sql/ccm-cms/upgrade/postgres-6.3.0-6.3.1.sql Modified: trunk/ccm-cms/src/ccm-cms.upgrade Log: Integrated patch [ 1368135 ] correction to privilege hierarchy from sourceforge. Added: trunk/ccm-cms/sql/ccm-cms/default/upgrade/6.3.0-6.3.1/update-privilege-hierarchy.sql =================================================================== --- trunk/ccm-cms/sql/ccm-cms/default/upgrade/6.3.0-6.3.1/update-privilege-hierarchy.sql 2005-11-25 22:56:40 UTC (rev 1013) +++ trunk/ccm-cms/sql/ccm-cms/default/upgrade/6.3.0-6.3.1/update-privilege-hierarchy.sql 2005-11-30 11:10:55 UTC (rev 1014) @@ -0,0 +1,26 @@ +-- +-- 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$ +-- $DateTime: 2004/08/17 23:15:09 $ + +-- set read as child of cms_read_item (so that a permission check +-- on read will return objects with cms_read_item granted. +-- all existing dnm... records are updated by trigger fired +-- by this insert +insert into acs_privilege_hierarchy (privilege, child_privilege) +values ('cms_read_item', 'read'); Property changes on: trunk/ccm-cms/sql/ccm-cms/default/upgrade/6.3.0-6.3.1/update-privilege-hierarchy.sql ___________________________________________________________________ Name: svn:keywords + Id Author URL Added: trunk/ccm-cms/sql/ccm-cms/upgrade/oracle-se-6.3.0-6.3.1.sql =================================================================== --- trunk/ccm-cms/sql/ccm-cms/upgrade/oracle-se-6.3.0-6.3.1.sql 2005-11-25 22:56:40 UTC (rev 1013) +++ trunk/ccm-cms/sql/ccm-cms/upgrade/oracle-se-6.3.0-6.3.1.sql 2005-11-30 11:10:55 UTC (rev 1014) @@ -0,0 +1,24 @@ +-- +-- 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$ +-- $DateTime: 2004/08/16 18:10:38 $ + +PROMPT Red Hat Enterprise CMS 6.3.0 -> 6.3.1 Upgrade Script (Oracle) + +@@ ../default/upgrade/6.3.0-6.3.1/update-privilege-hierarchy.sql + Property changes on: trunk/ccm-cms/sql/ccm-cms/upgrade/oracle-se-6.3.0-6.3.1.sql ___________________________________________________________________ Name: svn:keywords + Id Author URL Added: trunk/ccm-cms/sql/ccm-cms/upgrade/postgres-6.3.0-6.3.1.sql =================================================================== --- trunk/ccm-cms/sql/ccm-cms/upgrade/postgres-6.3.0-6.3.1.sql 2005-11-25 22:56:40 UTC (rev 1013) +++ trunk/ccm-cms/sql/ccm-cms/upgrade/postgres-6.3.0-6.3.1.sql 2005-11-30 11:10:55 UTC (rev 1014) @@ -0,0 +1,27 @@ +-- +-- 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$ +-- $DateTime: 2004/08/17 23:15:09 $ + +\echo Red Hat Enterprise CMS 6.3.0 -> 6.3.1 Upgrade Script (PostgreSQL) + +begin; + +\i ../default/upgrade/6.3.0-6.3.1/update-privilege-hierarchy.sql + +commit; Property changes on: trunk/ccm-cms/sql/ccm-cms/upgrade/postgres-6.3.0-6.3.1.sql ___________________________________________________________________ Name: svn:keywords + Id Author URL Modified: trunk/ccm-cms/src/ccm-cms.upgrade =================================================================== --- trunk/ccm-cms/src/ccm-cms.upgrade 2005-11-25 22:56:40 UTC (rev 1013) +++ trunk/ccm-cms/src/ccm-cms.upgrade 2005-11-30 11:10:55 UTC (rev 1014) @@ -8,4 +8,7 @@ <version from="6.1.1" to="6.2.0"> <script sql="ccm-cms/upgrade/::database::-6.1.1-6.2.0.sql"/> </version> + <version from="6.3.0" to="6.3.1"> + <script sql="ccm-cms/upgrade/::database::-6.3.0-6.3.1.sql"/> + </version> </upgrade> |
From: <ap...@vh...> - 2005-11-25 22:59:57
|
Author: apevec Date: 2005-11-25 23:56:40 +0100 (Fri, 25 Nov 2005) New Revision: 1013 Modified: releases/1.0.3/ccm-cms/src/WEB-INF/resources/cms-item-adapters.xml releases/1.0.3/ccm-cms/src/com/arsdigita/cms/installer/Initializer.java Log: merge r1008 from trunk: add auditing info in ContentItem XML output Modified: releases/1.0.3/ccm-cms/src/WEB-INF/resources/cms-item-adapters.xml =================================================================== --- releases/1.0.3/ccm-cms/src/WEB-INF/resources/cms-item-adapters.xml 2005-11-24 14:57:51 UTC (rev 1012) +++ releases/1.0.3/ccm-cms/src/WEB-INF/resources/cms-item-adapters.xml 2005-11-25 22:56:40 UTC (rev 1013) @@ -32,6 +32,9 @@ </xrd:adapter> <xrd:adapter objectType="com.arsdigita.cms.ContentPage" extends="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter"> + <xrd:associations rule="include"> + <xrd:property name="/object/auditing"/> + </xrd:associations> </xrd:adapter> <!-- Adds a text asset --> Modified: releases/1.0.3/ccm-cms/src/com/arsdigita/cms/installer/Initializer.java =================================================================== --- releases/1.0.3/ccm-cms/src/com/arsdigita/cms/installer/Initializer.java 2005-11-24 14:57:51 UTC (rev 1012) +++ releases/1.0.3/ccm-cms/src/com/arsdigita/cms/installer/Initializer.java 2005-11-25 22:56:40 UTC (rev 1013) @@ -18,10 +18,15 @@ */ package com.arsdigita.cms.installer; +import com.arsdigita.auditing.BasicAuditTrail; import com.arsdigita.cms.dispatcher.ContentCenterDispatcher; import com.arsdigita.cms.dispatcher.ItemDispatcher; +import com.arsdigita.domain.DomainObject; +import com.arsdigita.domain.DomainObjectFactory; +import com.arsdigita.domain.DomainObjectInstantiator; import com.arsdigita.initializer.Configuration; import com.arsdigita.initializer.InitializationException; +import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.SessionManager; import com.arsdigita.persistence.TransactionContext; @@ -138,6 +143,14 @@ } finally { txn.commitTxn(); } + + DomainObjectFactory.registerInstantiator + ("com.arsdigita.auditing.BasicAuditTrail", + new DomainObjectInstantiator() { + public DomainObject doNewInstance(DataObject dataObject) { + return new BasicAuditTrail(dataObject); + } + }); } protected void doShutdown() {} |
From: <ap...@vh...> - 2005-11-24 14:59:34
|
Author: apevec Date: 2005-11-24 15:57:51 +0100 (Thu, 24 Nov 2005) New Revision: 1012 Added: trunk/ccm-core/src/com/arsdigita/xml/formatters/FullDateFormatter.java Log: re-add new date XML formatter from r976 w/o offending line (it was removed at r980 b/c it didn't compile) The problem was XML.getConfig().getActivateFullTimeFormatter() ie additional registry parameter. That parameter is not need, since formatter class is explicitly specified in DOT configuration file anyway. To use it add <xrd:formatter property=... class=...> for your Date property. Added: trunk/ccm-core/src/com/arsdigita/xml/formatters/FullDateFormatter.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/xml/formatters/FullDateFormatter.java 2005-11-24 10:21:44 UTC (rev 1011) +++ trunk/ccm-core/src/com/arsdigita/xml/formatters/FullDateFormatter.java 2005-11-24 14:57:51 UTC (rev 1012) @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2002-2005 Runtime Collective Ltd. 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.xml.formatters; + +import com.arsdigita.kernel.Kernel; +import com.arsdigita.xml.Formatter; +import com.arsdigita.xml.XML; + +import java.text.DateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.Locale; + +/** + * A DateFormatter which displays dates as: + * <br> + * <yearNo> | <monthNo> | <dayOfMonthNo> | <dayOfWeekNo> + * | <hour> | <minute> | <second> | <apm> | <localised date> + * <br> + * the numbers are padded with 0s, so the positions of the fields are always + * 0, 7, 12, 17, 21, 26, 31, 36, 41 (in Java), and 1, 8, 13, 18, 22, 27, 32, 37, 42 (in XSL). + */ +public class FullDateFormatter extends DateFormatter { + + public static String SEPARATOR = " | "; + public static String AM = "am"; + public static String PM = "pm"; + public static char ZERO = '0'; + + public String format(Object value) { + + String parentResult = super.format(value); + + Date date = (Date) value; + Calendar cal = Calendar.getInstance(); + StringBuffer result = new StringBuffer(60); + + cal.setTime(date); + + append(result, cal.get(Calendar.YEAR)); + appendMaybeSmall(result, cal.get(Calendar.MONTH)); + appendMaybeSmall(result, cal.get(Calendar.DAY_OF_MONTH)); + append(result, cal.get(Calendar.DAY_OF_WEEK)); + appendMaybeSmall(result, cal.get(Calendar.HOUR)); + appendMaybeSmall(result, cal.get(Calendar.MINUTE)); + appendMaybeSmall(result, cal.get(Calendar.SECOND)); + + switch (cal.get(Calendar.AM_PM)) { + case Calendar.AM: result.append(AM); break; + case Calendar.PM: result.append(PM); break; + } + + result.append(SEPARATOR) + .append(parentResult); + + return result.toString(); + } + + public void appendMaybeSmall(StringBuffer sb, int value) { + if (value < 10) { + sb.append(ZERO); + } + append(sb, value); + } + + public void append(StringBuffer sb, int value) { + sb.append(value) + .append(SEPARATOR); + } +} |
From: <ap...@vh...> - 2005-11-24 10:23:22
|
Author: apevec Date: 2005-11-24 11:21:44 +0100 (Thu, 24 Nov 2005) New Revision: 1011 Modified: trunk/tools/misc/build-all.sh Log: usage help was not shown Modified: trunk/tools/misc/build-all.sh =================================================================== --- trunk/tools/misc/build-all.sh 2005-11-24 08:56:10 UTC (rev 1010) +++ trunk/tools/misc/build-all.sh 2005-11-24 10:21:44 UTC (rev 1011) @@ -18,7 +18,7 @@ rm -rf $AUTO_BUILD_ROOT && mkdir $AUTO_BUILD_ROOT; function display_usage() { - echo <<EOF + cat <<EOF Usage: $0 [OPTIONS] APPS-FILE Options: |
From: <ap...@vh...> - 2005-11-24 08:57:58
|
Author: apevec Date: 2005-11-24 09:56:10 +0100 (Thu, 24 Nov 2005) New Revision: 1010 Modified: releases/1.0.3/ccm-core/src/com/arsdigita/search/Search.java Log: merge r971 from trunk: Fix for double-close issue with Lucene 1.4.3 see https://sourceforge.net/forum/message.php?msg_id=3411434 Modified: releases/1.0.3/ccm-core/src/com/arsdigita/search/Search.java =================================================================== --- releases/1.0.3/ccm-core/src/com/arsdigita/search/Search.java 2005-11-23 22:59:49 UTC (rev 1009) +++ releases/1.0.3/ccm-core/src/com/arsdigita/search/Search.java 2005-11-24 08:56:10 UTC (rev 1010) @@ -191,8 +191,6 @@ results = (ResultSet) cache.get(spec); if (results == null) { results = rawResults; - } else if(rawResults != null) { - rawResults.close(); } } catch(Exception e) { if(rawResults != null) { |
From: <ap...@vh...> - 2005-11-23 23:01:39
|
Author: apevec Date: 2005-11-23 23:59:49 +0100 (Wed, 23 Nov 2005) New Revision: 1009 Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsTable.java Log: render new multi-valued properties correctly Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsTable.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsTable.java 2005-11-23 17:39:51 UTC (rev 1008) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsTable.java 2005-11-23 22:59:49 UTC (rev 1009) @@ -114,16 +114,16 @@ }); addColumn("topic", Consultation.TOPIC, true, - new DynOptionCellRenderer("topic")); + new TopicCellRenderer()); addColumn("geo_area", Consultation.GEO_AREA, true, - new DynOptionCellRenderer("geo")); + new GeoCellRenderer()); addColumn("start_date", Consultation.START_DATE, true, new DateTableCellRenderer()); addColumn("type", Consultation.CONSULTATION_TYPE, true, - new DynOptionCellRenderer("type")); + new TypeCellRenderer()); addColumn("results_feedback", Consultation.FEEDBACK); @@ -212,20 +212,40 @@ return (String)state.getValue(m_filter); } - private class DynOptionCellRenderer implements TableCellRenderer { - private String m_optionName; - - public DynOptionCellRenderer(String optionName) { - m_optionName = optionName; - } + private class TopicCellRenderer implements TableCellRenderer { + private Label l = new Label(); + public Component getComponent(Table table, PageState state, + Object value, boolean isSelected, Object key, int row, int column) { + l.setLabel(Consultation.internalGetPrettyTopics((String) value)); + return l; + } + } - public Component getComponent(Table table, PageState state, + private class TypeCellRenderer implements TableCellRenderer { + private Label l = new Label(); + public Component getComponent(Table table, PageState state, Object value, boolean isSelected, Object key, int row, int column) { - if (value == null) - return new Label(""); + l.setLabel(Consultation.internalGetPrettyTypes((String) value)); + return l; + } + } - return new Label(ConsultationUtil.globalize(m_optionName + "Option" + value)); + private class TargetCellRenderer implements TableCellRenderer { + private Label l = new Label(); + public Component getComponent(Table table, PageState state, + Object value, boolean isSelected, Object key, int row, int column) { + l.setLabel(Consultation.internalGetPrettyTargets((String) value)); + return l; } } + private class GeoCellRenderer implements TableCellRenderer { + private Label l = new Label(); + public Component getComponent(Table table, PageState state, + Object value, boolean isSelected, Object key, int row, int column) { + l.setLabel(Consultation.internalGetPrettyGeoAreas((String) value)); + return l; + } + } + } |
From: <ss...@vh...> - 2005-11-23 17:41:36
|
Author: sshinde Date: 2005-11-23 18:39:51 +0100 (Wed, 23 Nov 2005) New Revision: 1008 Modified: trunk/ccm-cms/src/WEB-INF/resources/cms-item-adapters.xml trunk/ccm-cms/src/com/arsdigita/cms/installer/Initializer.java Log: Changes to output Auditing XML information for items. Applying patch supplied by carsten. Modified: trunk/ccm-cms/src/WEB-INF/resources/cms-item-adapters.xml =================================================================== --- trunk/ccm-cms/src/WEB-INF/resources/cms-item-adapters.xml 2005-11-21 12:27:27 UTC (rev 1007) +++ trunk/ccm-cms/src/WEB-INF/resources/cms-item-adapters.xml 2005-11-23 17:39:51 UTC (rev 1008) @@ -32,6 +32,9 @@ </xrd:adapter> <xrd:adapter objectType="com.arsdigita.cms.ContentPage" extends="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter"> + <xrd:associations rule="include"> + <xrd:property name="/object/auditing"/> + </xrd:associations> </xrd:adapter> <!-- Adds a text asset --> Modified: trunk/ccm-cms/src/com/arsdigita/cms/installer/Initializer.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/installer/Initializer.java 2005-11-21 12:27:27 UTC (rev 1007) +++ trunk/ccm-cms/src/com/arsdigita/cms/installer/Initializer.java 2005-11-23 17:39:51 UTC (rev 1008) @@ -18,10 +18,15 @@ */ package com.arsdigita.cms.installer; +import com.arsdigita.auditing.BasicAuditTrail; import com.arsdigita.cms.dispatcher.ContentCenterDispatcher; import com.arsdigita.cms.dispatcher.ItemDispatcher; +import com.arsdigita.domain.DomainObject; +import com.arsdigita.domain.DomainObjectFactory; +import com.arsdigita.domain.DomainObjectInstantiator; import com.arsdigita.initializer.Configuration; import com.arsdigita.initializer.InitializationException; +import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.SessionManager; import com.arsdigita.persistence.TransactionContext; @@ -138,6 +143,14 @@ } finally { txn.commitTxn(); } + + DomainObjectFactory.registerInstantiator + ("com.arsdigita.auditing.BasicAuditTrail", + new DomainObjectInstantiator() { + public DomainObject doNewInstance(DataObject dataObject) { + return new BasicAuditTrail(dataObject); + } + }); } protected void doShutdown() {} |
From: <ssk...@vh...> - 2005-11-21 12:29:10
|
Author: sskracic Date: 2005-11-21 13:27:27 +0100 (Mon, 21 Nov 2005) New Revision: 1007 Modified: releases/1.0.3/ccm-ldn-navigation/application.xml releases/1.0.3/ccm-ldn-navigation/src/com/arsdigita/london/navigation/cms/CMSNavigationModel.java Log: Integrated r1006 from the trunk (navigation menu fixes). Modified: releases/1.0.3/ccm-ldn-navigation/application.xml =================================================================== --- releases/1.0.3/ccm-ldn-navigation/application.xml 2005-11-21 12:25:18 UTC (rev 1006) +++ releases/1.0.3/ccm-ldn-navigation/application.xml 2005-11-21 12:27:27 UTC (rev 1007) @@ -3,7 +3,7 @@ name="ccm-ldn-navigation" prettyName="Navigation" version="6.2.0" - release="4" + release="5" webapp="ROOT"> <ccm:dependencies> <ccm:requires name="ccm-core" version="6.2.0" relation="ge"/> Modified: releases/1.0.3/ccm-ldn-navigation/src/com/arsdigita/london/navigation/cms/CMSNavigationModel.java =================================================================== --- releases/1.0.3/ccm-ldn-navigation/src/com/arsdigita/london/navigation/cms/CMSNavigationModel.java 2005-11-21 12:25:18 UTC (rev 1006) +++ releases/1.0.3/ccm-ldn-navigation/src/com/arsdigita/london/navigation/cms/CMSNavigationModel.java 2005-11-21 12:27:27 UTC (rev 1007) @@ -23,14 +23,22 @@ import com.arsdigita.cms.CMS; import com.arsdigita.cms.ContentBundle; import com.arsdigita.cms.ContentItem; +import com.arsdigita.cms.TemplateContext; +import com.arsdigita.domain.DomainCollection; import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.domain.DomainServiceInterfaceExposer; import com.arsdigita.kernel.ACSObject; import com.arsdigita.london.navigation.GenericNavigationModel; +import com.arsdigita.london.navigation.Navigation; +import com.arsdigita.london.terms.Domain; import com.arsdigita.persistence.DataAssociation; import com.arsdigita.persistence.DataAssociationCursor; +import com.arsdigita.persistence.DataCollection; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.Filter; +import com.arsdigita.persistence.SessionManager; +import com.arsdigita.util.Assert; +import com.arsdigita.web.Application; import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; @@ -41,7 +49,11 @@ * return the current Content Item if any. The getCategory() method * will return the content item's default category, if any. * The getRootCategory() method will return the content section's - * root category, if any. + * root category, if any. If a non-null TemplateContext is set + * (by Subsite filter for example), the root category will not + * be fetched from content section, instead it will be taken from + * the domain which has a mapping with said context to the + * default navigation app (/navigation/). */ public class CMSNavigationModel extends GenericNavigationModel { @@ -55,6 +67,32 @@ return super.loadObject(); } + protected Category loadRootCategory() { + TemplateContext dispatcherContext = Navigation.getContext().getTemplateContext(); + if (dispatcherContext == null) { + return super.loadRootCategory(); + } + DataCollection objs = SessionManager.getSession() + .retrieve(Domain.BASE_DATA_OBJECT_TYPE); + Navigation navApp = (Navigation) Application.retrieveApplicationForPath( + Navigation.getConfig().getDefaultCategoryRootPath()); + Assert.exists(navApp, Navigation.class); + objs.addEqualsFilter("model.ownerUseContext.categoryOwner.id", navApp.getID()); + objs.addEqualsFilter("model.ownerUseContext.useContext", + dispatcherContext.getContext()); + Category root = null; + DomainCollection domains = new DomainCollection(objs); + if (domains.next()) { + root = ((Domain) domains.getDomainObject()).getModel(); + domains.close(); + } else { + // can't find domain, 404 + return null; + } + Assert.exists(root, Category.class); + return root; + } + protected Category[] loadCategoryPath() { Category cat = null; @@ -84,19 +122,8 @@ categories.close(); cat = (Category) DomainObjectFactory.newInstance( obj ); } else { - s_log.debug("we don't have any categories"); + s_log.debug("we don't have any categories in the subtree with that root cat"); categories.close(); - - assoc = (DataAssociation)DomainServiceInterfaceExposer - .get(bundle, "categories"); - categories = assoc.cursor(); - categories.addOrder("link.isDefault desc"); - if( categories.next() ) { - s_log.debug( "Got category from another tree" ); - DataObject obj = categories.getDataObject(); - categories.close(); - cat = (Category) DomainObjectFactory.newInstance( obj ); - } } } |
From: <ssk...@vh...> - 2005-11-21 12:27:09
|
Author: sskracic Date: 2005-11-21 13:25:18 +0100 (Mon, 21 Nov 2005) New Revision: 1006 Modified: trunk/ccm-ldn-navigation/application.xml trunk/ccm-ldn-navigation/src/com/arsdigita/london/navigation/cms/CMSNavigationModel.java Log: Two major changes: 1. if an item has no categories in the current root category, null is returned, instead of grabbing some random category in other (possibly non-navigational) domains. 2. the algorithm to find the "current root category" has been changed. If a template context is not set, the old behavior is retained, ie. you get the root category of the content section the item belongs to. However, if there is a non-null template context (set by the Subsite filter, for example), then root category is taken from the domain which has a mapping to the default navigation app instance (most likely it's /navigation/) with a context being equal the template context. With those two changes, 2 things are fixed: a. items that are not categorised against navigation tree show default navigation menu on the left side, and no BCT at all b. items displayed in subsite context has correct (ie. subsite aware) navigation menu on the left side and BCT. Modified: trunk/ccm-ldn-navigation/application.xml =================================================================== --- trunk/ccm-ldn-navigation/application.xml 2005-11-18 22:03:26 UTC (rev 1005) +++ trunk/ccm-ldn-navigation/application.xml 2005-11-21 12:25:18 UTC (rev 1006) @@ -3,7 +3,7 @@ name="ccm-ldn-navigation" prettyName="Navigation" version="6.3.0" - release="4" + release="5" webapp="ROOT"> <ccm:dependencies> <ccm:requires name="ccm-core" version="6.2.0" relation="ge"/> Modified: trunk/ccm-ldn-navigation/src/com/arsdigita/london/navigation/cms/CMSNavigationModel.java =================================================================== --- trunk/ccm-ldn-navigation/src/com/arsdigita/london/navigation/cms/CMSNavigationModel.java 2005-11-18 22:03:26 UTC (rev 1005) +++ trunk/ccm-ldn-navigation/src/com/arsdigita/london/navigation/cms/CMSNavigationModel.java 2005-11-21 12:25:18 UTC (rev 1006) @@ -23,14 +23,22 @@ import com.arsdigita.cms.CMS; import com.arsdigita.cms.ContentBundle; import com.arsdigita.cms.ContentItem; +import com.arsdigita.cms.TemplateContext; +import com.arsdigita.domain.DomainCollection; import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.domain.DomainServiceInterfaceExposer; import com.arsdigita.kernel.ACSObject; import com.arsdigita.london.navigation.GenericNavigationModel; +import com.arsdigita.london.navigation.Navigation; +import com.arsdigita.london.terms.Domain; import com.arsdigita.persistence.DataAssociation; import com.arsdigita.persistence.DataAssociationCursor; +import com.arsdigita.persistence.DataCollection; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.Filter; +import com.arsdigita.persistence.SessionManager; +import com.arsdigita.util.Assert; +import com.arsdigita.web.Application; import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; @@ -41,7 +49,11 @@ * return the current Content Item if any. The getCategory() method * will return the content item's default category, if any. * The getRootCategory() method will return the content section's - * root category, if any. + * root category, if any. If a non-null TemplateContext is set + * (by Subsite filter for example), the root category will not + * be fetched from content section, instead it will be taken from + * the domain which has a mapping with said context to the + * default navigation app (/navigation/). */ public class CMSNavigationModel extends GenericNavigationModel { @@ -55,6 +67,32 @@ return super.loadObject(); } + protected Category loadRootCategory() { + TemplateContext dispatcherContext = Navigation.getContext().getTemplateContext(); + if (dispatcherContext == null) { + return super.loadRootCategory(); + } + DataCollection objs = SessionManager.getSession() + .retrieve(Domain.BASE_DATA_OBJECT_TYPE); + Navigation navApp = (Navigation) Application.retrieveApplicationForPath( + Navigation.getConfig().getDefaultCategoryRootPath()); + Assert.exists(navApp, Navigation.class); + objs.addEqualsFilter("model.ownerUseContext.categoryOwner.id", navApp.getID()); + objs.addEqualsFilter("model.ownerUseContext.useContext", + dispatcherContext.getContext()); + Category root = null; + DomainCollection domains = new DomainCollection(objs); + if (domains.next()) { + root = ((Domain) domains.getDomainObject()).getModel(); + domains.close(); + } else { + // can't find domain, 404 + return null; + } + Assert.exists(root, Category.class); + return root; + } + protected Category[] loadCategoryPath() { Category cat = null; @@ -84,19 +122,8 @@ categories.close(); cat = (Category) DomainObjectFactory.newInstance( obj ); } else { - s_log.debug("we don't have any categories"); + s_log.debug("we don't have any categories in the subtree with that root cat"); categories.close(); - - assoc = (DataAssociation)DomainServiceInterfaceExposer - .get(bundle, "categories"); - categories = assoc.cursor(); - categories.addOrder("link.isDefault desc"); - if( categories.next() ) { - s_log.debug( "Got category from another tree" ); - DataObject obj = categories.getDataObject(); - categories.close(); - cat = (Category) DomainObjectFactory.newInstance( obj ); - } } } |
From: <ap...@vh...> - 2005-11-18 22:05:04
|
Author: apevec Date: 2005-11-18 23:03:26 +0100 (Fri, 18 Nov 2005) New Revision: 1005 Modified: releases/1.0.3/ccm-cms/src/com/arsdigita/cms/ui/TasksPanel.java Log: integrated -r1002 from trunk: "lock" is default task filter when request parameter is not present Modified: releases/1.0.3/ccm-cms/src/com/arsdigita/cms/ui/TasksPanel.java =================================================================== --- releases/1.0.3/ccm-cms/src/com/arsdigita/cms/ui/TasksPanel.java 2005-11-18 18:08:55 UTC (rev 1004) +++ releases/1.0.3/ccm-cms/src/com/arsdigita/cms/ui/TasksPanel.java 2005-11-18 22:03:26 UTC (rev 1005) @@ -284,13 +284,13 @@ String lockFilterType = getLockFilterType(state); - if ( lockFilterType.equals("all") ) { - m_viewLockLabel.setVisible(state,false); - m_viewLockLink.setVisible(state,true); + if ( lockFilterType.equals("lock") ) { + m_viewLockLabel.setVisible(state,true); + m_viewLockLink.setVisible(state,false); m_viewUnlockLabel.setVisible(state,false); m_viewUnlockLink.setVisible(state,true); - m_viewAllLockLabel.setVisible(state,true); - m_viewAllLockLink.setVisible(state,false); + m_viewAllLockLabel.setVisible(state,false); + m_viewAllLockLink.setVisible(state,true); } else if ( lockFilterType.equals("unlock") ) { m_viewLockLabel.setVisible(state,false); m_viewLockLink.setVisible(state,true); @@ -298,13 +298,13 @@ m_viewUnlockLink.setVisible(state,false); m_viewAllLockLabel.setVisible(state,false); m_viewAllLockLink.setVisible(state,true); - } else { // default is "lock" - m_viewLockLabel.setVisible(state,true); - m_viewLockLink.setVisible(state,false); + } else { + m_viewLockLabel.setVisible(state,false); + m_viewLockLink.setVisible(state,true); m_viewUnlockLabel.setVisible(state,false); m_viewUnlockLink.setVisible(state,true); - m_viewAllLockLabel.setVisible(state,false); - m_viewAllLockLink.setVisible(state,true); + m_viewAllLockLabel.setVisible(state,true); + m_viewAllLockLink.setVisible(state,false); } } }); @@ -360,7 +360,7 @@ protected String getLockFilterType(PageState state) { String lockFilterType = (String)state.getValue(m_lockFilterParam); if ( lockFilterType == null || lockFilterType.equals("") ) { - lockFilterType = ""; + lockFilterType = "lock"; } return lockFilterType; } @@ -399,7 +399,7 @@ query.addEqualsFilter("status","1"); } else if ( lockFilterType.equals("unlock") ) { query.addEqualsFilter("isLocked","f"); - } + } // else show all } private static class RootFolderSelectionModel |
From: <ssk...@vh...> - 2005-11-18 18:10:27
|
Author: sskracic Date: 2005-11-18 19:08:55 +0100 (Fri, 18 Nov 2005) New Revision: 1004 Modified: releases/1.0.3/ccm-ldn-navigation/application.xml releases/1.0.3/ccm-ldn-navigation/src/com/arsdigita/london/navigation/NavigationFileResolver.java Log: Integrated r1003 from trunk (subsite-specific navigation fixed). Modified: releases/1.0.3/ccm-ldn-navigation/application.xml =================================================================== --- releases/1.0.3/ccm-ldn-navigation/application.xml 2005-11-18 18:04:39 UTC (rev 1003) +++ releases/1.0.3/ccm-ldn-navigation/application.xml 2005-11-18 18:08:55 UTC (rev 1004) @@ -3,7 +3,7 @@ name="ccm-ldn-navigation" prettyName="Navigation" version="6.2.0" - release="3" + release="4" webapp="ROOT"> <ccm:dependencies> <ccm:requires name="ccm-core" version="6.2.0" relation="ge"/> Modified: releases/1.0.3/ccm-ldn-navigation/src/com/arsdigita/london/navigation/NavigationFileResolver.java =================================================================== --- releases/1.0.3/ccm-ldn-navigation/src/com/arsdigita/london/navigation/NavigationFileResolver.java 2005-11-18 18:04:39 UTC (rev 1003) +++ releases/1.0.3/ccm-ldn-navigation/src/com/arsdigita/london/navigation/NavigationFileResolver.java 2005-11-18 18:08:55 UTC (rev 1004) @@ -90,7 +90,12 @@ DataCollection objs = SessionManager.getSession() .retrieve(Domain.BASE_DATA_OBJECT_TYPE); objs.addEqualsFilter("model.ownerUseContext.categoryOwner.id", nav.getID()); - objs.addEqualsFilter("model.ownerUseContext.useContext", null); + String dispatcherContext = null; + TemplateContext tc = Navigation.getContext().getTemplateContext(); + if (tc != null) { + dispatcherContext = tc.getContext(); + } + objs.addEqualsFilter("model.ownerUseContext.useContext", dispatcherContext); DomainCollection domains = new DomainCollection(objs); if (domains.next()) { root = ((Domain) domains.getDomainObject()).getModel(); |
From: <ssk...@vh...> - 2005-11-18 18:06:17
|
Author: sskracic Date: 2005-11-18 19:04:39 +0100 (Fri, 18 Nov 2005) New Revision: 1003 Modified: trunk/ccm-ldn-navigation/application.xml trunk/ccm-ldn-navigation/src/com/arsdigita/london/navigation/NavigationFileResolver.java Log: The code which returns 404 on requesting non-navigation categories for /ccm/navigation/category.jsp?categoryID=XYZ did not take into account subsite specific navigation categories that might be different from the default navigation tree. Modified: trunk/ccm-ldn-navigation/application.xml =================================================================== --- trunk/ccm-ldn-navigation/application.xml 2005-11-18 14:54:50 UTC (rev 1002) +++ trunk/ccm-ldn-navigation/application.xml 2005-11-18 18:04:39 UTC (rev 1003) @@ -3,7 +3,7 @@ name="ccm-ldn-navigation" prettyName="Navigation" version="6.3.0" - release="3" + release="4" webapp="ROOT"> <ccm:dependencies> <ccm:requires name="ccm-core" version="6.2.0" relation="ge"/> Modified: trunk/ccm-ldn-navigation/src/com/arsdigita/london/navigation/NavigationFileResolver.java =================================================================== --- trunk/ccm-ldn-navigation/src/com/arsdigita/london/navigation/NavigationFileResolver.java 2005-11-18 14:54:50 UTC (rev 1002) +++ trunk/ccm-ldn-navigation/src/com/arsdigita/london/navigation/NavigationFileResolver.java 2005-11-18 18:04:39 UTC (rev 1003) @@ -90,7 +90,12 @@ DataCollection objs = SessionManager.getSession() .retrieve(Domain.BASE_DATA_OBJECT_TYPE); objs.addEqualsFilter("model.ownerUseContext.categoryOwner.id", nav.getID()); - objs.addEqualsFilter("model.ownerUseContext.useContext", null); + String dispatcherContext = null; + TemplateContext tc = Navigation.getContext().getTemplateContext(); + if (tc != null) { + dispatcherContext = tc.getContext(); + } + objs.addEqualsFilter("model.ownerUseContext.useContext", dispatcherContext); DomainCollection domains = new DomainCollection(objs); if (domains.next()) { root = ((Domain) domains.getDomainObject()).getModel(); |
From: <ap...@vh...> - 2005-11-18 14:56:15
|
Author: apevec Date: 2005-11-18 15:54:50 +0100 (Fri, 18 Nov 2005) New Revision: 1002 Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/TasksPanel.java Log: default filter is lock when request parameter is not defined Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/TasksPanel.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/TasksPanel.java 2005-11-17 22:21:16 UTC (rev 1001) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/TasksPanel.java 2005-11-18 14:54:50 UTC (rev 1002) @@ -284,13 +284,13 @@ String lockFilterType = getLockFilterType(state); - if ( lockFilterType.equals("all") ) { - m_viewLockLabel.setVisible(state,false); - m_viewLockLink.setVisible(state,true); + if ( lockFilterType.equals("lock") ) { + m_viewLockLabel.setVisible(state,true); + m_viewLockLink.setVisible(state,false); m_viewUnlockLabel.setVisible(state,false); m_viewUnlockLink.setVisible(state,true); - m_viewAllLockLabel.setVisible(state,true); - m_viewAllLockLink.setVisible(state,false); + m_viewAllLockLabel.setVisible(state,false); + m_viewAllLockLink.setVisible(state,true); } else if ( lockFilterType.equals("unlock") ) { m_viewLockLabel.setVisible(state,false); m_viewLockLink.setVisible(state,true); @@ -298,13 +298,13 @@ m_viewUnlockLink.setVisible(state,false); m_viewAllLockLabel.setVisible(state,false); m_viewAllLockLink.setVisible(state,true); - } else { // default is "lock" - m_viewLockLabel.setVisible(state,true); - m_viewLockLink.setVisible(state,false); + } else { + m_viewLockLabel.setVisible(state,false); + m_viewLockLink.setVisible(state,true); m_viewUnlockLabel.setVisible(state,false); m_viewUnlockLink.setVisible(state,true); - m_viewAllLockLabel.setVisible(state,false); - m_viewAllLockLink.setVisible(state,true); + m_viewAllLockLabel.setVisible(state,true); + m_viewAllLockLink.setVisible(state,false); } } }); @@ -360,7 +360,7 @@ protected String getLockFilterType(PageState state) { String lockFilterType = (String)state.getValue(m_lockFilterParam); if ( lockFilterType == null || lockFilterType.equals("") ) { - lockFilterType = ""; + lockFilterType = "lock"; } return lockFilterType; } @@ -399,7 +399,7 @@ query.addEqualsFilter("status","1"); } else if ( lockFilterType.equals("unlock") ) { query.addEqualsFilter("isLocked","f"); - } + } // else show all } private static class RootFolderSelectionModel |
From: <ap...@vh...> - 2005-11-17 22:22:54
|
Author: apevec Date: 2005-11-17 23:21:16 +0100 (Thu, 17 Nov 2005) New Revision: 1001 Modified: contrib/ccm-ldn-camden-consultation/trunk/sql/ccm-ldn-camden-consultation/upgrade/oracle-se-1.0.2-1.0.3.sql Log: correct upgrade script Modified: contrib/ccm-ldn-camden-consultation/trunk/sql/ccm-ldn-camden-consultation/upgrade/oracle-se-1.0.2-1.0.3.sql =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/sql/ccm-ldn-camden-consultation/upgrade/oracle-se-1.0.2-1.0.3.sql 2005-11-17 22:01:16 UTC (rev 1000) +++ contrib/ccm-ldn-camden-consultation/trunk/sql/ccm-ldn-camden-consultation/upgrade/oracle-se-1.0.2-1.0.3.sql 2005-11-17 22:21:16 UTC (rev 1001) @@ -13,9 +13,10 @@ geo_area varchar2(4000) ); -update CAM_CONSULTATIONS set geo_area = (select to_char(geo_area) from tmp_CAM_CONSULTATIONS t where t.consultation_id = consultation_id); -update CAM_CONSULTATIONS set target_audience = (select to_char(target_audience) from tmp_CAM_CONSULTATIONS t where t.consultation_id = consultation_id); -update CAM_CONSULTATIONS set consultation_type = (select to_char(consultation_type) from tmp_CAM_CONSULTATIONS t where t.consultation_id = consultation_id); -update CAM_CONSULTATIONS set topic = (select to_char(topic) from tmp_CAM_CONSULTATIONS t where t.consultation_id = consultation_id); +update CAM_CONSULTATIONS c set geo_area = (select to_char(geo_area) from tmp_CAM_CONSULTATIONS where consultation_id = c.consultation_id); +update CAM_CONSULTATIONS c set target_audience = (select to_char(target_audience) from tmp_CAM_CONSULTATIONS where consultation_id = c.consultation_id); +update CAM_CONSULTATIONS c set consultation_type = (select to_char(consultation_type) from tmp_CAM_CONSULTATIONS where consultation_id = c.consultation_id); +update CAM_CONSULTATIONS c set topic = (select to_char(topic) from tmp_CAM_CONSULTATIONS where consultation_id = c.consultation_id); -drop table tmp_CAM_CONSULTATIONS; +-- leave temp table, just in case +-- drop table tmp_CAM_CONSULTATIONS; |
From: <ap...@vh...> - 2005-11-17 22:02:52
|
Author: apevec Date: 2005-11-17 23:01:16 +0100 (Thu, 17 Nov 2005) New Revision: 1000 Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/Consultation.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationConfig.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationMetadataProvider.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationTextContentProvider.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/GeoAreaFormatter.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TargetFormatter.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TopicFormatter.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TypeFormatter.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutForm.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutStep.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAlertConfirm.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationCreate.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationHowForm.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationHowStep.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationPropertiesForm.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationResultsForm.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationWhoForm.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationWhoStep.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsFilter.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsList.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsTable.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/admin/BulkDeletionConfirm.java Log: organize imports Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/Consultation.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/Consultation.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/Consultation.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -26,7 +26,6 @@ import org.apache.log4j.Logger; -import com.arsdigita.categorization.Category; import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.CustomCopy; import com.arsdigita.cms.FileAsset; @@ -34,15 +33,9 @@ import com.arsdigita.cms.ItemCopier; import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.globalization.GlobalizedMessage; -import com.arsdigita.kernel.ACSObject; -import com.arsdigita.kernel.permissions.PermissionService; -import com.arsdigita.persistence.DataAssociation; -import com.arsdigita.persistence.DataAssociationCursor; import com.arsdigita.persistence.DataCollection; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.OID; -import com.arsdigita.persistence.Session; -import com.arsdigita.persistence.SessionManager; import com.arsdigita.persistence.metadata.Property; import com.arsdigita.util.StringUtils; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -1,6 +1,5 @@ package com.arsdigita.camden.cms.contenttypes; -import java.lang.reflect.Array; import java.math.BigDecimal; import java.security.GeneralSecurityException; import java.util.Collection; @@ -13,9 +12,7 @@ import org.apache.commons.codec.binary.Base64; import org.apache.log4j.Logger; -import com.arsdigita.bebop.FormProcessException; import com.arsdigita.cms.util.GlobalizationUtil; -import com.arsdigita.db.DbHelper; import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.globalization.GlobalizedMessage; import com.arsdigita.kernel.ACSObject; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationConfig.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationConfig.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationConfig.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -20,7 +20,6 @@ import com.arsdigita.kernel.KernelHelper; import com.arsdigita.runtime.AbstractConfig; -import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.StringParameter; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationMetadataProvider.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationMetadataProvider.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationMetadataProvider.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -6,9 +6,7 @@ import org.apache.log4j.Logger; import com.arsdigita.cms.search.AssetExtractor; -import com.arsdigita.cms.search.ContentItemMetadataProvider; import com.arsdigita.cms.search.ContentPageMetadataProvider; -import com.arsdigita.cms.search.TextContentProvider; import com.arsdigita.cms.search.XMLContentProvider; import com.arsdigita.domain.DomainObject; import com.arsdigita.search.ContentProvider; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationTextContentProvider.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationTextContentProvider.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationTextContentProvider.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -18,7 +18,6 @@ import com.arsdigita.search.converter.Converter; import com.arsdigita.search.converter.ConverterRegistry; import com.arsdigita.util.StringUtils; -import java.util.Locale; /** * Customized version of TextContentProvider which overrides Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/GeoAreaFormatter.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/GeoAreaFormatter.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/GeoAreaFormatter.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -1,6 +1,5 @@ package com.arsdigita.camden.cms.contenttypes; -import com.arsdigita.persistence.DataAssociation; import com.arsdigita.xml.Formatter; /** Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TargetFormatter.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TargetFormatter.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TargetFormatter.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -1,6 +1,5 @@ package com.arsdigita.camden.cms.contenttypes; -import com.arsdigita.persistence.DataAssociation; import com.arsdigita.xml.Formatter; /** Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TopicFormatter.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TopicFormatter.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TopicFormatter.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -1,6 +1,5 @@ package com.arsdigita.camden.cms.contenttypes; -import com.arsdigita.persistence.DataAssociation; import com.arsdigita.xml.Formatter; /** Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TypeFormatter.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TypeFormatter.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TypeFormatter.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -1,6 +1,5 @@ package com.arsdigita.camden.cms.contenttypes; -import com.arsdigita.persistence.DataAssociation; import com.arsdigita.xml.Formatter; /** Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutForm.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutForm.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutForm.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -18,11 +18,6 @@ */ package com.arsdigita.camden.cms.contenttypes.ui; -import java.util.Iterator; -import java.util.MissingResourceException; -import java.util.ResourceBundle; -import java.util.TreeMap; - import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.PageState; @@ -35,7 +30,6 @@ 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.parameters.TrimmedStringParameter; import com.arsdigita.camden.cms.contenttypes.Consultation; import com.arsdigita.camden.cms.contenttypes.ConsultationUtil; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutStep.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutStep.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutStep.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -19,13 +19,11 @@ package com.arsdigita.camden.cms.contenttypes.ui; import java.util.Date; -import java.util.Locale; import com.arsdigita.bebop.Component; import com.arsdigita.bebop.PageState; import com.arsdigita.camden.cms.contenttypes.Consultation; import com.arsdigita.camden.cms.contenttypes.ConsultationUtil; -import com.arsdigita.camden.cms.contenttypes.TopicListFormatter; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; @@ -34,7 +32,6 @@ import com.arsdigita.cms.util.GlobalizationUtil; import com.arsdigita.domain.DomainObject; import com.arsdigita.globalization.GlobalizedMessage; -import com.arsdigita.kernel.Kernel; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet.AttributeFormatter; import com.arsdigita.xml.Formatter; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAlertConfirm.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAlertConfirm.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAlertConfirm.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -22,14 +22,12 @@ import java.util.Map; import com.arsdigita.bebop.Label; -import com.arsdigita.bebop.Page; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.event.PrintEvent; import com.arsdigita.bebop.event.PrintListener; import com.arsdigita.camden.cms.contenttypes.ConsultationAlert; import com.arsdigita.camden.cms.contenttypes.ConsultationUtil; import com.arsdigita.domain.DataObjectNotFoundException; -import com.arsdigita.web.ParameterMap; public class ConsultationAlertConfirm extends Label { Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationCreate.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationCreate.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationCreate.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -32,7 +32,6 @@ import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.Folder; import com.arsdigita.cms.ItemSelectionModel; -import com.arsdigita.cms.ui.authoring.ApplyWorkflowFormSection; import com.arsdigita.cms.ui.authoring.CreationSelector; import com.arsdigita.cms.ui.authoring.PageCreate; import com.arsdigita.util.Assert; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationHowForm.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationHowForm.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationHowForm.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -18,7 +18,6 @@ */ package com.arsdigita.camden.cms.contenttypes.ui; -import java.awt.Checkbox; import java.io.IOException; import java.math.BigDecimal; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationHowStep.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationHowStep.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationHowStep.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -18,8 +18,6 @@ */ package com.arsdigita.camden.cms.contenttypes.ui; -import java.util.Locale; - import com.arsdigita.bebop.Component; import com.arsdigita.bebop.PageState; import com.arsdigita.camden.cms.contenttypes.Consultation; @@ -33,8 +31,6 @@ import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; import com.arsdigita.domain.DomainObject; -import com.arsdigita.globalization.GlobalizedMessage; -import com.arsdigita.kernel.Kernel; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet.AttributeFormatter; import com.arsdigita.web.URL; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationPropertiesForm.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationPropertiesForm.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationPropertiesForm.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -18,18 +18,12 @@ */ package com.arsdigita.camden.cms.contenttypes.ui; -import java.math.BigDecimal; - -import org.apache.log4j.Logger; - import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.event.FormInitListener; import com.arsdigita.bebop.event.FormProcessListener; import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.event.FormSubmissionListener; import com.arsdigita.camden.cms.contenttypes.Consultation; -import com.arsdigita.camden.cms.contenttypes.ConsultationUtil; -import com.arsdigita.categorization.Category; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.BasicPageForm; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationResultsForm.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationResultsForm.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationResultsForm.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -20,9 +20,6 @@ import java.io.IOException; import java.math.BigDecimal; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; import com.arsdigita.bebop.Container; import com.arsdigita.bebop.FormData; @@ -36,7 +33,6 @@ import com.arsdigita.bebop.form.CheckboxGroup; import com.arsdigita.bebop.form.DHTMLEditor; import com.arsdigita.bebop.form.Option; -import com.arsdigita.bebop.form.SingleSelect; import com.arsdigita.bebop.parameters.TrimmedStringParameter; import com.arsdigita.camden.cms.contenttypes.Consultation; import com.arsdigita.camden.cms.contenttypes.ConsultationUtil; @@ -46,7 +42,6 @@ import com.arsdigita.cms.ui.FileUploadSection; import com.arsdigita.cms.ui.authoring.BasicItemForm; import com.arsdigita.globalization.GlobalizedMessage; -import com.arsdigita.kernel.Kernel; /** * CMS authoring form for the Camden Consultations content type. Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationWhoForm.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationWhoForm.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationWhoForm.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -18,12 +18,6 @@ */ package com.arsdigita.camden.cms.contenttypes.ui; -import java.util.Iterator; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; -import java.util.TreeMap; - import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.PageState; @@ -31,16 +25,11 @@ import com.arsdigita.bebop.event.FormProcessListener; import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.event.FormSubmissionListener; -import com.arsdigita.bebop.form.DHTMLEditor; import com.arsdigita.bebop.form.MultipleSelect; -import com.arsdigita.bebop.form.Option; -import com.arsdigita.bebop.form.SingleSelect; -import com.arsdigita.bebop.parameters.TrimmedStringParameter; import com.arsdigita.camden.cms.contenttypes.Consultation; import com.arsdigita.camden.cms.contenttypes.ConsultationUtil; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.BasicItemForm; -import com.arsdigita.kernel.Kernel; public class ConsultationWhoForm extends BasicItemForm implements FormProcessListener, FormInitListener, FormSubmissionListener { Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationWhoStep.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationWhoStep.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationWhoStep.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -28,7 +28,6 @@ import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; import com.arsdigita.domain.DomainObject; -import com.arsdigita.globalization.GlobalizedMessage; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet.AttributeFormatter; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsFilter.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsFilter.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsFilter.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -18,21 +18,13 @@ */ package com.arsdigita.camden.cms.contenttypes.ui; -import java.util.Iterator; - import javax.servlet.ServletException; -import org.apache.log4j.Logger; - -import com.arsdigita.bebop.BaseLink; import com.arsdigita.bebop.Component; import com.arsdigita.bebop.ControlLink; import com.arsdigita.bebop.DimensionalNavbar; import com.arsdigita.bebop.Label; -import com.arsdigita.bebop.Page; import com.arsdigita.bebop.PageState; -import com.arsdigita.bebop.SimpleComponent; -import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.camden.cms.contenttypes.ConsultationUtil; import com.arsdigita.xml.Element; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsList.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsList.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsList.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -24,10 +24,8 @@ import com.arsdigita.camden.cms.contenttypes.Consultation; import com.arsdigita.globalization.GlobalizedMessage; import com.arsdigita.kernel.ACSObject; -import com.arsdigita.kernel.Kernel; import com.arsdigita.london.navigation.DataCollectionRenderer; import com.arsdigita.london.navigation.Navigation; -import com.arsdigita.london.navigation.cms.CMSDataCollectionDefinition; import com.arsdigita.london.navigation.ui.AbstractObjectList; import com.arsdigita.persistence.DataCollection; import com.arsdigita.persistence.DataObject; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsTable.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsTable.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationsTable.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -20,10 +20,6 @@ import java.math.BigDecimal; -import javax.servlet.ServletException; - -import org.apache.log4j.Logger; - import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.Link; @@ -37,8 +33,6 @@ import com.arsdigita.camden.cms.contenttypes.ConsultationUtil; import com.arsdigita.cms.ContentItem; import com.arsdigita.cms.ContentPage; -import com.arsdigita.cms.ui.authoring.ItemCategorySummary; -import com.arsdigita.db.DbHelper; import com.arsdigita.london.navigation.Navigation; import com.arsdigita.persistence.DataQuery; import com.arsdigita.persistence.OID; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/admin/BulkDeletionConfirm.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/admin/BulkDeletionConfirm.java 2005-11-17 20:37:08 UTC (rev 999) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/admin/BulkDeletionConfirm.java 2005-11-17 22:01:16 UTC (rev 1000) @@ -1,15 +1,12 @@ package com.arsdigita.camden.cms.contenttypes.ui.admin; -import java.math.BigDecimal; import java.util.Map; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.event.PrintEvent; import com.arsdigita.bebop.event.PrintListener; -import com.arsdigita.camden.cms.contenttypes.ConsultationAlert; import com.arsdigita.camden.cms.contenttypes.ConsultationUtil; -import com.arsdigita.domain.DataObjectNotFoundException; public class BulkDeletionConfirm extends Label { |
Author: apevec Date: 2005-11-17 21:37:08 +0100 (Thu, 17 Nov 2005) New Revision: 999 Added: contrib/ccm-ldn-camden-consultation/trunk/sql/ccm-ldn-camden-consultation/upgrade/oracle-se-1.0.2-1.0.3.sql Modified: contrib/ccm-ldn-camden-consultation/trunk/application.xml contrib/ccm-ldn-camden-consultation/trunk/pdl/com/arsdigita/camden/cms/contenttypes/Consultation.pdl contrib/ccm-ldn-camden-consultation/trunk/pdl/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.pdl contrib/ccm-ldn-camden-consultation/trunk/src/ccm-ldn-camden-consultation.upgrade contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/Consultation.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationResources.properties contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationTextContentProvider.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/GeoAreaFormatter.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TargetFormatter.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TopicFormatter.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TypeFormatter.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutForm.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutStep.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationWhoForm.java contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationWhoStep.java Log: final version of Consultation CT: topic, consultationType, targetAudience and geoArea properties are migrated from 0..1 to 0..n Modified: contrib/ccm-ldn-camden-consultation/trunk/application.xml =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/application.xml 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/application.xml 2005-11-17 20:37:08 UTC (rev 999) @@ -2,7 +2,7 @@ <ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project" name="ccm-ldn-camden-consultation" prettyName="Red Hat CCM Content Types" - version="1.0.2" + version="1.0.3" release="1" webapp="ROOT"> <ccm:dependencies> Modified: contrib/ccm-ldn-camden-consultation/trunk/pdl/com/arsdigita/camden/cms/contenttypes/Consultation.pdl =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/pdl/com/arsdigita/camden/cms/contenttypes/Consultation.pdl 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/pdl/com/arsdigita/camden/cms/contenttypes/Consultation.pdl 2005-11-17 20:37:08 UTC (rev 999) @@ -25,14 +25,14 @@ String[0..1] purpose = cam_consultations.purpose CLOB; String[0..1] contact = cam_consultations.contact CLOB; - Integer[0..1] topic = cam_consultations.topic; - Integer[0..1] consultationType = cam_consultations.consultation_type; + String[0..1] topic = cam_consultations.topic; + String[0..1] consultationType = cam_consultations.consultation_type; Date[0..1] startDate = cam_consultations.start_date; Date[0..1] completionDate = cam_consultations.completion_date; Date[0..1] resultsDate = cam_consultations.results_date; Boolean[0..1] statutory = cam_consultations.statutory; - Integer[0..1] targetAudience = cam_consultations.target_audience; - Integer[0..1] geoArea = cam_consultations.geo_area; + String[0..1] targetAudience = cam_consultations.target_audience; + String[0..1] geoArea = cam_consultations.geo_area; String[0..1] methodology = cam_consultations.methodology CLOB; String[0..1] feedback = cam_consultations.feedback CLOB; Boolean[1..1] alertSent = cam_consultations.alert_sent; @@ -41,7 +41,7 @@ } association { - Consultation[0..1] methodologyConsultation = + Consultation[0..1] methodologyConsultation = join cms_files.file_id to cam_consult_method_file_map.file_id, join cam_consult_method_file_map.consultation_id @@ -55,7 +55,7 @@ } association { - Consultation[0..1] feedbackConsultation = + Consultation[0..1] feedbackConsultation = join cms_files.file_id to cam_consult_feedback_file_map.file_id, join cam_consult_feedback_file_map.consultation_id @@ -72,8 +72,8 @@ Consultation consultation; do { - select * - from + select * + from (select i.*, co.*, l.start_date_time, row_number() over (order by l.start_date_time desc) as rn from cam_consultations co, cms_items i, @@ -85,20 +85,20 @@ where rn <= :maxCount order by start_date_time desc } map { - consultation.id = consultation_id; - consultation.purpose = purpose; - consultation.contact = contact; - consultation.topic = topic; - consultation.consultationType = consultation_type; - consultation.startDate = start_date; - consultation.completionDate = completion_date; - consultation.resultsDate = results_date; - consultation.statutory = statutory; - consultation.targetAudience = target_audience; - consultation.geoArea = geo_area; - consultation.methodology = methodology; - consultation.feedback = feedback; - consultation.name = name; - consultation.type = type; + consultation.id = consultation_id; + consultation.purpose = purpose; + consultation.contact = contact; + consultation.topic = topic; + consultation.consultationType = consultation_type; + consultation.startDate = start_date; + consultation.completionDate = completion_date; + consultation.resultsDate = results_date; + consultation.statutory = statutory; + consultation.targetAudience = target_audience; + consultation.geoArea = geo_area; + consultation.methodology = methodology; + consultation.feedback = feedback; + consultation.name = name; + consultation.type = type; } } Modified: contrib/ccm-ldn-camden-consultation/trunk/pdl/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.pdl =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/pdl/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.pdl 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/pdl/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.pdl 2005-11-17 20:37:08 UTC (rev 999) @@ -22,13 +22,13 @@ import com.arsdigita.kernel.*; object type ConsultationAlert extends ACSObject { - String[0..1] firstNames = cam_consultation_alerts.first_names VARCHAR(100); - String[0..1] lastName = cam_consultation_alerts.last_name VARCHAR(100); - String[1..1] email = cam_consultation_alerts.email VARCHAR(100); - Date[1..1] creationDate = cam_consultation_alerts.creation_date; + String[0..1] firstNames = cam_consultation_alerts.first_names VARCHAR(100); + String[0..1] lastName = cam_consultation_alerts.last_name VARCHAR(100); + String[1..1] email = cam_consultation_alerts.email VARCHAR(100); + Date[1..1] creationDate = cam_consultation_alerts.creation_date; String[1..1] confirmationToken = cam_consultation_alerts.confirmation_token VARCHAR(100); String[1..1] cancellationToken = cam_consultation_alerts.cancellation_token VARCHAR(100); - Boolean[1..1] emailConfirmed = cam_consultation_alerts.email_confirmed; + Boolean[1..1] emailConfirmed = cam_consultation_alerts.email_confirmed; reference key (cam_consultation_alerts.alert_id); } @@ -37,14 +37,14 @@ BigDecimal id; String purpose; String contact; - Integer topic; - Integer consultationType; + String topic; + String consultationType; Date startDate; Date completionDate; Date resultsDate; Boolean statutory; - Integer targetAudience; - Integer geoArea; + String targetAudience; + String geoArea; String methodology; String feedback; String title; Added: contrib/ccm-ldn-camden-consultation/trunk/sql/ccm-ldn-camden-consultation/upgrade/oracle-se-1.0.2-1.0.3.sql =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/sql/ccm-ldn-camden-consultation/upgrade/oracle-se-1.0.2-1.0.3.sql 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/sql/ccm-ldn-camden-consultation/upgrade/oracle-se-1.0.2-1.0.3.sql 2005-11-17 20:37:08 UTC (rev 999) @@ -0,0 +1,21 @@ +-- upgrade 1.0.2 -> 1.0.3, final version +-- 0..n properties are encoded as a slash separated list of values +create table tmp_CAM_CONSULTATIONS +as select consultation_id, topic, consultation_type, target_audience, geo_area + from CAM_CONSULTATIONS; + +update CAM_CONSULTATIONS set topic=null, consultation_type=null, target_audience=null, geo_area=null; + +alter table CAM_CONSULTATIONS modify ( + topic varchar2(4000), + consultation_type varchar2(4000), + target_audience varchar2(4000), + geo_area varchar2(4000) +); + +update CAM_CONSULTATIONS set geo_area = (select to_char(geo_area) from tmp_CAM_CONSULTATIONS t where t.consultation_id = consultation_id); +update CAM_CONSULTATIONS set target_audience = (select to_char(target_audience) from tmp_CAM_CONSULTATIONS t where t.consultation_id = consultation_id); +update CAM_CONSULTATIONS set consultation_type = (select to_char(consultation_type) from tmp_CAM_CONSULTATIONS t where t.consultation_id = consultation_id); +update CAM_CONSULTATIONS set topic = (select to_char(topic) from tmp_CAM_CONSULTATIONS t where t.consultation_id = consultation_id); + +drop table tmp_CAM_CONSULTATIONS; Modified: contrib/ccm-ldn-camden-consultation/trunk/src/ccm-ldn-camden-consultation.upgrade =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/ccm-ldn-camden-consultation.upgrade 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/src/ccm-ldn-camden-consultation.upgrade 2005-11-17 20:37:08 UTC (rev 999) @@ -5,4 +5,7 @@ <version from="1.0.1" to="1.0.2"> <script sql="ccm-ldn-camden-consultation/upgrade/::database::-1.0.1-1.0.2.sql"/> </version> + <version from="1.0.2" to="1.0.3"> + <script sql="ccm-ldn-camden-consultation/upgrade/::database::-1.0.2-1.0.3.sql"/> + </version> </upgrade> Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/Consultation.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/Consultation.java 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/Consultation.java 2005-11-17 20:37:08 UTC (rev 999) @@ -20,6 +20,9 @@ import java.math.BigDecimal; import java.util.Date; +import java.util.LinkedList; +import java.util.List; +import java.util.StringTokenizer; import org.apache.log4j.Logger; @@ -33,9 +36,13 @@ import com.arsdigita.globalization.GlobalizedMessage; import com.arsdigita.kernel.ACSObject; import com.arsdigita.kernel.permissions.PermissionService; +import com.arsdigita.persistence.DataAssociation; +import com.arsdigita.persistence.DataAssociationCursor; import com.arsdigita.persistence.DataCollection; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.OID; +import com.arsdigita.persistence.Session; +import com.arsdigita.persistence.SessionManager; import com.arsdigita.persistence.metadata.Property; import com.arsdigita.util.StringUtils; @@ -74,6 +81,8 @@ public static final String FEEDBACK_DOCUMENTS = "feedbackDocuments"; public static final String ALERT_SENT = "alertSent"; + private static final String SEPARATOR = "/"; + private boolean m_wasNew = true; public Consultation() { @@ -122,44 +131,120 @@ set(CONTACT, value); } - public Integer getTopic() { - return (Integer) get(TOPIC); - } - - public GlobalizedMessage getPrettyTopic() { - Integer i = getTopic(); - if (i == null) + public String[] getTopic() { + String value = (String) get(TOPIC); + if (value == null) { return null; - - return ConsultationUtil.globalize("topicOption" + i); + } + List topics = new LinkedList(); + StringTokenizer tok = new StringTokenizer(value,SEPARATOR); + while (tok.hasMoreTokens()) { + String topic = tok.nextToken(); + Integer.valueOf(topic); // integer check + topics.add(topic); + } + return (String[]) topics.toArray(new String[0]); } - public static GlobalizedMessage getPrettyTopic(Integer i) { + public String getPrettyTopic() { + return internalGetPrettyTopics((String) get(TOPIC)); + } + + public static String internalGetPrettyTopics(String value) { + if (value == null) { + return " "; + } + StringTokenizer tok = new StringTokenizer(value,SEPARATOR); + if (tok.hasMoreTokens()) { + StringBuffer topics = new StringBuffer(); + topics.append(Consultation.getPrettyTopic(Integer.valueOf(tok.nextToken())).localize()); + while (tok.hasMoreTokens()) { + topics.append(',').append(Consultation.getPrettyTopic(Integer.valueOf(tok.nextToken())).localize()); + } + return topics.toString(); + } else { + return " "; + } + } + + private static GlobalizedMessage getPrettyTopic(Integer i) { return ConsultationUtil.globalize("topicOption" + i); } - public void setTopic(Integer value) { - set(TOPIC, value); + public void setTopic(String[] topics) { + if (topics == null || topics.length == 0) { + set(TOPIC, null); + return; + } + StringBuffer value = new StringBuffer(); + int n=topics.length-1; + for (int i=0; i<n; i++) { + String topic = topics[i]; + Integer.valueOf(topic); // integer check + value.append(topic).append(SEPARATOR); + } + String topic = topics[n]; + Integer.valueOf(topic); // integer check + value.append(topic); + set(TOPIC,value.toString()); } - - public Integer getConsultationType() { - return (Integer) get(CONSULTATION_TYPE); + + public String[] getConsultationType() { + String value = (String) get(CONSULTATION_TYPE); + if (value == null) { + return null; + } + List types = new LinkedList(); + StringTokenizer tok = new StringTokenizer(value,SEPARATOR); + while (tok.hasMoreTokens()) { + String type = tok.nextToken(); + Integer.valueOf(type); // integer check + types.add(type); + } + return (String[]) types.toArray(new String[0]); } - public GlobalizedMessage getPrettyType() { - Integer i = getConsultationType(); - if (i == null) - return null; - - return ConsultationUtil.globalize("typeOption" + i); + public String getPrettyType() { + return internalGetPrettyTypes((String) get(CONSULTATION_TYPE)); } - public static GlobalizedMessage getPrettyType(Integer i) { + public static String internalGetPrettyTypes(String value) { + if (value == null) { + return " "; + } + StringTokenizer tok = new StringTokenizer(value,SEPARATOR); + if (tok.hasMoreTokens()) { + StringBuffer types = new StringBuffer(); + types.append(Consultation.getPrettyType(Integer.valueOf(tok.nextToken())).localize()); + while (tok.hasMoreTokens()) { + types.append(',').append(Consultation.getPrettyType(Integer.valueOf(tok.nextToken())).localize()); + } + return types.toString(); + } else { + return " "; + } + } + + private static GlobalizedMessage getPrettyType(Integer i) { return ConsultationUtil.globalize("typeOption" + i); } - public void setConsultationType(Integer value) { - set(CONSULTATION_TYPE, value); + public void setConsultationType(String[] types) { + if (types == null || types.length == 0) { + set(CONSULTATION_TYPE, null); + return; + } + StringBuffer value = new StringBuffer(); + int n=types.length-1; + for (int i=0; i<n; i++) { + String type = types[i]; + Integer.valueOf(type); // integer check + value.append(type).append(SEPARATOR); + } + String type = types[n]; + Integer.valueOf(type); // integer check + value.append(type); + set(CONSULTATION_TYPE,value.toString()); } public Date getStartDate() { @@ -206,44 +291,120 @@ set(ALERT_SENT, value); } - public Integer getTargetAudience() { - return (Integer) get(TARGET_AUDIENCE); + public String[] getTargetAudience() { + String value = (String) get(TARGET_AUDIENCE); + if (value == null) { + return null; + } + List targets = new LinkedList(); + StringTokenizer tok = new StringTokenizer(value,SEPARATOR); + while (tok.hasMoreTokens()) { + String target = tok.nextToken(); + Integer.valueOf(target); // integer check + targets.add(target); + } + return (String[]) targets.toArray(new String[0]); } - public GlobalizedMessage getPrettyTarget() { - Integer i = getTargetAudience(); - if (i == null) - return null; - - return ConsultationUtil.globalize("targetOption" + i); + public String getPrettyTarget() { + return internalGetPrettyTargets((String) get(TARGET_AUDIENCE)); } + + public static String internalGetPrettyTargets(String value) { + if (value == null) { + return " "; + } + StringTokenizer tok = new StringTokenizer(value,SEPARATOR); + if (tok.hasMoreTokens()) { + StringBuffer targets = new StringBuffer(); + targets.append(Consultation.getPrettyTarget(Integer.valueOf(tok.nextToken())).localize()); + while (tok.hasMoreTokens()) { + targets.append(',').append(Consultation.getPrettyTarget(Integer.valueOf(tok.nextToken())).localize()); + } + return targets.toString(); + } else { + return " "; + } + } - public static GlobalizedMessage getPrettyTarget(Integer i) { + private static GlobalizedMessage getPrettyTarget(Integer i) { return ConsultationUtil.globalize("targetOption" + i); } - public void setTargetAudience(Integer value) { - set(TARGET_AUDIENCE, value); + public void setTargetAudience(String[] targets) { + if (targets == null || targets.length == 0) { + set(TARGET_AUDIENCE, null); + return; + } + StringBuffer value = new StringBuffer(); + int n=targets.length-1; + for (int i=0; i<n; i++) { + String target = targets[i]; + Integer.valueOf(target); // integer check + value.append(target).append(SEPARATOR); + } + String target = targets[n]; + Integer.valueOf(target); // integer check + value.append(target); + set(TARGET_AUDIENCE,value.toString()); } - public Integer getGeoArea() { - return (Integer) get(GEO_AREA); + public String[] getGeoArea() { + String value = (String) get(GEO_AREA); + if (value == null) { + return null; + } + List geos = new LinkedList(); + StringTokenizer tok = new StringTokenizer(value,SEPARATOR); + while (tok.hasMoreTokens()) { + String geo = tok.nextToken(); + Integer.valueOf(geo); // integer check + geos.add(geo); + } + return (String[]) geos.toArray(new String[0]); } - public GlobalizedMessage getPrettyGeoArea() { - Integer i = getGeoArea(); - if (i == null) - return null; - - return ConsultationUtil.globalize("geoOption" + i); + public String getPrettyGeoArea() { + return internalGetPrettyGeoAreas((String) get(GEO_AREA)); } + + public static String internalGetPrettyGeoAreas(String value) { + if (value == null) { + return " "; + } + StringTokenizer tok = new StringTokenizer(value,SEPARATOR); + if (tok.hasMoreTokens()) { + StringBuffer geos = new StringBuffer(); + geos.append(Consultation.getPrettyGeoArea(Integer.valueOf(tok.nextToken())).localize()); + while (tok.hasMoreTokens()) { + geos.append(',').append(Consultation.getPrettyGeoArea(Integer.valueOf(tok.nextToken())).localize()); + } + return geos.toString(); + } else { + return " "; + } + } - public static GlobalizedMessage getPrettyGeoArea(Integer i) { + private static GlobalizedMessage getPrettyGeoArea(Integer i) { return ConsultationUtil.globalize("geoOption" + i); } - public void setGeoArea(Integer value) { - set(GEO_AREA, value); + public void setGeoArea(String[] geoAreas) { + if (geoAreas == null || geoAreas.length == 0) { + set(GEO_AREA, null); + return; + } + StringBuffer value = new StringBuffer(); + int n=geoAreas.length-1; + for (int i=0; i<n; i++) { + String geoArea = geoAreas[i]; + Integer.valueOf(geoArea); // integer check + value.append(geoArea).append(SEPARATOR); + } + String geoArea = geoAreas[n]; + Integer.valueOf(geoArea); // integer check + value.append(geoArea); + set(GEO_AREA,value.toString()); } public String getMethodology() { Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.java 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationAlert.java 2005-11-17 20:37:08 UTC (rev 999) @@ -3,7 +3,9 @@ import java.lang.reflect.Array; import java.math.BigDecimal; import java.security.GeneralSecurityException; +import java.util.Collection; import java.util.Date; +import java.util.LinkedList; import java.util.Locale; import javax.mail.MessagingException; @@ -298,9 +300,8 @@ Formatter dateFormatter = new DateFormatter(); String itemList = ""; - BigDecimal[] itemIDs = - (BigDecimal[])Array.newInstance(BigDecimal.class, (int)items.size()); - int i = 0; + Collection itemIDs = new LinkedList(); + while (items.next()) { String title = (String)items.get(Consultation.TITLE); String purpose = StringUtils.htmlToText((String)items.get(Consultation.PURPOSE)); @@ -311,30 +312,11 @@ siteURL + Navigation.redirectURL(new OID(Consultation.BASE_DATA_OBJECT_TYPE, id)); - Integer topicId = (Integer)items.get(Consultation.TOPIC); - String topic = null; - if (topicId != null) - topic = - (String)Consultation.getPrettyTopic(topicId).localize(locale); + String topic = Consultation.internalGetPrettyTopics((String)items.get(Consultation.TOPIC)); + String consultationType = Consultation.internalGetPrettyTypes((String)items.get(Consultation.CONSULTATION_TYPE)); + String targetAudience = Consultation.internalGetPrettyTargets((String)items.get(Consultation.TARGET_AUDIENCE)); + String geoArea = Consultation.internalGetPrettyGeoAreas((String)items.get(Consultation.GEO_AREA)); - Integer typeId = (Integer)items.get(Consultation.CONSULTATION_TYPE); - String consultationType = null; - if (typeId != null) - consultationType = - (String)Consultation.getPrettyType(typeId).localize(locale); - - Integer targetId = (Integer)items.get(Consultation.TARGET_AUDIENCE); - String targetAudience = null; - if (targetId != null) - targetAudience = - (String)Consultation.getPrettyTarget(targetId).localize(locale); - - Integer geoId = (Integer)items.get(Consultation.GEO_AREA); - String geoArea = null; - if (geoId != null) - geoArea = - (String)Consultation.getPrettyGeoArea(geoId).localize(locale); - Date startDateDate = (Date)items.get(Consultation.START_DATE); String startDate = null; if (startDateDate != null) @@ -404,7 +386,7 @@ itemList += "\n"; - itemIDs[i++] = id; + itemIDs.add(id); } DataCollection alerts = dbSession.retrieve(BASE_DATA_OBJECT_TYPE); Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationResources.properties =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationResources.properties 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationResources.properties 2005-11-17 20:37:08 UTC (rev 999) @@ -24,14 +24,45 @@ topic=Topic topicOption0=Culture -topicOption1=Environmental Health -topicOption2=Equalities/Diversity +#OLD topicOption1=Environmental Health +topicOption1=Environmental health and consumer protection +#OLD topicOption2=Equalities/Diversity +topicOption2=Equalities/diversity topicOption3=Health -topicOption4=Housing Needs -topicOption5=Leisure Centres +#OLD topicOption4=Housing Needs +topicOption4=Housing +#OLD topicOption5=Leisure Centres +topicOption5=Leisure centres topicOption6=Libraries topicOption7=Planning -topicOption8=Services For Children +#OLD topicOption8=Services For Children +topicOption8=Social care +# NEW from IT 83236 +topicOption9=Anti-social behaviour +topicOption10=Business and the local economy +topicOption11=Children and young people +topicOption12=Communications +topicOption13=Community leadership +topicOption14=Council tax and business rates +topicOption15=Crime and community safety +#Culture +topicOption16=Drugs +topicOption17=Education +#Environmental health and consumer protection +#Equalities/diversity +#Health +#Housing +#Leisure centres +#Libraries +topicOption18=Parking +topicOption19=Parks +#Planning +topicOption20=Quality of life +topicOption21=Quality of the environment +#Social care +topicOption22=Transport +topicOption23=Voluntary sector +topicOption24=Waste Management type=Type typeOption0=Online Questionnaire @@ -40,21 +71,56 @@ typeOption3=Meeting target_audience=Target Audience -targetOption0=Citizens Panel Members -targetOption1=Community/Voluntary Groups -targetOption2=Council Staff -targetOption3=Disabled People -targetOption4=Non-Service Users +#OLD targetOption0=Citizens Panel Members +targetOption0=Citizens panel members +#OLD targetOption1=Community/Voluntary Groups +targetOption1=Community/voluntary groups +#OLD targetOption2=Council Staff +targetOption2=Council staff +#OLD targetOption3=Disabled People +targetOption3=Disabled people +#OLD targetOption4=Non-Service Users +targetOption4=Non-service users targetOption5=Residents -targetOption6=Schools - Parents -targetOption7=Schools - School Staff -targetOption8=Service Users -targetOption9=Specific Black Or Ethnic Minority Group +#OLD targetOption6=Schools - Parents +targetOption6=Parents +#OLD targetOption7=Schools - School Staff +targetOption7=School staff +#OLD targetOption8=Service Users +targetOption8=Service users +#OLD targetOption9=Specific Black Or Ethnic Minority Group +targetOption9=Black and minority ethnic groups +# NEW from IT 83236 +targetOption10=Businesses +targetOption11=Carers +targetOption12=Children +#Citizens panel members +#Community/voluntary groups +#Council staff +targetOption13=Councillors +#Disabled people +targetOption14=Faith communities +targetOption15=Health service users +targetOption16=Lesbian, gay, bisexual and transgender groups +targetOption17=Landlords +targetOption18=Leaseholders +#Non-service users +targetOption19=Older people +targetOption20=Other local service providers +#Parents +targetOption21=Police +targetOption22=Pupils +targetOption23=Residents +#School staff +#Service users +targetOption24=Council tenants +targetOption25=Young people geo_area=Geographical Area geoOption0=Hampstead Town geoOption1=Highgate -geoOption2=Frognal & Fitzjohns +#geoOption2=Frognal & Fitzjohns +geoOption2=Frognal and Fitzjohns geoOption3=Fortune Green geoOption4=West Hampstead geoOption5=Kilburn @@ -66,10 +132,25 @@ geoOption11=Haverstock geoOption12=Camden Town with Primrose Hill geoOption13=Regents Park -geoOption14=St Pancras & Somers Town +#geoOption14=St Pancras & Somers Town +geoOption14=St Pancras and Somers Town geoOption15=Kings Cross -geoOption17=Bloomsbury -geoOption18=Holborn & Covent Garden +geoOption16=Bloomsbury +#geoOption17=Holborn & Covent Garden +geoOption17=Holborn and Covent Garden +# NEW from IT 83236 +geoOption18=Camden-wide +#------------------------------------------- +geoOption19=Adelaide NRA +geoOption20=Camden Central NRA +geoOption21=Caversham NRA +geoOption22=Covent Garden NRA +geoOption23=Gospel Oak NRA +geoOption24=Highgate NRA +geoOption25=Holborn NRA +geoOption26=Kilburn NRA +geoOption27=Kings Cross NRA +geoOption28=West Euston NRA methodology=Methodology methodology_documents=Methodology Documents Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationTextContentProvider.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationTextContentProvider.java 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ConsultationTextContentProvider.java 2005-11-17 20:37:08 UTC (rev 999) @@ -59,7 +59,7 @@ private StringBuffer m_text; public ConsultationTextRenderer() { - m_text = new StringBuffer(""); + m_text = new StringBuffer(); } public String getText() { @@ -105,27 +105,22 @@ if ("/object".equals(path)) { String propertyName = property.getName(); - if ("consultationType".equals(propertyName)) - m_text.append(" " - + Consultation.getPrettyType( - (Integer) value).localize(locale)); + m_text.append(Consultation.internalGetPrettyTypes( + (String) value)); else if ("topic".equals(propertyName)) - m_text.append(" " - + Consultation.getPrettyTopic( - (Integer) value).localize(locale)); + m_text.append(Consultation.internalGetPrettyTopics( + (String) value)); else if ("geoArea".equals(propertyName)) - m_text.append(" " - + Consultation.getPrettyGeoArea( - (Integer) value).localize(locale)); + m_text.append(Consultation.internalGetPrettyGeoAreas( + (String) value)); else if ("targetAudience".equals(propertyName)) - m_text.append(" " - + Consultation.getPrettyTarget( - (Integer) value).localize(locale)); + m_text.append(Consultation.internalGetPrettyTargets( + (String) value)); else - m_text.append(" " + value); + m_text.append(' ').append(value); } else - m_text.append(" " + value); + m_text.append(' ').append(value); } } } @@ -162,7 +157,7 @@ private void appendTextAsset(TextAsset asset) { String content = asset.getText(); if (content != null) { - m_text.append(" " + StringUtils.htmlToText(content)); + m_text.append(' ').append(StringUtils.htmlToText(content)); } } @@ -184,7 +179,7 @@ s_log.debug("Converted file is: " + converted); } - m_text.append(" ").append(converted); + m_text.append(' ').append(converted); } catch (ConversionException e) { s_log.error("Error converting FileAsset " + asset.getOID() + " with MimeType " + asset.getMimeType(), e); Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/GeoAreaFormatter.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/GeoAreaFormatter.java 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/GeoAreaFormatter.java 2005-11-17 20:37:08 UTC (rev 999) @@ -1,5 +1,6 @@ package com.arsdigita.camden.cms.contenttypes; +import com.arsdigita.persistence.DataAssociation; import com.arsdigita.xml.Formatter; /** @@ -16,7 +17,7 @@ if (value == null) return ""; - return (String)Consultation.getPrettyGeoArea((Integer)value).localize(); + return Consultation.internalGetPrettyGeoAreas((String) value); } } Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TargetFormatter.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TargetFormatter.java 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TargetFormatter.java 2005-11-17 20:37:08 UTC (rev 999) @@ -1,5 +1,6 @@ package com.arsdigita.camden.cms.contenttypes; +import com.arsdigita.persistence.DataAssociation; import com.arsdigita.xml.Formatter; /** @@ -16,7 +17,7 @@ if (value == null) return ""; - return (String)Consultation.getPrettyTarget((Integer)value).localize(); + return Consultation.internalGetPrettyTargets((String) value); } } Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TopicFormatter.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TopicFormatter.java 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TopicFormatter.java 2005-11-17 20:37:08 UTC (rev 999) @@ -1,5 +1,6 @@ package com.arsdigita.camden.cms.contenttypes; +import com.arsdigita.persistence.DataAssociation; import com.arsdigita.xml.Formatter; /** @@ -16,7 +17,8 @@ if (value == null) return ""; - return (String)Consultation.getPrettyTopic((Integer)value).localize(); + return Consultation.internalGetPrettyTopics((String) value); + } } Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TypeFormatter.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TypeFormatter.java 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/TypeFormatter.java 2005-11-17 20:37:08 UTC (rev 999) @@ -1,5 +1,6 @@ package com.arsdigita.camden.cms.contenttypes; +import com.arsdigita.persistence.DataAssociation; import com.arsdigita.xml.Formatter; /** @@ -16,7 +17,7 @@ if (value == null) return ""; - return (String)Consultation.getPrettyType((Integer)value).localize(); + return Consultation.internalGetPrettyTypes((String) value); } } Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutForm.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutForm.java 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutForm.java 2005-11-17 20:37:08 UTC (rev 999) @@ -33,6 +33,7 @@ import com.arsdigita.bebop.form.CheckboxGroup; import com.arsdigita.bebop.form.DHTMLEditor; 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.parameters.TrimmedStringParameter; @@ -53,8 +54,8 @@ private final static String ID = "FORM_ABOUT"; private ConsultationAboutStep m_step; - private SingleSelect m_topicWidget; - private SingleSelect m_typeWidget; + private MultipleSelect m_topicWidget; + private MultipleSelect m_typeWidget; /** * Creates a new form to edit the Consultation object specified @@ -88,28 +89,23 @@ consultation.setPurpose(data.getString(Consultation.PURPOSE)); consultation.setContact(data.getString(Consultation.CONTACT)); - Integer i = null; - String s = data.getString(Consultation.TOPIC); - if (!"".equals(s)) - i = new Integer(s); - consultation.setTopic(i); + String[] values = (String[]) data.get(Consultation.TOPIC); + consultation.setTopic(values); - i = null; - s = data.getString(Consultation.CONSULTATION_TYPE); - if (!"".equals(s)) - i = new Integer(s); - consultation.setConsultationType(i); + values = (String[]) data.get(Consultation.CONSULTATION_TYPE); + consultation.setConsultationType(values); consultation.setStartDate(data.getDate(Consultation.START_DATE)); consultation.setCompletionDate(data.getDate(Consultation.COMPLETION_DATE)); consultation.setResultsDate(data.getDate(Consultation.RESULTS_DATE)); - String[] statutoryValues = (String[])data.get(Consultation.STATUTORY); + values = (String[])data.get(Consultation.STATUTORY); Boolean statutory = Boolean.FALSE; - if (statutoryValues != null && - statutoryValues.length > 0 && - "1".equals(statutoryValues[0])) + if (values != null && + values.length > 0 && + "1".equals(values[0])) statutory = Boolean.TRUE; consultation.setStatutory(statutory); + consultation.save(); if (m_step != null) @@ -157,18 +153,12 @@ contactWidget.setRows(10); add(contactWidget); - Label labelNone = - new Label(ConsultationUtil.globalize("option_none")); - Option optionNone = new Option("", labelNone); - add(new Label(ConsultationUtil.globalize("topic"))); - m_topicWidget = new SingleSelect(Consultation.TOPIC); - m_topicWidget.addOption(optionNone); + m_topicWidget = new MultipleSelect(Consultation.TOPIC); add(m_topicWidget); add(new Label(ConsultationUtil.globalize("type"))); - m_typeWidget = new SingleSelect(Consultation.CONSULTATION_TYPE); - m_typeWidget.addOption(optionNone); + m_typeWidget = new MultipleSelect(Consultation.CONSULTATION_TYPE); add(m_typeWidget); add(new Label(ConsultationUtil.globalize("start_date"))); Modified: contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutStep.java =================================================================== --- contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutStep.java 2005-11-15 22:33:41 UTC (rev 998) +++ contrib/ccm-ldn-camden-consultation/trunk/src/com/arsdigita/camden/cms/contenttypes/ui/ConsultationAboutStep.java 2005-11-17 20:37:08 UTC (rev 999) @@ -25,6 +25,7 @@ import com.arsdigita.bebop.PageState; import com.arsdigita.camden.cms.contenttypes.Consultation; import com.arsdigita.camden.cms.contenttypes.ConsultationUtil; +import com.arsdigita.camden.cms.contenttypes.TopicListFormatter; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicItemForm; @@ -49,7 +50,7 @@ /** The name of the editing sheet added to this step */ public static String EDIT_SHEET_NAME = "SHEET_ABOUT"; - + public ConsultationAboutStep(ItemSelectionModel itemModel, AuthoringKitWizard parent) { super( itemModel, parent ); @@ -82,24 +83,16 @@ sheet.add(ConsultationUtil.globalize("contact"), Consultation.CONTACT); sheet.add(ConsultationUtil.globalize("topic"), Consultation.TOPIC, - new AttributeFormatter() { - public String format(DomainObject obj, String attribute, PageState state) { .. |
Author: sskracic Date: 2005-11-15 23:33:41 +0100 (Tue, 15 Nov 2005) New Revision: 998 Modified: releases/1.0.3/ccm-cms/application.xml releases/1.0.3/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchWidget.java releases/1.0.3/ccm-core/application.xml releases/1.0.3/ccm-core/src/com/arsdigita/bebop/BaseLink.java releases/1.0.3/ccm-core/src/com/arsdigita/bebop/form/Submit.java releases/1.0.3/ccm-core/web/packages/acs-admin/xsl/split-panel.xsl releases/1.0.3/ccm-core/web/packages/bebop/xsl/FormWidget.xsl releases/1.0.3/ccm-core/web/packages/bebop/xsl/Link.xsl releases/1.0.3/ccm-core/web/packages/bebop/xsl/Widget.xsl Log: Integrated r996 from trunk: DCP code now preserves onClick attribute if exists. Modified: releases/1.0.3/ccm-cms/application.xml =================================================================== --- releases/1.0.3/ccm-cms/application.xml 2005-11-15 22:28:53 UTC (rev 997) +++ releases/1.0.3/ccm-cms/application.xml 2005-11-15 22:33:41 UTC (rev 998) @@ -3,7 +3,7 @@ name="ccm-cms" prettyName="Red Hat CCM Content Management System" version="6.2.0" - release="6" + release="7" webapp="ROOT"> <ccm:dependencies> <ccm:requires name="ccm-core" version="6.2.0" relation="ge"/> Modified: releases/1.0.3/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchWidget.java =================================================================== --- releases/1.0.3/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchWidget.java 2005-11-15 22:28:53 UTC (rev 997) +++ releases/1.0.3/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchWidget.java 2005-11-15 22:33:41 UTC (rev 998) @@ -91,7 +91,6 @@ ItemSearchWidget parent, ContentType contentType) { super(name, "Search"); - this.avoidDoubleClick(false); this.parent = parent; this.contentType = contentType; this.setAttribute("onClick", "return " + parent.m_item.getName().replace('.','_') + "Popup(this.form)"); @@ -112,7 +111,6 @@ public ClearFragment(String name, ItemSearchWidget parent) { super(name, "Clear"); - this.avoidDoubleClick(false); this.parent = parent; this.setAttribute("onClick", "this.form." + parent.m_item.getName() + ".value = \"\"; return false;"); this.setAttribute("value", "Clear"); Modified: releases/1.0.3/ccm-core/application.xml =================================================================== --- releases/1.0.3/ccm-core/application.xml 2005-11-15 22:28:53 UTC (rev 997) +++ releases/1.0.3/ccm-core/application.xml 2005-11-15 22:33:41 UTC (rev 998) @@ -3,7 +3,7 @@ name="ccm-core" prettyName="Core" version="6.2.0" - release="3" + release="4" webapp="ROOT" buildHooks="build-hooks.xml"> <ccm:dependencies> Modified: releases/1.0.3/ccm-core/src/com/arsdigita/bebop/BaseLink.java =================================================================== --- releases/1.0.3/ccm-core/src/com/arsdigita/bebop/BaseLink.java 2005-11-15 22:28:53 UTC (rev 997) +++ releases/1.0.3/ccm-core/src/com/arsdigita/bebop/BaseLink.java 2005-11-15 22:33:41 UTC (rev 998) @@ -321,7 +321,8 @@ protected void generateExtraXMLAttributes(PageState state, Element link) {} /** - * Sets onClick event. Not for confirmation messages; Should call setConfirmation for that. + * Sets onClick event and <em>disables the javascript-based double-click protection for this link</em>. + * Not for confirmation messages; Should call setConfirmation for that. * * @param value * @pre value.toLowerCase().startsWith("return confirm(") == false Modified: releases/1.0.3/ccm-core/src/com/arsdigita/bebop/form/Submit.java =================================================================== --- releases/1.0.3/ccm-core/src/com/arsdigita/bebop/form/Submit.java 2005-11-15 22:28:53 UTC (rev 997) +++ releases/1.0.3/ccm-core/src/com/arsdigita/bebop/form/Submit.java 2005-11-15 22:33:41 UTC (rev 998) @@ -45,7 +45,6 @@ public static final String versionId = "$Id$ by $Author$, $DateTime: $"; - private boolean m_noDoubleClick = true; private GlobalizedMessage m_buttonLabel; /** @@ -124,10 +123,13 @@ * onClick field to try to prevent doubleclicks. * * @param avoid true to avoid doubleclicks, false otherwise. + * @deprecated use configuration parameter waf.bebop.dcp_message + * to enable/disable double-click protection globally. + * In case you want to disable DCP on per-widget basis, + * use {@link #setOnClick(String)}. + * @see #setOnClick(String) */ public void avoidDoubleClick ( boolean avoid ) { - Assert.assertNotLocked(this); - m_noDoubleClick = avoid; } /** @@ -213,20 +215,6 @@ return (ps != null) && (p.getValue() != null); } - public void lock() { - if ( m_noDoubleClick ) { - StringBuffer sb = new StringBuffer(); - if (getOnClick() != null) { - sb.append(getOnClick()) - .append(" "); - } - sb.append("if(this.value == '") - .append(getAttribute("value")) - .append("') { this.value = 'Please Wait'; this.form.submit(); } "); - setOnClick(sb.toString()); - } - super.lock(); - } /** * Set the HTML size attribute of this widget. @@ -238,8 +226,9 @@ } /** - * Set the onclick parameter. lock() will append to that String. - * + * Sets the onclick parameter and <em>disables the Javascript-based double-click protection</em> + * for this widget. + * This is the preferred method to disable double-click protection on per-widget basis. * @param command The JavaScript to execute when the button is clicked. */ public void setOnClick(String command) { Modified: releases/1.0.3/ccm-core/web/packages/acs-admin/xsl/split-panel.xsl =================================================================== --- releases/1.0.3/ccm-core/web/packages/acs-admin/xsl/split-panel.xsl 2005-11-15 22:28:53 UTC (rev 997) +++ releases/1.0.3/ccm-core/web/packages/acs-admin/xsl/split-panel.xsl 2005-11-15 22:33:41 UTC (rev 998) @@ -160,8 +160,13 @@ <!-- pads the label of the submit buttons --> <xsl:template match="bebop:formWidget[@type='submit']"> - <input value="   {@value}   " onclick="dcp_hide(this.form);"> - <xsl:for-each select="@*[name() != 'value' and name() != 'onclick']"> + <input value="   {@value}   "> + <xsl:if test="boolean(@onclick) = false()"> + <xsl:attribute name="onclick"> + <xsl:value-of select="'dcp_hide(this.form);'"/> + </xsl:attribute> + </xsl:if> + <xsl:for-each select="@*[name() != 'value']"> <xsl:attribute name="{name()}"> <xsl:value-of select="."/> </xsl:attribute> Modified: releases/1.0.3/ccm-core/web/packages/bebop/xsl/FormWidget.xsl =================================================================== --- releases/1.0.3/ccm-core/web/packages/bebop/xsl/FormWidget.xsl 2005-11-15 22:28:53 UTC (rev 997) +++ releases/1.0.3/ccm-core/web/packages/bebop/xsl/FormWidget.xsl 2005-11-15 22:33:41 UTC (rev 998) @@ -16,14 +16,18 @@ <xsl:template match="bebop:formWidget[@type='submit']" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"> - <input onclick="dcp_hide(this.form);"> - <xsl:for-each select="@*[name() != 'onclick']"> - <xsl:attribute name="{name()}"> - <xsl:value-of select="."/> - </xsl:attribute> - </xsl:for-each> + <input> + <xsl:if test="boolean(@onclick) = false()"> + <xsl:attribute name="onclick"> + <xsl:value-of select="'dcp_hide(this.form);'"/> + </xsl:attribute> + </xsl:if> + <xsl:for-each select="@*"> + <xsl:attribute name="{name()}"> + <xsl:value-of select="."/> + </xsl:attribute> + </xsl:for-each> </input> </xsl:template> - </xsl:stylesheet> Modified: releases/1.0.3/ccm-core/web/packages/bebop/xsl/Link.xsl =================================================================== --- releases/1.0.3/ccm-core/web/packages/bebop/xsl/Link.xsl 2005-11-15 22:28:53 UTC (rev 997) +++ releases/1.0.3/ccm-core/web/packages/bebop/xsl/Link.xsl 2005-11-15 22:33:41 UTC (rev 998) @@ -14,8 +14,13 @@ </xsl:when> <xsl:otherwise> - <a onclick="dcp_hide(this);"> - <xsl:copy-of select="@*[name() != 'href_no_javascript' and name() != 'onclick']"/> + <a> + <xsl:if test="boolean(@onclick) = false()"> + <xsl:attribute name="onclick"> + <xsl:value-of select="'dcp_hide(this);'"/> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="@*[name() != 'href_no_javascript']"/> <xsl:apply-templates/> </a> </xsl:otherwise> @@ -37,8 +42,13 @@ </img> </a> <xsl:text> </xsl:text> - <a onclick="dcp_hide(this);"> - <xsl:copy-of select="@*[name() != 'href_no_javascript' and name() != 'onclick']"/> + <a> + <xsl:if test="boolean(@onclick) = false()"> + <xsl:attribute name="onclick"> + <xsl:value-of select="'dcp_hide(this);'"/> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="@*[name() != 'href_no_javascript']"/> <xsl:apply-templates/> </a> </xsl:otherwise> Modified: releases/1.0.3/ccm-core/web/packages/bebop/xsl/Widget.xsl =================================================================== --- releases/1.0.3/ccm-core/web/packages/bebop/xsl/Widget.xsl 2005-11-15 22:28:53 UTC (rev 997) +++ releases/1.0.3/ccm-core/web/packages/bebop/xsl/Widget.xsl 2005-11-15 22:33:41 UTC (rev 998) @@ -23,12 +23,17 @@ <xsl:template match="bebop:formWidget[@type='submit']" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"> - <input onclick="dcp_hide(this.form);"> - <xsl:for-each select="@*[name() != 'onclick']"> - <xsl:attribute name="{name()}"> - <xsl:value-of select="."/> - </xsl:attribute> - </xsl:for-each> + <input> + <xsl:if test="boolean(@onclick) = false()"> + <xsl:attribute name="onclick"> + <xsl:value-of select="'dcp_hide(this.form);'"/> + </xsl:attribute> + </xsl:if> + <xsl:for-each select="@*"> + <xsl:attribute name="{name()}"> + <xsl:value-of select="."/> + </xsl:attribute> + </xsl:for-each> </input> </xsl:template> |
From: <ssk...@vh...> - 2005-11-15 22:30:23
|
Author: sskracic Date: 2005-11-15 23:28:53 +0100 (Tue, 15 Nov 2005) New Revision: 997 Modified: trunk/ccm-cms/application.xml trunk/ccm-core/application.xml Log: Bumped release numbers for core and cms due to DCP fix. Modified: trunk/ccm-cms/application.xml =================================================================== --- trunk/ccm-cms/application.xml 2005-11-15 22:27:13 UTC (rev 996) +++ trunk/ccm-cms/application.xml 2005-11-15 22:28:53 UTC (rev 997) @@ -3,7 +3,7 @@ name="ccm-cms" prettyName="Red Hat CCM Content Management System" version="6.3.0" - release="5" + release="6" webapp="ROOT"> <ccm:dependencies> <ccm:requires name="ccm-core" version="6.2.0" relation="ge"/> Modified: trunk/ccm-core/application.xml =================================================================== --- trunk/ccm-core/application.xml 2005-11-15 22:27:13 UTC (rev 996) +++ trunk/ccm-core/application.xml 2005-11-15 22:28:53 UTC (rev 997) @@ -3,7 +3,7 @@ name="ccm-core" prettyName="Core" version="6.3.0" - release="3" + release="4" webapp="ROOT" buildHooks="build-hooks.xml"> <ccm:dependencies> |
Author: sskracic Date: 2005-11-15 23:27:13 +0100 (Tue, 15 Nov 2005) New Revision: 996 Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchWidget.java trunk/ccm-core/src/com/arsdigita/bebop/BaseLink.java trunk/ccm-core/src/com/arsdigita/bebop/form/Submit.java trunk/ccm-core/web/packages/acs-admin/xsl/split-panel.xsl trunk/ccm-core/web/packages/bebop/xsl/FormWidget.xsl trunk/ccm-core/web/packages/bebop/xsl/Link.xsl trunk/ccm-core/web/packages/bebop/xsl/Widget.xsl Log: The javascript-based double-click protection had a very undesirable side-effect to remove any "onClick" attribute that might have been set for either link or a form button. This fix simply does not touch DOM for links or form buttons that have "onClick" attribute set. Along the way, removed bogus double-click protection from Submit.java and corrected Javadoc. Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchWidget.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchWidget.java 2005-11-14 15:10:37 UTC (rev 995) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchWidget.java 2005-11-15 22:27:13 UTC (rev 996) @@ -91,7 +91,6 @@ ItemSearchWidget parent, ContentType contentType) { super(name, "Search"); - this.avoidDoubleClick(false); this.parent = parent; this.contentType = contentType; this.setAttribute("onClick", "return " + parent.m_item.getName().replace('.','_') + "Popup(this.form)"); @@ -112,7 +111,6 @@ public ClearFragment(String name, ItemSearchWidget parent) { super(name, "Clear"); - this.avoidDoubleClick(false); this.parent = parent; this.setAttribute("onClick", "this.form." + parent.m_item.getName() + ".value = \"\"; return false;"); this.setAttribute("value", "Clear"); Modified: trunk/ccm-core/src/com/arsdigita/bebop/BaseLink.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/bebop/BaseLink.java 2005-11-14 15:10:37 UTC (rev 995) +++ trunk/ccm-core/src/com/arsdigita/bebop/BaseLink.java 2005-11-15 22:27:13 UTC (rev 996) @@ -321,7 +321,8 @@ protected void generateExtraXMLAttributes(PageState state, Element link) {} /** - * Sets onClick event. Not for confirmation messages; Should call setConfirmation for that. + * Sets onClick event and <em>disables the javascript-based double-click protection for this link</em>. + * Not for confirmation messages; Should call setConfirmation for that. * * @param value * @pre value.toLowerCase().startsWith("return confirm(") == false Modified: trunk/ccm-core/src/com/arsdigita/bebop/form/Submit.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/bebop/form/Submit.java 2005-11-14 15:10:37 UTC (rev 995) +++ trunk/ccm-core/src/com/arsdigita/bebop/form/Submit.java 2005-11-15 22:27:13 UTC (rev 996) @@ -45,7 +45,6 @@ public static final String versionId = "$Id$ by $Author$, $DateTime: $"; - private boolean m_noDoubleClick = true; private GlobalizedMessage m_buttonLabel; /** @@ -124,10 +123,13 @@ * onClick field to try to prevent doubleclicks. * * @param avoid true to avoid doubleclicks, false otherwise. + * @deprecated use configuration parameter waf.bebop.dcp_message + * to enable/disable double-click protection globally. + * In case you want to disable DCP on per-widget basis, + * use {@link #setOnClick(String)}. + * @see #setOnClick(String) */ public void avoidDoubleClick ( boolean avoid ) { - Assert.assertNotLocked(this); - m_noDoubleClick = avoid; } /** @@ -213,20 +215,6 @@ return (ps != null) && (p.getValue() != null); } - public void lock() { - if ( m_noDoubleClick ) { - StringBuffer sb = new StringBuffer(); - if (getOnClick() != null) { - sb.append(getOnClick()) - .append(" "); - } - sb.append("if(this.value == '") - .append(getAttribute("value")) - .append("') { this.value = 'Please Wait'; this.form.submit(); } "); - setOnClick(sb.toString()); - } - super.lock(); - } /** * Set the HTML size attribute of this widget. @@ -238,8 +226,9 @@ } /** - * Set the onclick parameter. lock() will append to that String. - * + * Sets the onclick parameter and <em>disables the Javascript-based double-click protection</em> + * for this widget. + * This is the preferred method to disable double-click protection on per-widget basis. * @param command The JavaScript to execute when the button is clicked. */ public void setOnClick(String command) { Modified: trunk/ccm-core/web/packages/acs-admin/xsl/split-panel.xsl =================================================================== --- trunk/ccm-core/web/packages/acs-admin/xsl/split-panel.xsl 2005-11-14 15:10:37 UTC (rev 995) +++ trunk/ccm-core/web/packages/acs-admin/xsl/split-panel.xsl 2005-11-15 22:27:13 UTC (rev 996) @@ -160,8 +160,13 @@ <!-- pads the label of the submit buttons --> <xsl:template match="bebop:formWidget[@type='submit']"> - <input value="   {@value}   " onclick="dcp_hide(this.form);"> - <xsl:for-each select="@*[name() != 'value' and name() != 'onclick']"> + <input value="   {@value}   "> + <xsl:if test="boolean(@onclick) = false()"> + <xsl:attribute name="onclick"> + <xsl:value-of select="'dcp_hide(this.form);'"/> + </xsl:attribute> + </xsl:if> + <xsl:for-each select="@*[name() != 'value']"> <xsl:attribute name="{name()}"> <xsl:value-of select="."/> </xsl:attribute> Modified: trunk/ccm-core/web/packages/bebop/xsl/FormWidget.xsl =================================================================== --- trunk/ccm-core/web/packages/bebop/xsl/FormWidget.xsl 2005-11-14 15:10:37 UTC (rev 995) +++ trunk/ccm-core/web/packages/bebop/xsl/FormWidget.xsl 2005-11-15 22:27:13 UTC (rev 996) @@ -16,14 +16,18 @@ <xsl:template match="bebop:formWidget[@type='submit']" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"> - <input onclick="dcp_hide(this.form);"> - <xsl:for-each select="@*[name() != 'onclick']"> - <xsl:attribute name="{name()}"> - <xsl:value-of select="."/> - </xsl:attribute> - </xsl:for-each> + <input> + <xsl:if test="boolean(@onclick) = false()"> + <xsl:attribute name="onclick"> + <xsl:value-of select="'dcp_hide(this.form);'"/> + </xsl:attribute> + </xsl:if> + <xsl:for-each select="@*"> + <xsl:attribute name="{name()}"> + <xsl:value-of select="."/> + </xsl:attribute> + </xsl:for-each> </input> </xsl:template> - </xsl:stylesheet> Modified: trunk/ccm-core/web/packages/bebop/xsl/Link.xsl =================================================================== --- trunk/ccm-core/web/packages/bebop/xsl/Link.xsl 2005-11-14 15:10:37 UTC (rev 995) +++ trunk/ccm-core/web/packages/bebop/xsl/Link.xsl 2005-11-15 22:27:13 UTC (rev 996) @@ -14,8 +14,13 @@ </xsl:when> <xsl:otherwise> - <a onclick="dcp_hide(this);"> - <xsl:copy-of select="@*[name() != 'href_no_javascript' and name() != 'onclick']"/> + <a> + <xsl:if test="boolean(@onclick) = false()"> + <xsl:attribute name="onclick"> + <xsl:value-of select="'dcp_hide(this);'"/> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="@*[name() != 'href_no_javascript']"/> <xsl:apply-templates/> </a> </xsl:otherwise> @@ -37,8 +42,13 @@ </img> </a> <xsl:text> </xsl:text> - <a onclick="dcp_hide(this);"> - <xsl:copy-of select="@*[name() != 'href_no_javascript' and name() != 'onclick']"/> + <a> + <xsl:if test="boolean(@onclick) = false()"> + <xsl:attribute name="onclick"> + <xsl:value-of select="'dcp_hide(this);'"/> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="@*[name() != 'href_no_javascript']"/> <xsl:apply-templates/> </a> </xsl:otherwise> Modified: trunk/ccm-core/web/packages/bebop/xsl/Widget.xsl =================================================================== --- trunk/ccm-core/web/packages/bebop/xsl/Widget.xsl 2005-11-14 15:10:37 UTC (rev 995) +++ trunk/ccm-core/web/packages/bebop/xsl/Widget.xsl 2005-11-15 22:27:13 UTC (rev 996) @@ -23,12 +23,17 @@ <xsl:template match="bebop:formWidget[@type='submit']" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"> - <input onclick="dcp_hide(this.form);"> - <xsl:for-each select="@*[name() != 'onclick']"> - <xsl:attribute name="{name()}"> - <xsl:value-of select="."/> - </xsl:attribute> - </xsl:for-each> + <input> + <xsl:if test="boolean(@onclick) = false()"> + <xsl:attribute name="onclick"> + <xsl:value-of select="'dcp_hide(this.form);'"/> + </xsl:attribute> + </xsl:if> + <xsl:for-each select="@*"> + <xsl:attribute name="{name()}"> + <xsl:value-of select="."/> + </xsl:attribute> + </xsl:for-each> </input> </xsl:template> |
From: <ap...@vh...> - 2005-11-14 15:11:58
|
Author: apevec Date: 2005-11-14 16:10:37 +0100 (Mon, 14 Nov 2005) New Revision: 995 Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/item/ItemLanguagesTable.java trunk/ccm-cms/src/com/arsdigita/cms/util/GlobalizationUtil.java Log: internal hook in CMS globalization to override keys in CMSResources.properties Modified: trunk/ccm-cms/src/com/arsdigita/cms/ui/item/ItemLanguagesTable.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/ui/item/ItemLanguagesTable.java 2005-11-14 14:38:27 UTC (rev 994) +++ trunk/ccm-cms/src/com/arsdigita/cms/ui/item/ItemLanguagesTable.java 2005-11-14 15:10:37 UTC (rev 995) @@ -47,11 +47,8 @@ /** - * Displays a table of publishing history for an item, with options - * to republish the item at any of its previous states. + * Displays a list of all language instances of an item. * - * @author Stanislav Freidin (sfr...@ar...) - * @version $Id$ */ public class ItemLanguagesTable extends DataTable { @@ -70,7 +67,7 @@ addColumn("cms.ui.language.header", ContentPage.LANGUAGE, false, new LanguageRenderer()); addColumn("cms.title", ContentPage.TITLE); m_deleteColumn = addColumn("cms.ui.action", new ActionCellRenderer(m_model)); - setResourceBundle(GlobalizationUtil.BUNDLE_NAME); + setResourceBundle(GlobalizationUtil.getBundleName()); addTableActionListener(new InstanceDeleter()); } Modified: trunk/ccm-cms/src/com/arsdigita/cms/util/GlobalizationUtil.java =================================================================== --- trunk/ccm-cms/src/com/arsdigita/cms/util/GlobalizationUtil.java 2005-11-14 14:38:27 UTC (rev 994) +++ trunk/ccm-cms/src/com/arsdigita/cms/util/GlobalizationUtil.java 2005-11-14 15:10:37 UTC (rev 995) @@ -32,14 +32,27 @@ public class GlobalizationUtil { - public static final String BUNDLE_NAME = "com.arsdigita.cms.util.CMSResourceBundle"; + public static String s_bundleName = "com.arsdigita.cms.util.CMSResourceBundle"; public static GlobalizedMessage globalize(String key) { - return new GlobalizedMessage(key, BUNDLE_NAME); + return new GlobalizedMessage(key, getBundleName()); } public static GlobalizedMessage globalize(String key, Object[] args) { - return new GlobalizedMessage(key, BUNDLE_NAME, args); + return new GlobalizedMessage(key, getBundleName(), args); } + /* + * Not a part of API. Otherwise it would need to be properly synchronized. + * Only meant be used to override resource keys in CMSResources + * by a custom application, in Initializer. + */ + public static void internalSetBundleName(String bundleName) { + s_bundleName = bundleName; + } + + public static String getBundleName() { + return s_bundleName; + } + } |
From: <ap...@vh...> - 2005-11-14 14:39:41
|
Author: apevec Date: 2005-11-14 15:38:27 +0100 (Mon, 14 Nov 2005) New Revision: 994 Modified: trunk/ccm-ldn-theme/src/com/arsdigita/london/theme/ui/ThemeForm.java Log: fail with full stack trace when theme directory cannot be created Modified: trunk/ccm-ldn-theme/src/com/arsdigita/london/theme/ui/ThemeForm.java =================================================================== --- trunk/ccm-ldn-theme/src/com/arsdigita/london/theme/ui/ThemeForm.java 2005-11-14 14:35:30 UTC (rev 993) +++ trunk/ccm-ldn-theme/src/com/arsdigita/london/theme/ui/ThemeForm.java 2005-11-14 14:38:27 UTC (rev 994) @@ -355,7 +355,9 @@ ThemeApplication.getConfig().getDefaultThemeManifest()); } - newDirectory.mkdirs(); + if ( !newDirectory.mkdirs() ) { + throw new UncheckedWrapperException("Cannot create theme directory "+newDirectory.getAbsolutePath()); + } ManifestReader reader = new FileWriterManifestReader(is, newDirectory); @@ -406,7 +408,7 @@ } catch (IOException e) { throw new UncheckedWrapperException( "Error reading from " + filePath + - " or writing to " + m_newDirectory.getAbsolutePath()); + " or writing to " + m_newDirectory.getAbsolutePath(), e); } } } |
From: <ap...@vh...> - 2005-11-14 14:36:50
|
Author: apevec Date: 2005-11-14 15:35:30 +0100 (Mon, 14 Nov 2005) New Revision: 993 Modified: trunk/ccm-formbuilder-pdf/src/com/arsdigita/formbuilder/pdf/PDFConfig.java Log: change log level of the debug message Modified: trunk/ccm-formbuilder-pdf/src/com/arsdigita/formbuilder/pdf/PDFConfig.java =================================================================== --- trunk/ccm-formbuilder-pdf/src/com/arsdigita/formbuilder/pdf/PDFConfig.java 2005-11-14 14:29:25 UTC (rev 992) +++ trunk/ccm-formbuilder-pdf/src/com/arsdigita/formbuilder/pdf/PDFConfig.java 2005-11-14 14:35:30 UTC (rev 993) @@ -48,7 +48,7 @@ try { s_config.load(); } catch (java.lang.IllegalArgumentException ex) { - s_log.warn("Unable to load PDFConfig. This is not a problem " + + s_log.info("Unable to load PDFConfig. This is not a problem " + "during ccm load, but is a problem at all other times"); } } |
From: <ap...@vh...> - 2005-11-14 14:30:52
|
Author: apevec Date: 2005-11-14 15:29:25 +0100 (Mon, 14 Nov 2005) New Revision: 992 Modified: trunk/ccm-core/src/com/arsdigita/bebop/form/Widget.java trunk/ccm-core/src/com/arsdigita/mail/Mail.java Log: make debug messages more useful Modified: trunk/ccm-core/src/com/arsdigita/bebop/form/Widget.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/bebop/form/Widget.java 2005-11-10 18:22:03 UTC (rev 991) +++ trunk/ccm-core/src/com/arsdigita/bebop/form/Widget.java 2005-11-14 14:29:25 UTC (rev 992) @@ -272,7 +272,7 @@ */ public void setForm(final Form form) { if (m_form != null && form != null) { - throw new IllegalStateException("Form already set"); + throw new IllegalStateException("Form "+form.getName()+" already set for "+getName()); } m_form = form; Modified: trunk/ccm-core/src/com/arsdigita/mail/Mail.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/mail/Mail.java 2005-11-10 18:22:03 UTC (rev 991) +++ trunk/ccm-core/src/com/arsdigita/mail/Mail.java 2005-11-14 14:29:25 UTC (rev 992) @@ -27,6 +27,7 @@ import java.io.UnsupportedEncodingException; import java.net.URL; import java.util.ArrayList; +import java.util.Arrays; import java.util.Date; import java.util.Enumeration; import java.util.Hashtable; @@ -337,9 +338,9 @@ s_log.debug("no message sent. No valid recipients:\n"); } } else { - s_log.info("message sent to <" + m_filteredTo + "> from <" + m_from + + s_log.info("message sent to <" + Arrays.asList(m_filteredTo) + "> from <" + m_from + "> subject <" + m_subject + ">"); - s_log.info("messages filtered for <" + m_invalidTo + "> from <" + m_from + + s_log.info("messages filtered for <" + Arrays.asList(m_invalidTo) + "> from <" + m_from + "> subject <" + m_subject + ">"); } } |