You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ws...@apache.org on 2006/07/12 06:49:16 UTC
svn commit: r421119 [3/4] - in /struts/struts1/trunk/core/src:
main/java/org/apache/struts/ main/java/org/apache/struts/action/
main/java/org/apache/struts/chain/
main/java/org/apache/struts/chain/commands/
main/java/org/apache/struts/chain/commands/ge...
Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ActionContextBase.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ActionContextBase.java?rev=421119&r1=421118&r2=421119&view=diff
==============================================================================
--- struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ActionContextBase.java (original)
+++ struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ActionContextBase.java Tue Jul 11 21:49:11 2006
@@ -1,549 +1,549 @@
-/*
- * $Id$
- *
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed 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.struts.chain.contexts;
-
-import org.apache.commons.chain.Context;
-import org.apache.commons.chain.impl.ContextBase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.struts.action.Action;
-import org.apache.struts.action.ActionForm;
-import org.apache.struts.action.ActionMessages;
-import org.apache.struts.chain.Constants;
-import org.apache.struts.config.ActionConfig;
-import org.apache.struts.config.FormBeanConfig;
-import org.apache.struts.config.ForwardConfig;
-import org.apache.struts.config.ModuleConfig;
-import org.apache.struts.util.MessageResources;
-import org.apache.struts.util.TokenProcessor;
-
-import java.util.Locale;
-import java.util.Map;
-
-/**
- * <p> Provide an abstract but semi-complete implementation of ActionContext
- * to serve as the base for concrete implementations. </p> <p> The abstract
- * methods to implement are the accessors for the named states,
- * <code>getApplicationScope</code>, <code>getRequestScope</code>, and
- * <code>getSessionScope</code>. </p>
- */
-public abstract class ActionContextBase extends ContextWrapper
- implements ActionContext {
- /**
- * @see Constants.ACTION_KEY
- */
- public static final String ACTION_KEY = Constants.ACTION_KEY;
-
- /**
- * @see
- */
- public static final String ACTION_CONFIG_KEY = Constants.ACTION_CONFIG_KEY;
-
- /**
- * @see Constants.ACTION_FORM_KEY
- */
- public static final String ACTION_FORM_KEY = Constants.ACTION_FORM_KEY;
-
- /**
- * @see Constants.FORWARD_CONFIG_KEY
- */
- public static final String FORWARD_CONFIG_KEY =
- Constants.FORWARD_CONFIG_KEY;
-
- /**
- * @see Constants.MODULE_CONFIG_KEY
- */
- public static final String MODULE_CONFIG_KEY = Constants.MODULE_CONFIG_KEY;
-
- /**
- * @see Constants.EXCEPTION_KEY
- */
- public static final String EXCEPTION_KEY = Constants.EXCEPTION_KEY;
-
- /**
- * <p> Provide the default context attribute under which to store the
- * ActionMessage cache for errors. </p>
- */
- public static final String ERROR_ACTION_MESSAGES_KEY = "errors";
-
- /**
- * <p> Provide the default context attribute under which to store the
- * ActionMessage cache. </p>
- */
- public static final String MESSAGE_ACTION_MESSAGES_KEY = "messages";
-
- /**
- * @see Constants.MESSAGE_RESOURCES_KEY
- */
- public static final String MESSAGE_RESOURCES_KEY =
- Constants.MESSAGE_RESOURCES_KEY;
-
- /**
- * @see Constants.INCLUDE_KEY
- */
- public static final String INCLUDE_KEY = Constants.INCLUDE_KEY;
-
- /**
- * @see Constants.LOCALE_KEY
- */
- public static final String LOCALE_KEY = Constants.LOCALE_KEY;
-
- /**
- * @see Constants.CANCEL_KEY
- */
- public static final String CANCEL_KEY = Constants.CANCEL_KEY;
-
- /**
- * @see Constants.VALID_KEY
- */
- public static final String VALID_KEY = Constants.VALID_KEY;
-
- /**
- * Provide the default context attribute under which to store the
- * transaction token key.
- */
- public static final String TRANSACTION_TOKEN_KEY = "TRANSACTION_TOKEN_KEY";
-
- /**
- * Provide the default context attribute under which to store the token
- * key.
- */
- public static final String TOKEN_KEY = "TOKEN_KEY";
-
- /**
- * Store the TokenProcessor instance for this Context.
- */
- protected TokenProcessor token = null;
-
- /**
- * Store the Log instance for this Context.
- */
- private Log logger = null;
-
- /**
- * Instantiate ActionContextBase, wrapping the given Context.
- *
- * @param context Context to wrap
- */
- public ActionContextBase(Context context) {
- super(context);
- token = TokenProcessor.getInstance();
- logger = LogFactory.getLog(this.getClass());
- }
-
- /**
- * Instantiate ActionContextBase, wrapping a default ContextBase
- * instance.
- */
- public ActionContextBase() {
- this(new ContextBase());
- }
-
- // -------------------------------
- // General Application Support
- // -------------------------------
- public void release() {
- this.token = null;
- }
-
- public abstract Map getApplicationScope();
-
- public abstract Map getRequestScope();
-
- public abstract Map getSessionScope();
-
- public Map getScope(String scopeName) {
- if (REQUEST_SCOPE.equals(scopeName)) {
- return this.getRequestScope();
- }
-
- if (SESSION_SCOPE.equals(scopeName)) {
- return this.getSessionScope();
- }
-
- if (APPLICATION_SCOPE.equals(scopeName)) {
- return this.getApplicationScope();
- }
-
- throw new IllegalArgumentException("Invalid scope: " + scopeName);
- }
-
- // -------------------------------
- // General Struts properties
- // -------------------------------
- public void setAction(Action action) {
- this.put(ACTION_KEY, action);
- }
-
- public Action getAction() {
- return (Action) this.get(ACTION_KEY);
- }
-
- public void setActionForm(ActionForm form) {
- this.put(ACTION_FORM_KEY, form);
- }
-
- public ActionForm getActionForm() {
- return (ActionForm) this.get(ACTION_FORM_KEY);
- }
-
- public void setActionConfig(ActionConfig config) {
- this.put(ACTION_CONFIG_KEY, config);
- }
-
- public ActionConfig getActionConfig() {
- return (ActionConfig) this.get(ACTION_CONFIG_KEY);
- }
-
- public void setForwardConfig(ForwardConfig forward) {
- this.put(FORWARD_CONFIG_KEY, forward);
- }
-
- public ForwardConfig getForwardConfig() {
- return (ForwardConfig) this.get(FORWARD_CONFIG_KEY);
- }
-
- public void setInclude(String include) {
- this.put(INCLUDE_KEY, include);
- }
-
- public String getInclude() {
- return (String) this.get(INCLUDE_KEY);
- }
-
- public Boolean getFormValid() {
- return (Boolean) this.get(VALID_KEY);
- }
-
- public void setFormValid(Boolean valid) {
- this.put(VALID_KEY, valid);
- }
-
- public ModuleConfig getModuleConfig() {
- return (ModuleConfig) this.get(MODULE_CONFIG_KEY);
- }
-
- public void setModuleConfig(ModuleConfig config) {
- this.put(MODULE_CONFIG_KEY, config);
- }
-
- public Exception getException() {
- return (Exception) this.get(EXCEPTION_KEY);
- }
-
- public void setException(Exception e) {
- this.put(EXCEPTION_KEY, e);
- }
-
- // -------------------------------
- // ActionMessage Processing
- // -------------------------------
- public void addMessages(ActionMessages messages) {
- this.addActionMessages(MESSAGE_ACTION_MESSAGES_KEY, messages);
- }
-
- public void addErrors(ActionMessages errors) {
- this.addActionMessages(ERROR_ACTION_MESSAGES_KEY, errors);
- }
-
- public ActionMessages getErrors() {
- return (ActionMessages) this.get(ERROR_ACTION_MESSAGES_KEY);
- }
-
- public ActionMessages getMessages() {
- return (ActionMessages) this.get(MESSAGE_ACTION_MESSAGES_KEY);
- }
-
- public void saveErrors(ActionMessages errors) {
- this.saveActionMessages(ERROR_ACTION_MESSAGES_KEY, errors);
- }
-
- public void saveMessages(ActionMessages messages) {
- this.saveActionMessages(MESSAGE_ACTION_MESSAGES_KEY, messages);
- }
-
- // ISSUE: do we want to add this to the public API?
-
- /**
- * <p> Add the given messages to a cache stored in this Context, under
- * key. </p>
- *
- * @param key The attribute name for the message cache
- * @param messages The ActionMessages to add
- */
- public void addActionMessages(String key, ActionMessages messages) {
- if (messages == null) {
- // bad programmer! *slap*
- return;
- }
-
- // get any existing messages from the request, or make a new one
- ActionMessages requestMessages = (ActionMessages) this.get(key);
-
- if (requestMessages == null) {
- requestMessages = new ActionMessages();
- }
-
- // add incoming messages
- requestMessages.add(messages);
-
- // if still empty, just wipe it out from the request
- this.remove(key);
-
- // save the messages
- this.saveActionMessages(key, requestMessages);
- }
-
- // ISSUE: do we want to add this to the public API?
-
- /**
- * <p> Save the given ActionMessages into the request scope under the
- * given key, clearing the attribute if the messages are empty or null.
- * </p>
- *
- * @param key The attribute name for the message cache
- * @param messages The ActionMessages to add
- */
- public void saveActionMessages(String key, ActionMessages messages) {
- this.saveActionMessages(REQUEST_SCOPE, key, messages);
- }
-
- /**
- * <p>Save the given <code>messages</code> into the map identified by the
- * given <code>scopeId</code> under the given <code>key</code>.</p>
- *
- * @param scopeId
- * @param key
- * @param messages
- */
- public void saveActionMessages(String scopeId, String key,
- ActionMessages messages) {
- Map scope = getScope(scopeId);
-
- if ((messages == null) || messages.isEmpty()) {
- scope.remove(key);
-
- return;
- }
-
- scope.put(key, messages);
- }
-
- // ISSUE: Should we deprecate this method, since it is misleading?
- // Do we need it for backward compatibility?
-
- /**
- * <p> Adapt a legacy form of SaveMessages to the ActionContext API by
- * storing the ActoinMessages under the default scope.
- *
- * @param scope The scope for the internal cache
- * @param messages ActionMesssages to cache
- */
- public void saveMessages(String scope, ActionMessages messages) {
- this.saveMessages(messages);
- }
-
- // -------------------------------
- // Token Processing
- // -------------------------------
- // ISSUE: Should there be a getToken method?
- // Is there a problem trying to map this method from Action
- // to ActionContext when we aren't necessarily sure how token
- // processing maps into a context with an ill-defined "session"?
- // There's no getToken() method, but maybe there should be. *
- public void saveToken() {
- String token = this.generateToken();
-
- this.put(TRANSACTION_TOKEN_KEY, token);
- }
-
- public String generateToken() {
- return token.generateToken(getTokenGeneratorId());
- }
-
- // ISSUE: The original implementation was based on the HttpSession
- // identifier; what would be a way to do that without depending on the
- // Servlet API?
- // REPLY: uuid's
- // http://java.sun.com/products/jini/2.0/doc/specs/api/net/jini/id/Uuid.html
- protected String getTokenGeneratorId() {
- return "";
- }
-
- public boolean isTokenValid() {
- return this.isTokenValid(false);
- }
-
- public boolean isTokenValid(boolean reset) {
- // Retrieve the transaction token from this session, and
- // reset it if requested
- String saved = (String) this.get(TRANSACTION_TOKEN_KEY);
-
- if (saved == null) {
- return false;
- }
-
- if (reset) {
- this.resetToken();
- }
-
- // Retrieve the transaction token included in this request
- String token = (String) this.get(TOKEN_KEY);
-
- if (token == null) {
- return false;
- }
-
- return saved.equals(token);
- }
-
- public void resetToken() {
- this.remove(TRANSACTION_TOKEN_KEY);
- }
-
- // -------------------------------
- // Cancel Processing
- // -------------------------------
- public Boolean getCancelled() {
- return (Boolean) this.get(CANCEL_KEY);
- }
-
- public void setCancelled(Boolean cancelled) {
- this.put(CANCEL_KEY, cancelled);
- }
-
- // -------------------------------
- // MessageResources Processing
- // -------------------------------
- public void setMessageResources(MessageResources messageResources) {
- this.put(MESSAGE_RESOURCES_KEY, messageResources);
- }
-
- public MessageResources getMessageResources() {
- return (MessageResources) this.get(MESSAGE_RESOURCES_KEY);
- }
-
- public MessageResources getMessageResources(String key) {
- return (MessageResources) this.get(key);
- }
-
- // -------------------------------
- // Locale Processing
- // -------------------------------
- public void setLocale(Locale locale) {
- this.put(LOCALE_KEY, locale);
- }
-
- public Locale getLocale() {
- return (Locale) this.get(LOCALE_KEY);
- }
-
- // -------------------------------
- // Convenience Methods: these are not part of the formal ActionContext API,
- // but are likely to be commonly useful.
- // -------------------------------
-
- /**
- * <p> Provide the currently configured commons-logging <code>Log</code>
- * instance. </p>
- *
- * @return Log instance for this context
- */
- public Log getLogger() {
- return this.logger;
- }
-
- /**
- * <p> Set the commons-logging <code>Log</code> instance which should be
- * used to LOG messages. This is initialized at instantiation time but may
- * be overridden. Be advised not to set the value to null, as
- * <code>ActionContextBase</code> uses the logger for some of its own
- * operations. </p>
- */
- public void setLogger(Log logger) {
- this.logger = logger;
- }
-
- /**
- * <p> Using this <code>ActionContext</code>'s default
- * <code>ModuleConfig</code>, return an existing <code>ActionForm</code>
- * in the specified scope, or create a new one and add it to the specified
- * scope. </p>
- *
- * @param formName The name attribute of our ActionForm
- * @param scopeName The scope identier (request, session)
- * @return The ActionForm for this request
- * @throws IllegalAccessException If object cannot be created
- * @throws InstantiationException If object cannot be created
- * @see this.findOrCreateActionForm(String, String, ModuleConfig)
- */
- public ActionForm findOrCreateActionForm(String formName, String scopeName)
- throws IllegalAccessException, InstantiationException {
- return this.findOrCreateActionForm(formName, scopeName,
- this.getModuleConfig());
- }
-
- /**
- * <p> In the context of the given <code>ModuleConfig</code> and this
- * <code>ActionContext</code>, look for an existing
- * <code>ActionForm</code> in the specified scope. If one is found, return
- * it; otherwise, create a new instance, add it to that scope, and then
- * return it. </p>
- *
- * @param formName The name attribute of our ActionForm
- * @param scopeName The scope identier (request, session)
- * @return The ActionForm for this request
- * @throws IllegalAccessException If object cannot be created
- * @throws InstantiationException If object cannot be created
- * @throws IllegalArgumentException If form config is missing from module
- * or scopeName is invalid
- */
- public ActionForm findOrCreateActionForm(String formName, String scopeName,
- ModuleConfig moduleConfig)
- throws IllegalAccessException, InstantiationException {
- Map scope = this.getScope(scopeName);
-
- ActionForm instance;
- FormBeanConfig formBeanConfig =
- moduleConfig.findFormBeanConfig(formName);
-
- if (formBeanConfig == null) {
- throw new IllegalArgumentException("No form config found under "
- + formName + " in module " + moduleConfig.getPrefix());
- }
-
- instance = (ActionForm) scope.get(formName);
-
- // ISSUE: Can we recycle the existing instance (if any)?
- if (instance != null) {
- getLogger().trace("Found an instance in scope " + scopeName
- + "; test for reusability");
-
- if (formBeanConfig.canReuse(instance)) {
- return instance;
- }
- }
-
- ActionForm form = formBeanConfig.createActionForm(this);
-
- // ISSUE: Should we check this call to put?
- scope.put(formName, form);
-
- return form;
- }
-}
+/*
+ * $Id$
+ *
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.struts.chain.contexts;
+
+import org.apache.commons.chain.Context;
+import org.apache.commons.chain.impl.ContextBase;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionMessages;
+import org.apache.struts.chain.Constants;
+import org.apache.struts.config.ActionConfig;
+import org.apache.struts.config.FormBeanConfig;
+import org.apache.struts.config.ForwardConfig;
+import org.apache.struts.config.ModuleConfig;
+import org.apache.struts.util.MessageResources;
+import org.apache.struts.util.TokenProcessor;
+
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * <p> Provide an abstract but semi-complete implementation of ActionContext
+ * to serve as the base for concrete implementations. </p> <p> The abstract
+ * methods to implement are the accessors for the named states,
+ * <code>getApplicationScope</code>, <code>getRequestScope</code>, and
+ * <code>getSessionScope</code>. </p>
+ */
+public abstract class ActionContextBase extends ContextWrapper
+ implements ActionContext {
+ /**
+ * @see Constants.ACTION_KEY
+ */
+ public static final String ACTION_KEY = Constants.ACTION_KEY;
+
+ /**
+ * @see
+ */
+ public static final String ACTION_CONFIG_KEY = Constants.ACTION_CONFIG_KEY;
+
+ /**
+ * @see Constants.ACTION_FORM_KEY
+ */
+ public static final String ACTION_FORM_KEY = Constants.ACTION_FORM_KEY;
+
+ /**
+ * @see Constants.FORWARD_CONFIG_KEY
+ */
+ public static final String FORWARD_CONFIG_KEY =
+ Constants.FORWARD_CONFIG_KEY;
+
+ /**
+ * @see Constants.MODULE_CONFIG_KEY
+ */
+ public static final String MODULE_CONFIG_KEY = Constants.MODULE_CONFIG_KEY;
+
+ /**
+ * @see Constants.EXCEPTION_KEY
+ */
+ public static final String EXCEPTION_KEY = Constants.EXCEPTION_KEY;
+
+ /**
+ * <p> Provide the default context attribute under which to store the
+ * ActionMessage cache for errors. </p>
+ */
+ public static final String ERROR_ACTION_MESSAGES_KEY = "errors";
+
+ /**
+ * <p> Provide the default context attribute under which to store the
+ * ActionMessage cache. </p>
+ */
+ public static final String MESSAGE_ACTION_MESSAGES_KEY = "messages";
+
+ /**
+ * @see Constants.MESSAGE_RESOURCES_KEY
+ */
+ public static final String MESSAGE_RESOURCES_KEY =
+ Constants.MESSAGE_RESOURCES_KEY;
+
+ /**
+ * @see Constants.INCLUDE_KEY
+ */
+ public static final String INCLUDE_KEY = Constants.INCLUDE_KEY;
+
+ /**
+ * @see Constants.LOCALE_KEY
+ */
+ public static final String LOCALE_KEY = Constants.LOCALE_KEY;
+
+ /**
+ * @see Constants.CANCEL_KEY
+ */
+ public static final String CANCEL_KEY = Constants.CANCEL_KEY;
+
+ /**
+ * @see Constants.VALID_KEY
+ */
+ public static final String VALID_KEY = Constants.VALID_KEY;
+
+ /**
+ * Provide the default context attribute under which to store the
+ * transaction token key.
+ */
+ public static final String TRANSACTION_TOKEN_KEY = "TRANSACTION_TOKEN_KEY";
+
+ /**
+ * Provide the default context attribute under which to store the token
+ * key.
+ */
+ public static final String TOKEN_KEY = "TOKEN_KEY";
+
+ /**
+ * Store the TokenProcessor instance for this Context.
+ */
+ protected TokenProcessor token = null;
+
+ /**
+ * Store the Log instance for this Context.
+ */
+ private Log logger = null;
+
+ /**
+ * Instantiate ActionContextBase, wrapping the given Context.
+ *
+ * @param context Context to wrap
+ */
+ public ActionContextBase(Context context) {
+ super(context);
+ token = TokenProcessor.getInstance();
+ logger = LogFactory.getLog(this.getClass());
+ }
+
+ /**
+ * Instantiate ActionContextBase, wrapping a default ContextBase
+ * instance.
+ */
+ public ActionContextBase() {
+ this(new ContextBase());
+ }
+
+ // -------------------------------
+ // General Application Support
+ // -------------------------------
+ public void release() {
+ this.token = null;
+ }
+
+ public abstract Map getApplicationScope();
+
+ public abstract Map getRequestScope();
+
+ public abstract Map getSessionScope();
+
+ public Map getScope(String scopeName) {
+ if (REQUEST_SCOPE.equals(scopeName)) {
+ return this.getRequestScope();
+ }
+
+ if (SESSION_SCOPE.equals(scopeName)) {
+ return this.getSessionScope();
+ }
+
+ if (APPLICATION_SCOPE.equals(scopeName)) {
+ return this.getApplicationScope();
+ }
+
+ throw new IllegalArgumentException("Invalid scope: " + scopeName);
+ }
+
+ // -------------------------------
+ // General Struts properties
+ // -------------------------------
+ public void setAction(Action action) {
+ this.put(ACTION_KEY, action);
+ }
+
+ public Action getAction() {
+ return (Action) this.get(ACTION_KEY);
+ }
+
+ public void setActionForm(ActionForm form) {
+ this.put(ACTION_FORM_KEY, form);
+ }
+
+ public ActionForm getActionForm() {
+ return (ActionForm) this.get(ACTION_FORM_KEY);
+ }
+
+ public void setActionConfig(ActionConfig config) {
+ this.put(ACTION_CONFIG_KEY, config);
+ }
+
+ public ActionConfig getActionConfig() {
+ return (ActionConfig) this.get(ACTION_CONFIG_KEY);
+ }
+
+ public void setForwardConfig(ForwardConfig forward) {
+ this.put(FORWARD_CONFIG_KEY, forward);
+ }
+
+ public ForwardConfig getForwardConfig() {
+ return (ForwardConfig) this.get(FORWARD_CONFIG_KEY);
+ }
+
+ public void setInclude(String include) {
+ this.put(INCLUDE_KEY, include);
+ }
+
+ public String getInclude() {
+ return (String) this.get(INCLUDE_KEY);
+ }
+
+ public Boolean getFormValid() {
+ return (Boolean) this.get(VALID_KEY);
+ }
+
+ public void setFormValid(Boolean valid) {
+ this.put(VALID_KEY, valid);
+ }
+
+ public ModuleConfig getModuleConfig() {
+ return (ModuleConfig) this.get(MODULE_CONFIG_KEY);
+ }
+
+ public void setModuleConfig(ModuleConfig config) {
+ this.put(MODULE_CONFIG_KEY, config);
+ }
+
+ public Exception getException() {
+ return (Exception) this.get(EXCEPTION_KEY);
+ }
+
+ public void setException(Exception e) {
+ this.put(EXCEPTION_KEY, e);
+ }
+
+ // -------------------------------
+ // ActionMessage Processing
+ // -------------------------------
+ public void addMessages(ActionMessages messages) {
+ this.addActionMessages(MESSAGE_ACTION_MESSAGES_KEY, messages);
+ }
+
+ public void addErrors(ActionMessages errors) {
+ this.addActionMessages(ERROR_ACTION_MESSAGES_KEY, errors);
+ }
+
+ public ActionMessages getErrors() {
+ return (ActionMessages) this.get(ERROR_ACTION_MESSAGES_KEY);
+ }
+
+ public ActionMessages getMessages() {
+ return (ActionMessages) this.get(MESSAGE_ACTION_MESSAGES_KEY);
+ }
+
+ public void saveErrors(ActionMessages errors) {
+ this.saveActionMessages(ERROR_ACTION_MESSAGES_KEY, errors);
+ }
+
+ public void saveMessages(ActionMessages messages) {
+ this.saveActionMessages(MESSAGE_ACTION_MESSAGES_KEY, messages);
+ }
+
+ // ISSUE: do we want to add this to the public API?
+
+ /**
+ * <p> Add the given messages to a cache stored in this Context, under
+ * key. </p>
+ *
+ * @param key The attribute name for the message cache
+ * @param messages The ActionMessages to add
+ */
+ public void addActionMessages(String key, ActionMessages messages) {
+ if (messages == null) {
+ // bad programmer! *slap*
+ return;
+ }
+
+ // get any existing messages from the request, or make a new one
+ ActionMessages requestMessages = (ActionMessages) this.get(key);
+
+ if (requestMessages == null) {
+ requestMessages = new ActionMessages();
+ }
+
+ // add incoming messages
+ requestMessages.add(messages);
+
+ // if still empty, just wipe it out from the request
+ this.remove(key);
+
+ // save the messages
+ this.saveActionMessages(key, requestMessages);
+ }
+
+ // ISSUE: do we want to add this to the public API?
+
+ /**
+ * <p> Save the given ActionMessages into the request scope under the
+ * given key, clearing the attribute if the messages are empty or null.
+ * </p>
+ *
+ * @param key The attribute name for the message cache
+ * @param messages The ActionMessages to add
+ */
+ public void saveActionMessages(String key, ActionMessages messages) {
+ this.saveActionMessages(REQUEST_SCOPE, key, messages);
+ }
+
+ /**
+ * <p>Save the given <code>messages</code> into the map identified by the
+ * given <code>scopeId</code> under the given <code>key</code>.</p>
+ *
+ * @param scopeId
+ * @param key
+ * @param messages
+ */
+ public void saveActionMessages(String scopeId, String key,
+ ActionMessages messages) {
+ Map scope = getScope(scopeId);
+
+ if ((messages == null) || messages.isEmpty()) {
+ scope.remove(key);
+
+ return;
+ }
+
+ scope.put(key, messages);
+ }
+
+ // ISSUE: Should we deprecate this method, since it is misleading?
+ // Do we need it for backward compatibility?
+
+ /**
+ * <p> Adapt a legacy form of SaveMessages to the ActionContext API by
+ * storing the ActoinMessages under the default scope.
+ *
+ * @param scope The scope for the internal cache
+ * @param messages ActionMesssages to cache
+ */
+ public void saveMessages(String scope, ActionMessages messages) {
+ this.saveMessages(messages);
+ }
+
+ // -------------------------------
+ // Token Processing
+ // -------------------------------
+ // ISSUE: Should there be a getToken method?
+ // Is there a problem trying to map this method from Action
+ // to ActionContext when we aren't necessarily sure how token
+ // processing maps into a context with an ill-defined "session"?
+ // There's no getToken() method, but maybe there should be. *
+ public void saveToken() {
+ String token = this.generateToken();
+
+ this.put(TRANSACTION_TOKEN_KEY, token);
+ }
+
+ public String generateToken() {
+ return token.generateToken(getTokenGeneratorId());
+ }
+
+ // ISSUE: The original implementation was based on the HttpSession
+ // identifier; what would be a way to do that without depending on the
+ // Servlet API?
+ // REPLY: uuid's
+ // http://java.sun.com/products/jini/2.0/doc/specs/api/net/jini/id/Uuid.html
+ protected String getTokenGeneratorId() {
+ return "";
+ }
+
+ public boolean isTokenValid() {
+ return this.isTokenValid(false);
+ }
+
+ public boolean isTokenValid(boolean reset) {
+ // Retrieve the transaction token from this session, and
+ // reset it if requested
+ String saved = (String) this.get(TRANSACTION_TOKEN_KEY);
+
+ if (saved == null) {
+ return false;
+ }
+
+ if (reset) {
+ this.resetToken();
+ }
+
+ // Retrieve the transaction token included in this request
+ String token = (String) this.get(TOKEN_KEY);
+
+ if (token == null) {
+ return false;
+ }
+
+ return saved.equals(token);
+ }
+
+ public void resetToken() {
+ this.remove(TRANSACTION_TOKEN_KEY);
+ }
+
+ // -------------------------------
+ // Cancel Processing
+ // -------------------------------
+ public Boolean getCancelled() {
+ return (Boolean) this.get(CANCEL_KEY);
+ }
+
+ public void setCancelled(Boolean cancelled) {
+ this.put(CANCEL_KEY, cancelled);
+ }
+
+ // -------------------------------
+ // MessageResources Processing
+ // -------------------------------
+ public void setMessageResources(MessageResources messageResources) {
+ this.put(MESSAGE_RESOURCES_KEY, messageResources);
+ }
+
+ public MessageResources getMessageResources() {
+ return (MessageResources) this.get(MESSAGE_RESOURCES_KEY);
+ }
+
+ public MessageResources getMessageResources(String key) {
+ return (MessageResources) this.get(key);
+ }
+
+ // -------------------------------
+ // Locale Processing
+ // -------------------------------
+ public void setLocale(Locale locale) {
+ this.put(LOCALE_KEY, locale);
+ }
+
+ public Locale getLocale() {
+ return (Locale) this.get(LOCALE_KEY);
+ }
+
+ // -------------------------------
+ // Convenience Methods: these are not part of the formal ActionContext API,
+ // but are likely to be commonly useful.
+ // -------------------------------
+
+ /**
+ * <p> Provide the currently configured commons-logging <code>Log</code>
+ * instance. </p>
+ *
+ * @return Log instance for this context
+ */
+ public Log getLogger() {
+ return this.logger;
+ }
+
+ /**
+ * <p> Set the commons-logging <code>Log</code> instance which should be
+ * used to LOG messages. This is initialized at instantiation time but may
+ * be overridden. Be advised not to set the value to null, as
+ * <code>ActionContextBase</code> uses the logger for some of its own
+ * operations. </p>
+ */
+ public void setLogger(Log logger) {
+ this.logger = logger;
+ }
+
+ /**
+ * <p> Using this <code>ActionContext</code>'s default
+ * <code>ModuleConfig</code>, return an existing <code>ActionForm</code>
+ * in the specified scope, or create a new one and add it to the specified
+ * scope. </p>
+ *
+ * @param formName The name attribute of our ActionForm
+ * @param scopeName The scope identier (request, session)
+ * @return The ActionForm for this request
+ * @throws IllegalAccessException If object cannot be created
+ * @throws InstantiationException If object cannot be created
+ * @see this.findOrCreateActionForm(String, String, ModuleConfig)
+ */
+ public ActionForm findOrCreateActionForm(String formName, String scopeName)
+ throws IllegalAccessException, InstantiationException {
+ return this.findOrCreateActionForm(formName, scopeName,
+ this.getModuleConfig());
+ }
+
+ /**
+ * <p> In the context of the given <code>ModuleConfig</code> and this
+ * <code>ActionContext</code>, look for an existing
+ * <code>ActionForm</code> in the specified scope. If one is found, return
+ * it; otherwise, create a new instance, add it to that scope, and then
+ * return it. </p>
+ *
+ * @param formName The name attribute of our ActionForm
+ * @param scopeName The scope identier (request, session)
+ * @return The ActionForm for this request
+ * @throws IllegalAccessException If object cannot be created
+ * @throws InstantiationException If object cannot be created
+ * @throws IllegalArgumentException If form config is missing from module
+ * or scopeName is invalid
+ */
+ public ActionForm findOrCreateActionForm(String formName, String scopeName,
+ ModuleConfig moduleConfig)
+ throws IllegalAccessException, InstantiationException {
+ Map scope = this.getScope(scopeName);
+
+ ActionForm instance;
+ FormBeanConfig formBeanConfig =
+ moduleConfig.findFormBeanConfig(formName);
+
+ if (formBeanConfig == null) {
+ throw new IllegalArgumentException("No form config found under "
+ + formName + " in module " + moduleConfig.getPrefix());
+ }
+
+ instance = (ActionForm) scope.get(formName);
+
+ // ISSUE: Can we recycle the existing instance (if any)?
+ if (instance != null) {
+ getLogger().trace("Found an instance in scope " + scopeName
+ + "; test for reusability");
+
+ if (formBeanConfig.canReuse(instance)) {
+ return instance;
+ }
+ }
+
+ ActionForm form = formBeanConfig.createActionForm(this);
+
+ // ISSUE: Should we check this call to put?
+ scope.put(formName, form);
+
+ return form;
+ }
+}
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ActionContextBase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ActionContextBase.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ContextWrapper.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ContextWrapper.java?rev=421119&r1=421118&r2=421119&view=diff
==============================================================================
--- struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ContextWrapper.java (original)
+++ struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ContextWrapper.java Tue Jul 11 21:49:11 2006
@@ -1,105 +1,105 @@
-/*
- * $Id$
- *
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed 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.struts.chain.contexts;
-
-import org.apache.commons.chain.Context;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * <p> Provide a base class for any Context Implementation which is primarily
- * intended for use in a subchain. </p> <p> Classes which extend
- * <code>ContextWrapper</code> may implement typesafe property methods which
- * also leave their values in the underlying context. </p>
- */
-public class ContextWrapper implements Context {
- private Context base;
-
- /**
- * <p> Instantiate object as a composite around the given Context. </p>
- *
- * @param context Context instance to wrap
- */
- public ContextWrapper(Context context) {
- this.base = context;
- }
-
- /**
- * Provide the underlying Context for this composite.
- *
- * @return The undelrying Context
- */
- protected Context getBaseContext() {
- return this.base;
- }
-
- // -------------------------------
- // Map interface methods
- // -------------------------------
- public Set entrySet() {
- return this.base.entrySet();
- }
-
- public Set keySet() {
- return this.base.keySet();
- }
-
- public Collection values() {
- return this.base.values();
- }
-
- public void clear() {
- this.base.clear();
- }
-
- public void putAll(Map map) {
- // ISSUE: Should we check this call to putAll?
- this.base.putAll(map);
- }
-
- public Object remove(Object key) {
- return this.base.remove(key);
- }
-
- public Object put(Object key, Object value) {
- // ISSUE: Should we check this call to put?
- return this.base.put(key, value);
- }
-
- public Object get(Object key) {
- return this.base.get(key);
- }
-
- public boolean containsValue(Object o) {
- return this.base.containsValue(o);
- }
-
- public boolean containsKey(Object o) {
- return this.base.containsKey(o);
- }
-
- public boolean isEmpty() {
- return this.base.isEmpty();
- }
-
- public int size() {
- return this.base.size();
- }
-}
+/*
+ * $Id$
+ *
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.struts.chain.contexts;
+
+import org.apache.commons.chain.Context;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * <p> Provide a base class for any Context Implementation which is primarily
+ * intended for use in a subchain. </p> <p> Classes which extend
+ * <code>ContextWrapper</code> may implement typesafe property methods which
+ * also leave their values in the underlying context. </p>
+ */
+public class ContextWrapper implements Context {
+ private Context base;
+
+ /**
+ * <p> Instantiate object as a composite around the given Context. </p>
+ *
+ * @param context Context instance to wrap
+ */
+ public ContextWrapper(Context context) {
+ this.base = context;
+ }
+
+ /**
+ * Provide the underlying Context for this composite.
+ *
+ * @return The undelrying Context
+ */
+ protected Context getBaseContext() {
+ return this.base;
+ }
+
+ // -------------------------------
+ // Map interface methods
+ // -------------------------------
+ public Set entrySet() {
+ return this.base.entrySet();
+ }
+
+ public Set keySet() {
+ return this.base.keySet();
+ }
+
+ public Collection values() {
+ return this.base.values();
+ }
+
+ public void clear() {
+ this.base.clear();
+ }
+
+ public void putAll(Map map) {
+ // ISSUE: Should we check this call to putAll?
+ this.base.putAll(map);
+ }
+
+ public Object remove(Object key) {
+ return this.base.remove(key);
+ }
+
+ public Object put(Object key, Object value) {
+ // ISSUE: Should we check this call to put?
+ return this.base.put(key, value);
+ }
+
+ public Object get(Object key) {
+ return this.base.get(key);
+ }
+
+ public boolean containsValue(Object o) {
+ return this.base.containsValue(o);
+ }
+
+ public boolean containsKey(Object o) {
+ return this.base.containsKey(o);
+ }
+
+ public boolean isEmpty() {
+ return this.base.isEmpty();
+ }
+
+ public int size() {
+ return this.base.size();
+ }
+}
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ContextWrapper.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ContextWrapper.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/MockActionContext.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/MockActionContext.java?rev=421119&r1=421118&r2=421119&view=diff
==============================================================================
--- struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/MockActionContext.java (original)
+++ struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/MockActionContext.java Tue Jul 11 21:49:11 2006
@@ -1,67 +1,67 @@
-/*
- * $Id$
- *
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed 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.struts.chain.contexts;
-
-import java.util.HashMap;
-import java.util.Map;
-
-// ISSUE: Are there any useful "assert" type methods we could add to this?
-
-/**
- * <p> Implement <code>ActionContext</code> with empty maps for
- * <code>applicationScope</code>, <code>sessionScope</code>,
- * <code>requestScope</code>, and <code>parameterMap</code> properties. </p>
- */
-public class MockActionContext extends ActionContextBase {
- private Map applicationScope = new HashMap();
- private Map requestScope = new HashMap();
- private Map sessionScope = new HashMap();
- private Map parameterMap = new HashMap();
-
- public Map getApplicationScope() {
- return applicationScope;
- }
-
- public void setApplicationScope(Map applicationScope) {
- this.applicationScope = applicationScope;
- }
-
- public Map getParameterMap() {
- return parameterMap;
- }
-
- public void setParameterMap(Map parameterMap) {
- this.parameterMap = parameterMap;
- }
-
- public Map getRequestScope() {
- return requestScope;
- }
-
- public void setRequestScope(Map requestScope) {
- this.requestScope = requestScope;
- }
-
- public Map getSessionScope() {
- return sessionScope;
- }
-
- public void setSessionScope(Map sessionScope) {
- this.sessionScope = sessionScope;
- }
-}
+/*
+ * $Id$
+ *
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.struts.chain.contexts;
+
+import java.util.HashMap;
+import java.util.Map;
+
+// ISSUE: Are there any useful "assert" type methods we could add to this?
+
+/**
+ * <p> Implement <code>ActionContext</code> with empty maps for
+ * <code>applicationScope</code>, <code>sessionScope</code>,
+ * <code>requestScope</code>, and <code>parameterMap</code> properties. </p>
+ */
+public class MockActionContext extends ActionContextBase {
+ private Map applicationScope = new HashMap();
+ private Map requestScope = new HashMap();
+ private Map sessionScope = new HashMap();
+ private Map parameterMap = new HashMap();
+
+ public Map getApplicationScope() {
+ return applicationScope;
+ }
+
+ public void setApplicationScope(Map applicationScope) {
+ this.applicationScope = applicationScope;
+ }
+
+ public Map getParameterMap() {
+ return parameterMap;
+ }
+
+ public void setParameterMap(Map parameterMap) {
+ this.parameterMap = parameterMap;
+ }
+
+ public Map getRequestScope() {
+ return requestScope;
+ }
+
+ public void setRequestScope(Map requestScope) {
+ this.requestScope = requestScope;
+ }
+
+ public Map getSessionScope() {
+ return sessionScope;
+ }
+
+ public void setSessionScope(Map sessionScope) {
+ this.sessionScope = sessionScope;
+ }
+}
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/MockActionContext.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/MockActionContext.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ServletActionContext.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ServletActionContext.java?rev=421119&r1=421118&r2=421119&view=diff
==============================================================================
--- struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ServletActionContext.java (original)
+++ struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ServletActionContext.java Tue Jul 11 21:49:11 2006
@@ -1,248 +1,248 @@
-/*
- * $Id$
- *
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed 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.struts.chain.contexts;
-
-import org.apache.commons.chain.web.servlet.ServletWebContext;
-import org.apache.struts.Globals;
-import org.apache.struts.action.ActionMessages;
-import org.apache.struts.action.ActionServlet;
-import org.apache.struts.chain.Constants;
-import org.apache.struts.config.ActionConfig;
-import org.apache.struts.util.MessageResources;
-
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * <p> Implement ActionContext interface while making Servlet API-specific
- * values available. </p>
- */
-public class ServletActionContext extends WebActionContext {
- /**
- * <p> Instantiate this composite by wrapping a ServletWebContext. </p>
- *
- * @param context The ServletWebContext to wrap
- */
- public ServletActionContext(ServletWebContext context) {
- super(context);
- }
-
- /**
- * <p> Instantiate this Context for a given ServletContext,
- * HttpServletRequest, and HttpServletResponse. </p>
- *
- * @param context The instant ServletContext
- * @param request The instant HttpServletRequest
- * @param response The instant HttpServletResponse
- */
- public ServletActionContext(ServletContext context,
- HttpServletRequest request, HttpServletResponse response) {
- this(new ServletWebContext(context, request, response));
- }
-
- /**
- * <p> Provide the ServletWebContext for this composite. </p>
- *
- * @return Our ServletWebContext
- */
- protected ServletWebContext servletWebContext() {
- return (ServletWebContext) this.getBaseContext();
- }
-
- public void release() {
- this.servletWebContext().release();
- super.release();
- }
-
- // -------------------------------
- // Servlet specific properties
- // -------------------------------
-
- /**
- * <p> Return the ServletContext for this context. </p>
- *
- * @return Our ServletContext
- */
- public ServletContext getContext() {
- return servletWebContext().getContext();
- }
-
- /**
- * <p> Return the HttpServletRequest for this context. </p>
- *
- * @return Our HttpServletRequest
- */
- public HttpServletRequest getRequest() {
- return servletWebContext().getRequest();
- }
-
- /**
- * <p> Return the HttpServletResponse for this context. </p>
- *
- * @return Our HttpServletResponse
- */
- public HttpServletResponse getResponse() {
- return servletWebContext().getResponse();
- }
-
- /**
- * <p> Return the ActionServlet for this context. </p>
- *
- * @return Our ActionServlet
- */
- public ActionServlet getActionServlet() {
- return (ActionServlet) this.get(Constants.ACTION_SERVLET_KEY);
- }
-
- /**
- * <p> Set the ActionServlet instance for this context. </p>
- *
- * @param servlet Our ActionServlet instance
- */
- public void setActionServlet(ActionServlet servlet) {
- this.put(Constants.ACTION_SERVLET_KEY, servlet);
- }
-
- // -------------------------------
- // Servlet specific modifications to base properties.
- // -------------------------------
- public void setActionConfig(ActionConfig actionConfig) {
- super.setActionConfig(actionConfig);
- this.getRequestScope().put(Globals.MAPPING_KEY, actionConfig);
-
- // ISSUE: Should we check this call to put?
- }
-
- public MessageResources getMessageResources() {
- return ((MessageResources) getRequest().getAttribute(Globals.MESSAGES_KEY));
- }
-
- // ISSUE: This method would probably be better handled by a "Struts"
- // object which encapsulated the servler (Application) scope.
- public MessageResources getMessageResources(String key) {
- // Identify the current module
- ServletContext context = getActionServlet().getServletContext();
-
- // Return the requested message resources instance
- return (MessageResources) context.getAttribute(key
- + getModuleConfig().getPrefix());
- }
-
- public void setMessageResources(MessageResources resources) {
- super.setMessageResources(resources);
- this.getRequest().setAttribute(Globals.MESSAGES_KEY, resources);
- }
-
- /**
- * <p> Store the mesasage resources for the current module under the given
- * request attribute key. </p>
- *
- * @param key Request attribute key
- * @param resources Message resouces to store
- */
- public void setMessageResources(String key, MessageResources resources) {
- this.getRequest().setAttribute(key + getModuleConfig().getPrefix(),
- resources);
- }
-
- // -------------------------------
- // ActionMessage Processing
- // -------------------------------
- public void saveErrors(ActionMessages errors) {
- // Remove any error messages attribute if none are required
- if ((errors == null) || errors.isEmpty()) {
- getRequest().removeAttribute(Globals.ERROR_KEY);
-
- return;
- }
-
- // Save the error messages we need
- getRequest().setAttribute(Globals.ERROR_KEY, errors);
- }
-
- public void saveMessages(ActionMessages messages) {
- if ((messages == null) || messages.isEmpty()) {
- getRequest().removeAttribute(Globals.MESSAGE_KEY);
-
- return;
- }
-
- getRequest().setAttribute(Globals.MESSAGE_KEY, messages);
- }
-
- public void addMessages(ActionMessages messages) {
- if (messages == null) {
- return;
- }
-
- ActionMessages requestMessages = getMessages();
-
- if (requestMessages == null) {
- requestMessages = new ActionMessages();
- }
-
- requestMessages.add(messages);
- saveMessages(requestMessages);
- }
-
- public void addErrors(ActionMessages errors) {
- if (errors == null) {
- return;
- }
-
- ActionMessages requestErrors = getErrors();
-
- if (requestErrors == null) {
- requestErrors = new ActionMessages();
- }
-
- requestErrors.add(errors);
- saveErrors(requestErrors);
- }
-
- public ActionMessages getErrors() {
- return (ActionMessages) this.getRequest().getAttribute(Globals.ERROR_KEY);
- }
-
- public ActionMessages getMessages() {
- return (ActionMessages) this.getRequest().getAttribute(Globals.MESSAGE_KEY);
- }
-
- // -------------------------------
- // Token Processing
- // Implementing the servlet-aware versions by using the
- // TokenProcessor class
- // directly should ensure greater compatibility.
- // -------------------------------
- public void saveToken() {
- token.saveToken(getRequest());
- }
-
- public String generateToken() {
- return token.generateToken(getRequest());
- }
-
- public boolean isTokenValid(boolean reset) {
- return token.isTokenValid(getRequest(), reset);
- }
-
- public void resetToken() {
- token.resetToken(getRequest());
- }
-}
+/*
+ * $Id$
+ *
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.struts.chain.contexts;
+
+import org.apache.commons.chain.web.servlet.ServletWebContext;
+import org.apache.struts.Globals;
+import org.apache.struts.action.ActionMessages;
+import org.apache.struts.action.ActionServlet;
+import org.apache.struts.chain.Constants;
+import org.apache.struts.config.ActionConfig;
+import org.apache.struts.util.MessageResources;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * <p> Implement ActionContext interface while making Servlet API-specific
+ * values available. </p>
+ */
+public class ServletActionContext extends WebActionContext {
+ /**
+ * <p> Instantiate this composite by wrapping a ServletWebContext. </p>
+ *
+ * @param context The ServletWebContext to wrap
+ */
+ public ServletActionContext(ServletWebContext context) {
+ super(context);
+ }
+
+ /**
+ * <p> Instantiate this Context for a given ServletContext,
+ * HttpServletRequest, and HttpServletResponse. </p>
+ *
+ * @param context The instant ServletContext
+ * @param request The instant HttpServletRequest
+ * @param response The instant HttpServletResponse
+ */
+ public ServletActionContext(ServletContext context,
+ HttpServletRequest request, HttpServletResponse response) {
+ this(new ServletWebContext(context, request, response));
+ }
+
+ /**
+ * <p> Provide the ServletWebContext for this composite. </p>
+ *
+ * @return Our ServletWebContext
+ */
+ protected ServletWebContext servletWebContext() {
+ return (ServletWebContext) this.getBaseContext();
+ }
+
+ public void release() {
+ this.servletWebContext().release();
+ super.release();
+ }
+
+ // -------------------------------
+ // Servlet specific properties
+ // -------------------------------
+
+ /**
+ * <p> Return the ServletContext for this context. </p>
+ *
+ * @return Our ServletContext
+ */
+ public ServletContext getContext() {
+ return servletWebContext().getContext();
+ }
+
+ /**
+ * <p> Return the HttpServletRequest for this context. </p>
+ *
+ * @return Our HttpServletRequest
+ */
+ public HttpServletRequest getRequest() {
+ return servletWebContext().getRequest();
+ }
+
+ /**
+ * <p> Return the HttpServletResponse for this context. </p>
+ *
+ * @return Our HttpServletResponse
+ */
+ public HttpServletResponse getResponse() {
+ return servletWebContext().getResponse();
+ }
+
+ /**
+ * <p> Return the ActionServlet for this context. </p>
+ *
+ * @return Our ActionServlet
+ */
+ public ActionServlet getActionServlet() {
+ return (ActionServlet) this.get(Constants.ACTION_SERVLET_KEY);
+ }
+
+ /**
+ * <p> Set the ActionServlet instance for this context. </p>
+ *
+ * @param servlet Our ActionServlet instance
+ */
+ public void setActionServlet(ActionServlet servlet) {
+ this.put(Constants.ACTION_SERVLET_KEY, servlet);
+ }
+
+ // -------------------------------
+ // Servlet specific modifications to base properties.
+ // -------------------------------
+ public void setActionConfig(ActionConfig actionConfig) {
+ super.setActionConfig(actionConfig);
+ this.getRequestScope().put(Globals.MAPPING_KEY, actionConfig);
+
+ // ISSUE: Should we check this call to put?
+ }
+
+ public MessageResources getMessageResources() {
+ return ((MessageResources) getRequest().getAttribute(Globals.MESSAGES_KEY));
+ }
+
+ // ISSUE: This method would probably be better handled by a "Struts"
+ // object which encapsulated the servler (Application) scope.
+ public MessageResources getMessageResources(String key) {
+ // Identify the current module
+ ServletContext context = getActionServlet().getServletContext();
+
+ // Return the requested message resources instance
+ return (MessageResources) context.getAttribute(key
+ + getModuleConfig().getPrefix());
+ }
+
+ public void setMessageResources(MessageResources resources) {
+ super.setMessageResources(resources);
+ this.getRequest().setAttribute(Globals.MESSAGES_KEY, resources);
+ }
+
+ /**
+ * <p> Store the mesasage resources for the current module under the given
+ * request attribute key. </p>
+ *
+ * @param key Request attribute key
+ * @param resources Message resouces to store
+ */
+ public void setMessageResources(String key, MessageResources resources) {
+ this.getRequest().setAttribute(key + getModuleConfig().getPrefix(),
+ resources);
+ }
+
+ // -------------------------------
+ // ActionMessage Processing
+ // -------------------------------
+ public void saveErrors(ActionMessages errors) {
+ // Remove any error messages attribute if none are required
+ if ((errors == null) || errors.isEmpty()) {
+ getRequest().removeAttribute(Globals.ERROR_KEY);
+
+ return;
+ }
+
+ // Save the error messages we need
+ getRequest().setAttribute(Globals.ERROR_KEY, errors);
+ }
+
+ public void saveMessages(ActionMessages messages) {
+ if ((messages == null) || messages.isEmpty()) {
+ getRequest().removeAttribute(Globals.MESSAGE_KEY);
+
+ return;
+ }
+
+ getRequest().setAttribute(Globals.MESSAGE_KEY, messages);
+ }
+
+ public void addMessages(ActionMessages messages) {
+ if (messages == null) {
+ return;
+ }
+
+ ActionMessages requestMessages = getMessages();
+
+ if (requestMessages == null) {
+ requestMessages = new ActionMessages();
+ }
+
+ requestMessages.add(messages);
+ saveMessages(requestMessages);
+ }
+
+ public void addErrors(ActionMessages errors) {
+ if (errors == null) {
+ return;
+ }
+
+ ActionMessages requestErrors = getErrors();
+
+ if (requestErrors == null) {
+ requestErrors = new ActionMessages();
+ }
+
+ requestErrors.add(errors);
+ saveErrors(requestErrors);
+ }
+
+ public ActionMessages getErrors() {
+ return (ActionMessages) this.getRequest().getAttribute(Globals.ERROR_KEY);
+ }
+
+ public ActionMessages getMessages() {
+ return (ActionMessages) this.getRequest().getAttribute(Globals.MESSAGE_KEY);
+ }
+
+ // -------------------------------
+ // Token Processing
+ // Implementing the servlet-aware versions by using the
+ // TokenProcessor class
+ // directly should ensure greater compatibility.
+ // -------------------------------
+ public void saveToken() {
+ token.saveToken(getRequest());
+ }
+
+ public String generateToken() {
+ return token.generateToken(getRequest());
+ }
+
+ public boolean isTokenValid(boolean reset) {
+ return token.isTokenValid(getRequest(), reset);
+ }
+
+ public void resetToken() {
+ token.resetToken(getRequest());
+ }
+}
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ServletActionContext.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/ServletActionContext.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/WebActionContext.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/WebActionContext.java?rev=421119&r1=421118&r2=421119&view=diff
==============================================================================
--- struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/WebActionContext.java (original)
+++ struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/WebActionContext.java Tue Jul 11 21:49:11 2006
@@ -1,178 +1,178 @@
-/*
- * $Id$
- *
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed 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.struts.chain.contexts;
-
-import org.apache.commons.chain.web.WebContext;
-import org.apache.struts.Globals;
-import org.apache.struts.config.ModuleConfig;
-
-import java.util.Map;
-
-/**
- * <p> Provide a Subclass of ActionContextBase which is understood to be
- * wrapping an instance of <code>org.apache.commons.chain.web.WebContext</code>.
- * </p>
- */
-public class WebActionContext extends ActionContextBase {
- /**
- * Instantiate this composite by wrapping an instance of WebContext.
- *
- * @param context The WebContext to wrap
- */
- public WebActionContext(WebContext context) {
- super(context);
- }
-
- /**
- * Provide the wrapped WebContext for this composite.
- *
- * @return The wrapped WebContext
- */
- protected WebContext webContext() {
- return (WebContext) this.getBaseContext();
- }
-
- public void release() {
- super.release();
- }
-
- // -------------------------------
- // WebContext property wrappers
- // -------------------------------
-
- /**
- * <p> Return an immutable Map that maps header names to the first (or
- * only) header value (as a String). </p>
- *
- * @return A immutable Map of web request header names
- */
- public Map getHeader() {
- return webContext().getHeader();
- }
-
- /**
- * <p> Return an immutable Map that maps header names to the set of all
- * values specified in the request (as a String array). Header names must
- * be matched in a case-insensitive manner. </p>
- *
- * @return An immutable Map of web request header values
- */
- public Map getHeaderValues() {
- return webContext().getHeaderValues();
- }
-
- /**
- * <p> Return an immutable Map that maps context application
- * initialization parameters to their values. </p>
- *
- * @return An immutable Map of web context initialization parameters
- */
- public Map getInitParam() {
- return webContext().getInitParam();
- }
-
- /**
- * <p> Return a map whose keys are <code>String</code> request parameter
- * names and whose values are <code>String</code> values. </p> <p> For
- * parameters which were submitted with more than one value, only one
- * value will be returned, as if one called
- * <code>ServletRequest.getParameter(String)</code>
- * </p>
- *
- * @return A map of web request parameters
- */
- public Map getParam() {
- return webContext().getParam();
- }
-
- /**
- * <p> Return a map whose keys are <code>String</code> request parameter
- * names and whose values are <code>String[]</code> values. </p>
- *
- * @return A map of web request parameter values (as an array)
- */
- public Map getParamValues() {
- return webContext().getParamValues();
- }
-
- public Map getApplicationScope() {
- return webContext().getApplicationScope();
- }
-
- public Map getRequestScope() {
- return webContext().getRequestScope();
- }
-
- public Map getParameterMap() {
- return getParamValues();
- }
-
- public Map getSessionScope() {
- return webContext().getSessionScope();
- }
-
- // ISSUE: AbstractSelectModule set the precedent of doing this at the
- // "web context" level instead of the ServletWebContext level.
- // Consider whether that's how we want to do it universally for other
- // manipulations of the RequestScope or not...
- public void setModuleConfig(ModuleConfig moduleConfig) {
- super.setModuleConfig(moduleConfig);
- this.getRequestScope().put(Globals.MODULE_KEY, moduleConfig);
- }
-
- /**
- * @see org.apache.struts.chain.contexts.ActionContext#getModuleConfig()
- */
- public ModuleConfig getModuleConfig() {
- ModuleConfig mc = super.getModuleConfig();
-
- if (mc == null) {
- mc = (ModuleConfig) this.getRequestScope().get(Globals.MODULE_KEY);
- }
-
- return mc;
- }
-
- // ISSUE: AbstractSelectModule set the precedent of doing this at the
- // "web context" level instead of the ServletWebContext level. Consider
- // whether that's how we want to do it universally for other manipulations
- // of the RequestScope or not...
- public void setCancelled(Boolean cancelled) {
- super.setCancelled(cancelled);
-
- // historic semantics of "isCancelled" are to consider any non-null
- // value in the request under Globals.CANCEL_KEY as "yes, this was
- // cancelled."
- if ((cancelled != null) && cancelled.booleanValue()) {
- this.getRequestScope().put(Globals.CANCEL_KEY, cancelled);
- } else {
- this.getRequestScope().remove(Globals.CANCEL_KEY);
- }
- }
-
- public Boolean getCancelled() {
- Boolean cancelled = super.getCancelled();
-
- if (cancelled == null) {
- cancelled =
- (Boolean) this.getRequestScope().get(Globals.CANCEL_KEY);
- }
-
- return cancelled;
- }
-}
+/*
+ * $Id$
+ *
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.struts.chain.contexts;
+
+import org.apache.commons.chain.web.WebContext;
+import org.apache.struts.Globals;
+import org.apache.struts.config.ModuleConfig;
+
+import java.util.Map;
+
+/**
+ * <p> Provide a Subclass of ActionContextBase which is understood to be
+ * wrapping an instance of <code>org.apache.commons.chain.web.WebContext</code>.
+ * </p>
+ */
+public class WebActionContext extends ActionContextBase {
+ /**
+ * Instantiate this composite by wrapping an instance of WebContext.
+ *
+ * @param context The WebContext to wrap
+ */
+ public WebActionContext(WebContext context) {
+ super(context);
+ }
+
+ /**
+ * Provide the wrapped WebContext for this composite.
+ *
+ * @return The wrapped WebContext
+ */
+ protected WebContext webContext() {
+ return (WebContext) this.getBaseContext();
+ }
+
+ public void release() {
+ super.release();
+ }
+
+ // -------------------------------
+ // WebContext property wrappers
+ // -------------------------------
+
+ /**
+ * <p> Return an immutable Map that maps header names to the first (or
+ * only) header value (as a String). </p>
+ *
+ * @return A immutable Map of web request header names
+ */
+ public Map getHeader() {
+ return webContext().getHeader();
+ }
+
+ /**
+ * <p> Return an immutable Map that maps header names to the set of all
+ * values specified in the request (as a String array). Header names must
+ * be matched in a case-insensitive manner. </p>
+ *
+ * @return An immutable Map of web request header values
+ */
+ public Map getHeaderValues() {
+ return webContext().getHeaderValues();
+ }
+
+ /**
+ * <p> Return an immutable Map that maps context application
+ * initialization parameters to their values. </p>
+ *
+ * @return An immutable Map of web context initialization parameters
+ */
+ public Map getInitParam() {
+ return webContext().getInitParam();
+ }
+
+ /**
+ * <p> Return a map whose keys are <code>String</code> request parameter
+ * names and whose values are <code>String</code> values. </p> <p> For
+ * parameters which were submitted with more than one value, only one
+ * value will be returned, as if one called
+ * <code>ServletRequest.getParameter(String)</code>
+ * </p>
+ *
+ * @return A map of web request parameters
+ */
+ public Map getParam() {
+ return webContext().getParam();
+ }
+
+ /**
+ * <p> Return a map whose keys are <code>String</code> request parameter
+ * names and whose values are <code>String[]</code> values. </p>
+ *
+ * @return A map of web request parameter values (as an array)
+ */
+ public Map getParamValues() {
+ return webContext().getParamValues();
+ }
+
+ public Map getApplicationScope() {
+ return webContext().getApplicationScope();
+ }
+
+ public Map getRequestScope() {
+ return webContext().getRequestScope();
+ }
+
+ public Map getParameterMap() {
+ return getParamValues();
+ }
+
+ public Map getSessionScope() {
+ return webContext().getSessionScope();
+ }
+
+ // ISSUE: AbstractSelectModule set the precedent of doing this at the
+ // "web context" level instead of the ServletWebContext level.
+ // Consider whether that's how we want to do it universally for other
+ // manipulations of the RequestScope or not...
+ public void setModuleConfig(ModuleConfig moduleConfig) {
+ super.setModuleConfig(moduleConfig);
+ this.getRequestScope().put(Globals.MODULE_KEY, moduleConfig);
+ }
+
+ /**
+ * @see org.apache.struts.chain.contexts.ActionContext#getModuleConfig()
+ */
+ public ModuleConfig getModuleConfig() {
+ ModuleConfig mc = super.getModuleConfig();
+
+ if (mc == null) {
+ mc = (ModuleConfig) this.getRequestScope().get(Globals.MODULE_KEY);
+ }
+
+ return mc;
+ }
+
+ // ISSUE: AbstractSelectModule set the precedent of doing this at the
+ // "web context" level instead of the ServletWebContext level. Consider
+ // whether that's how we want to do it universally for other manipulations
+ // of the RequestScope or not...
+ public void setCancelled(Boolean cancelled) {
+ super.setCancelled(cancelled);
+
+ // historic semantics of "isCancelled" are to consider any non-null
+ // value in the request under Globals.CANCEL_KEY as "yes, this was
+ // cancelled."
+ if ((cancelled != null) && cancelled.booleanValue()) {
+ this.getRequestScope().put(Globals.CANCEL_KEY, cancelled);
+ } else {
+ this.getRequestScope().remove(Globals.CANCEL_KEY);
+ }
+ }
+
+ public Boolean getCancelled() {
+ Boolean cancelled = super.getCancelled();
+
+ if (cancelled == null) {
+ cancelled =
+ (Boolean) this.getRequestScope().get(Globals.CANCEL_KEY);
+ }
+
+ return cancelled;
+ }
+}
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/WebActionContext.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/chain/contexts/WebActionContext.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ActionConfig.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ActionConfigMatcher.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ConfigHelper.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ConfigHelperInterface.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ConfigRuleSet.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ControllerConfig.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ExceptionConfig.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/FormBeanConfig.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/FormPropertyConfig.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ForwardConfig.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/MessageResourcesConfig.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ModuleConfig.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/ModuleConfigFactory.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/PlugInConfig.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/impl/DefaultModuleConfigFactory.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/config/impl/ModuleConfigImpl.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/mock/MockAction.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/mock/MockActionServlet.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/mock/MockEnumeration.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/mock/MockFormBean.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/mock/MockHttpServletRequest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/mock/MockHttpServletResponse.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/mock/MockHttpSession.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/mock/MockPageContext.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/mock/MockPrincipal.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/mock/MockServletConfig.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/mock/MockServletContext.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/mock/TestMockBase.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/upload/CommonsMultipartRequestHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/upload/FormFile.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/upload/MultipartRequestHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/upload/MultipartRequestWrapper.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/util/ImageButtonBean.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/util/IteratorAdapter.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/util/LabelValueBean.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/util/MessageResources.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL
Propchange: struts/struts1/trunk/core/src/main/java/org/apache/struts/util/MessageResourcesFactory.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue Jul 11 21:49:11 2006
@@ -1 +1 @@
-date author id rev
+Date Author Id Revision HeadURL