tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r1185727 - in /tapestry/tapestry5/trunk/tapestry-core/src: main/java/org/apache/tapestry5/internal/services/ main/java/org/apache/tapestry5/services/ test/java/org/apache/tapestry5/internal/services/
Date Tue, 18 Oct 2011 15:45:13 GMT
Author: hlship
Date: Tue Oct 18 15:45:13 2011
New Revision: 1185727

URL: http://svn.apache.org/viewvc?rev=1185727&view=rev
Log:
Rename Tapestry's internal SessionFactory to TapestrySessionFactory (to avoid name conflicts
on this common service id)

Added:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TapestrySessionFactory.java
      - copied, changed from r1185726, tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactory.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TapestrySessionFactoryImpl.java
      - copied, changed from r1185726, tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactoryImpl.java
Removed:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactory.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactoryImpl.java
Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/RequestImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/RequestImplTest.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/RequestImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/RequestImpl.java?rev=1185727&r1=1185726&r2=1185727&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/RequestImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/RequestImpl.java
Tue Oct 18 15:45:13 2011
@@ -37,7 +37,7 @@ public class RequestImpl implements Requ
 
     private final String requestEncoding;
 
-    private final SessionFactory sessionFactory;
+    private final TapestrySessionFactory sessionFactory;
 
     private boolean encodingSet;
 
@@ -46,7 +46,7 @@ public class RequestImpl implements Requ
     public RequestImpl(
             HttpServletRequest request,
             String requestEncoding,
-            SessionFactory sessionFactory)
+            TapestrySessionFactory sessionFactory)
     {
         this.request = request;
         this.requestEncoding = requestEncoding;

Copied: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TapestrySessionFactory.java
(from r1185726, tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactory.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TapestrySessionFactory.java?p2=tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TapestrySessionFactory.java&p1=tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactory.java&r1=1185726&r2=1185727&rev=1185727&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactory.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TapestrySessionFactory.java
Tue Oct 18 15:45:13 2011
@@ -17,13 +17,13 @@ package org.apache.tapestry5.internal.se
 import org.apache.tapestry5.services.Session;
 
 /**
- * Encapsulates logic for accessing the {@link Session} (a wrapper around the {@link javax.servlet.http.HttpSession}).
+ * Encapsulates logic for accessing the Tapestry {@link Session} (a wrapper around the {@link
javax.servlet.http.HttpSession}).
  *
- * @since 5.3
  * @see SessionImpl
  * @see ClusteredSessionImpl
+ * @since 5.3
  */
-public interface SessionFactory
+public interface TapestrySessionFactory
 {
     Session getSession(boolean create);
 }

Copied: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TapestrySessionFactoryImpl.java
(from r1185726, tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactoryImpl.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TapestrySessionFactoryImpl.java?p2=tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TapestrySessionFactoryImpl.java&p1=tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactoryImpl.java&r1=1185726&r2=1185727&rev=1185727&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/SessionFactoryImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TapestrySessionFactoryImpl.java
Tue Oct 18 15:45:13 2011
@@ -22,13 +22,13 @@ import org.apache.tapestry5.services.Ses
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 
-public class SessionFactoryImpl implements SessionFactory
+public class TapestrySessionFactoryImpl implements TapestrySessionFactory
 {
     private boolean clustered;
     private final SessionPersistedObjectAnalyzer analyzer;
     private final HttpServletRequest request;
 
-    public SessionFactoryImpl(
+    public TapestrySessionFactoryImpl(
             @Symbol(SymbolConstants.CLUSTERED_SESSIONS)
             boolean clustered,
             SessionPersistedObjectAnalyzer analyzer,

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java?rev=1185727&r1=1185726&r2=1185727&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
Tue Oct 18 15:45:13 2011
@@ -223,10 +223,10 @@ public final class TapestryModule
     {
         private final RequestHandler handler;
         private final String applicationCharset;
-        private final SessionFactory sessionFactory;
+        private final TapestrySessionFactory sessionFactory;
 
         public HttpServletRequestHandlerTerminator(RequestHandler handler, String applicationCharset,
-                                                   SessionFactory sessionFactory)
+                                                   TapestrySessionFactory sessionFactory)
         {
             this.handler = handler;
             this.applicationCharset = applicationCharset;
@@ -349,7 +349,7 @@ public final class TapestryModule
         binder.bind(URLEncoder.class, URLEncoderImpl.class);
         binder.bind(ContextPathEncoder.class, ContextPathEncoderImpl.class);
         binder.bind(ApplicationStatePersistenceStrategy.class, SessionApplicationStatePersistenceStrategy.class).withSimpleId();
-        binder.bind(SessionFactory.class, SessionFactoryImpl.class);
+        binder.bind(TapestrySessionFactory.class, TapestrySessionFactoryImpl.class);
         binder.bind(AssetPathConverter.class, IdentityAssetPathConverter.class);
         binder.bind(NumericTranslatorSupport.class);
         binder.bind(ClientDataEncoder.class, ClientDataEncoderImpl.class);
@@ -1376,7 +1376,7 @@ public final class TapestryModule
                                                                     @Symbol(SymbolConstants.CHARSET)
                                                                     String applicationCharset,
 
-                                                                    SessionFactory sessionFactory)
+                                                                    TapestrySessionFactory
sessionFactory)
     {
         HttpServletRequestHandler terminator = new HttpServletRequestHandlerTerminator(handler,
applicationCharset,
                 sessionFactory);

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/RequestImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/RequestImplTest.java?rev=1185727&r1=1185726&r2=1185727&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/RequestImplTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/RequestImplTest.java
Tue Oct 18 15:45:13 2011
@@ -33,7 +33,7 @@ public class RequestImplTest extends Int
     public void get_session_doesnt_exist()
     {
         HttpServletRequest sr = mockHttpServletRequest();
-        SessionFactory sf = newMock(SessionFactory.class);
+        TapestrySessionFactory sf = newMock(TapestrySessionFactory.class);
 
         expect(sf.getSession(false)).andReturn(null);
 
@@ -51,7 +51,7 @@ public class RequestImplTest extends Int
     {
         HttpServletRequest sr = mockHttpServletRequest();
         HttpSession ss = mockHttpSession();
-        SessionFactory sf = newMock(SessionFactory.class);
+        TapestrySessionFactory sf = newMock(TapestrySessionFactory.class);
 
         expect(sf.getSession(true)).andReturn(new SessionImpl(sr, ss));
 
@@ -102,8 +102,7 @@ public class RequestImplTest extends Int
         {
             new RequestImpl(sr, encoding, null).getParameterNames();
             unreachable();
-        }
-        catch (RuntimeException ex)
+        } catch (RuntimeException ex)
         {
             assertSame(ex.getCause(), exception);
         }
@@ -131,11 +130,11 @@ public class RequestImplTest extends Int
     public Object[][] xhr_inputs()
     {
         return new Object[][]
-        {
-        { null, false },
-        { "", false },
-        { "some other value", false },
-        { "XMLHttpRequest", true } };
+                {
+                        {null, false},
+                        {"", false},
+                        {"some other value", false},
+                        {"XMLHttpRequest", true}};
     }
 
     @Test
@@ -204,9 +203,9 @@ public class RequestImplTest extends Int
         HttpSession hsession1 = mockHttpSession();
         HttpSession hsession2 = mockHttpSession();
 
-        SessionFactory sf = newMock(SessionFactory.class);
+        TapestrySessionFactory sf = newMock(TapestrySessionFactory.class);
 
-        expect(sf.getSession(true)).andReturn(new SessionImpl(sr,hsession1));
+        expect(sf.getSession(true)).andReturn(new SessionImpl(sr, hsession1));
 
         replay();
 



Mime
View raw message