From 2f0048fea72720f67a205d16b7fce45a448e91b7 Mon Sep 17 00:00:00 2001 From: pb Date: Tue, 31 Jan 2012 02:38:22 +0000 Subject: [PATCH] Diverse Formatierungen und Bereinigungen. git-svn-id: https://svn.libreccm.org/ccm/trunk@1483 8810af33-2d31-482b-a856-94f89814c4df --- .../themes/static/aplaws-generic/lib/lib.xsl | 8 +- .../WEB-INF/resources/cms-item-adapters.xml | 32 ++- ccm-cms/src/com/arsdigita/cms/CMSConfig.java | 9 +- .../arsdigita/cms/dispatcher/BaseAsset.java | 4 +- .../cms/dispatcher/ContentItemXSLServlet.java | 1 + .../dispatcher/DefaultTemplateResolver.java | 1 + .../cms/dispatcher/ServiceDispatcher.java | 2 +- .../cms/publishToFile/DestinationStub.java | 1 + .../cms/publishToFile/Initializer.java | 16 +- .../cms/publishToFile/PublishToFile.java | 20 +- .../publishToFile/PublishToFileConfig.java | 197 ++++++++---------- .../PublishToFileConfig_parameter.properties | 73 ++++--- .../AddNewStyleApplicationEntries.java | 2 +- .../dispatcher/BaseDispatcherServlet.java | 3 + .../dispatcher/RedirectorServlet.java | 3 + .../src/com/arsdigita/web/BaseDispatcher.java | 24 ++- .../com/arsdigita/web/DispatcherServlet.java | 14 +- ccm-core/src/com/arsdigita/web/WebConfig.java | 1 + .../themes/static/aplaws-generic/lib/lib.xsl | 12 +- ccm-sci-bundle/bundles/devel/cfg/project.xml | 2 +- .../themes/static/aplaws-generic/lib/lib.xsl | 19 +- 21 files changed, 237 insertions(+), 207 deletions(-) diff --git a/ccm-bundle/web/themes/static/aplaws-generic/lib/lib.xsl b/ccm-bundle/web/themes/static/aplaws-generic/lib/lib.xsl index 3ffab4e5f..f8247e3b8 100644 --- a/ccm-bundle/web/themes/static/aplaws-generic/lib/lib.xsl +++ b/ccm-bundle/web/themes/static/aplaws-generic/lib/lib.xsl @@ -200,11 +200,9 @@ - - - -Data Protection and Information Sharing notice. No personal information you have given us will be passed on to third parties for commercial purposes. The Council's policy is that all information will be shared among officers and other agencies where the legal framework allows it, if this will help to improve the service you receive and to develop other services. If you do not wish certain information about you to be exchanged within the Council, you can request that this does not happen. - + + + diff --git a/ccm-cms/src/WEB-INF/resources/cms-item-adapters.xml b/ccm-cms/src/WEB-INF/resources/cms-item-adapters.xml index 83333942f..39b7593ca 100755 --- a/ccm-cms/src/WEB-INF/resources/cms-item-adapters.xml +++ b/ccm-cms/src/WEB-INF/resources/cms-item-adapters.xml @@ -9,7 +9,8 @@ - + @@ -33,7 +34,9 @@ - + @@ -50,7 +53,9 @@ - + @@ -67,7 +72,9 @@ - + @@ -129,7 +136,8 @@ - + @@ -153,7 +161,9 @@ - + @@ -214,7 +224,8 @@ - + @@ -230,12 +241,15 @@ - + - + diff --git a/ccm-cms/src/com/arsdigita/cms/CMSConfig.java b/ccm-cms/src/com/arsdigita/cms/CMSConfig.java index 41f74db87..4687cb38e 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSConfig.java +++ b/ccm-cms/src/com/arsdigita/cms/CMSConfig.java @@ -105,7 +105,7 @@ public final class CMSConfig extends AbstractConfig { * * @return The ContentSectionConfig record; it cannot be null */ - public static final synchronized CMSConfig getInstance() { + public static synchronized CMSConfig getInstance() { if (s_config == null) { s_config = new CMSConfig(); s_config.load(); @@ -148,7 +148,8 @@ public final class CMSConfig extends AbstractConfig { Parameter.REQUIRED, "/default/folder.jsp"); /** - * Path for the default template folder. Path is relative to webapp root + * Path or the root folter for template folders. + * Path is relative to webapp root. */ private final Parameter m_templateRootPath = new StringParameter( @@ -696,6 +697,10 @@ public final class CMSConfig extends AbstractConfig { loadInfo(); } + /** + * Retrieve path of the root folter for template folders. + * Path is relative to webapp root. + */ public final String getTemplateRoot() { return (String) get(m_templateRootPath); } diff --git a/ccm-cms/src/com/arsdigita/cms/dispatcher/BaseAsset.java b/ccm-cms/src/com/arsdigita/cms/dispatcher/BaseAsset.java index e038ca51f..bfd443133 100755 --- a/ccm-cms/src/com/arsdigita/cms/dispatcher/BaseAsset.java +++ b/ccm-cms/src/com/arsdigita/cms/dispatcher/BaseAsset.java @@ -44,8 +44,10 @@ import javax.servlet.ServletException; class BaseAsset extends ResourceHandlerImpl { private static final Logger s_log = Logger.getLogger(BaseAsset.class); + public final static String ASSET_ID = "asset_id"; public static final String OID_PARAM = "oid"; + private final static String s_defaultName = "File"; private static final BigDecimalParameter s_assetId = new BigDecimalParameter(ASSET_ID); private static final OIDParameter s_oid = new OIDParameter(OID_PARAM); @@ -72,7 +74,7 @@ class BaseAsset extends ResourceHandlerImpl { } /** - * Sets RFC2183 governed Contnet-Disposition header to supply filename to + * Sets RFC2183 governed Content-Disposition header to supply filename to * client. See section 19.5.1 of RFC2616 for interpretation of * Content-Disposition in HTTP. */ diff --git a/ccm-cms/src/com/arsdigita/cms/dispatcher/ContentItemXSLServlet.java b/ccm-cms/src/com/arsdigita/cms/dispatcher/ContentItemXSLServlet.java index c9f6becd9..6c3a491e2 100755 --- a/ccm-cms/src/com/arsdigita/cms/dispatcher/ContentItemXSLServlet.java +++ b/ccm-cms/src/com/arsdigita/cms/dispatcher/ContentItemXSLServlet.java @@ -55,6 +55,7 @@ public class ContentItemXSLServlet extends BaseServlet { public static Map s_templateResolverCache = Collections.synchronizedMap(new HashMap()); + @Override protected void doService(HttpServletRequest sreq, HttpServletResponse sresp) throws ServletException, IOException { diff --git a/ccm-cms/src/com/arsdigita/cms/dispatcher/DefaultTemplateResolver.java b/ccm-cms/src/com/arsdigita/cms/dispatcher/DefaultTemplateResolver.java index a9d03360e..16c522f5b 100755 --- a/ccm-cms/src/com/arsdigita/cms/dispatcher/DefaultTemplateResolver.java +++ b/ccm-cms/src/com/arsdigita/cms/dispatcher/DefaultTemplateResolver.java @@ -79,6 +79,7 @@ public class DefaultTemplateResolver extends AbstractTemplateResolver public String getTemplate(ContentSection section, ContentItem item, HttpServletRequest request) { + String template = getItemTemplate(section, item, request); MimeType mimeType = MimeType.loadMimeType(Template.JSP_MIME_TYPE); diff --git a/ccm-cms/src/com/arsdigita/cms/dispatcher/ServiceDispatcher.java b/ccm-cms/src/com/arsdigita/cms/dispatcher/ServiceDispatcher.java index 03106af85..75cdc8f6a 100755 --- a/ccm-cms/src/com/arsdigita/cms/dispatcher/ServiceDispatcher.java +++ b/ccm-cms/src/com/arsdigita/cms/dispatcher/ServiceDispatcher.java @@ -298,7 +298,7 @@ public class ServiceDispatcher extends LockableImpl implements Dispatcher { * </dispatcher-configuration> * */ - private final void readFromFile(final String file) { + private void readFromFile(final String file) { if ( isLocked() ) { s_log.error( diff --git a/ccm-cms/src/com/arsdigita/cms/publishToFile/DestinationStub.java b/ccm-cms/src/com/arsdigita/cms/publishToFile/DestinationStub.java index 4a82ffeb4..9e418e439 100755 --- a/ccm-cms/src/com/arsdigita/cms/publishToFile/DestinationStub.java +++ b/ccm-cms/src/com/arsdigita/cms/publishToFile/DestinationStub.java @@ -75,6 +75,7 @@ class DestinationStub { return m_urlStub; } + @Override public String toString() { return "Doc Root " + m_documentRoot + (isSharedRoot() ? " (shared)" : " (not shared)") + diff --git a/ccm-cms/src/com/arsdigita/cms/publishToFile/Initializer.java b/ccm-cms/src/com/arsdigita/cms/publishToFile/Initializer.java index 6bac3f804..c0700140a 100755 --- a/ccm-cms/src/com/arsdigita/cms/publishToFile/Initializer.java +++ b/ccm-cms/src/com/arsdigita/cms/publishToFile/Initializer.java @@ -79,6 +79,7 @@ public class Initializer extends CompoundInitializer { * registering object instantiators and observers. * */ + @Override public void init(DomainInitEvent e) { s_log.debug("publishToFile.Initializer.init(DomainInitEvent) invoked"); @@ -106,6 +107,7 @@ public class Initializer extends CompoundInitializer { public DomainObject doNewInstance(DataObject dataObject) { return new PublishedFile(dataObject); } + @Override public DomainObjectInstantiator resolveInstantiator(DataObject obj) { return this; @@ -117,18 +119,6 @@ public class Initializer extends CompoundInitializer { } -// /** -// * An empty implementation of {@link Initializer#init(LegacyInitEvent)}. -// * -// * @param evt The legacy init event. -// */ -// An empty implementations prevents this initializer from being executed. -// A missing implementations causes the super class method to be executed, which -// invokes the above added LegacyInitializer. -// That initializer starts P2fs background thread and creation of -// ~/packages/content-section/templates/content works now. -// SEE NEW LOCATION: ~/templates/ccm-cms/content-section -// public void init(LegacyInitEvent evt) {} /** * Implementation of the {@link Initializer#init(ContextInitEvent)} method @@ -138,6 +128,7 @@ public class Initializer extends CompoundInitializer { * * @param evt The context init event. **/ + @Override public void init(ContextInitEvent evt) { s_log.debug("publishToFile.Initializer.init(ContextInitEvent) invoked"); @@ -193,6 +184,7 @@ public class Initializer extends CompoundInitializer { * * @param evt The legacy init event. **/ + @Override public void close(ContextCloseEvent evt) { s_log.debug("publishToFile.Initializer.destroy() invoked"); diff --git a/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFile.java b/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFile.java index ec904b1fd..a0c6ebb67 100755 --- a/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFile.java +++ b/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFile.java @@ -50,21 +50,27 @@ import java.util.Map; import org.apache.log4j.Logger; /** - * Methods for writing content (as static pages) to the file - * system when an item is published, and removing the files when the - * item is unpublished. + * PublishToFile system provides two capability: + * (1) It writes content as static html pages to the file system when an item is + * published and removes the files when the item is unpublished. It enables + * CCM to store content for delivery directly by a WEB server instead of + * generating pages dynamically every time a page is requested (standard usage). + * (2) It delivers (and synchronizes) templates stored in the database to the + * filesystem of each CCM instance (e.g. in a distributed multi tear + * environment but also in case of a single instance). User defined templates + * are stored in the database and must be synchronized with the filesystem + * in order to be used. * * @author Jeff Teeters (teeters@arsdigita.com) * @author David Lutterkort * @version $Revision: #32 $ $DateTime: 2004/08/17 23:15:09 $ */ - public class PublishToFile implements PublishToFileListener { - public static final int DEFAULT_TIMEOUT = 60; + /** Private Logger instance for debugging purpose. */ + private static Logger s_log = Logger.getLogger(PublishToFile.class); - private static Logger s_log = - Logger.getLogger(PublishToFile.class); + public static final int DEFAULT_TIMEOUT = 60; // Queue entry timeout // TODO: pickup value from configuration file as a single source! diff --git a/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFileConfig.java b/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFileConfig.java index 36542d19f..281258f9d 100644 --- a/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFileConfig.java +++ b/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFileConfig.java @@ -18,27 +18,20 @@ */ package com.arsdigita.cms.publishToFile; +import com.arsdigita.cms.CMS; import com.arsdigita.runtime.AbstractConfig; import com.arsdigita.util.parameter.BooleanParameter; -// import com.arsdigita.util.parameter.ClassParameter; import com.arsdigita.util.parameter.IntegerParameter; import com.arsdigita.util.parameter.Parameter; import com.arsdigita.util.parameter.SpecificClassParameter; import com.arsdigita.util.parameter.StringParameter; -// import java.util.Arrays; import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; -// STATUS: All parameter and its values copied from the old Initializer class -// and from enterprise.init file. -// Temporary solution for m_destinations (destinations for published content -// items and template), returned as constant list. - - /** * Configuration object for the publish-to-file service. * @@ -47,10 +40,27 @@ import org.apache.log4j.Logger; */ public class PublishToFileConfig extends AbstractConfig { + /** Private Logger instance for debugging purpose. */ private static final Logger s_log = Logger.getLogger(PublishToFileConfig.class); + /** Private static instance of this class - singelton design pattern */ private static PublishToFileConfig s_conf; + + /** + * Disable publish-to-filesystem for content items (not for templates!). + * + * NOTE: Templates are stored in the database and must be synchronized with + * the filesystem in order to be used. Therefore publish-to filesystem must + * not deactivated at all. + */ + private final Parameter + m_disableItemPfs = new BooleanParameter( + "com.arsdigita.cms.ptf.disable_item_pfs", + Parameter.REQUIRED, + new Boolean(true)); + + /** * Temporary, constant list of publish destinations. It is intended as a * temporary fix until we have a configurable pramameter @@ -60,19 +70,7 @@ public class PublishToFileConfig extends AbstractConfig { private static ArrayList s_tmpDestList; /** - * Disable publish-to-filesystem for items other than templates. - * NOTE: Templates are stored in the database and must be synchronized with - * the filesystem in order to be used. Therefore publish-to filesystem must - * not deactivated at all. - */ - // Moved from ContentSectionConfig where this parameter was a temporary measure - // to allow limited parameter-based control of p2fs until MapParameter, - // which was intended to replace old Initilizer system's parameter - // implementation, is fully implemented) - private final Parameter m_disableItemPfs; - - /** - * List of publish destinations for content types. + * List of publish destinations for content items. * Each list element is itself a four-element list in the format * { "content type", "root directory", "shared storage", "url stub" }. * @@ -81,14 +79,29 @@ public class PublishToFileConfig extends AbstractConfig { * webapp root(!). * Shared storage must be true if the root directory is shared NFS storage, * false otherwise. - * URL stub is the path componen3t of the URL from which the live + * URL stub is the path component of the URL from which the live * server will serve from this directory. */ // ToDO: Parameter destination is a list, but we have no ListParameter type // for now. We have either to develop a ListParameter class or treat this // parameter as a set of StringArrayParameter. // Another possibility considered was MapParameter - private final Parameter m_destinations; + // m_destinations is unfinished work! Not usable! + // Parameter is a list, but we have currently no ListParameter type. + // Others have considered to develop a MapParameter for it. + private final Parameter m_destinations = new StringParameter + ("com.arsdigita.cms.ptf.destination", Parameter.REQUIRED, + "{ " + + " { 'com.arsdigita.cms.ContentItem', " + + " 'p2fs', " + + " false, " + + " '/p2fs' }, " + + " { 'com.arsdigita.cms.Template', " + + CMS.getConfig().getTemplateRoot() + + " false, " + + " '/templates' } " + + "} " + ); /** * Class implementing PublishToFileListener Interface. @@ -98,7 +111,14 @@ public class PublishToFileConfig extends AbstractConfig { * but custom classes can also be used. That can be used to perform * additional actions when publishing or unpublishing to the file system. */ - private final Parameter m_publishToFileListenerClass; + // Originally (old initializer system): + // publishListener = "com.arsdigita.cms.publishToFile.PublishToFile"; + private final Parameter + m_ListenerClass = new SpecificClassParameter( + "com.arsdigita.cms.ptf.listener_class", + Parameter.REQUIRED, + PublishToFile.class, + PublishToFileListener.class); /** * Time (in seconds) after system startup to wait before starting to monitor @@ -109,7 +129,12 @@ public class PublishToFileConfig extends AbstractConfig { * functionality of the system and is not recommended under normal * conditions. */ - private final Parameter m_startupDelay; + private final Parameter + m_startupDelay = new IntegerParameter( + "com.arsdigita.cms.ptf.startup_delay", + Parameter.REQUIRED, + new Integer(30) ); + /** * Time (in seconds) between checking whether there are entries in the @@ -117,22 +142,42 @@ public class PublishToFileConfig extends AbstractConfig { * * A value <= 0 disables processing the queue on this server. */ - private final Parameter m_pollDelay; + private final Parameter + m_pollDelay = new IntegerParameter( + "com.arsdigita.cms.ptf.poll_delay", + Parameter.REQUIRED, + new Integer(5) ); + /** * Time to wait (seconds) before retrying to process a failed entry. */ - private final Parameter m_retryDelay; + private final Parameter + m_retryDelay = new IntegerParameter( + "com.arsdigita.cms.ptf.retry_delay", + Parameter.REQUIRED, + new Integer(120)); + /** * Time to wait (seconds) before aborting item request. */ - private final Parameter m_requestTimeout; + private final Parameter + m_requestTimeout = new IntegerParameter( + "com.arsdigita.cms.ptf.request_timeout", + Parameter.REQUIRED, + new Integer(60) ); + /** * Number of queue entries to process at once. */ - private final Parameter m_blockSize; + private final Parameter + m_blockSize = new IntegerParameter( + "com.arsdigita.cms.ptf.block_size", + Parameter.REQUIRED, + new Integer(40) ); + /** * Method used to select entries for processing. @@ -142,7 +187,12 @@ public class PublishToFileConfig extends AbstractConfig { * all elements in a folder can be done only once for the * folder). */ - private final Parameter m_blockSelectMethod; + private final Parameter + m_blockSelectMethod = new StringParameter( + "com.arsdigita.cms.ptf.block_select_method", + Parameter.REQUIRED, + "GroupByParent"); + /** * Number of times a failed queue entry will be reprocessed. @@ -151,8 +201,11 @@ public class PublishToFileConfig extends AbstractConfig { * will ignore the action. * The default value -1 will ignore this parameter. */ - private final Parameter m_maximumFailCount; - + private final Parameter + m_maximumFailCount = new IntegerParameter( + "com.arsdigita.cms.ptf.maximum_fail_count", + Parameter.REQUIRED, + new Integer(10) ); /** @@ -174,82 +227,16 @@ public class PublishToFileConfig extends AbstractConfig { /** * Constructor. * - * Do not use it directly! + * Do not use it directly! Use PublishToFileConfig.getConfig() instead + * (singelton design pattern!) */ public PublishToFileConfig() { - // Initialize field values - - // Notice: Default now TRUE! Had previously be false. - // Parameter renamed and relocated, Adaptation of installation bundles - // required (version 6.0.2). - m_disableItemPfs = new BooleanParameter - ("com.arsdigita.cms.publishToFile.disable_item_pfs", - Parameter.REQUIRED, new Boolean(true)); - - // m_destinations is unfinished work! Not usable! - // Parameter is a list, but we have currently no ListParameter type. - // Others have considered to develop a MapParameter for it. - m_destinations = new StringParameter - ("com.arsdigita.cms.publishToFile.destination", Parameter.REQUIRED, - "{ " + - " { 'com.arsdigita.cms.ContentItem', " + - " 'p2fs', " + - " false, " + - " '/p2fs' }, " + - " { 'com.arsdigita.cms.Template', " + - " '/templates/ccm-cms/content-section', " + - " false, " + - " '/templates' } " + - "} " - ); - - // Originally (old initializer system): - // publishListener = "com.arsdigita.cms.publishToFile.PublishToFile"; - m_publishToFileListenerClass = new SpecificClassParameter - ("com.arsdigita.cms.publishToFile.publish_to_file_listener_class", - Parameter.REQUIRED, - PublishToFile.class, - PublishToFileListener.class); - - - // Queue management parameters. - - - m_startupDelay = new IntegerParameter - ("com.arsdigita.cms.publishToFile.startup_delay", Parameter.REQUIRED, - new Integer(30)); - - m_pollDelay = new IntegerParameter - ("com.arsdigita.cms.publishToFile.poll_delay", Parameter.REQUIRED, - new Integer(5)); - - m_retryDelay = new IntegerParameter - ("com.arsdigita.cms.publishToFile.retry_delay", Parameter.REQUIRED, - new Integer(120)); - - m_requestTimeout = new IntegerParameter - ("com.arsdigita.cms.publishToFile.request_timeout", Parameter.REQUIRED, - new Integer(60)); - - m_blockSize = new IntegerParameter - ("com.arsdigita.cms.publishToFile.block_size", Parameter.REQUIRED, - new Integer(40)); - - m_blockSelectMethod = new StringParameter - ("com.arsdigita.cms.publishToFile.block_select_method", Parameter.REQUIRED, - "GroupByParent"); - - m_maximumFailCount = new IntegerParameter - ("com.arsdigita.cms.publishToFile.maximum_fail_count", Parameter.REQUIRED, - new Integer(10)); - - // Register parameters register(m_disableItemPfs); // register(m_destinations); Unfinished; currently not usable - register(m_publishToFileListenerClass); + register(m_ListenerClass); register(m_startupDelay); register(m_pollDelay); register(m_retryDelay); @@ -308,15 +295,15 @@ public class PublishToFileConfig extends AbstractConfig { s_tmpDestList = new ArrayList(); s_tmpDestList.add ( new ArrayList() {{ add("com.arsdigita.cms.ContentItem"); - add("p2fs"); + add("html"); add(new Boolean(false)); - add("/p2fs"); + add("/html"); }} ); s_tmpDestList.add ( new ArrayList() {{ add("com.arsdigita.cms.Template"); - add("templates/ccm-cms/content-section"); + add( CMS.getConfig().getTemplateRoot() ); add(new Boolean(false)); add("/templates"); }} @@ -333,7 +320,7 @@ public class PublishToFileConfig extends AbstractConfig { * @return PublishToFileListener implementation class */ public Class getPublishListenerClass() { - return (Class) get(m_publishToFileListenerClass); + return (Class) get(m_ListenerClass); } /** diff --git a/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFileConfig_parameter.properties b/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFileConfig_parameter.properties index 9d0b5e408..1b321e0d8 100644 --- a/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFileConfig_parameter.properties +++ b/ccm-cms/src/com/arsdigita/cms/publishToFile/PublishToFileConfig_parameter.properties @@ -1,41 +1,50 @@ -com.arsdigita.cms.disable_item_pfs.title=Disable (non-Template) Item p2fs -com.arsdigita.cms.disable_item_pfs.purpose=Disable publish-to-filesystem for items other than templates. -com.arsdigita.cms.disable_item_pfs.example=true -com.arsdigita.cms.disable_item_pfs.format=[boolean] +com.arsdigita.cms.ptf.disable_item_pfs.title=Disable (non-Template) Item p2fs +com.arsdigita.cms.ptf.disable_item_pfs.purpose=Disable publish-to-filesystem for items other than templates. +com.arsdigita.cms.ptf.disable_item_pfs.example=true +com.arsdigita.cms.ptf.disable_item_pfs.format=[boolean] +com.arsdigita.cms.ptf.destination.title=Comming soon +com.arsdigita.cms.ptf.destination.purpose=Comming soon +com.arsdigita.cms.ptf.destination.example=Comming soon +com.arsdigita.cms.ptf.destination.format=Comming soon -com.arsdigita.cms.publish_to_file_class.title=Publish to File listener class -com.arsdigita.cms.publish_to_file_class.purpose=Class implementing PublishToFileListener. Contains the initial methods called when publishing or unpublishing. Normally this should be set to com.arsdigita.cms.publishToFile.PublishToFile, but custom classes can also be used. -com.arsdigita.cms.publish_to_file_class.example=com.arsdigita.cms.publishToFile.PublishToFile -com.arsdigita.cms.publish_to_file_class.format=[class] +com.arsdigita.cms.ptf.listener_class.title=Publish to File listener class +com.arsdigita.cms.ptf.listener_class.purpose=Class implementing PublishToFileListener. Contains the initial methods called when publishing or unpublishing. Normally this should be set to com.arsdigita.cms.publishToFile.PublishToFile, but custom classes can also be used. +com.arsdigita.cms.ptf.listener_class.example=com.arsdigita.cms.publishToFile.PublishToFile +com.arsdigita.cms.ptf.listener_class.format=[class] +com.arsdigita.cms.ptf.startup_delay.title=Publish to File Startup Delay +com.arsdigita.cms.ptf.startup_delay.purpose=Time after system startup to wait before starting to monitor publishToFile queue (in seconds). +com.arsdigita.cms.ptf.startup_delay.example=30 +com.arsdigita.cms.ptf.startup_delay.format=[integer] -waf.notification.request_manager_delay.title=Request Manager Delay -waf.notification.request_manager_delay.purpose=Start of request manager's delay in seconds. -waf.notification.request_manager_delay.example=900 -waf.notification.request_manager_delay.format=[integer] +com.arsdigita.cms.ptf.poll_delay.title=Publish to File Poll Delay +com.arsdigita.cms.ptf.poll_delay.purpose=Time between checking whether there are entries in the publishToFile queue (in seconds). +com.arsdigita.cms.ptf.poll_delay.example=5 +com.arsdigita.cms.ptf.poll_delay.format=[integer] -waf.notification.request_manager_period.title=Request Manager Period -waf.notification.request_manager_period.purpose=Request manager's activities period in seconds -waf.notification.request_manager_period.example=900 -waf.notification.request_manager_period.format=[integer] +com.arsdigita.cms.ptf.retry_delay.title=Publish to File Retry Delay +com.arsdigita.cms.ptf.retry_delay.purpose=Time to wait before retrying to process a failed entry (in seconds). +com.arsdigita.cms.ptf.retry_delay.example=120 +com.arsdigita.cms.ptf.retry_delay.format=[integer] -waf.notification.simple_queue.title=Simple Queue Delay -waf.notification.simple_queue_delay.purpose=Start of Simple Queue's delay in seconds. -waf.notification.simple_queue_delay.example=900 -waf.notification.simple_queue_delay.format=[integer] +com.arsdigita.cms.ptf.request_timeout.title=Publish to File Request Timeout +com.arsdigita.cms.ptf.request_timeout.purpose=Time to wait (seconds) before aborting item request. +com.arsdigita.cms.ptf.request_timeout.example=60 +com.arsdigita.cms.ptf.request_timeout.format=[integer] -waf.notification.simple_queue_period.title=Simple Queue Period -waf.notification.simple_queue_period.purpose=Simple Queue 's activities period in seconds -waf.notification.simple_queue_period.example=900 -waf.notification.simple_queue_period.format=[integer] +com.arsdigita.cms.ptf.block_size.title=Publish to File Block Size +com.arsdigita.cms.ptf.block_size.purpose=Number of queue entries to process at once. +com.arsdigita.cms.ptf.block_size.example=40 +com.arsdigita.cms.ptf.block_size.format=[integer] -waf.notification.digest_queue.title=Digest Queue Delay -waf.notification.digest_queue_delay.purpose=Start of Digest Queue's delay in seconds. -waf.notification.digest_queue_delay.example=900 -waf.notification.digest_queue_delay.format=[integer] +com.arsdigita.cms.ptf.block_select_method.title=Publish to File Block Select Method +com.arsdigita.cms.ptf.block_select_method.purpose=Method used to select entries for processing. +com.arsdigita.cms.ptf.block_select_method.example=[QueuedOrder|GroupByParent] +com.arsdigita.cms.ptf.block_select_method.format=[String] + +com.arsdigita.cms.ptf.maximum_fail_count.title=Publish to File Maximum Fails +com.arsdigita.cms.ptf.maximum_fail_count.purpose=If Fail Count in database is more than specified limit, Queue Manager will ignore the action. +com.arsdigita.cms.ptf.maximum_fail_count.example=10 +com.arsdigita.cms.ptf.maximum_fail_count.format=[integer] -waf.notification.digest_queue_period.title=Digest Queue Period -waf.notification.digest_queue_period.purpose=Digest Queue 's activities period in seconds -waf.notification.digest_queue_period.example=900 -waf.notification.digest_queue_period.format=[integer] diff --git a/ccm-cms/src/com/arsdigita/cms/upgrade/AddNewStyleApplicationEntries.java b/ccm-cms/src/com/arsdigita/cms/upgrade/AddNewStyleApplicationEntries.java index a352cc90c..e9e54eb54 100644 --- a/ccm-cms/src/com/arsdigita/cms/upgrade/AddNewStyleApplicationEntries.java +++ b/ccm-cms/src/com/arsdigita/cms/upgrade/AddNewStyleApplicationEntries.java @@ -39,7 +39,7 @@ import org.apache.log4j.Logger; /** * Update from CCM version 6.6.1 to 6.6.2 where loader has been refactored to - * use (new style) applications in package com.arsdigita.weg instead of old + * use (new style) applications in package com.arsdigita.web instead of old * style applications using com.arsdigita.kermel.[Package* & SiteNode]. * * Affected are the packages CMS Workspace and Service. They are now loaded diff --git a/ccm-core/src/com/arsdigita/dispatcher/BaseDispatcherServlet.java b/ccm-core/src/com/arsdigita/dispatcher/BaseDispatcherServlet.java index 605f66c36..58f541eaf 100755 --- a/ccm-core/src/com/arsdigita/dispatcher/BaseDispatcherServlet.java +++ b/ccm-core/src/com/arsdigita/dispatcher/BaseDispatcherServlet.java @@ -614,6 +614,7 @@ public abstract class BaseDispatcherServlet extends HttpServlet StringBuffer m_buffer = new StringBuffer(); + @Override public InputSource resolveEntity(String publicId, String systemId) throws SAXException { // we don't want to read the web.xml dtd @@ -634,12 +635,14 @@ public abstract class BaseDispatcherServlet extends HttpServlet } } + @Override public void characters(char[] ch, int start, int len) { for (int i = 0; i < len; i++) { m_buffer.append(ch[start + i]); } } + @Override public void endElement(String uri, String localName, String qname) { diff --git a/ccm-core/src/com/arsdigita/dispatcher/RedirectorServlet.java b/ccm-core/src/com/arsdigita/dispatcher/RedirectorServlet.java index b66a264d9..68a0d1633 100755 --- a/ccm-core/src/com/arsdigita/dispatcher/RedirectorServlet.java +++ b/ccm-core/src/com/arsdigita/dispatcher/RedirectorServlet.java @@ -42,6 +42,7 @@ public class RedirectorServlet extends HttpServlet { public String m_target = null; + @Override public void init() throws ServletException { ServletConfig conf = getServletConfig(); m_target = conf.getInitParameter(PARAM_NAME); @@ -50,6 +51,7 @@ public class RedirectorServlet extends HttpServlet { } } + @Override public void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { @@ -60,5 +62,6 @@ public class RedirectorServlet extends HttpServlet { DispatcherHelper.sendExternalRedirect(resp, m_target); } + @Override public void destroy() { } } diff --git a/ccm-core/src/com/arsdigita/web/BaseDispatcher.java b/ccm-core/src/com/arsdigita/web/BaseDispatcher.java index b60b89b50..9acd6e0f0 100755 --- a/ccm-core/src/com/arsdigita/web/BaseDispatcher.java +++ b/ccm-core/src/com/arsdigita/web/BaseDispatcher.java @@ -59,9 +59,19 @@ class BaseDispatcher { return s_cache.isCached(path); } + /** + * Does all the work! + * + * @param sreq + * @param sresp + * @return + * @throws ServletException + * @throws IOException + */ final boolean dispatch(final HttpServletRequest sreq, final HttpServletResponse sresp) - throws ServletException, IOException { + throws ServletException, IOException { + if (s_log.isDebugEnabled()) { s_log.debug("Dispatching request " + sreq.getRequestURI() + " [" + sreq.getContextPath() + "," + @@ -160,11 +170,12 @@ class BaseDispatcher { } } - private final void forward(String contextPath, - final String target, - final HttpServletRequest sreq, - final HttpServletResponse sresp) - throws ServletException, IOException { + private void forward(String contextPath, + final String target, + final HttpServletRequest sreq, + final HttpServletResponse sresp) + throws ServletException, IOException { + if (s_log.isDebugEnabled()) { s_log.debug("Forwarding by path to target '" + target + "'"); } @@ -277,6 +288,7 @@ class BaseDispatcher { return target.toString(); } + @Override public boolean equals(Object obj) { if ( obj==null ) { return false; } diff --git a/ccm-core/src/com/arsdigita/web/DispatcherServlet.java b/ccm-core/src/com/arsdigita/web/DispatcherServlet.java index ff7f30720..077fca1ca 100755 --- a/ccm-core/src/com/arsdigita/web/DispatcherServlet.java +++ b/ccm-core/src/com/arsdigita/web/DispatcherServlet.java @@ -88,6 +88,9 @@ public class DispatcherServlet extends BaseServlet { private String m_fallbackName = null; private final BaseDispatcher m_dispatcher; + /** + * + */ public DispatcherServlet() { m_dispatcher = new BaseDispatcher(); } @@ -106,16 +109,17 @@ public class DispatcherServlet extends BaseServlet { @Override protected void doService(final HttpServletRequest sreq, final HttpServletResponse sresp) - throws ServletException, IOException { - DeveloperSupport.requestStart - (new RequestEvent(sreq, sresp, null, true, false)); - + throws ServletException, IOException { + + DeveloperSupport.requestStart(new RequestEvent( + sreq, sresp, null, true, false)); if (s_log.isDebugEnabled()) { s_log.debug("Servicing request '" + sreq.getRequestURI() + "'"); } - DeveloperSupport.startStage("BaseDispatcher.dispatch"); + + /* Try to dispatch to an applications servlet (i.e. new style legacy free) */ boolean dispatched = m_dispatcher.dispatch(sreq, sresp); DeveloperSupport.endStage("BaseDispatcher.dispatch"); diff --git a/ccm-core/src/com/arsdigita/web/WebConfig.java b/ccm-core/src/com/arsdigita/web/WebConfig.java index 9ac84106d..59708e028 100755 --- a/ccm-core/src/com/arsdigita/web/WebConfig.java +++ b/ccm-core/src/com/arsdigita/web/WebConfig.java @@ -65,6 +65,7 @@ public final class WebConfig extends AbstractConfig { private final Parameter m_secureSwitchBack; public WebConfig() { + m_scheme = new DefaultSchemeParameter ("waf.web.default_scheme", Parameter.REQUIRED, "http"); diff --git a/ccm-quasi-bundle/web/themes/static/aplaws-generic/lib/lib.xsl b/ccm-quasi-bundle/web/themes/static/aplaws-generic/lib/lib.xsl index 3ffab4e5f..d41517159 100644 --- a/ccm-quasi-bundle/web/themes/static/aplaws-generic/lib/lib.xsl +++ b/ccm-quasi-bundle/web/themes/static/aplaws-generic/lib/lib.xsl @@ -200,16 +200,14 @@ - - - -Data Protection and Information Sharing notice. No personal information you have given us will be passed on to third parties for commercial purposes. The Council's policy is that all information will be shared among officers and other agencies where the legal framework allows it, if this will help to improve the service you receive and to develop other services. If you do not wish certain information about you to be exchanged within the Council, you can request that this does not happen. - + + + - - + + diff --git a/ccm-sci-bundle/bundles/devel/cfg/project.xml b/ccm-sci-bundle/bundles/devel/cfg/project.xml index 74250a779..ce9a5230f 100644 --- a/ccm-sci-bundle/bundles/devel/cfg/project.xml +++ b/ccm-sci-bundle/bundles/devel/cfg/project.xml @@ -108,8 +108,8 @@ + diff --git a/ccm-sci-bundle/web/themes/static/aplaws-generic/lib/lib.xsl b/ccm-sci-bundle/web/themes/static/aplaws-generic/lib/lib.xsl index 2fc0a7e2f..216ffc077 100644 --- a/ccm-sci-bundle/web/themes/static/aplaws-generic/lib/lib.xsl +++ b/ccm-sci-bundle/web/themes/static/aplaws-generic/lib/lib.xsl @@ -163,7 +163,7 @@ copyright &nbsp;|&nbsp; disclaimer and privacy statement - &nbsp;|& + &nbsp;|&nbsp; contact &nbsp;|&nbsp; accessibility @@ -187,23 +187,16 @@ - - - - - - - - - - -Data Protection and Information Sharing notice. No personal information you have given us will be passed on to third parties for commercial purposes. The Council's policy is that all information will be shared among officers and other agencies where the legal framework allows it, if this will help to improve the service you receive and to develop other services. If you do not wish certain information about you to be exchanged within the Council, you can request that this does not happen. - + + + + +