webwork/src/main/webwork/action ActionContext.java,1.11,1.12

[email protected]
Newsgroups gmane.comp.java.open-symphony.cvs
Message-ID <[email protected]>
Update of /cvsroot/opensymphony/webwork/src/main/webwork/action
In directory sc8-pr-cvs1:/tmp/cvs-serv674/src/main/webwork/action

Modified Files:
	ActionContext.java 
Log Message:
Small cleanups

Index: ActionContext.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/main/webwork/action/ActionContext.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ActionContext.java	17 Jun 2003 13:43:34 -0000	1.11
+++ ActionContext.java	31 Oct 2003 00:57:00 -0000	1.12
@@ -6,10 +6,6 @@
  */
 package webwork.action;
 
-import org.apache.commons.logging.*;
-import webwork.action.factory.ApplicationMap;
-import webwork.action.factory.ParameterMap;
-import webwork.action.factory.SessionMap;
 import webwork.multipart.MultiPartRequestWrapper;
 import webwork.util.ValueStack;
 
@@ -41,8 +37,7 @@
 public class ActionContext
 {
    static ThreadLocal actionContext = new ActionContextThreadLocal();
-   private static Log log = LogFactory.getLog(ActionContext.class);
-   
+
    public static final String ACTION_NAME = "webwork.action.ActionContext.name";
    public static final String SESSION = "webwork.action.ActionContext.action";
    public static final String APPLICATION = "webwork.action.ActionContext.application";
@@ -84,7 +79,7 @@
    /**
     * Stores a value in the current ActionContext.  The value can
     * be looked up using the key.
-    * 
+    *
     * @param key The key of the value.
     * @param value The value to be stored.
     */
@@ -93,11 +88,11 @@
          lookup = new HashMap();
       lookup.put(key, value);
    }
-   
+
    /**
     * Returns a value that is stored in the current ActionContext
     * buy doing a lookup using the value's key.
-    * 
+    *
     * @param key The key used to find the value.
     * @return The value that was found using the key.
     */
@@ -109,14 +104,14 @@
 
    /**
     * Returns the name of the current Action.
-    * 
+    *
     * @return The current Action name.
     */
    public static String getName()
    {
       return getContext().getNameImpl();
    }
-   
+
    public String getNameImpl()
    {
    	return (String) get(ACTION_NAME);
@@ -124,7 +119,7 @@
 
    /**
     * Stores the name of the current Action in the ActionContext.
-    * 
+    *
     * @param name The name of the current action.
     */
    public static void setName(String name)
@@ -147,7 +142,7 @@
    {
    	return getContext().getLocaleImpl();
    }
-   
+
    public Locale getLocaleImpl()
    {
    	Locale locale = (Locale) get(LOCALE);
@@ -192,7 +187,7 @@
       }
       return session;
    }
-	
+
    /**
     * Set a session Map.
     */
@@ -263,8 +258,8 @@
    }
 
    /**
-    * Set a Map of parameters.  
-    * 
+    * Set a Map of parameters.
+    *
     * @param parameters The parameters for the current action context.
     */
    public static void setParameters(Map parameters)
@@ -278,8 +273,8 @@
    }
 
    /**
-    * Get the current ActionContext parameters.  Each Map entry is a String.  
-    * 
+    * Get the current ActionContext parameters.  Each Map entry is a String.
+    *
     * @return The parameters for the current action context.
     */
    public static Map getSingleValueParameters()
@@ -299,8 +294,8 @@
 
    /**
     * Set a Map of single value parameters.
-    * 
-    * @param The parameters for the current action context.
+    *
+    * @param  parameters for the current action context.
     */
    public static void setSingleValueParameters(Map parameters)
    {
@@ -314,22 +309,22 @@
 
    /**
     * Returns the current user's security Principal.
-    * 
+    *
     * @return the current user's security Principal
     */
    public static Principal getPrincipal()
    {
       return getContext().getPrincipalImpl();
    }
-   
+
    public Principal getPrincipalImpl()
    {
       return (Principal) get(PRINCIPAL);
    }
-   
+
    /**
     * Set  the current user's security Principal.
-    * 
+    *
     * @param principal the current user's security Principal
     */
    public static void setPrincipal(Principal principal)
@@ -355,7 +350,7 @@
    // add wrapRequest code here and throw IOException!!!
    public MultiPartRequestWrapper getMultiPartRequestImpl()
    {
-      HttpServletRequest request = (HttpServletRequest) getRequestImpl();
+      HttpServletRequest request = getRequestImpl();
       if (request instanceof MultiPartRequestWrapper) {
          return (MultiPartRequestWrapper) request;
       } else
@@ -379,7 +374,7 @@
 
    /**
     * Set the HttpServletRequest.
-    * 
+    *
     */
    public static void setRequest(HttpServletRequest request)
    {
@@ -390,7 +385,7 @@
    {
       put(REQUEST, request);
    }
-   
+
    /**
     * Returns the HttpServletResponse when in a servlet environment.
     *
@@ -408,7 +403,7 @@
 
    /**
     * Set the HttpServletResponse.
-    * 
+    *
     */
    public static void setResponse(HttpServletResponse response)
    {
@@ -437,7 +432,7 @@
 
    /**
     * Set the ServletContext.
-    * 
+    *
     */
    public static void setServletContext(ServletContext context)
    {
@@ -471,8 +466,7 @@
 
    /**
     * Set the ValueStack.
-    *
-    * @param ValueStack 
+    * @param valueStack
     */
    public static void setValueStack(ValueStack valueStack)
    {
@@ -484,11 +478,11 @@
       put(ValueStack.STACK_NAME, valueStack);
    }
 
-   private static class ActionContextThreadLocal extends InheritableThreadLocal 
+   private static class ActionContextThreadLocal extends InheritableThreadLocal
    {
       protected Object initialValue() {
          return new ActionContext();
       }
    }
-   
+
 }




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.