Diverse Formatierungen und Bereinigungen.
git-svn-id: https://svn.libreccm.org/ccm/trunk@1483 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
ab0e27cf33
commit
2f0048fea7
|
|
@ -203,8 +203,6 @@
|
|||
<xsl:apply-templates select="cms:contentPanel/cms:item"/>
|
||||
<xsl:call-template name="fileAttachments" />
|
||||
<xsl:call-template name="associatedLinks" />
|
||||
<font family="arial">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.
|
||||
</font>
|
||||
</xsl:when>
|
||||
<!-- A-Z -->
|
||||
<xsl:when test="cms:alphabetNavigation">
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
<xrd:context name="com.arsdigita.cms.dispatcher.SimpleXMLGenerator">
|
||||
|
||||
<!-- Content item is the simplest type -->
|
||||
<xrd:adapter objectType="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:adapter objectType="com.arsdigita.cms.ContentItem"
|
||||
traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:attributes rule="exclude">
|
||||
<xrd:property name="/object/id"/>
|
||||
<xrd:property name="/object/defaultDomainClass"/>
|
||||
|
|
@ -33,7 +34,9 @@
|
|||
</xrd:adapter>
|
||||
|
||||
<!-- Special handling for Link (by Quasimodo)-->
|
||||
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.Link" extends="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.LinkTraversalAdapter">
|
||||
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.Link"
|
||||
extends="com.arsdigita.cms.ContentItem"
|
||||
traversalClass="com.arsdigita.cms.contenttypes.LinkTraversalAdapter">
|
||||
<xrd:attributes rule="exclude">
|
||||
<xrd:property name="/object/targetItem/id"/>
|
||||
<xrd:property name="/object/targetItem/defaultDomainClass"/>
|
||||
|
|
@ -50,7 +53,9 @@
|
|||
</xrd:associations>
|
||||
</xrd:adapter>
|
||||
|
||||
<xrd:adapter objectType="com.arsdigita.cms.ContentPage" extends="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:adapter objectType="com.arsdigita.cms.ContentPage"
|
||||
extends="com.arsdigita.cms.ContentItem"
|
||||
traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
|
||||
|
||||
<xrd:attributes rule="exclude">
|
||||
|
|
@ -67,7 +72,9 @@
|
|||
</xrd:adapter>
|
||||
|
||||
<!-- Adds a text asset -->
|
||||
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.GenericArticle" extends="com.arsdigita.cms.ContentPage" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.GenericArticle"
|
||||
extends="com.arsdigita.cms.ContentPage"
|
||||
traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:attributes rule="exclude">
|
||||
<xrd:property name="/object/textAsset/id"/>
|
||||
<xrd:property name="/object/textAsset/defaultDomainClass"/>
|
||||
|
|
@ -129,7 +136,8 @@
|
|||
<!-- Next the metadata for search -->
|
||||
<xrd:context name="com.arsdigita.cms.search.ContentPageMetadataProvider">
|
||||
<!-- Content item is the simplest type -->
|
||||
<xrd:adapter objectType="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:adapter objectType="com.arsdigita.cms.ContentItem"
|
||||
traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:attributes rule="exclude">
|
||||
<xrd:property name="/object/id"/>
|
||||
<xrd:property name="/object/defaultDomainClass"/>
|
||||
|
|
@ -153,7 +161,9 @@
|
|||
</xrd:adapter>
|
||||
|
||||
<!-- Adds a text asset -->
|
||||
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.GenericArticle" extends="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.GenericArticle"
|
||||
extends="com.arsdigita.cms.ContentItem"
|
||||
traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:attributes rule="exclude">
|
||||
<xrd:property name="/object/textAsset/id"/>
|
||||
<xrd:property name="/object/textAsset/defaultDomainClass"/>
|
||||
|
|
@ -214,7 +224,8 @@
|
|||
|
||||
<!-- Search metadata for file assets -->
|
||||
<xrd:context name="com.arsdigita.cms.search.AssetMetadataProvider">
|
||||
<xrd:adapter objectType="com.arsdigita.cms.FileAsset" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:adapter objectType="com.arsdigita.cms.FileAsset"
|
||||
traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:attributes rule="exclude">
|
||||
<xrd:property name="/object/id"/>
|
||||
<xrd:property name="/object/content"/>
|
||||
|
|
@ -230,12 +241,15 @@
|
|||
<!-- For assets, we want to pull out all HTML, or binary files -->
|
||||
<xrd:context name="com.arsdigita.cms.search.AssetExtractor">
|
||||
<!-- Content item is the simplest type -->
|
||||
<xrd:adapter objectType="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:adapter objectType="com.arsdigita.cms.ContentItem"
|
||||
traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:associations rule="include"/>
|
||||
</xrd:adapter>
|
||||
|
||||
<!-- Adds a text asset -->
|
||||
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.GenericArticle" extends="com.arsdigita.cms.ContentItem" traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.GenericArticle"
|
||||
extends="com.arsdigita.cms.ContentItem"
|
||||
traversalClass="com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter">
|
||||
<xrd:associations rule="include">
|
||||
<xrd:property name="/object/textAsset"/>
|
||||
</xrd:associations>
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public final class CMSConfig extends AbstractConfig {
|
|||
*
|
||||
* @return The <code>ContentSectionConfig</code> 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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ public class ServiceDispatcher extends LockableImpl implements Dispatcher {
|
|||
* </dispatcher-configuration>
|
||||
* </pre>
|
||||
*/
|
||||
private final void readFromFile(final String file) {
|
||||
private void readFromFile(final String file) {
|
||||
|
||||
if ( isLocked() ) {
|
||||
s_log.error(
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ class DestinationStub {
|
|||
return m_urlStub;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Doc Root " + m_documentRoot +
|
||||
(isSharedRoot() ? " (shared)" : " (not shared)") +
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <a href="mailto:dlutter@redhat.com">David Lutterkort</a>
|
||||
* @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!
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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() { }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
||||
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,
|
||||
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; }
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
@ -107,15 +110,16 @@ public class DispatcherServlet extends BaseServlet {
|
|||
protected void doService(final HttpServletRequest sreq,
|
||||
final HttpServletResponse sresp)
|
||||
throws ServletException, IOException {
|
||||
DeveloperSupport.requestStart
|
||||
(new RequestEvent(sreq, sresp, null, true, false));
|
||||
|
||||
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");
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -203,8 +203,6 @@
|
|||
<xsl:apply-templates select="cms:contentPanel/cms:item"/>
|
||||
<xsl:call-template name="fileAttachments" />
|
||||
<xsl:call-template name="associatedLinks" />
|
||||
<font family="arial">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.
|
||||
</font>
|
||||
</xsl:when>
|
||||
<!-- A-Z -->
|
||||
<xsl:when test="cms:alphabetNavigation">
|
||||
|
|
|
|||
|
|
@ -108,8 +108,8 @@
|
|||
|
||||
<!-- Content Types -->
|
||||
<!--
|
||||
<ccm:application name="ccm-cms-types-agenda"/>
|
||||
-->
|
||||
<ccm:application name="ccm-cms-types-agenda"/>
|
||||
<ccm:application name="ccm-cms-types-faqitem"/>
|
||||
<ccm:application name="ccm-cms-types-glossaryitem"/>
|
||||
<ccm:application name="ccm-cms-types-htmlform"/>
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@
|
|||
<a href="/copyright" title="copyright">copyright</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;|&nbsp;</xsl:text>
|
||||
<a href="/disclaimer" title="disclaimer and privacy statement" accesskey="8">disclaimer and privacy statement</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;|&</xsl:text>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;|&nbsp;</xsl:text>
|
||||
<a href="/contact" title="contact" accesskey="9">contact</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;|&nbsp;</xsl:text>
|
||||
<a href="/accessibility" title="accessibility statement" accesskey="0">accessibility</a>
|
||||
|
|
@ -187,13 +187,6 @@
|
|||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<xsl:template name="pageContent">
|
||||
<a class="intLink" name="top" />
|
||||
<xsl:choose>
|
||||
|
|
@ -202,7 +195,7 @@
|
|||
<xsl:apply-templates select="cms:contentPanel/cms:item"/>
|
||||
<xsl:call-template name="fileAttachments" />
|
||||
<xsl:call-template name="associatedLinks" />
|
||||
<font family="arial">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.
|
||||
<font family="arial">
|
||||
</font>
|
||||
</xsl:when>
|
||||
<!-- A-Z -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue