cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r586206 - in /cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session: components/ context/
Date Fri, 19 Oct 2007 01:31:35 GMT
Author: vgritsenko
Date: Thu Oct 18 18:31:34 2007
New Revision: 586206

URL: http://svn.apache.org/viewvc?rev=586206&view=rev
Log:
switching to new AbstractLogEnabled

Modified:
    cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultContextManager.java
    cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultFormManager.java
    cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultMediaManager.java
    cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultSessionManager.java
    cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultTransactionManager.java
    cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/context/RequestSessionContext.java
    cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/context/StandardSessionContextProvider.java

Modified: cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultContextManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultContextManager.java?rev=586206&r1=586205&r2=586206&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultContextManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultContextManager.java
Thu Oct 18 18:31:34 2007
@@ -19,29 +19,30 @@
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
-
 import javax.servlet.http.HttpSession;
 
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.ContextException;
 import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.ServiceSelector;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
+import org.apache.excalibur.source.SourceResolver;
+import org.apache.excalibur.xml.xpath.XPathProcessor;
+
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.environment.Request;
+import org.apache.cocoon.util.AbstractLogEnabled;
 import org.apache.cocoon.util.Deprecation;
 import org.apache.cocoon.webapps.session.ContextManager;
 import org.apache.cocoon.webapps.session.context.SessionContext;
 import org.apache.cocoon.webapps.session.context.SessionContextProvider;
 import org.apache.cocoon.webapps.session.context.SimpleSessionContext;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.xml.xpath.XPathProcessor;
+
 import org.xml.sax.SAXException;
 
 /**
@@ -50,8 +51,7 @@
  * @deprecated This block is deprecated and will be removed in future versions.
  * @version $Id$
  */
