myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r811086 - in /myfaces/test/trunk: test12/src/main/java/org/apache/shale/test/mock/ test20/src/main/java/org/apache/shale/test/mock/
Date Thu, 03 Sep 2009 19:31:07 GMT
Author: lu4242
Date: Thu Sep  3 19:31:07 2009
New Revision: 811086

URL: http://svn.apache.org/viewvc?rev=811086&view=rev
Log:
small fixes (add _processingEvents and redirect getMimeType)

Modified:
    myfaces/test/trunk/test12/src/main/java/org/apache/shale/test/mock/MockExternalContext.java
    myfaces/test/trunk/test20/src/main/java/org/apache/shale/test/mock/MockExternalContext20.java
    myfaces/test/trunk/test20/src/main/java/org/apache/shale/test/mock/MockFacesContext20.java

Modified: myfaces/test/trunk/test12/src/main/java/org/apache/shale/test/mock/MockExternalContext.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/shale/test/mock/MockExternalContext.java?rev=811086&r1=811085&r2=811086&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/shale/test/mock/MockExternalContext.java
(original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/shale/test/mock/MockExternalContext.java
Thu Sep  3 19:31:07 2009
@@ -76,7 +76,7 @@
 
 
     private Map applicationMap = null;
-    private ServletContext context = null;
+    protected ServletContext context = null;
     protected HttpServletRequest request = null;
     private Map requestMap = null;
     protected HttpServletResponse response = null;
@@ -366,7 +366,7 @@
     /** {@inheritDoc} */
     public Set getResourcePaths(String path) {
 
-        throw new UnsupportedOperationException();
+        return context.getResourcePaths(path);
 
     }
 

Modified: myfaces/test/trunk/test20/src/main/java/org/apache/shale/test/mock/MockExternalContext20.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/shale/test/mock/MockExternalContext20.java?rev=811086&r1=811085&r2=811086&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/shale/test/mock/MockExternalContext20.java
(original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/shale/test/mock/MockExternalContext20.java
Thu Sep  3 19:31:07 2009
@@ -32,6 +32,12 @@
         super(context, request, response);
     }
 
+    @Override
+    public String getMimeType(String file)
+    {
+        return context.getMimeType(file);
+    }
+
     // ------------------------------------------------------ Instance Variables
 
     // ----------------------------------------------------- Mock Object Methods

Modified: myfaces/test/trunk/test20/src/main/java/org/apache/shale/test/mock/MockFacesContext20.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/shale/test/mock/MockFacesContext20.java?rev=811086&r1=811085&r2=811086&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/shale/test/mock/MockFacesContext20.java
(original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/shale/test/mock/MockFacesContext20.java
Thu Sep  3 19:31:07 2009
@@ -31,6 +31,8 @@
 
     // ------------------------------------------------------------ Constructors
 
+    private boolean _processingEvents = true;
+    
     public MockFacesContext20() {
         super();
         setCurrentInstance(this);
@@ -104,6 +106,17 @@
         return _partialViewContext;
     }
     
+    public boolean isProcessingEvents()
+    {
+        return _processingEvents;
+    }
+    
+    @Override
+    public void setProcessingEvents(boolean processingEvents)
+    {
+        _processingEvents = processingEvents;
+    }
+    
     // ------------------------------------------------- ExternalContext Methods
 
 }



Mime
View raw message