You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2006/12/24 15:47:14 UTC
svn commit: r490029 - in /cocoon/trunk/core:
cocoon-configuration/cocoon-configuration-api/src/main/java/org/apache/cocoon/configuration/
cocoon-configuration/cocoon-configuration-impl/src/main/java/org/apache/cocoon/configuration/
cocoon-configuration...
Author: cziegeler
Date: Sun Dec 24 06:47:14 2006
New Revision: 490029
URL: http://svn.apache.org/viewvc?view=rev&rev=490029
Log:
Remove cocoon servlet specific stuff from settings
Added:
cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/ServletSettings.java (with props)
Removed:
cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/deployment/
Modified:
cocoon/trunk/core/cocoon-configuration/cocoon-configuration-api/src/main/java/org/apache/cocoon/configuration/Settings.java
cocoon/trunk/core/cocoon-configuration/cocoon-configuration-impl/src/main/java/org/apache/cocoon/configuration/SettingsDefaults.java
cocoon/trunk/core/cocoon-configuration/cocoon-configuration-impl/src/main/java/org/apache/cocoon/configuration/impl/MutableSettings.java
cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/generation/StatusGenerator.java
cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java
cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestUtil.java
cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java
Modified: cocoon/trunk/core/cocoon-configuration/cocoon-configuration-api/src/main/java/org/apache/cocoon/configuration/Settings.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-configuration/cocoon-configuration-api/src/main/java/org/apache/cocoon/configuration/Settings.java?view=diff&rev=490029&r1=490028&r2=490029
==============================================================================
--- cocoon/trunk/core/cocoon-configuration/cocoon-configuration-api/src/main/java/org/apache/cocoon/configuration/Settings.java (original)
+++ cocoon/trunk/core/cocoon-configuration/cocoon-configuration-api/src/main/java/org/apache/cocoon/configuration/Settings.java Sun Dec 24 06:47:14 2006
@@ -57,12 +57,6 @@
String KEY_WORK_DIRECTORY = "org.apache.cocoon.work.directory";
/**
- * If true or not set, this class will try to catch and handle all Cocoon exceptions.
- * If false, it will rethrow them to the servlet container.
- */
- String KEY_MANAGE_EXCEPTIONS = "org.apache.cocoon.manageexceptions";
-
- /**
* Set form encoding. This will be the character set used to decode request
* parameters. If not set the ISO-8859-1 encoding will be assumed.
*/
@@ -86,21 +80,6 @@
String KEY_RELOADING = "org.apache.cocoon.reloading";
/**
- * Allow adding processing time to the response
- */
- String KEY_SHOWTIME = "org.apache.cocoon.showtime";
-
- /**
- * If true, processing time will be added as an HTML comment
- */
- String KEY_HIDE_SHOWTIME = "org.apache.cocoon.hideshowtime";
-
- /**
- * If true, the X-Cocoon-Version response header will be included.
- */
- String KEY_SHOW_VERSION = "org.apache.cocoon.show-version";
-
- /**
* Delay between reload checks for the configuration
*/
String KEY_RELOAD_DELAY = "org.apache.cocoon.reload-delay";
@@ -160,12 +139,6 @@
String getContainerEncoding();
/**
- * @return Returns the manageExceptions.
- * @see #KEY_MANAGE_EXCEPTIONS
- */
- boolean isManageExceptions();
-
- /**
* @return Returns the cacheDirectory.
* @see #KEY_CACHE_DIRECTORY
*/
@@ -177,18 +150,6 @@
long getCreationTime();
/**
- * @return Returns the hideShowTime.
- * @see #KEY_HIDE_SHOWTIME
- */
- boolean isHideShowTime();
-
- /**
- * @return Returns the showCocoonVersion.
- * @see #KEY_SHOW_VERSION
- */
- boolean isShowVersion();
-
- /**
* This method can be used by components to query if they are
* configured to check for reloading.
* @param type The type of the component that wants to check for reload.
@@ -205,12 +166,6 @@
* @see #KEY_RELOAD_DELAY
*/
long getReloadDelay(String type);
-
- /**
- * @return Returns the showTime.
- * @see #KEY_SHOWTIME
- */
- boolean isShowTime();
/**
* Return the current running mode.
Modified: cocoon/trunk/core/cocoon-configuration/cocoon-configuration-impl/src/main/java/org/apache/cocoon/configuration/SettingsDefaults.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-configuration/cocoon-configuration-impl/src/main/java/org/apache/cocoon/configuration/SettingsDefaults.java?view=diff&rev=490029&r1=490028&r2=490029
==============================================================================
--- cocoon/trunk/core/cocoon-configuration/cocoon-configuration-impl/src/main/java/org/apache/cocoon/configuration/SettingsDefaults.java (original)
+++ cocoon/trunk/core/cocoon-configuration/cocoon-configuration-impl/src/main/java/org/apache/cocoon/configuration/SettingsDefaults.java Sun Dec 24 06:47:14 2006
@@ -24,9 +24,6 @@
*/
public abstract class SettingsDefaults {
- /** Default value for {@link Settings#isManageExceptions()}. */
- public static final boolean MANAGE_EXCEPTIONS = true;
-
/** The default running mode. */
public static final String DEFAULT_RUNNING_MODE = "prod";
@@ -37,14 +34,6 @@
* Default value for {@link Settings#isReloadingEnabled(String)} parameter (false).
*/
public static final boolean RELOADING_ENABLED_DEFAULT = false;
-
- public static final boolean SHOW_TIME = false;
- public static final boolean HIDE_SHOW_TIME = false;
-
- /**
- * Default value for {@link Settings#isShowVersion()} parameter (true).
- */
- public static final boolean SHOW_COCOON_VERSION = true;
public static final long DEFAULT_CONFIGURATION_RELOAD_DELAY = 1000;
Modified: cocoon/trunk/core/cocoon-configuration/cocoon-configuration-impl/src/main/java/org/apache/cocoon/configuration/impl/MutableSettings.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-configuration/cocoon-configuration-impl/src/main/java/org/apache/cocoon/configuration/impl/MutableSettings.java?view=diff&rev=490029&r1=490028&r2=490029
==============================================================================
--- cocoon/trunk/core/cocoon-configuration/cocoon-configuration-impl/src/main/java/org/apache/cocoon/configuration/impl/MutableSettings.java (original)
+++ cocoon/trunk/core/cocoon-configuration/cocoon-configuration-impl/src/main/java/org/apache/cocoon/configuration/impl/MutableSettings.java Sun Dec 24 06:47:14 2006
@@ -77,27 +77,6 @@
protected String workDirectory;
/**
- * Allow adding processing time to the response
- */
- protected boolean showTime;
-
- /**
- * If true, processing time will be added as an HTML comment
- */
- protected boolean hideShowTime;
-
- /**
- * If true, the X-Cocoon-Version response header will be included.
- */
- protected boolean showCocoonVersion;
-
- /**
- * If true or not set, this class will try to catch and handle all Cocoon exceptions.
- * If false, it will rethrow them to the servlet container.
- */
- protected boolean manageExceptions;
-
- /**
* Set form encoding. This will be the character set used to decode request
* parameters. If not set the ISO-8859-1 encoding will be assumed.
*/
@@ -128,10 +107,6 @@
public MutableSettings(String mode) {
// set default values
this.reloadingEnabled = SettingsDefaults.RELOADING_ENABLED_DEFAULT;
- this.showTime = SettingsDefaults.SHOW_TIME;
- this.hideShowTime = SettingsDefaults.HIDE_SHOW_TIME;
- this.showCocoonVersion = SettingsDefaults.SHOW_COCOON_VERSION;
- this.manageExceptions = SettingsDefaults.MANAGE_EXCEPTIONS;
this.configurationReloadDelay = SettingsDefaults.DEFAULT_CONFIGURATION_RELOAD_DELAY;
this.containerEncoding = SettingsDefaults.DEFAULT_CONTAINER_ENCODING;
this.runningMode = mode;
@@ -163,14 +138,6 @@
this.setCacheDirectory(value);
} else if ( key.equals(KEY_WORK_DIRECTORY) ) {
this.setWorkDirectory(value);
- } else if ( key.equals(KEY_SHOWTIME) ) {
- this.setShowTime(BooleanUtils.toBoolean(value));
- } else if ( key.equals(KEY_HIDE_SHOWTIME) ) {
- this.setHideShowTime(BooleanUtils.toBoolean(value));
- } else if ( key.equals(KEY_SHOW_VERSION) ) {
- this.setShowCocoonVersion(BooleanUtils.toBoolean(value));
- } else if ( key.equals(KEY_MANAGE_EXCEPTIONS) ) {
- this.setManageExceptions(BooleanUtils.toBoolean(value));
} else if ( key.equals(KEY_FORM_ENCODING) ) {
this.setFormEncoding(value);
} else if ( key.startsWith(KEY_LOAD_CLASSES) ) {
@@ -185,16 +152,6 @@
}
/**
- * @see org.apache.cocoon.core.DynamicSettings#isHideShowTime()
- */
- public boolean isHideShowTime() {
- if ( this.parent != null ) {
- return this.parent.isHideShowTime();
- }
- return this.hideShowTime;
- }
-
- /**
* @see org.apache.cocoon.core.DynamicSettings#isReloadingEnabled(java.lang.String)
*/
public boolean isReloadingEnabled(String type) {
@@ -263,36 +220,6 @@
}
/**
- * @see org.apache.cocoon.core.BaseSettings#isManageExceptions()
- */
- public boolean isManageExceptions() {
- if ( parent != null ) {
- return parent.isManageExceptions();
- }
- return this.manageExceptions;
- }
-
- /**
- * @see org.apache.cocoon.core.DynamicSettings#isShowTime()
- */
- public boolean isShowTime() {
- if ( parent != null ) {
- return parent.isShowTime();
- }
- return this.showTime;
- }
-
- /**
- * @return Returns the showCocoonVersion flag.
- */
- public boolean isShowVersion() {
- if ( parent != null ) {
- return parent.isShowVersion();
- }
- return this.showCocoonVersion;
- }
-
- /**
* @see org.apache.cocoon.core.BaseSettings#getWorkDirectory()
*/
public String getWorkDirectory() {
@@ -346,12 +273,6 @@
value = this.getCacheDirectory();
} else if ( key.equals(KEY_WORK_DIRECTORY) ) {
value = this.getWorkDirectory();
- } else if ( key.equals(KEY_SHOWTIME) ) {
- value = String.valueOf(this.isShowTime());
- } else if ( key.equals(KEY_HIDE_SHOWTIME) ) {
- value = String.valueOf(this.isHideShowTime());
- } else if ( key.equals(KEY_MANAGE_EXCEPTIONS) ) {
- value = String.valueOf(this.isManageExceptions());
} else if ( key.equals(KEY_FORM_ENCODING) ) {
value = this.getFormEncoding();
} else if ( key.equals(KEY_LOAD_CLASSES) ) {
@@ -382,14 +303,10 @@
KEY_RELOAD_DELAY + " : " + this.getReloadDelay(null) + '\n' +
KEY_RELOADING + " : " + this.isReloadingEnabled(null) + '\n' +
KEY_LOAD_CLASSES + " : " + this.toString(this.getLoadClasses()) + '\n' +
- KEY_MANAGE_EXCEPTIONS + " : " + this.isManageExceptions() + '\n' +
KEY_CACHE_DIRECTORY + " : " + this.getCacheDirectory() + '\n' +
KEY_WORK_DIRECTORY + " : " + this.getWorkDirectory() + '\n' +
KEY_FORM_ENCODING + " : " + this.getFormEncoding() + '\n' +
- KEY_CONTAINER_ENCODING + " : " + this.getContainerEncoding() + '\n' +
- KEY_SHOWTIME + " : " + this.isShowTime() + '\n' +
- KEY_HIDE_SHOWTIME + " : " + this.isHideShowTime() + '\n' +
- KEY_SHOW_VERSION + " : " + this.isShowVersion() + '\n';
+ KEY_CONTAINER_ENCODING + " : " + this.getContainerEncoding() + '\n';
}
/**
@@ -411,15 +328,6 @@
}
/**
- * @param hideShowTime The hideShowTime to set.
- */
- public void setHideShowTime(boolean hideShowTime) {
- this.checkWriteable();
- this.checkSubSetting();
- this.hideShowTime = hideShowTime;
- }
-
- /**
* @param allowReload The allowReload to set.
*/
public void setReloadingEnabled(boolean allowReload) {
@@ -452,33 +360,6 @@
public void addToLoadClasses(String className) {
this.checkWriteable();
this.loadClasses.add(className);
- }
-
- /**
- * @param manageExceptions The manageExceptions to set.
- */
- public void setManageExceptions(boolean manageExceptions) {
- this.checkWriteable();
- this.checkSubSetting();
- this.manageExceptions = manageExceptions;
- }
-
- /**
- * @param showTime The showTime to set.
- */
- public void setShowTime(boolean showTime) {
- this.checkWriteable();
- this.checkSubSetting();
- this.showTime = showTime;
- }
-
- /**
- * @param showCocoonVersion The showCocoonVersion flag to set.
- */
- public void setShowCocoonVersion(boolean showCocoonVersion) {
- this.checkWriteable();
- this.checkSubSetting();
- this.showCocoonVersion = showCocoonVersion;
}
/**
Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/generation/StatusGenerator.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/generation/StatusGenerator.java?view=diff&rev=490029&r1=490028&r2=490029
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/generation/StatusGenerator.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/generation/StatusGenerator.java Sun Dec 24 06:47:14 2006
@@ -461,7 +461,6 @@
this.addValue("Running mode", s.getRunningMode());
this.addMultilineValue(Settings.KEY_LOAD_CLASSES, s.getLoadClasses());
- this.addValue(Settings.KEY_MANAGE_EXCEPTIONS, s.isManageExceptions());
this.addValue(Settings.KEY_CACHE_DIRECTORY, s.getCacheDirectory());
this.addValue(Settings.KEY_WORK_DIRECTORY, s.getWorkDirectory());
this.addValue(Settings.KEY_FORM_ENCODING, s.getFormEncoding());
@@ -485,9 +484,6 @@
final String value = s.getProperty(key);
this.addValue(key.substring(18), value);
}
- this.addValue(Settings.KEY_SHOWTIME, s.isShowTime());
- this.addValue(Settings.KEY_HIDE_SHOWTIME, s.isHideShowTime());
- this.addValue(Settings.KEY_SHOW_VERSION, s.isShowVersion());
this.endGroup();
}
Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java?view=diff&rev=490029&r1=490028&r2=490029
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java Sun Dec 24 06:47:14 2006
@@ -72,6 +72,9 @@
/** The root settings. */
protected final Settings settings;
+ /** The special servlet settings. */
+ protected final ServletSettings servletSettings;
+
/** The processor. */
protected Processor processor;
@@ -85,6 +88,7 @@
this.servletContext = servletContext;
this.cocoonBeanFactory = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
this.settings = (Settings) this.cocoonBeanFactory.getBean(Settings.ROLE);
+ this.servletSettings = new ServletSettings(this.settings);
final String encoding = this.settings.getContainerEncoding();
if ( encoding == null ) {
this.containerEncoding = "ISO-8859-1";
@@ -119,7 +123,7 @@
stopWatch.start();
// add the cocoon header timestamp
- if (this.settings.isShowVersion()) {
+ if (this.servletSettings.isShowVersion()) {
res.addHeader("X-Cocoon-Version", Constants.VERSION);
}
@@ -143,7 +147,7 @@
RequestUtil.manageException(request, res, null, uri,
HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
"Problem in creating the Environment", null, null, e,
- this.settings, this.getLogger(), this);
+ this.servletSettings, this.getLogger(), this);
return;
}
@@ -160,7 +164,7 @@
"Cocoon engine failed in processing the request",
"The processing engine failed to process the request. This could be due to lack of matching or bugs in the pipeline engine.",
null,
- this.settings, this.getLogger(), this);
+ this.servletSettings, this.getLogger(), this);
return;
}
} catch (ResourceNotFoundException e) {
@@ -176,7 +180,7 @@
"Resource Not Found",
"The requested resource \"" + request.getRequestURI() + "\" could not be found",
e,
- this.settings, this.getLogger(), this);
+ this.servletSettings, this.getLogger(), this);
return;
} catch (ConnectionResetException e) {
@@ -202,7 +206,7 @@
RequestUtil.manageException(request, res, env, uri,
HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
"Internal Server Error", null, null, e,
- this.settings, this.getLogger(), this);
+ this.servletSettings, this.getLogger(), this);
return;
}
@@ -215,7 +219,7 @@
if (contentType != null && contentType.equals("text/html")) {
String showTime = request.getParameter(Constants.SHOWTIME_PARAM);
- boolean show = this.settings.isShowTime();
+ boolean show = this.servletSettings.isShowTime();
if (showTime != null) {
show = !showTime.equalsIgnoreCase("no");
}
@@ -223,7 +227,7 @@
if ( timeString == null ) {
timeString = processTime(stopWatch.getTime());
}
- boolean hide = this.settings.isHideShowTime();
+ boolean hide = this.servletSettings.isHideShowTime();
if (showTime != null) {
hide = showTime.equalsIgnoreCase("hide");
}
Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestUtil.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestUtil.java?view=diff&rev=490029&r1=490028&r2=490029
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestUtil.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestUtil.java Sun Dec 24 06:47:14 2006
@@ -27,7 +27,6 @@
import org.apache.cocoon.components.notification.DefaultNotifyingBuilder;
import org.apache.cocoon.components.notification.Notifier;
import org.apache.cocoon.components.notification.Notifying;
-import org.apache.cocoon.configuration.Settings;
import org.apache.cocoon.environment.Environment;
/**
@@ -110,7 +109,7 @@
String message,
String description,
Exception e,
- Settings settings,
+ ServletSettings settings,
Logger logger,
Object sender)
throws IOException {
Added: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/ServletSettings.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/ServletSettings.java?view=auto&rev=490029
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/ServletSettings.java (added)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/ServletSettings.java Sun Dec 24 06:47:14 2006
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.servlet;
+
+import org.apache.cocoon.configuration.Settings;
+import org.apache.commons.lang.BooleanUtils;
+
+/**
+ * Helper class for managing Cocoon servlet specific settings.
+ * @version $Id$
+ * @since 2.2
+ */
+public class ServletSettings {
+
+ /**
+ * Allow adding processing time to the response
+ */
+ public static String KEY_SHOWTIME = "org.apache.cocoon.showtime";
+
+ /**
+ * If true, processing time will be added as an HTML comment
+ */
+ public static String KEY_HIDE_SHOWTIME = "org.apache.cocoon.hideshowtime";
+
+ /**
+ * If true, the X-Cocoon-Version response header will be included.
+ */
+ public static String KEY_SHOW_VERSION = "org.apache.cocoon.show-version";
+
+ /**
+ * If true or not set, this class will try to catch and handle all Cocoon exceptions.
+ * If false, it will rethrow them to the servlet container.
+ */
+ public static String KEY_MANAGE_EXCEPTIONS = "org.apache.cocoon.manageexceptions";
+
+ /** Default value for {@link Settings#isManageExceptions()}. */
+ public static final boolean MANAGE_EXCEPTIONS = true;
+
+ public static final boolean SHOW_TIME = false;
+ public static final boolean HIDE_SHOW_TIME = false;
+
+ /**
+ * Default value for {@link Settings#isShowVersion()} parameter (true).
+ */
+ public static final boolean SHOW_COCOON_VERSION = true;
+
+ /**
+ * Allow adding processing time to the response
+ */
+ protected boolean showTime;
+
+ /**
+ * If true, processing time will be added as an HTML comment
+ */
+ protected boolean hideShowTime;
+
+ /**
+ * If true, the X-Cocoon-Version response header will be included.
+ */
+ protected boolean showCocoonVersion;
+
+ /**
+ * If true or not set, this class will try to catch and handle all Cocoon exceptions.
+ * If false, it will rethrow them to the servlet container.
+ */
+ protected boolean manageExceptions;
+
+ public ServletSettings(Settings s) {
+ // set defaults
+ this.showTime = SHOW_TIME;
+ this.hideShowTime = HIDE_SHOW_TIME;
+ this.showCocoonVersion = SHOW_COCOON_VERSION;
+ this.manageExceptions = MANAGE_EXCEPTIONS;
+ if ( s != null ) {
+ String value;
+ value = s.getProperty(KEY_SHOWTIME);
+ if ( value != null ) {
+ this.setShowTime(BooleanUtils.toBoolean(value));
+ }
+ value = s.getProperty(KEY_HIDE_SHOWTIME);
+ if ( value != null ) {
+ this.setHideShowTime(BooleanUtils.toBoolean(value));
+ }
+ value = s.getProperty(KEY_SHOW_VERSION);
+ if ( value != null ) {
+ this.setShowCocoonVersion(BooleanUtils.toBoolean(value));
+ }
+ value = s.getProperty(KEY_MANAGE_EXCEPTIONS);
+ if ( value != null ) {
+ this.setManageExceptions(BooleanUtils.toBoolean(value));
+ }
+ }
+ }
+
+ /**
+ * @return Returns the hideShowTime.
+ * @see #KEY_HIDE_SHOWTIME
+ */
+ public boolean isHideShowTime() {
+ return this.hideShowTime;
+ }
+
+ /**
+ * @return Returns the manageExceptions.
+ * @see #KEY_MANAGE_EXCEPTIONS
+ */
+ public boolean isManageExceptions() {
+ return this.manageExceptions;
+ }
+
+ /**
+ * @return Returns the showTime.
+ * @see #KEY_SHOWTIME
+ */
+ public boolean isShowTime() {
+ return this.showTime;
+ }
+
+ /**
+ * @return Returns the showCocoonVersion.
+ * @see #KEY_SHOW_VERSION
+ */
+ public boolean isShowVersion() {
+ return this.showCocoonVersion;
+ }
+
+ /**
+ * @param hideShowTime The hideShowTime to set.
+ */
+ public void setHideShowTime(boolean hideShowTime) {
+ this.hideShowTime = hideShowTime;
+ }
+
+ /**
+ * @param manageExceptions The manageExceptions to set.
+ */
+ public void setManageExceptions(boolean manageExceptions) {
+ this.manageExceptions = manageExceptions;
+ }
+
+ /**
+ * @param showTime The showTime to set.
+ */
+ public void setShowTime(boolean showTime) {
+ this.showTime = showTime;
+ }
+
+ /**
+ * @param showCocoonVersion The showCocoonVersion flag to set.
+ */
+ public void setShowCocoonVersion(boolean showCocoonVersion) {
+ this.showCocoonVersion = showCocoonVersion;
+ }
+}
Propchange: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/ServletSettings.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/ServletSettings.java
------------------------------------------------------------------------------
svn:keywords = Id
Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java?view=diff&rev=490029&r1=490028&r2=490029
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java Sun Dec 24 06:47:14 2006
@@ -33,6 +33,7 @@
import org.apache.cocoon.configuration.Settings;
import org.apache.cocoon.core.container.spring.avalon.AvalonUtils;
import org.apache.cocoon.servlet.RequestUtil;
+import org.apache.cocoon.servlet.ServletSettings;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.web.context.support.WebApplicationContextUtils;
@@ -58,6 +59,9 @@
/** The root settings. */
protected Settings settings;
+ /** The special servlet settings. */
+ protected ServletSettings servletSettings;
+
/** The servlet context. */
protected ServletContext servletContext;
@@ -80,6 +84,7 @@
this.cocoonBeanFactory = WebApplicationContextUtils.getRequiredWebApplicationContext(this.servletContext);
this.log = (Logger) this.cocoonBeanFactory.getBean(AvalonUtils.LOGGER_ROLE);
this.settings = (Settings) this.cocoonBeanFactory.getBean(Settings.ROLE);
+ this.servletSettings = new ServletSettings(this.settings);
String containerEncoding;
final String encoding = settings.getContainerEncoding();
if ( encoding == null ) {
@@ -119,7 +124,7 @@
RequestUtil.manageException(request, response, null, null,
HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
"Problem in creating the Request",
- null, null, e, this.settings, getLogger(), this);
+ null, null, e, this.servletSettings, getLogger(), this);
} finally {
try {
if (request instanceof MultipartHttpServletRequest) {