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: <fa...@vh...> - 2005-09-12 15:13:57
|
Author: fabrice Date: 2005-09-12 17:04:51 +0200 (Mon, 12 Sep 2005) New Revision: 791 Modified: ccm-ldn-atoz/trunk/pdl/com/arsdigita/london/atoz/AtoZItemProvider.pdl Log: Use title of the live item Modified: ccm-ldn-atoz/trunk/pdl/com/arsdigita/london/atoz/AtoZItemProvider.pdl =================================================================== --- ccm-ldn-atoz/trunk/pdl/com/arsdigita/london/atoz/AtoZItemProvider.pdl 2005-09-12 15:03:16 UTC (rev 790) +++ ccm-ldn-atoz/trunk/pdl/com/arsdigita/london/atoz/AtoZItemProvider.pdl 2005-09-12 15:04:51 UTC (rev 791) @@ -42,13 +42,16 @@ acs_objects o, cat_object_category_map m, cms_pages cp, - atoz_item_provider p + atoz_item_provider p, + cms_items i2 where i.version = 'live' and i.item_id = o.object_id and o.object_id = m.object_id and m.category_id = p.category_id - and o.object_id = cp.item_id and p.provider_id = :providerID + and i2.parent_id = i.item_id + and i2.version = 'live' + and cp.item_id = i2.item_id union select i.item_id as id, o.object_type as object_type, |
From: <fa...@vh...> - 2005-09-12 15:12:28
|
Author: fabrice Date: 2005-09-12 17:03:16 +0200 (Mon, 12 Sep 2005) New Revision: 790 Modified: ccm-ldn-aplaws/trunk/bundles/complete/cfg/web.xml Log: Secure and profiler for complete bundle Modified: ccm-ldn-aplaws/trunk/bundles/complete/cfg/web.xml =================================================================== --- ccm-ldn-aplaws/trunk/bundles/complete/cfg/web.xml 2005-09-12 15:02:20 UTC (rev 789) +++ ccm-ldn-aplaws/trunk/bundles/complete/cfg/web.xml 2005-09-12 15:03:16 UTC (rev 790) @@ -5,6 +5,16 @@ <web-app> <filter> + <filter-name>secured</filter-name> + <filter-class>com.arsdigita.web.SecureFilter</filter-class> + </filter> + + <filter> + <filter-name>profiler</filter-name> + <filter-class>com.arsdigita.profiler.ProfilerFilter</filter-class> + </filter> + + <filter> <filter-name>shortcuts</filter-name> <filter-class>com.arsdigita.london.shortcuts.ShortcutFilter</filter-class> </filter> @@ -15,6 +25,16 @@ </filter> <filter-mapping> + <filter-name>secured</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <filter-mapping> + <filter-name>profiler</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <filter-mapping> <filter-name>subsite</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> |
From: <fa...@vh...> - 2005-09-12 15:11:25
|
Author: fabrice Date: 2005-09-12 17:02:20 +0200 (Mon, 12 Sep 2005) New Revision: 789 Added: ccm-core/trunk/src/com/arsdigita/web/DynamicHostProvider.java Modified: ccm-core/trunk/src/com/arsdigita/ui/login/RecoverPasswordPanel.java ccm-core/trunk/src/com/arsdigita/web/WebConfig.java ccm-core/trunk/src/com/arsdigita/web/WebConfig_parameter.properties Log: Use dynamic host provider to get the host URL in emails Modified: ccm-core/trunk/src/com/arsdigita/ui/login/RecoverPasswordPanel.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/ui/login/RecoverPasswordPanel.java 2005-09-12 15:01:57 UTC (rev 788) +++ ccm-core/trunk/src/com/arsdigita/ui/login/RecoverPasswordPanel.java 2005-09-12 15:02:20 UTC (rev 789) @@ -341,7 +341,7 @@ (RecoveryLoginModule.getParamName(), RecoveryLoginModule.getParamValue(user.getID())); - url = com.arsdigita.web.URL.there + url = com.arsdigita.web.URL.dynamicHostThere (req, Initializer.getFullURL (Initializer.CHANGE_PAGE_KEY, req), Added: ccm-core/trunk/src/com/arsdigita/web/DynamicHostProvider.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/web/DynamicHostProvider.java 2005-09-12 15:01:57 UTC (rev 788) +++ ccm-core/trunk/src/com/arsdigita/web/DynamicHostProvider.java 2005-09-12 15:02:20 UTC (rev 789) @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2005 RuntimeCollective 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.web; + +public interface DynamicHostProvider { + + public String getName(); + + public int getPort(); +} Modified: ccm-core/trunk/src/com/arsdigita/web/WebConfig.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/web/WebConfig.java 2005-09-12 15:01:57 UTC (rev 788) +++ ccm-core/trunk/src/com/arsdigita/web/WebConfig.java 2005-09-12 15:02:20 UTC (rev 789) @@ -20,6 +20,7 @@ import com.arsdigita.domain.DomainCollection; import com.arsdigita.runtime.AbstractConfig; +import com.arsdigita.util.parameter.BooleanParameter; import com.arsdigita.util.parameter.EnumerationParameter; import com.arsdigita.util.parameter.ErrorList; import com.arsdigita.util.parameter.Parameter; @@ -29,8 +30,10 @@ import com.arsdigita.util.parameter.StringParameter; import com.arsdigita.util.servlet.HttpHost; import com.arsdigita.util.servlet.HttpHostParameter; + import java.util.ArrayList; import java.util.List; + import org.apache.log4j.Logger; /** @@ -60,6 +63,8 @@ private final Parameter m_servlet; private final Parameter m_policy; private final Parameter m_resolver; + private final Parameter m_dynamic_host_provider; + private final Parameter m_deactivate_cache_host_notifications; private final Parameter m_secureRequired; public WebConfig() { @@ -108,6 +113,12 @@ m_secureRequired = new StringArrayParameter( "waf.web.secure_required", Parameter.OPTIONAL, null); + m_dynamic_host_provider = new StringParameter + ("waf.web.dynamic_host_provider", Parameter.OPTIONAL, ""); + + m_deactivate_cache_host_notifications = new BooleanParameter + ("waf.web.deactivate_cache_host_notifications", Parameter.OPTIONAL, Boolean.TRUE); + register(m_scheme); register(m_server); register(m_secureServer); @@ -117,6 +128,8 @@ register(m_servlet); register(m_policy); register(m_resolver); + register(m_dynamic_host_provider); + register(m_deactivate_cache_host_notifications); register(m_secureRequired); loadInfo(); @@ -222,6 +235,29 @@ } } + protected DynamicHostProvider dhProvider = null; + protected boolean dhProviderInited = false; + + public final DynamicHostProvider getDynamicHostProvider() { + if (dhProviderInited == false) { + String classname = (String) get(m_dynamic_host_provider); + if (classname != null) { + try { + Class klass = Class.forName(classname); + dhProvider = (DynamicHostProvider) klass.newInstance(); + } catch (Exception e) { + s_log.error("Could not instantiate DynamicHostProvider using classname : "+classname, e); + } + } + dhProviderInited = true; + } + return dhProvider; + } + + public final boolean getDeactivateCacheHostNotifications() { + return ((Boolean) get(m_deactivate_cache_host_notifications)).booleanValue(); + } + // // Deprecated classes and methods // Modified: ccm-core/trunk/src/com/arsdigita/web/WebConfig_parameter.properties =================================================================== --- ccm-core/trunk/src/com/arsdigita/web/WebConfig_parameter.properties 2005-09-12 15:01:57 UTC (rev 788) +++ ccm-core/trunk/src/com/arsdigita/web/WebConfig_parameter.properties 2005-09-12 15:02:20 UTC (rev 789) @@ -38,3 +38,11 @@ waf.web.site_name.purpose=The name of your website, for use in page footers for example waf.web.site_name.example=Joe's House of HTML waf.web.site_name.format=[string] +waf.web.dynamic_host_provider.title=Dynamic Host Provider +waf.web.dynamic_host_provider.purpose=Class name of the DynamicHostProvider to use +waf.web.dynamic_host_provider.example=com.arsdigita.web.ServerDynamicHostProvider +waf.web.dynamic_host_provider.format=[string] +waf.web.deactivate_cache_host_notifications.title=Deactivate Host Notification for Caches +waf.web.deactivate_cache_host_notifications.purpose=Whether Hosts should be notificed when a Cache needs to be cleared +waf.web.deactivate_cache_host_notifications.example=true +waf.web.deactivate_cache_host_notifications.format=[boolean] |
From: <fa...@vh...> - 2005-09-12 15:11:00
|
Author: fabrice Date: 2005-09-12 17:01:57 +0200 (Mon, 12 Sep 2005) New Revision: 788 Modified: ccm-core/trunk/src/com/arsdigita/formbuilder/actions/SimpleEmailListener.java Log: Code layout Modified: ccm-core/trunk/src/com/arsdigita/formbuilder/actions/SimpleEmailListener.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/formbuilder/actions/SimpleEmailListener.java 2005-09-12 15:01:33 UTC (rev 787) +++ ccm-core/trunk/src/com/arsdigita/formbuilder/actions/SimpleEmailListener.java 2005-09-12 15:01:57 UTC (rev 788) @@ -18,6 +18,13 @@ */ package com.arsdigita.formbuilder.actions; +import com.arsdigita.bebop.FormData; +import com.arsdigita.bebop.FormProcessException; +import com.arsdigita.bebop.event.FormProcessListener; +import com.arsdigita.bebop.event.FormSectionEvent; +import com.arsdigita.bebop.parameters.ParameterData; +import com.arsdigita.domain.DataObjectNotFoundException; +import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.formbuilder.CompoundComponent; import com.arsdigita.formbuilder.PersistentComponent; import com.arsdigita.formbuilder.PersistentFormSection; @@ -26,13 +33,6 @@ import com.arsdigita.formbuilder.PersistentWidget; import com.arsdigita.formbuilder.WidgetLabel; import com.arsdigita.formbuilder.util.Placeholders; - -import com.arsdigita.bebop.FormData; -import com.arsdigita.bebop.FormProcessException; -import com.arsdigita.bebop.event.FormProcessListener; -import com.arsdigita.bebop.event.FormSectionEvent; -import com.arsdigita.domain.DataObjectNotFoundException; -import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.User; import com.arsdigita.mail.Mail; |
From: <fa...@vh...> - 2005-09-12 15:10:33
|
Author: fabrice Date: 2005-09-12 17:01:33 +0200 (Mon, 12 Sep 2005) New Revision: 787 Modified: ccm-core/trunk/src/com/arsdigita/domain/SimpleDomainObjectXMLFormatter.java Log: More log output Modified: ccm-core/trunk/src/com/arsdigita/domain/SimpleDomainObjectXMLFormatter.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/domain/SimpleDomainObjectXMLFormatter.java 2005-09-12 15:01:18 UTC (rev 786) +++ ccm-core/trunk/src/com/arsdigita/domain/SimpleDomainObjectXMLFormatter.java 2005-09-12 15:01:33 UTC (rev 787) @@ -52,12 +52,18 @@ if (formatter == null) { if (s_log.isDebugEnabled()) { s_log.debug("No formatter for " + path + + " for object "+obj+ + " and property "+prop+ + " and value "+value+ " using default"); } return XML.format(value); } if (s_log.isDebugEnabled()) { s_log.debug("Processing property " + path + + " for object "+obj+ + " and property "+prop+ + " and value "+value+ " with " + formatter.getClass()); } return formatter.format(value); |
From: <fa...@vh...> - 2005-09-12 15:10:18
|
Author: fabrice Date: 2005-09-12 17:01:18 +0200 (Mon, 12 Sep 2005) New Revision: 786 Modified: ccm-core/trunk/src/com/arsdigita/caching/CacheServlet.java Log: Option to deactivate cache host notification Modified: ccm-core/trunk/src/com/arsdigita/caching/CacheServlet.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/caching/CacheServlet.java 2005-09-12 15:00:56 UTC (rev 785) +++ ccm-core/trunk/src/com/arsdigita/caching/CacheServlet.java 2005-09-12 15:01:18 UTC (rev 786) @@ -170,6 +170,7 @@ // return; // } + if (!Web.getConfig().getDeactivateCacheHostNotifications()) { s_log.debug("notifying peers"); final DomainCollection hosts = Host.retrieveAll(); final HttpHost current = Web.getConfig().getHost(); @@ -179,6 +180,7 @@ notifyPeer(host, makeParameterMap(id, key, hash)); } } + } private static void notifyPeer(Host host, ParameterMap params) { final String url = "http://" + host + SERVLET_URL + params; |
From: <fa...@vh...> - 2005-09-12 15:09:56
|
Author: fabrice Date: 2005-09-12 17:00:56 +0200 (Mon, 12 Sep 2005) New Revision: 785 Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/category/IndexItemSelectionForm.java Log: Option to have no index item on categories Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/category/IndexItemSelectionForm.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/ui/category/IndexItemSelectionForm.java 2005-09-12 15:00:31 UTC (rev 784) +++ ccm-cms/trunk/src/com/arsdigita/cms/ui/category/IndexItemSelectionForm.java 2005-09-12 15:00:56 UTC (rev 785) @@ -63,6 +63,7 @@ private RadioGroup m_options; private static final String NULL_OPTION_VALUE = ""; + private static final String NONE_OPTION_VALUE = "None"; private FormErrorDisplay m_errors; private SaveCancelSection m_saveCancelSection; @@ -96,6 +97,10 @@ boolean valueSet = false; + // option for NO index Object + group.addOption(new Option(NONE_OPTION_VALUE, + new Label(NONE_OPTION_VALUE))); + while (children.next()) { ACSObject item = (ACSObject) children.getDomainObject(); @@ -119,6 +124,10 @@ .getID().toString()); valueSet = true; } + else{ + group.setValue(state, NONE_OPTION_VALUE); + valueSet = true; + } if (category.getParentCategoryCount() > 0) { group.addOption @@ -160,7 +169,13 @@ ContentItem item = null; if (selectedValue != null) { if (NULL_OPTION_VALUE.equals(selectedValue)) { + category.setIgnoreParentIndexItem(false); selectedValue = null; + } + else if(NONE_OPTION_VALUE.equals(selectedValue)) { + category.setIgnoreParentIndexItem(true); + selectedValue = null; + } else { item = new ContentItem (new BigDecimal(selectedValue)); |
Author: fabrice Date: 2005-09-12 17:00:31 +0200 (Mon, 12 Sep 2005) New Revision: 784 Added: ccm-core/trunk/sql/ccm-core/oracle-se/upgrade/6.1.1-6.1.2/add_column_ignore_parent_index.sql ccm-core/trunk/sql/ccm-core/postgres/upgrade/6.1.1-6.1.2/add_column_ignore_parent_index.sql Modified: ccm-core/trunk/pdl/com/arsdigita/categorization/Category.pdl ccm-core/trunk/sql/ccm-core/upgrade/oracle-se-6.1.1-6.1.2.sql ccm-core/trunk/sql/ccm-core/upgrade/postgres-6.1.1-6.1.2.sql ccm-core/trunk/src/com/arsdigita/categorization/Category.java Log: Option to have no index item on categories Modified: ccm-core/trunk/pdl/com/arsdigita/categorization/Category.pdl =================================================================== --- ccm-core/trunk/pdl/com/arsdigita/categorization/Category.pdl 2005-09-12 14:59:59 UTC (rev 783) +++ ccm-core/trunk/pdl/com/arsdigita/categorization/Category.pdl 2005-09-12 15:00:31 UTC (rev 784) @@ -28,6 +28,7 @@ Boolean[1..1] isEnabled = cat_categories.enabled_p CHAR(1); Boolean[1..1] isAbstract = cat_categories.abstract_p CHAR(1); String[1..1] defaultAncestors = cat_categories.default_ancestors VARCHAR(3209); + Boolean[1..1] ignoreParentIndexItem = cat_categories.ignore_parent_index_p CHAR(1); reference key (cat_categories.category_id); } Added: ccm-core/trunk/sql/ccm-core/oracle-se/upgrade/6.1.1-6.1.2/add_column_ignore_parent_index.sql =================================================================== --- ccm-core/trunk/sql/ccm-core/oracle-se/upgrade/6.1.1-6.1.2/add_column_ignore_parent_index.sql 2005-09-12 14:59:59 UTC (rev 783) +++ ccm-core/trunk/sql/ccm-core/oracle-se/upgrade/6.1.1-6.1.2/add_column_ignore_parent_index.sql 2005-09-12 15:00:31 UTC (rev 784) @@ -0,0 +1,3 @@ +alter table cat_categories add (ignore_parent_index_p char(1)); +update cat_categories set ignore_parent_index_p=0; +alter table cat_categories modify (ignore_parent_index_p not null); Added: ccm-core/trunk/sql/ccm-core/postgres/upgrade/6.1.1-6.1.2/add_column_ignore_parent_index.sql =================================================================== --- ccm-core/trunk/sql/ccm-core/postgres/upgrade/6.1.1-6.1.2/add_column_ignore_parent_index.sql 2005-09-12 14:59:59 UTC (rev 783) +++ ccm-core/trunk/sql/ccm-core/postgres/upgrade/6.1.1-6.1.2/add_column_ignore_parent_index.sql 2005-09-12 15:00:31 UTC (rev 784) @@ -0,0 +1,3 @@ +alter table cat_categories add column ignore_parent_index_p character(1); +update cat_categories set ignore_parent_index_p=0; +alter table cat_categories alter column ignore_parent_index_p set NOT NULL; Modified: ccm-core/trunk/sql/ccm-core/upgrade/oracle-se-6.1.1-6.1.2.sql =================================================================== --- ccm-core/trunk/sql/ccm-core/upgrade/oracle-se-6.1.1-6.1.2.sql 2005-09-12 14:59:59 UTC (rev 783) +++ ccm-core/trunk/sql/ccm-core/upgrade/oracle-se-6.1.1-6.1.2.sql 2005-09-12 15:00:31 UTC (rev 784) @@ -17,3 +17,4 @@ -- $DateTime: 2004/08/16 18:10:38 $ @@ ../oracle-se/upgrade/6.1.1-6.1.2/trigger-sync_lucene_docs.sql +@@ ../oracle-se/upgrade/6.1.1-6.1.2/add_column_ignore_parent_index.sql Modified: ccm-core/trunk/sql/ccm-core/upgrade/postgres-6.1.1-6.1.2.sql =================================================================== --- ccm-core/trunk/sql/ccm-core/upgrade/postgres-6.1.1-6.1.2.sql 2005-09-12 14:59:59 UTC (rev 783) +++ ccm-core/trunk/sql/ccm-core/upgrade/postgres-6.1.1-6.1.2.sql 2005-09-12 15:00:31 UTC (rev 784) @@ -17,4 +17,5 @@ begin; \i ../postgres/upgrade/6.1.1-6.1.2/trigger-sync_lucene_docs.sql + \i ../postgres/upgrade/add_column_ignore_parent_index.sql commit; Modified: ccm-core/trunk/src/com/arsdigita/categorization/Category.java =================================================================== --- ccm-core/trunk/src/com/arsdigita/categorization/Category.java 2005-09-12 14:59:59 UTC (rev 783) +++ ccm-core/trunk/src/com/arsdigita/categorization/Category.java 2005-09-12 15:00:31 UTC (rev 784) @@ -140,6 +140,8 @@ /** An attribute name for the underlying data object. */ public static final String DEFAULT_ANCESTORS = "defaultAncestors"; /** An attribute name for the underlying data object. */ + public static final String IGNORE_PARENT_INDEX_ITEM = "ignoreParentIndexItem"; + /** An attribute name for the underlying data object. */ private static final String PURPOSES = "purposes"; // this contains association names from the pdl file @@ -329,6 +331,8 @@ } setEnabled(true); setAbstract(false); + //by default do not ignore the parent index item + setIgnoreParentIndexItem(false); } m_hierarchy = new HierarchyDenormalization @@ -523,6 +527,29 @@ } /** + * Determine whether this category should have a default index item + * associated with it (i.e.it's parent category). + * + * @return <code>true</code> if the parent index item should be ignored (no default index item) + * <code>false</code> otherwise. + */ + public boolean ignoreParentIndexItem(){ + return ((Boolean) get(IGNORE_PARENT_INDEX_ITEM)).booleanValue(); + } + + /** + * Set whether this category should have a default index item + * associated with it (i.e.it's parent category). + * + * @param ignoreParentIndexItem <code>true</code> if the parent index item should be ignored (no default index item) + * <code>false</code> otherwise + */ + public void setIgnoreParentIndexItem(boolean ignoreParentIndexItem){ + set(IGNORE_PARENT_INDEX_ITEM, new Boolean(ignoreParentIndexItem)); + } + + + /** * @deprecated use the "use context" APIs instead **/ public Collection getPurposes() { @@ -558,7 +585,7 @@ remove(PURPOSES, purpose); } - private void setDefaultAncestors(Category defaultParent) { + public void setDefaultAncestors(Category defaultParent) { String value; if (defaultParent == null) { value = getID() + "/"; @@ -940,8 +967,9 @@ ACSObject item = getDirectIndexObject(); if (item == null) { - try { - item = getDefaultParentCategory().getIndexObject(); + if(!ignoreParentIndexItem()){ + try { + item = getDefaultParentCategory().getIndexObject(); } catch (CategoryNotFoundException ex) { // this will rarely happen and when it does we just want to // return null which is done below. it would be much nicer if @@ -949,6 +977,7 @@ // the exception s_log.debug("not found", ex); } + } } return item; |
From: <fa...@vh...> - 2005-09-12 15:09:09
|
Author: fabrice Date: 2005-09-12 16:59:59 +0200 (Mon, 12 Sep 2005) New Revision: 783 Modified: ccm-core/trunk/etc/java-libs.txt Log: New jakarta-oro version Modified: ccm-core/trunk/etc/java-libs.txt =================================================================== --- ccm-core/trunk/etc/java-libs.txt 2005-09-12 14:59:38 UTC (rev 782) +++ ccm-core/trunk/etc/java-libs.txt 2005-09-12 14:59:59 UTC (rev 783) @@ -15,7 +15,7 @@ i18n.jar 1.0 APACHE http://www.apache.org/LICENSE.txt iDoclet.jar 1.0 GPL http://www.gnu.org/copyleft/gpl.html jaas.jar 1.0 SUN http://java.sun.com/products/jaas/index-10.html -jakarta-oro-2.0.7.jar 2.0.7 APACHE http://www.apache.org/LICENSE.txt +jakarta-oro-2.0.8.jar 2.0.8 APACHE http://www.apache.org/LICENSE.txt javacc.jar 3.2 BSD https://javacc.dev.java.net/ jaxp.jar 1.1 SUN http://java.sun.com/xml/download.html jce.jar 1.2.1 SUN http://java.sun.com/products/jce/jce121_license.txt |
From: <fa...@vh...> - 2005-09-12 15:08:39
|
Author: fabrice Date: 2005-09-12 16:59:38 +0200 (Mon, 12 Sep 2005) New Revision: 782 Modified: ccm-cms-types-siteproxy/trunk/src/com/arsdigita/cms/contenttypes/SiteProxy.java Log: Adding a logger Modified: ccm-cms-types-siteproxy/trunk/src/com/arsdigita/cms/contenttypes/SiteProxy.java =================================================================== --- ccm-cms-types-siteproxy/trunk/src/com/arsdigita/cms/contenttypes/SiteProxy.java 2005-09-12 14:59:14 UTC (rev 781) +++ ccm-cms-types-siteproxy/trunk/src/com/arsdigita/cms/contenttypes/SiteProxy.java 2005-09-12 14:59:38 UTC (rev 782) @@ -18,16 +18,18 @@ */ package com.arsdigita.cms.contenttypes; +import com.arsdigita.cms.ContentType; +import com.arsdigita.cms.ContentPage; +import com.arsdigita.cms.ExtraXMLGenerator; +import com.arsdigita.cms.dispatcher.SiteProxyPanel; +import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.persistence.OID; import com.arsdigita.persistence.DataObject; -import com.arsdigita.domain.DataObjectNotFoundException; -import com.arsdigita.cms.ContentType; -import com.arsdigita.cms.ContentPage; import java.math.BigDecimal; +import org.apache.log4j.Logger; - /** * This content type represents a SiteProxy. * @@ -35,6 +37,8 @@ */ public class SiteProxy extends ContentPage { + private static final Logger s_log = Logger.getLogger(SiteProxy.class); + /** PDL property name for definition */ public static final String URL = "url"; @@ -84,5 +88,4 @@ public void setURL( String url ) { set(URL, url); } - } |
From: <fa...@vh...> - 2005-09-12 15:08:24
|
Author: fabrice Date: 2005-09-12 16:59:14 +0200 (Mon, 12 Sep 2005) New Revision: 781 Modified: ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/ui/mparticle/ArticleSectionPanel.java Log: Get it to work with no context Modified: ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/ui/mparticle/ArticleSectionPanel.java =================================================================== --- ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/ui/mparticle/ArticleSectionPanel.java 2005-09-12 14:57:56 UTC (rev 780) +++ ccm-cms-types-mparticle/trunk/src/com/arsdigita/cms/contenttypes/ui/mparticle/ArticleSectionPanel.java 2005-09-12 14:59:14 UTC (rev 781) @@ -18,30 +18,31 @@ */ package com.arsdigita.cms.contenttypes.ui.mparticle; +import com.arsdigita.bebop.Page; +import com.arsdigita.bebop.PageState; +import com.arsdigita.bebop.SimpleComponent; +import com.arsdigita.bebop.parameters.BigDecimalParameter; +import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.cms.CMS; import com.arsdigita.cms.CMSContext; +import com.arsdigita.cms.CMSExcursion; import com.arsdigita.cms.ContentItem; -import com.arsdigita.cms.CMSExcursion; import com.arsdigita.cms.ContentSection; -import com.arsdigita.cms.contenttypes.MultiPartArticle; import com.arsdigita.cms.contenttypes.ArticleSection; import com.arsdigita.cms.contenttypes.ArticleSectionCollection; +import com.arsdigita.cms.contenttypes.MultiPartArticle; import com.arsdigita.cms.dispatcher.XMLGenerator; - -import com.arsdigita.bebop.Page; -import com.arsdigita.bebop.PageState; -import com.arsdigita.bebop.SimpleComponent; -import com.arsdigita.bebop.parameters.ParameterModel; +import com.arsdigita.domain.DomainObjectXMLRenderer; import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.xml.Element; +import java.io.IOException; +import java.util.ArrayList; -import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import org.apache.log4j.Logger; -import java.util.ArrayList; /** * <p>This <code>ContentPanel</code> component fetches @@ -71,11 +72,31 @@ public void register(Page p) { super.register(p); + addGlobalStateParams(p); + } + + public void addGlobalStateParams(Page p) { p.addGlobalStateParam(m_page); } - protected XMLGenerator getXMLGenerator(PageState state) { - ContentSection section = CMS.getContext().getContentSection(); + /** + * Try to get the section from the context + * if there isn't (eg if we are looking at an index + * item on a category), guess the section from the item + */ + protected XMLGenerator getXMLGenerator(PageState state, ContentItem item) { + ContentSection section = null; + try { + section = CMS.getContext().getContentSection(); + } catch (Exception e) { + } + if (section == null) { + if (s_log.isDebugEnabled()) { + s_log.debug("Item id ; "+item.getOID()+" - "+item.getContentSection()+" - "+item); + } + section = item.getContentSection(); + CMS.getContext().setContentSection(section); + } return section.getXMLGenerator(); } @@ -92,18 +113,30 @@ return context.getContentItem(); } - protected ArticleSection[] getSections(final PageState state) { - PageNumber number = (PageNumber)state.getValue(m_page); + protected ArticleSection[] getSections(ContentItem item, final PageState state) { + PageNumber number = null; + try { + number = (PageNumber) state.getValue(m_page); + } catch (IllegalArgumentException e) { + // probably viewing an index item on a category, + // get the parameter from the request and set it + String value = state.getRequest().getParameter(PAGE_NUMBER_PARAM); + if (value == null) { + value = "1"; + } + number = new PageNumber(value); + state.setValue(m_page, number); + } if (number == null) { number = new PageNumber("1"); } - MultiPartArticle mpa = (MultiPartArticle)getContentItem(state); + MultiPartArticle mpa = (MultiPartArticle) item; if (!number.wantAllSections()) { if (s_log.isDebugEnabled()) { s_log.debug("Page number requested is " + number.getPageNumber()); } - return getSections(state, number.getPageNumber()); + return getSections(item, state, number.getPageNumber()); } else { ArticleSectionCollection sections = mpa.getSections(); if (s_log.isDebugEnabled()) { @@ -120,13 +153,14 @@ } // Get the section based on position in list of sections - protected ArticleSection[] getSections(PageState state, + protected ArticleSection[] getSections(ContentItem item, + PageState state, Integer number) { if (s_log.isDebugEnabled()) { s_log.debug("Getting page " + number); } - MultiPartArticle mpa = (MultiPartArticle)getContentItem(state); + MultiPartArticle mpa = (MultiPartArticle) item; ArticleSectionCollection sections = mpa.getSections(); int current = 1; int desired = number.intValue(); @@ -208,13 +242,20 @@ return; } - Element content = parent.newChildElement( - "cms:articleSectionPanel", CMS.CMS_XML_NS); + generateXML(item, parent, state); + } + + /** + * Specify the XML for a given content item. + */ + public void generateXML(ContentItem item, Element element, PageState state) { + + Element content = element.newChildElement("cms:articleSectionPanel", CMS.CMS_XML_NS); exportAttributes(content); - XMLGenerator xmlGenerator = getXMLGenerator(state); + XMLGenerator xmlGenerator = getXMLGenerator(state, item); - ArticleSection sections[] = getSections(state); + ArticleSection sections[] = getSections(item, state); for (int i= 0 ; i < sections.length ; i++) { generateSectionXML(state, content, @@ -223,7 +264,6 @@ } } - protected void generateSectionXML(final PageState state, final Element parent, final ContentItem section, @@ -231,7 +271,6 @@ CMSExcursion excursion = new CMSExcursion() { public void excurse() { setContentItem(section); - xmlGenerator.generateXML(state, parent, null); } }; |
From: <fa...@vh...> - 2005-09-12 15:07:05
|
Author: fabrice Date: 2005-09-12 16:57:56 +0200 (Mon, 12 Sep 2005) New Revision: 780 Modified: ccm-cms-types-formitem/trunk/sql/ccm-cms-types-formitem/oracle-se-create.sql ccm-cms-types-formitem/trunk/sql/ccm-cms-types-formitem/postgres-create.sql Log: Missing sql file Modified: ccm-cms-types-formitem/trunk/sql/ccm-cms-types-formitem/oracle-se-create.sql =================================================================== --- ccm-cms-types-formitem/trunk/sql/ccm-cms-types-formitem/oracle-se-create.sql 2005-09-12 14:57:17 UTC (rev 779) +++ ccm-cms-types-formitem/trunk/sql/ccm-cms-types-formitem/oracle-se-create.sql 2005-09-12 14:57:56 UTC (rev 780) @@ -20,6 +20,7 @@ @@ ddl/oracle-se/create.sql +@@ default/content-section/table-cms_form_item.sql @@ default/content-section/index-cms_form_item.sql @@ ddl/oracle-se/deferred.sql Modified: ccm-cms-types-formitem/trunk/sql/ccm-cms-types-formitem/postgres-create.sql =================================================================== --- ccm-cms-types-formitem/trunk/sql/ccm-cms-types-formitem/postgres-create.sql 2005-09-12 14:57:17 UTC (rev 779) +++ ccm-cms-types-formitem/trunk/sql/ccm-cms-types-formitem/postgres-create.sql 2005-09-12 14:57:56 UTC (rev 780) @@ -20,6 +20,7 @@ \i ddl/postgres/create.sql +\i default/content-section/table-cms_form_item.sql \i default/content-section/index-cms_form_item.sql \i ddl/postgres/deferred.sql |
From: <fa...@vh...> - 2005-09-12 15:06:25
|
Author: fabrice Date: 2005-09-12 16:57:17 +0200 (Mon, 12 Sep 2005) New Revision: 779 Modified: ccm-cms-assets-relatedlink/trunk/src/com/arsdigita/cms/contentassets/ui/RelatedLinkPropertyForm.java Log: Option to hide extra fields Modified: ccm-cms-assets-relatedlink/trunk/src/com/arsdigita/cms/contentassets/ui/RelatedLinkPropertyForm.java =================================================================== --- ccm-cms-assets-relatedlink/trunk/src/com/arsdigita/cms/contentassets/ui/RelatedLinkPropertyForm.java 2005-09-12 14:56:21 UTC (rev 778) +++ ccm-cms-assets-relatedlink/trunk/src/com/arsdigita/cms/contentassets/ui/RelatedLinkPropertyForm.java 2005-09-12 14:57:17 UTC (rev 779) @@ -24,6 +24,7 @@ import com.arsdigita.bebop.form.TextField; import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.cms.ContentItem; +import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.contenttypes.Link; import com.arsdigita.cms.contenttypes.ui.LinkPropertyForm; @@ -37,13 +38,21 @@ /** * Form to edit the basic properties of a RelatedLink. This form * extends LinkPropertyForm in order to create items of the correct - * subclass and set the linkOwner propertyl + * subclass and set the linkOwner property. Users have found the additional + * fields confusing at authoring time (resourceSize and resourceType) so we + * have added a configuration parameter that allows us to hide them on a + * site wide basis. * @version $Revision: #3 $ $Date: 2004/03/30 $ * @author Scott Seago (ss...@re...) */ public class RelatedLinkPropertyForm extends LinkPropertyForm { + private static boolean isHideAdditionalResourceFields; + static { + isHideAdditionalResourceFields = ContentSection.getConfig().isHideAdditionalResourceFields(); + } + /** * Creates a new form to edit the RelatedLink object specified * by the item selection model passed in. @@ -62,6 +71,9 @@ super.addWidgets(); + if ( isHideAdditionalResourceFields ) { + // Do nothing except protect the poor users from themselves. + } else { //Hack to get the form layout right. add(new Label("")); add(new Label( @@ -78,6 +90,7 @@ SingleSelect resType = new SingleSelect(new StringParameter(RelatedLink.RESOURCE_TYPE)); addMimeOptions(resType); add(resType); + } } /** @@ -125,6 +138,9 @@ FormData data = fse.getFormData(); PageState ps = fse.getPageState(); RelatedLink rl; + if ( isHideAdditionalResourceFields ) { + // Do nothing except protect the poor users from themselves. + } else { if ( getLinkSelectionModel().isSelected(ps)) { //We are editing the link , populate our addtional fields. rl = (RelatedLink) getLinkSelectionModel().getSelectedLink(ps); @@ -138,6 +154,7 @@ data.put(RelatedLink.RESOURCE_TYPE , null); } } + } /** * over-ride super class method to set extended properties for @@ -146,10 +163,16 @@ protected void setLinkProperties(Link link , FormSectionEvent fse){ RelatedLink rl = (RelatedLink) (link); FormData data = fse.getFormData(); + if ( isHideAdditionalResourceFields ) { + // We are not using these but let's try to set some reasonable defaults. + rl.setResourceSize( "" ); + rl.setResourceType(MimeType.loadMimeType("text/html")); + } else { rl.setResourceSize( (String) data.get(RelatedLink.RESOURCE_SIZE)); String typeName = (String) data.get(RelatedLink.RESOURCE_TYPE); MimeType mType = MimeType.loadMimeType(typeName); rl.setResourceType(mType); + } super.setLinkProperties(link , fse); } } |
From: <fa...@vh...> - 2005-09-12 15:05:32
|
Author: fabrice Date: 2005-09-12 16:56:21 +0200 (Mon, 12 Sep 2005) New Revision: 778 Modified: ccm-cms/trunk/src/com/arsdigita/cms/installer/ContentSectionSetup.java Log: Code layout Modified: ccm-cms/trunk/src/com/arsdigita/cms/installer/ContentSectionSetup.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/installer/ContentSectionSetup.java 2005-09-12 14:55:55 UTC (rev 777) +++ ccm-cms/trunk/src/com/arsdigita/cms/installer/ContentSectionSetup.java 2005-09-12 14:56:21 UTC (rev 778) @@ -18,24 +18,6 @@ */ package com.arsdigita.cms.installer; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.Date; -import java.util.EmptyStackException; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.NoSuchElementException; -import java.util.Stack; -import java.util.StringTokenizer; -import java.util.Timer; - -import org.apache.log4j.Logger; -import org.xml.sax.Attributes; -import org.xml.sax.helpers.DefaultHandler; - import com.arsdigita.categorization.Category; import com.arsdigita.categorization.RootCategoryCollection; import com.arsdigita.cms.ContentSection; @@ -66,6 +48,24 @@ import com.arsdigita.workflow.simple.WorkflowTemplate; import com.arsdigita.xml.XML; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.Date; +import java.util.EmptyStackException; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.Stack; +import java.util.StringTokenizer; +import java.util.Timer; + +import org.apache.log4j.Logger; +import org.xml.sax.Attributes; +import org.xml.sax.helpers.DefaultHandler; + /** * Sets up the content section. * |
From: <fa...@vh...> - 2005-09-12 15:05:05
|
Author: fabrice Date: 2005-09-12 16:55:55 +0200 (Mon, 12 Sep 2005) New Revision: 777 Modified: ccm-cms/trunk/src/com/arsdigita/cms/ContentSectionServlet.java Log: Let users log in first Modified: ccm-cms/trunk/src/com/arsdigita/cms/ContentSectionServlet.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/ContentSectionServlet.java 2005-09-12 14:55:36 UTC (rev 776) +++ ccm-cms/trunk/src/com/arsdigita/cms/ContentSectionServlet.java 2005-09-12 14:55:55 UTC (rev 777) @@ -25,12 +25,14 @@ import com.arsdigita.cms.dispatcher.TemplateResolver; import com.arsdigita.cms.publishToFile.LocalRequestPassword; import com.arsdigita.cms.lifecycle.Lifecycle; +import com.arsdigita.dispatcher.AccessDeniedException; import com.arsdigita.dispatcher.DispatcherHelper; import com.arsdigita.dispatcher.RequestContext; import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.kernel.ACSObjectCache; import com.arsdigita.kernel.Kernel; +import com.arsdigita.kernel.Party; import com.arsdigita.kernel.User; import com.arsdigita.persistence.AbstractTransactionListener; import com.arsdigita.persistence.OID; @@ -41,13 +43,11 @@ import com.arsdigita.versioning.Versions; import com.arsdigita.web.Application; import com.arsdigita.web.BaseApplicationServlet; +import com.arsdigita.web.LoginSignal; import com.arsdigita.web.Web; + import org.apache.log4j.Logger; -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; @@ -55,6 +55,10 @@ import java.util.Date; import java.util.HashMap; import java.util.Map; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; public class ContentSectionServlet extends BaseApplicationServlet { @@ -389,7 +393,15 @@ if (!hasPermission && !LocalRequestPassword.validLocalRequest(request)) { - throw new com.arsdigita.dispatcher.AccessDeniedException(); + + // first, check if the user is logged-in + // if he isn't, give him a chance to do so... + Party user = Kernel.getContext().getParty(); + if (user == null) { + throw new LoginSignal(request); + } + + throw new AccessDeniedException(); } return item; |
From: <fa...@vh...> - 2005-09-12 15:04:42
|
Author: fabrice Date: 2005-09-12 16:55:36 +0200 (Mon, 12 Sep 2005) New Revision: 776 Modified: ccm-cms/trunk/src/com/arsdigita/cms/CMSContext.java Log: Removing notnull constraint for content lists Modified: ccm-cms/trunk/src/com/arsdigita/cms/CMSContext.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/CMSContext.java 2005-09-12 14:55:15 UTC (rev 775) +++ ccm-cms/trunk/src/com/arsdigita/cms/CMSContext.java 2005-09-12 14:55:36 UTC (rev 776) @@ -85,11 +85,12 @@ /** * Gets the current content section - * @pre hasContentSection() == true + * not anymore: hasContentSection() == true * @return the currently selected content section */ public final ContentSection getContentSection() { - Assert.assertNotNull(m_section, "section"); + // removing this which is not true when viewing category pages + //Assert.assertNotNull(m_section, "section"); return m_section; } @@ -119,7 +120,11 @@ * @return the current content item */ public final ContentItem getContentItem() { - Assert.assertNotNull(m_item, "item"); + // removing this which is necessarily true in ContentList + //Assert.assertNotNull(m_item, "item"); + if (s_log.isDebugEnabled() && m_item == null) { + s_log.debug("Content item is null"); + } return m_item; } |
From: <fa...@vh...> - 2005-09-12 15:04:23
|
Author: fabrice Date: 2005-09-12 16:55:15 +0200 (Mon, 12 Sep 2005) New Revision: 775 Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/CMSResources.properties ccm-cms/trunk/src/com/arsdigita/cms/ui/revision/DifferencePane.java Log: Fix direction of diffs Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/CMSResources.properties =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/ui/CMSResources.properties 2005-09-12 14:54:39 UTC (rev 774) +++ ccm-cms/trunk/src/com/arsdigita/cms/ui/CMSResources.properties 2005-09-12 14:55:15 UTC (rev 775) @@ -408,7 +408,7 @@ cms.ui.item.lifecycles=Publishing cms.ui.item.preview=Preview cms.ui.item.reapply_a_lifecycle=Re-apply a Lifecycle -cms.ui.item.revision.added=Added +cms.ui.item.revision.added=Added To cms.ui.item.revision.current=Current revision cms.ui.item.revision.difference.show=Show difference cms.ui.item.revision.first=Initial revision @@ -425,7 +425,7 @@ cms.ui.item.revision.operation.value=Value cms.ui.item.revision.operation=Operation cms.ui.item.revision.operations=Operations -cms.ui.item.revision.removed=Removed +cms.ui.item.revision.removed=Removed From cms.ui.item.revision.return=Return to revisions cms.ui.item.revision.rollback=Rollback cms.ui.item.revision.rolled_back=Rolled back Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/revision/DifferencePane.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/ui/revision/DifferencePane.java 2005-09-12 14:54:39 UTC (rev 774) +++ ccm-cms/trunk/src/com/arsdigita/cms/ui/revision/DifferencePane.java 2005-09-12 14:55:15 UTC (rev 775) @@ -117,8 +117,8 @@ final GridPanel result = new GridPanel(1); if (((Boolean) change[0]).booleanValue()) { - final String adds = (String) change[3]; - final String removes = (String) change[4]; + final String adds = (String) change[4]; + final String removes = (String) change[3]; if (!adds.equals("")) { final Label addedLabel = new Label @@ -155,6 +155,7 @@ private class ModelBuilder extends AbstractTableModelBuilder { public final TableModel makeModel(final Table table, final PageState state) { + final Difference diff = Versions.diff (m_item.getContentItem(state).getOID(), m_from.getTransaction(state), |
From: <fa...@vh...> - 2005-09-12 15:03:53
|
Author: fabrice Date: 2005-09-12 16:54:39 +0200 (Mon, 12 Sep 2005) New Revision: 774 Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/lifecycle/ItemLifecycleItemPane.java ccm-cms/trunk/src/com/arsdigita/cms/ui/lifecycle/ItemLifecycleSelectForm.java Log: Option not to delete workflow after publication Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/lifecycle/ItemLifecycleItemPane.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/ui/lifecycle/ItemLifecycleItemPane.java 2005-09-12 14:54:17 UTC (rev 773) +++ ccm-cms/trunk/src/com/arsdigita/cms/ui/lifecycle/ItemLifecycleItemPane.java 2005-09-12 14:54:39 UTC (rev 774) @@ -233,7 +233,9 @@ } } + if (ContentSection.getConfig().getDeleteWorkflowAfterPublication()) { workflow.delete(); + } } if (ContentSection.getConfig().getUseStreamlinedCreation()) { Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/lifecycle/ItemLifecycleSelectForm.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/ui/lifecycle/ItemLifecycleSelectForm.java 2005-09-12 14:54:17 UTC (rev 773) +++ ccm-cms/trunk/src/com/arsdigita/cms/ui/lifecycle/ItemLifecycleSelectForm.java 2005-09-12 14:54:39 UTC (rev 774) @@ -528,7 +528,9 @@ } } + if (ContentSection.getConfig().getDeleteWorkflowAfterPublication()) { workflow.delete(); + } } // redirect to /content-center if streamlined creation mode is active. |
From: <fa...@vh...> - 2005-09-12 15:03:27
|
Author: fabrice Date: 2005-09-12 16:54:17 +0200 (Mon, 12 Sep 2005) New Revision: 773 Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/cse/ContentSoonExpiredPane.java Log: Check view permissions on items, and configure timespan of CSEPane Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/cse/ContentSoonExpiredPane.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/ui/cse/ContentSoonExpiredPane.java 2005-09-12 14:53:47 UTC (rev 772) +++ ccm-cms/trunk/src/com/arsdigita/cms/ui/cse/ContentSoonExpiredPane.java 2005-09-12 14:54:17 UTC (rev 773) @@ -29,12 +29,15 @@ import com.arsdigita.cms.SecurityManager; import com.arsdigita.cms.ui.ContentItemPage; import com.arsdigita.cms.util.GlobalizationUtil; +import com.arsdigita.cms.util.SecurityConstants; import com.arsdigita.globalization.GlobalizedMessage; import com.arsdigita.kernel.User; import com.arsdigita.kernel.permissions.PermissionDescriptor; import com.arsdigita.kernel.permissions.PermissionService; import com.arsdigita.kernel.permissions.PrivilegeDescriptor; import com.arsdigita.persistence.DataQuery; +import com.arsdigita.persistence.Filter; +import com.arsdigita.persistence.FilterFactory; import com.arsdigita.persistence.OID; import com.arsdigita.persistence.Session; import com.arsdigita.persistence.SessionManager; @@ -49,6 +52,7 @@ import java.math.BigDecimal; import java.util.Calendar; +import java.util.Iterator; import org.apache.log4j.Logger; @@ -74,12 +78,22 @@ SecurityManager sm = CMS.getContext().getSecurityManager(); User user = Web.getContext().getUser(); - if (hasSiteWideAdmin(user)) { - getDataTable().generateXML(state, parent); - } + DataTable dt = getDataTable(); + DataQuery dq = dt.getDataQuery(state); + dq.addFilter(getViewFilter(dq, user)); + + dt.generateXML(state, parent); + } + private static Filter getViewFilter(DataQuery query, User user) { + PrivilegeDescriptor privilege = new PrivilegeDescriptor(SecurityConstants.CMS_READ_ITEM); + FilterFactory ff = query.getFilterFactory(); + OID partyOID = user.getOID(); + return PermissionService.getFilterQuery(ff, "objectId", privilege, partyOID); + } + protected DataTable getDataTable() { if (dataTable == null) { dataTable = new DataTable(new ContentSoonExpiredQueryBuilder()); @@ -123,8 +137,12 @@ Session ses = SessionManager.getSession(); DataQuery query = ses.retrieveQuery("com.arsdigita.cms.getContentItemExpiredBeforeInSection"); + int months = ContentSection.getConfig().getSoonExpiredMonths(); + int days = ContentSection.getConfig().getSoonExpiredDays(); + Calendar now = Calendar.getInstance(); - now.add(Calendar.DAY_OF_YEAR, 1); + now.add(Calendar.DAY_OF_YEAR, days); + now.add(Calendar.MONTH, months); query.setParameter("endDateTime", now.getTime()); ContentSection section = CMS.getContext().getContentSection(); @@ -178,11 +196,28 @@ public Component getComponent(Table table, PageState state, Object value, boolean isSelected, Object key, int row, int column) { + boolean canEdit = false; BigDecimal id = (BigDecimal) key; + User user = Web.getContext().getUser(); + ContentItem ci = getItemFromIdString(id.toString()); + Iterator permissions = PermissionService.getImpliedPrivileges(ci.getOID(), user.getOID()); + while (permissions.hasNext()) { + PrivilegeDescriptor permission = (PrivilegeDescriptor)permissions.next(); + if (permission.equals(PrivilegeDescriptor.ADMIN) || permission.equals(PrivilegeDescriptor.EDIT)) { + canEdit = true; + break; + } + } + + if (!canEdit) { + return new Label(""); + } + Link l = (Link) threadLocal.get(); l.setTarget(ContentItemPage.getRelativeItemURL(ContentSoonExpiredPane.getItemDraft(id.toString()), ContentItemPage.AUTHORING_TAB)); ((Label) l.getChild()).setLabel(GlobalizationUtil.globalize("cms.ui.cse.editLink")); - return l; + + return l; } } |
From: <fa...@vh...> - 2005-09-12 15:02:55
|
Author: fabrice Date: 2005-09-12 16:53:47 +0200 (Mon, 12 Sep 2005) New Revision: 772 Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/folder/FolderEditForm.java ccm-cms/trunk/src/com/arsdigita/cms/ui/folder/FolderForm.java Log: Rename live version of folders too Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/folder/FolderEditForm.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/ui/folder/FolderEditForm.java 2005-09-12 14:52:37 UTC (rev 771) +++ ccm-cms/trunk/src/com/arsdigita/cms/ui/folder/FolderEditForm.java 2005-09-12 14:53:47 UTC (rev 772) @@ -24,6 +24,7 @@ import com.arsdigita.bebop.event.FormProcessListener; import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.cms.Folder; + import org.apache.log4j.Logger; class FolderEditForm extends FolderBaseForm { @@ -78,8 +79,17 @@ folder.setLabel((String) m_title.getValue(state)); folder.setName((String) m_fragment.getValue(state)); + folder.save(); - folder.save(); + // also modify the live version of the folder, + // otherwise items within this folder will keep + // using the old URL, for example + Folder live = (Folder) folder.getLiveVersion(); + if (live != null) { + live.setLabel((String) m_title.getValue(state)); + live.setName((String) m_fragment.getValue(state)); + live.save(); + } } } } Modified: ccm-cms/trunk/src/com/arsdigita/cms/ui/folder/FolderForm.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/ui/folder/FolderForm.java 2005-09-12 14:52:37 UTC (rev 771) +++ ccm-cms/trunk/src/com/arsdigita/cms/ui/folder/FolderForm.java 2005-09-12 14:53:47 UTC (rev 772) @@ -98,6 +98,16 @@ folder.setName(name); folder.setLabel(label); folder.save(); + + // also modify the live version of the folder, + // otherwise items within this folder will keep + // using the old URL, for example + Folder live = (Folder) folder.getLiveVersion(); + if (live != null) { + live.setName(name); + live.setLabel(label); + live.save(); + } } /** |
From: <fa...@vh...> - 2005-09-12 15:01:48
|
Author: fabrice Date: 2005-09-12 16:52:37 +0200 (Mon, 12 Sep 2005) New Revision: 771 Modified: ccm-cms/trunk/src/com/arsdigita/cms/ContentSectionConfig.java ccm-cms/trunk/src/com/arsdigita/cms/ContentSectionConfig_parameter.properties ccm-cms/trunk/src/com/arsdigita/cms/search/AssetExtractor.java ccm-cms/trunk/src/com/arsdigita/cms/search/TextContentProvider.java Log: Option to disable file asset extraction Modified: ccm-cms/trunk/src/com/arsdigita/cms/ContentSectionConfig.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/ContentSectionConfig.java 2005-09-12 14:52:01 UTC (rev 770) +++ ccm-cms/trunk/src/com/arsdigita/cms/ContentSectionConfig.java 2005-09-12 14:52:37 UTC (rev 771) @@ -46,6 +46,9 @@ import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; /** * A record containing server-session scoped configuration properties. @@ -91,6 +94,11 @@ private final Parameter m_publishLifecycleListenerClass; private final Parameter m_notifyAuthorOnLifecycle; private final Parameter m_saveTextCleansWordTags; + private final Parameter m_hideAdditionalResourceFields; + private final Parameter m_disableFileAssetExtraction; + private final Parameter m_deleteWorkflowAfterPublication; + private final Parameter m_soonExpiredTimespanMonths; + private final Parameter m_soonExpiredTimespanDays; private final Parameter m_defaultTaskAlerts; /** @@ -227,6 +235,26 @@ ("com.arsdigita.cms.save_text_cleans_word_tags", Parameter.OPTIONAL, new Boolean(false)); + m_hideAdditionalResourceFields = new BooleanParameter + ("com.arsdigita.cms.contentassets.ui.RelatedLinkPropertyForm.hideAdditionalResourceFields", + Parameter.REQUIRED, new Boolean(false)); + + m_disableFileAssetExtraction = new BooleanParameter + ("com.arsdigita.cms.search.disableFileAssetExtraction", + Parameter.REQUIRED, new Boolean(false)); + + m_deleteWorkflowAfterPublication = new BooleanParameter + ("com.arsdigita.cms.delete_workflow_after_publication", + Parameter.REQUIRED, new Boolean(true)); + + m_soonExpiredTimespanDays = new IntegerParameter + ("com.arsdigita.cms.soon_expired_timespan_days", + Parameter.REQUIRED, new Integer(1)); + + m_soonExpiredTimespanMonths = new IntegerParameter + ("com.arsdigita.cms.soon_expired_timespan_months", + Parameter.REQUIRED, new Integer(0)); + register(m_templateRootPath); register(m_defaultItemTemplatePath); register(m_defaultFolderTemplatePath); @@ -252,6 +280,11 @@ register(m_publishLifecycleListenerClass); register(m_notifyAuthorOnLifecycle); register(m_saveTextCleansWordTags); + register(m_hideAdditionalResourceFields); + register(m_disableFileAssetExtraction); + register(m_deleteWorkflowAfterPublication); + register(m_soonExpiredTimespanMonths); + register(m_soonExpiredTimespanDays); register(m_defaultTaskAlerts); loadInfo(); @@ -361,6 +394,26 @@ return ((Boolean) get(m_saveTextCleansWordTags)).booleanValue(); } + public final boolean isHideAdditionalResourceFields() { + return ((Boolean) get(m_hideAdditionalResourceFields)).booleanValue(); + } + + public final boolean getDisableFileAssetExtraction() { + return ((Boolean) get(m_disableFileAssetExtraction)).booleanValue(); + } + + public final boolean getDeleteWorkflowAfterPublication() { + return ((Boolean) get(m_deleteWorkflowAfterPublication)).booleanValue(); + } + + public final int getSoonExpiredMonths() { + return ((Integer) get(m_soonExpiredTimespanMonths)).intValue(); + } + + public final int getSoonExpiredDays() { + return ((Integer) get(m_soonExpiredTimespanDays)).intValue(); + } + public final String[] getDefaultTaskAlerts() { return (String[]) get(m_defaultTaskAlerts); } Modified: ccm-cms/trunk/src/com/arsdigita/cms/ContentSectionConfig_parameter.properties =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/ContentSectionConfig_parameter.properties 2005-09-12 14:52:01 UTC (rev 770) +++ ccm-cms/trunk/src/com/arsdigita/cms/ContentSectionConfig_parameter.properties 2005-09-12 14:52:37 UTC (rev 771) @@ -123,7 +123,31 @@ com.arsdigita.cms.save_text_cleans_word_tags.example=false com.arsdigita.cms.save_text_cleans_word_tags.format=[boolean] +com.arsdigita.cms.contentassets.ui.RelatedLinkPropertyForm.hideAdditionalResourceFields.title=Hide Additional Resource Fields +com.arsdigita.cms.contentassets.ui.RelatedLinkPropertyForm.hideAdditionalResourceFields.purpose=Hide Additional Resource Fields on RelatedLinkPropertyForm +com.arsdigita.cms.contentassets.ui.RelatedLinkPropertyForm.hideAdditionalResourceFields.example=false +com.arsdigita.cms.contentassets.ui.RelatedLinkPropertyForm.hideAdditionalResourceFields.format=[boolean] +com.arsdigita.cms.search.disableFileAssetExtraction.title=Disable FileAsset Extraction +com.arsdigita.cms.search.disableFileAssetExtraction.purpose=Get the search indexing not to process FileAssets, eg to avoid PDF slowdowns +com.arsdigita.cms.search.disableFileAssetExtraction.example=false +com.arsdigita.cms.search.disableFileAssetExtraction.format=[boolean] + +com.arsdigita.cms.delete_workflow_after_publication.title=Delete Workflow After Publication +com.arsdigita.cms.delete_workflow_after_publication.purpose=Whether an item's workflow should be deleted, once the item has been (re)published +com.arsdigita.cms.delete_workflow_after_publication.example=true +com.arsdigita.cms.delete_workflow_after_publication.format=[boolean] + +com.arsdigita.cms.soon_expired_timespan_days.title=Soon Expired Span Days +com.arsdigita.cms.soon_expired_timespan_days.purpose=Defines the number of days ahead that are covered in the 'Soon Expired' tab +com.arsdigita.cms.soon_expired_timespan_days.example=0 +com.arsdigita.cms.soon_expired_timespan_days.format=[integer] + +com.arsdigita.cms.soon_expired_timespan_months.title=Soon Expired Span Months +com.arsdigita.cms.soon_expired_timespan_months.purpose=Defines the number of months ahead that are covered in the 'Soon Expired' tab +com.arsdigita.cms.soon_expired_timespan_months.example=0 +com.arsdigita.cms.soon_expired_timespan_months.format=[integer] + com.arsdigita.cms.default_task_alerts.title=Default task alerts com.arsdigita.cms.default_task_alerts.purpose=Define for each task type on which workflow actions alert notifications are generated com.arsdigita.cms.default_task_alerts.example=Authoring:enable:finish:rollback,Approval:enable:finish:rollback,Deploy:enable:finish:rollback Modified: ccm-cms/trunk/src/com/arsdigita/cms/search/AssetExtractor.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/AssetExtractor.java 2005-09-12 14:52:01 UTC (rev 770) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/AssetExtractor.java 2005-09-12 14:52:37 UTC (rev 771) @@ -18,40 +18,36 @@ */ package com.arsdigita.cms.search; -import com.arsdigita.persistence.metadata.Property; -import com.arsdigita.persistence.DataObject; -import com.arsdigita.persistence.DataAssociation; -import com.arsdigita.persistence.metadata.ObjectType; - +import com.arsdigita.cms.ContentSection; +import com.arsdigita.cms.FileAsset; +import com.arsdigita.cms.TextAsset; import com.arsdigita.domain.DomainObject; import com.arsdigita.domain.DomainObjectTraversal; import com.arsdigita.domain.DomainServiceInterfaceExposer; +import com.arsdigita.persistence.DataAssociation; +import com.arsdigita.persistence.DataObject; +import com.arsdigita.persistence.metadata.ObjectType; +import com.arsdigita.persistence.metadata.Property; -import com.arsdigita.cms.TextAsset; -import com.arsdigita.cms.FileAsset; - import java.util.List; import java.util.ArrayList; import org.apache.log4j.Logger; - /** - * An implementation of DomainObjectTraversal that generates a - * finds all associated binary assets + * An implementation of DomainObjectTraversal that + * finds all associated binary assets. * * @version $Id$ */ public class AssetExtractor extends DomainObjectTraversal { - private static final Logger s_log = - Logger.getLogger( AssetExtractor.class ); + private static final Logger s_log = Logger.getLogger(AssetExtractor.class); + private List m_content; - public static final String TEXT_ASSET_DATA_OBJ = - "com.arsdigita.cms.TextAsset"; - public static final String FILE_ASSET_DATA_OBJ = - "com.arsdigita.cms.FileAsset"; + public static final String TEXT_ASSET_DATA_OBJ = "com.arsdigita.cms.TextAsset"; + public static final String FILE_ASSET_DATA_OBJ = "com.arsdigita.cms.FileAsset"; public AssetExtractor() { m_content = new ArrayList(); @@ -63,13 +59,15 @@ protected void beginObject(DomainObject obj, String path) { - if( obj.getObjectType().isSubtypeOf - ( FileAsset.BASE_DATA_OBJECT_TYPE ) ) { - FileAsset fa = (FileAsset) obj; + + if (!ContentSection.getConfig().getDisableFileAssetExtraction()) { + if (obj.getObjectType().isSubtypeOf(FileAsset.BASE_DATA_OBJECT_TYPE)) { + FileAsset fa = (FileAsset) obj; m_content.add( new RawContentProvider( "file", fa.getContent() ) ); if( s_log.isDebugEnabled() ) { s_log.debug( "Adding file provider for object " + fa.getOID() ); + } } } } @@ -85,44 +83,43 @@ protected void handleAttribute(DomainObject obj, String path, Property property) { + Object value = DomainServiceInterfaceExposer.get(obj, property.getName()); - if (value != null && - property.isRole() && - (value instanceof DataObject)) { + if (value != null && property.isRole() && (value instanceof DataObject)) { ObjectType assetType = ((DataObject)value).getOID().getObjectType(); String assetTypeName = assetType.getQualifiedName(); + if (assetTypeName.equals(TEXT_ASSET_DATA_OBJ)) { // add the value of the text asset to search_content TextAsset ta = new TextAsset((DataObject)value); String text = ta.getText(); if (text != null) { text = com.arsdigita.util.StringUtils.htmlToText( text ); - m_content.add( - new RawContentProvider("text", text.getBytes())); + m_content.add(new RawContentProvider("text", text.getBytes())); } - if( s_log.isDebugEnabled() ) { s_log.debug( "Adding text provider for attribute " + ta.getOID() ); } + } else if (assetTypeName.equals(FILE_ASSET_DATA_OBJ)) { + if (!ContentSection.getConfig().getDisableFileAssetExtraction()) { // add the value of the file asset to search_content FileAsset fa = new FileAsset((DataObject)value); m_content.add(new RawContentProvider("file", fa.getContent())); + if( s_log.isDebugEnabled() ) { + s_log.debug("Adding file provider for attribute "+fa.getOID()); + } + } - if( s_log.isDebugEnabled() ) { - s_log.debug( "Adding file provider for attribute " + - fa.getOID() ); - } } else if( s_log.isDebugEnabled() ) { s_log.debug( "Don't know what to do with property " + property.getName() + " of type " + assetTypeName ); } - } - - else if( s_log.isDebugEnabled() ) { + + } else if( s_log.isDebugEnabled() ) { s_log.debug( "Ignoring property " + property.getName() + " of type " + value.getClass().getName() ); } @@ -142,6 +139,9 @@ protected void beginAssociation(DomainObject obj, String path, Property property) { + + if (!ContentSection.getConfig().getDisableFileAssetExtraction()) { + DataAssociation association = (DataAssociation)DomainServiceInterfaceExposer.get (obj, property.getName()); @@ -161,6 +161,7 @@ } } } + } protected void endAssociation(DomainObject obj, String path, Modified: ccm-cms/trunk/src/com/arsdigita/cms/search/TextContentProvider.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/search/TextContentProvider.java 2005-09-12 14:52:01 UTC (rev 770) +++ ccm-cms/trunk/src/com/arsdigita/cms/search/TextContentProvider.java 2005-09-12 14:52:37 UTC (rev 771) @@ -18,9 +18,9 @@ */ package com.arsdigita.cms.search; +import com.arsdigita.cms.ContentSection; +import com.arsdigita.cms.FileAsset; import com.arsdigita.cms.TextAsset; -import com.arsdigita.cms.FileAsset; - import com.arsdigita.domain.DomainObject; import com.arsdigita.domain.DomainObjectTraversal; import com.arsdigita.domain.DomainServiceInterfaceExposer; @@ -95,13 +95,15 @@ protected void beginObject(DomainObject obj, String path) { - if( obj.getObjectType().isSubtypeOf - ( FileAsset.BASE_DATA_OBJECT_TYPE ) ) { - FileAsset fa = (FileAsset) obj; + + if (!ContentSection.getConfig().getDisableFileAssetExtraction()) { + if (obj.getObjectType().isSubtypeOf(FileAsset.BASE_DATA_OBJECT_TYPE)) { + FileAsset fa = (FileAsset) obj; appendFileAsset( fa ); if( s_log.isDebugEnabled() ) { s_log.debug( "Adding file asset object " + fa.getOID() ); + } } } } @@ -127,6 +129,7 @@ ObjectType assetType = ((DataObject)value).getOID().getObjectType(); String assetTypeName = assetType.getQualifiedName(); + if (assetTypeName.equals(TextAsset.BASE_DATA_OBJECT_TYPE)) { if( s_log.isDebugEnabled() ) { s_log.debug( "Adding text asset attribute " + @@ -135,7 +138,9 @@ } appendTextAsset(new TextAsset((DataObject)value)); + } else if (assetTypeName.equals(FileAsset.BASE_DATA_OBJECT_TYPE)) { + if (!ContentSection.getConfig().getDisableFileAssetExtraction()) { if( s_log.isDebugEnabled() ) { s_log.debug( "Adding file asset attribute " + property.getName() + " for " + @@ -145,6 +150,8 @@ FileAsset fa = new FileAsset((DataObject)value); appendFileAsset(fa); } + } + } else { if (value != null && !property.isRole()) { m_text.append(" " + value); @@ -173,7 +180,9 @@ if (association != null && association.getObjectType().isSubtypeOf (FileAsset.BASE_DATA_OBJECT_TYPE)) { - while (association.next()) { + + if (!ContentSection.getConfig().getDisableFileAssetExtraction()) { + while (association.next()) { if( s_log.isDebugEnabled() ) { s_log.debug( "Adding file asset association " + property.getName() + " for " + @@ -182,6 +191,8 @@ appendFileAsset(new FileAsset(association.getDataObject())); } + } + } else if (association != null && association.getObjectType().isSubtypeOf (TextAsset.BASE_DATA_OBJECT_TYPE)) { |
From: <fa...@vh...> - 2005-09-12 15:01:00
|
Author: fabrice Date: 2005-09-12 16:52:01 +0200 (Mon, 12 Sep 2005) New Revision: 770 Modified: ccm-cms/trunk/src/com/arsdigita/cms/publishToFile/PublishedFile.java ccm-cms/trunk/src/com/arsdigita/cms/publishToFile/QueueManager.java Log: Fix to optionally turn off p2fs for items Modified: ccm-cms/trunk/src/com/arsdigita/cms/publishToFile/PublishedFile.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/publishToFile/PublishedFile.java 2005-09-12 14:51:00 UTC (rev 769) +++ ccm-cms/trunk/src/com/arsdigita/cms/publishToFile/PublishedFile.java 2005-09-12 14:52:01 UTC (rev 770) @@ -90,6 +90,12 @@ // file. File getFile() { DestinationStub dest = PublishToFile.getDestination(getItemType()); + + // fix when turning off p2fs for items + if (dest == null) { + return null; + } + File f = new File(dest.getFile(), getFileName()); if (s_log.isDebugEnabled()) { Modified: ccm-cms/trunk/src/com/arsdigita/cms/publishToFile/QueueManager.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/publishToFile/QueueManager.java 2005-09-12 14:51:00 UTC (rev 769) +++ ccm-cms/trunk/src/com/arsdigita/cms/publishToFile/QueueManager.java 2005-09-12 14:52:01 UTC (rev 770) @@ -167,11 +167,17 @@ done.add(fileRecord.getFileName()); File file = fileRecord.getFile(); - if (file.exists()) { + + if (file == null) { + // fix when turning off p2fs for items + s_log.debug("Ignoring null file."); + + } else if (file.exists()) { if (s_log.isDebugEnabled()) { s_log.debug( "File " + file.getAbsolutePath() + " already exists"); } + } else { if (s_log.isInfoEnabled()) { s_log.info("Published file " + file.getAbsolutePath() + |
From: <fa...@vh...> - 2005-09-12 15:00:03
|
Author: fabrice Date: 2005-09-12 16:51:00 +0200 (Mon, 12 Sep 2005) New Revision: 769 Modified: ccm-cms/trunk/src/com/arsdigita/cms/lifecycle/NotifyLifecycleListener.java Log: Notification email to link to correct id Modified: ccm-cms/trunk/src/com/arsdigita/cms/lifecycle/NotifyLifecycleListener.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/lifecycle/NotifyLifecycleListener.java 2005-09-12 13:44:07 UTC (rev 768) +++ ccm-cms/trunk/src/com/arsdigita/cms/lifecycle/NotifyLifecycleListener.java 2005-09-12 14:51:00 UTC (rev 769) @@ -222,28 +222,35 @@ Party sender = UserTask.getAlertsSender(); if (sender == null) { s_log.error("Failed to get 'from' party from UserTask "); - } else { - + + } else { ContentSection section = item.getContentSection(); - DateFormat df = DateFormat.getDateInstance(DateFormat.LONG); String name = null; if (item instanceof ContentPage) { name = ((ContentPage)item).getTitle(); - } - else { + } else { name = item.getName(); } + String subject = "Content Item " + name + " is about to expire"; - String publicURL = URL.there(section.getSiteNode() - .getURL(DispatcherHelper.getWebappContext()) + + String publicURL = URL.there(section.getSiteNode().getURL(DispatcherHelper.getWebappContext()) + item.getPath(), null).getURL(); - String adminURL = URL.there(ContentItemPage - .getItemURL(item,ContentItemPage.AUTHORING_TAB), - null).getURL(); - + + // link to the trunk version of the item, which can be edited. + // the live item cannot! + //String adminURL = URL.there(ContentItemPage.getItemURL(item,ContentItemPage.AUTHORING_TAB), null).getURL(); + ContentItem adminItem = item.getDraftVersion(); + if (adminItem == null) { + adminItem = item; + } + String adminURL = URL.there(ContentItemPage.getItemURL(adminItem, + ContentItemPage.AUTHORING_TAB) + , null).getURL(); + StringBuffer body = new StringBuffer(300); body.append("Content Item "); body.append(name); |
From: <ssk...@vh...> - 2005-09-12 13:53:18
|
Author: sskracic Date: 2005-09-12 15:44:07 +0200 (Mon, 12 Sep 2005) New Revision: 768 Modified: tools/trunk/tools/lib/CCM/Runtime.pm Log: Try PG 8.0, then 7.4 JDBC, then everything else. Fixed uninitialized value issue. Modified: tools/trunk/tools/lib/CCM/Runtime.pm =================================================================== --- tools/trunk/tools/lib/CCM/Runtime.pm 2005-09-12 12:21:39 UTC (rev 767) +++ tools/trunk/tools/lib/CCM/Runtime.pm 2005-09-12 13:44:07 UTC (rev 768) @@ -158,12 +158,16 @@ $classpath = CCM::Util::catpath($classpath, $jar); } my $postgresql_jdbc = $ENV{'PG_JDBC2_LIB'}; + my @pg_jdbc_locs = ( + "/usr/share/java/rh-postgresql3.jar", + "/usr/share/pgsql/java/rh-postgresql3.jar", + "/usr/share/java/postgresql-jdbc3.jar", + "/usr/share/java/postgresql.jar" ); + # try 8.0, then 7.4, then everything else + my @pg80jars = glob("/usr/share/java/postgresql-8.0.*.jar"); + unshift @pg_jdbc_locs, (pop @pg80jars) if @pg80jars; my @pg74jars = glob("/usr/share/java/pg74*jdbc3.jar"); - # take the latest available - my $pg74jar = pop @pg74jars; - my @pg_jdbc_locs = ( $pg74jar, - "/usr/share/java/rh-postgresql3.jar", - "/usr/share/pgsql/java/rh-postgresql3.jar" ); + unshift @pg_jdbc_locs, (pop @pg74jars) if @pg74jars; for my $jar (@pg_jdbc_locs) { last if defined $postgresql_jdbc; $postgresql_jdbc = $jar if -f $jar; |
From: <ssk...@vh...> - 2005-09-12 12:30:54
|
Author: sskracic Date: 2005-09-12 14:21:39 +0200 (Mon, 12 Sep 2005) New Revision: 767 Modified: tools/trunk/misc/build-all.sh Log: More elegant way to find out the revision no. of the current dir. Modified: tools/trunk/misc/build-all.sh =================================================================== --- tools/trunk/misc/build-all.sh 2005-09-12 09:25:57 UTC (rev 766) +++ tools/trunk/misc/build-all.sh 2005-09-12 12:21:39 UTC (rev 767) @@ -185,21 +185,14 @@ # Gets svn revision for app whose tree starts in current dir. function get_svn_revision { SVN_REVISION="" - ccm_app=$(pwd) - ccm_app=${ccm_app##*/} - direntry=$(expr match "$(tr '\012' ' ' < .svn/entries)" '.*\(<entry [^>]*name=""[^>]*>\)') - if [ -z "$direntry" ]; then - echo "Could not find top level .svn entry for $ccm_app" - exit 1 - fi - revision=$(expr match "$direntry" '.*revision="\([0-9]*\)"') + revision=$(svn info . | grep ^Revision | cut '-d ' -f2) + ccm_app=$(pwd | sed 's!.*/!!') if [ -z "$revision" ]; then echo "Could not find the most recent svn revision number for $ccm_app" exit 1 fi # Woo hoo, we have revision number now! echo "Found the svn revision number for $ccm_app: $revision" - SVN_REVISION=".r$revision" } |