-public final class DefaultContextManager
-extends AbstractLogEnabled
+public final class DefaultContextManager extends AbstractLogEnabled
 implements Serviceable, ContextManager, ThreadSafe, Contextualizable, Disposable {
 
     /** The <code>ServiceManager</code> */

Modified: cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultFormManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultFormManager.java?rev=586206&r1=586205&r2=586206&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultFormManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultFormManager.java
Thu Oct 18 18:31:34 2007
@@ -19,26 +19,27 @@
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Map;
-
 import javax.servlet.http.HttpSession;
 
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.ContextException;
 import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
+
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Request;
+import org.apache.cocoon.util.AbstractLogEnabled;
 import org.apache.cocoon.webapps.session.ContextManager;
 import org.apache.cocoon.webapps.session.FormManager;
 import org.apache.cocoon.webapps.session.SessionConstants;
 import org.apache.cocoon.webapps.session.SessionManager;
 import org.apache.cocoon.webapps.session.context.SessionContext;
+
 import org.w3c.dom.DocumentFragment;
 
 /**

Modified: cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultMediaManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultMediaManager.java?rev=586206&r1=586205&r2=586206&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultMediaManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultMediaManager.java
Thu Oct 18 18:31:34 2007
@@ -22,10 +22,11 @@
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.ContextException;
 import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.thread.ThreadSafe;
+
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.environment.Request;
+import org.apache.cocoon.util.AbstractLogEnabled;
 import org.apache.cocoon.webapps.session.MediaManager;
 
 /**

Modified: cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultSessionManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultSessionManager.java?rev=586206&r1=586205&r2=586206&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultSessionManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultSessionManager.java
Thu Oct 18 18:31:34 2007
@@ -20,15 +20,16 @@
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.ContextException;
 import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
+
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.environment.Session;
+import org.apache.cocoon.util.AbstractLogEnabled;
 import org.apache.cocoon.webapps.session.ContextManager;
 import org.apache.cocoon.webapps.session.SessionConstants;
 import org.apache.cocoon.webapps.session.SessionManager;
@@ -36,6 +37,7 @@
 import org.apache.cocoon.xml.XMLConsumer;
 import org.apache.cocoon.xml.XMLUtils;
 import org.apache.cocoon.xml.dom.DOMUtil;
+
 import org.w3c.dom.DocumentFragment;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;

Modified: cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultTransactionManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultTransactionManager.java?rev=586206&r1=586205&r2=586206&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultTransactionManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/components/DefaultTransactionManager.java
Thu Oct 18 18:31:34 2007
@@ -18,17 +18,17 @@
 
 import java.util.HashMap;
 import java.util.Map;
-
 import javax.servlet.http.HttpSession;
 
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.ContextException;
 import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.thread.ThreadSafe;
+
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.environment.Request;
+import org.apache.cocoon.util.AbstractLogEnabled;
 import org.apache.cocoon.webapps.session.TransactionManager;
 import org.apache.cocoon.webapps.session.context.SessionContext;
 

Modified: cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/context/RequestSessionContext.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/context/RequestSessionContext.java?rev=586206&r1=586205&r2=586206&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/context/RequestSessionContext.java
(original)
+++ cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/context/RequestSessionContext.java
Thu Oct 18 18:31:34 2007
@@ -20,22 +20,23 @@
 import java.io.StringReader;
 import java.util.Enumeration;
 import java.util.Map;
-
 import javax.servlet.http.Cookie;
 
-import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.commons.lang.BooleanUtils;
+import org.apache.commons.logging.Log;
+import org.apache.excalibur.source.SourceParameters;
+import org.apache.excalibur.xml.sax.SAXParser;
+import org.apache.excalibur.xml.xpath.XPathProcessor;
+
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.transformation.CIncludeTransformer;
 import org.apache.cocoon.xml.IncludeXMLConsumer;
 import org.apache.cocoon.xml.dom.DOMUtil;
-import org.apache.commons.lang.BooleanUtils;
-import org.apache.excalibur.source.SourceParameters;
-import org.apache.excalibur.xml.sax.SAXParser;
-import org.apache.excalibur.xml.xpath.XPathProcessor;
+
 import org.w3c.dom.DOMException;
 import org.w3c.dom.Document;
 import org.w3c.dom.DocumentFragment;
@@ -118,8 +119,7 @@
  * @deprecated This block is deprecated and will be removed in future versions.
  * @version $Id$
  */
-public final class RequestSessionContext
-implements SessionContext {
+public final class RequestSessionContext implements SessionContext {
 
     private static final String PARAMETERS_ELEMENT = "cinclude:" + CIncludeTransformer.CINCLUDE_PARAMETERS_ELEMENT;
     private static final String PARAMETER_ELEMENT  = "cinclude:" + CIncludeTransformer.CINCLUDE_PARAMETER_ELEMENT;
@@ -127,7 +127,7 @@
     private static final String VALUE_ELEMENT      = "cinclude:" + CIncludeTransformer.CINCLUDE_VALUE_ELEMENT;
 
     /** The logger. */
-    protected Logger logger;
+    protected Log logger;
 
     /** Name of this context */
     private String    name;
@@ -141,7 +141,7 @@
     /** The XPath Processor */
     private XPathProcessor xpathProcessor;
 
-    public RequestSessionContext(Logger logger) {
+    public RequestSessionContext(Log logger) {
         this.logger = logger;
     }
 
@@ -199,9 +199,13 @@
      */
     private String createPath(String path) {
         if (path == null) path = "/";
-        if (path.startsWith("/") == false) path = "/" + path;
+        if (!path.startsWith("/")) {
+            path = "/" + path;
+        }
         path = "/context" + path;
-        if (path.endsWith("/") == true) path = path.substring(0, path.length() - 1);
+        if (path.endsWith("/")) {
+            path = path.substring(0, path.length() - 1);
+        }
         return path;
     }
 
@@ -291,7 +295,7 @@
 
         root.appendChild(attrElement);
         Enumeration all = this.request.getAttributeNames();
-        while (all.hasMoreElements() == true) {
+        while (all.hasMoreElements()) {
             attrName = (String) all.nextElement();
             try {
                 attr = doc.createElementNS(null, attrName);
@@ -363,7 +367,7 @@
 
         root.appendChild(headersElement);
         Enumeration all = this.request.getHeaderNames();
-        while (all.hasMoreElements() == true) {
+        while (all.hasMoreElements()) {
             headerName = (String) all.nextElement();
             try {
                 header = doc.createElementNS(null, headerName);
@@ -386,7 +390,7 @@
         Element     parameterValuesElement = doc.createElementNS(null, "parametervalues");
         root.appendChild(parameterElement);
         root.appendChild(parameterValuesElement);
-        String      parameterName = null;
+        String      parameterName;
         Enumeration pars = this.request.getParameterNames();
         Element     parameter;
         Element     element;
@@ -399,7 +403,7 @@
         parameterValuesElement.appendChild(element);
         parameterValuesElement = element;
 
-        while (pars.hasMoreElements() == true) {
+        while (pars.hasMoreElements()) {
             parameterName = (String)pars.nextElement();
             values = this.request.getParameterValues(parameterName);
 
@@ -561,7 +565,7 @@
     public Node getSingleNode(String path)
     throws ProcessingException {
         path = this.createPath(path);
-        Node node = null;
+        Node node;
 
         try {
             node = DOMUtil.getSingleNode(this.contextData, path, this.xpathProcessor);
@@ -577,7 +581,7 @@
     public NodeList getNodeList(String path)
     throws ProcessingException {
         path = this.createPath(path);
-        NodeList list = null;
+        NodeList list;
 
         try {
             list = DOMUtil.selectNodeList(this.contextData, path, this.xpathProcessor);

Modified: cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/context/StandardSessionContextProvider.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/context/StandardSessionContextProvider.java?rev=586206&r1=586205&r2=586206&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/context/StandardSessionContextProvider.java
(original)
+++ cocoon/trunk/blocks/cocoon-session-fw/cocoon-session-fw-impl/src/main/java/org/apache/cocoon/webapps/session/context/StandardSessionContextProvider.java
Thu Oct 18 18:31:34 2007
@@ -22,17 +22,18 @@
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.ContextException;
 import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
+import org.apache.excalibur.source.SourceResolver;
+import org.apache.excalibur.xml.xpath.XPathProcessor;
+
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.util.AbstractLogEnabled;
 import org.apache.cocoon.webapps.session.SessionConstants;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.xml.xpath.XPathProcessor;
 
 /**
  *  Context provider for the temporarily context, the request and the
@@ -41,9 +42,9 @@
  * @deprecated This block is deprecated and will be removed in future versions.
  * @version $Id$
  */
-public final class StandardSessionContextProvider
-extends AbstractLogEnabled
-implements SessionContextProvider, ThreadSafe, Contextualizable, Serviceable, Disposable
{
+public final class StandardSessionContextProvider extends AbstractLogEnabled
+                                                  implements SessionContextProvider, ThreadSafe,
Contextualizable,
+                                                             Serviceable, Disposable {
 
     protected Context context;
     
@@ -72,7 +73,7 @@
                 context = new SimpleSessionContext(this.xpathProcessor, this.resolver);
                 context.setup(name, null, null);
             } else if ( name.equals(SessionConstants.REQUEST_CONTEXT) ) {
-                context = new RequestSessionContext(this.getLogger());
+                context = new RequestSessionContext(getLogger());
                 context.setup(name, null, null);
                 ((RequestSessionContext)context).setup( objectModel, this.manager, this.xpathProcessor
);
             }



Mime
View raw message