myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r1051855 - in /myfaces/extensions/cdi/trunk: core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/config/ core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/config/ examples/jsf-examples/client...
Date Wed, 22 Dec 2010 11:40:49 GMT
Author: gpetracek
Date: Wed Dec 22 11:40:49 2010
New Revision: 1051855

URL: http://svn.apache.org/viewvc?rev=1051855&view=rev
Log:
EXTCDI-99 first draft

Added:
    myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf12/src/main/java/org/apache/myfaces/examples/codi/jsf12/config/Jsf12ModuleConfigForClientSideWindowHandler.java
      - copied, changed from r1051550, myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf12/src/main/java/org/apache/myfaces/examples/codi/jsf12/config/CodiConfigForClientSideWindowHandler.java
    myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/Jsf20ModuleConfigForClientSideWindowHandler.java
      - copied, changed from r1051550, myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/CodiConfig.java
Removed:
    myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf12/src/main/java/org/apache/myfaces/examples/codi/jsf12/config/CodiConfigForClientSideWindowHandler.java
    myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/CodiConfig.java
    myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/config/DefaultWindowContextConfig.java
    myfaces/extensions/cdi/trunk/jee-modules/jsf20-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf2/impl/config/
Modified:
    myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/config/CodiConfig.java
    myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/config/ConversationConfig.java
    myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/config/WindowContextConfig.java
    myfaces/extensions/cdi/trunk/jee-modules/jsf-module/api/src/main/java/org/apache/myfaces/extensions/cdi/jsf/api/config/JsfModuleConfig.java

Modified: myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/config/CodiConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/config/CodiConfig.java?rev=1051855&r1=1051854&r2=1051855&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/config/CodiConfig.java
(original)
+++ myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/config/CodiConfig.java
Wed Dec 22 11:40:49 2010
@@ -18,11 +18,13 @@
  */
 package org.apache.myfaces.extensions.cdi.core.api.config;
 
+import java.io.Serializable;
+
 /**
  * Marker interface for all type-safe framework configs.
  * 
  * @author Gerhard Petracek
  */
-public interface CodiConfig
+public interface CodiConfig extends Serializable
 {
 }

Modified: myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/config/ConversationConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/config/ConversationConfig.java?rev=1051855&r1=1051854&r2=1051855&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/config/ConversationConfig.java
(original)
+++ myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/config/ConversationConfig.java
Wed Dec 22 11:40:49 2010
@@ -18,36 +18,61 @@
  */
 package org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config;
 
+import org.apache.myfaces.extensions.cdi.core.api.config.AbstractAttributeAware;
 import org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig;
 
-import java.io.Serializable;
+import javax.enterprise.context.ApplicationScoped;
 
 /**
  * @author Gerhard Petracek
  */
-public interface ConversationConfig extends CodiConfig, Serializable
+@ApplicationScoped
+public class ConversationConfig extends AbstractAttributeAware implements CodiConfig
 {
+    private static final long serialVersionUID = -1637900766842152725L;
+
     /**
      * Timeout for {@link org.apache.myfaces.extensions.cdi.core.api.scope.conversation.ConversationScoped}
beans,
      * which will be used if the conversation doesn't get closed manually.
      * 
      * @return timeout in minutes
      */
-    int getConversationTimeoutInMinutes();
+    public int getConversationTimeoutInMinutes()
+    {
+        return 30;
+    }
 
     /*
      * event config
      */
 
-    boolean isScopeBeanEventEnabled();
-
-    boolean isAccessBeanEventEnabled();
-
-    boolean isUnscopeBeanEventEnabled();
-
-    boolean isStartConversationEventEnabled();
-
-    boolean isCloseConversationEventEnabled();
-    
-    boolean isRestartConversationEventEnabled();
+    public boolean isScopeBeanEventEnabled()
+    {
+        return false;
+    }
+
+    public boolean isAccessBeanEventEnabled()
+    {
+        return false;
+    }
+
+    public boolean isUnscopeBeanEventEnabled()
+    {
+        return false;
+    }
+
+    public boolean isStartConversationEventEnabled()
+    {
+        return false;
+    }
+
+    public boolean isCloseConversationEventEnabled()
+    {
+        return false;
+    }
+
+    public boolean isRestartConversationEventEnabled()
+    {
+        return false;
+    }
 }
\ No newline at end of file

Modified: myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/config/WindowContextConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/config/WindowContextConfig.java?rev=1051855&r1=1051854&r2=1051855&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/config/WindowContextConfig.java
(original)
+++ myfaces/extensions/cdi/trunk/core/api/src/main/java/org/apache/myfaces/extensions/cdi/core/api/scope/conversation/config/WindowContextConfig.java
Wed Dec 22 11:40:49 2010
@@ -18,15 +18,19 @@
  */
 package org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config;
 
+import org.apache.myfaces.extensions.cdi.core.api.config.AbstractAttributeAware;
 import org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig;
 
-import java.io.Serializable;
+import javax.enterprise.context.ApplicationScoped;
 
 /**
  * @author Gerhard Petracek
  */
-public interface WindowContextConfig extends CodiConfig, Serializable
+@ApplicationScoped
+public class WindowContextConfig extends AbstractAttributeAware implements CodiConfig
 {
+    private static final long serialVersionUID = 8159770064249255686L;
+
     /**
      * Specifies if it is allowed to use URL params for forwarding the current window-id.
      * (deactivate it e.g. for higher security - in this case it's required to use a window
id provided by a
@@ -34,7 +38,10 @@ public interface WindowContextConfig ext
      * 
      * @return true if it is allowed to add the window-id as URL parameter
      */
-    boolean isUrlParameterSupported();
+    public boolean isUrlParameterSupported()
+    {
+        return true;
+    }
 
     /**
      * Allows to restrict window-ids.
@@ -45,14 +52,20 @@ public interface WindowContextConfig ext
      *
      * @return true to allow window-ids which aren't generated by CODI, false otherwise
      */
-    boolean isUnknownWindowIdsAllowed();
+    public boolean isUnknownWindowIdsAllowed()
+    {
+        return false;
+    }
 
     /**
      * if set to <code>true</code> CODI will add a windowId=xxx parameter
      * while encoding each action URL.
      */
     @Deprecated
-    boolean isAddWindowIdToActionUrlsEnabled();
+    public boolean isAddWindowIdToActionUrlsEnabled()
+    {
+        return false;
+    }
 
     /**
      * Specifies the time for the timeout for a window. After a timeout is detected all beans
which are only linked
@@ -60,14 +73,20 @@ public interface WindowContextConfig ext
      *
      * @return the time for the timeout for a window
      */
-    int getWindowContextTimeoutInMinutes();
+    public int getWindowContextTimeoutInMinutes()
+    {
+        return 60;
+    }
 
     /**
      * Restricts the number of active windows.
      *
      * @return limit for active windows
      */
-    int getMaxWindowContextCount();
+    public int getMaxWindowContextCount()
+    {
+        return 64;
+    }
 
     /**
      * Allows to activate the cleanup of empty window contexts to avoid cleanup e.g.
@@ -75,15 +94,24 @@ public interface WindowContextConfig ext
      *
      * @return true for activating it, false otherwise
      */
-    boolean isCloseEmptyWindowContextsEnabled();
-    
+    public boolean isCloseEmptyWindowContextsEnabled()
+    {
+        return false;
+    }
+
     /*
      * event config
      */
 
-    boolean isCreateWindowContextEventEnabled();
-
-    boolean isCloseWindowContextEventEnabled();
+    public boolean isCreateWindowContextEventEnabled()
+    {
+        return false;
+    }
+
+    public boolean isCloseWindowContextEventEnabled()
+    {
+        return false;
+    }
 
     //boolean isResetWindowContextEventEnable();
 }

Copied: myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf12/src/main/java/org/apache/myfaces/examples/codi/jsf12/config/Jsf12ModuleConfigForClientSideWindowHandler.java
(from r1051550, myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf12/src/main/java/org/apache/myfaces/examples/codi/jsf12/config/CodiConfigForClientSideWindowHandler.java)
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf12/src/main/java/org/apache/myfaces/examples/codi/jsf12/config/Jsf12ModuleConfigForClientSideWindowHandler.java?p2=myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf12/src/main/java/org/apache/myfaces/examples/codi/jsf12/config/Jsf12ModuleConfigForClientSideWindowHandler.java&p1=myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf12/src/main/java/org/apache/myfaces/examples/codi/jsf12/config/CodiConfigForClientSideWindowHandler.java&r1=1051550&r2=1051855&rev=1051855&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf12/src/main/java/org/apache/myfaces/examples/codi/jsf12/config/CodiConfigForClientSideWindowHandler.java
(original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf12/src/main/java/org/apache/myfaces/examples/codi/jsf12/config/Jsf12ModuleConfigForClientSideWindowHandler.java
Wed Dec 22 11:40:49 2010
@@ -18,7 +18,7 @@
  */
 package org.apache.myfaces.examples.codi.jsf12.config;
 
-import org.apache.myfaces.extensions.cdi.jsf.impl.config.DefaultWindowContextConfig;
+import org.apache.myfaces.extensions.cdi.jsf.api.config.JsfModuleConfig;
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.inject.Specializes;
@@ -32,7 +32,7 @@ import javax.enterprise.inject.Specializ
  */
 @ApplicationScoped
 @Specializes
-public class CodiConfigForClientSideWindowHandler extends DefaultWindowContextConfig
+public class Jsf12ModuleConfigForClientSideWindowHandler extends JsfModuleConfig
 {
     private static final long serialVersionUID = -4094949435815088068L;
 
@@ -41,10 +41,4 @@ public class CodiConfigForClientSideWind
     {
         return false;
     }
-
-    @Override
-    public boolean isAddWindowIdToActionUrlsEnabled()
-    {
-        return false;
-    }
 }

Copied: myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/Jsf20ModuleConfigForClientSideWindowHandler.java
(from r1051550, myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/CodiConfig.java)
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/Jsf20ModuleConfigForClientSideWindowHandler.java?p2=myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/Jsf20ModuleConfigForClientSideWindowHandler.java&p1=myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/CodiConfig.java&r1=1051550&r2=1051855&rev=1051855&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/CodiConfig.java
(original)
+++ myfaces/extensions/cdi/trunk/examples/jsf-examples/clientside_windowhandler_jsf20/src/main/java/org/apache/myfaces/examples/jsf20/config/Jsf20ModuleConfigForClientSideWindowHandler.java
Wed Dec 22 11:40:49 2010
@@ -18,7 +18,7 @@
  */
 package org.apache.myfaces.examples.jsf20.config;
 
-import org.apache.myfaces.extensions.cdi.jsf2.impl.config.DefaultWindowContextConfig;
+import org.apache.myfaces.extensions.cdi.jsf.api.config.JsfModuleConfig;
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.inject.Specializes;
@@ -28,7 +28,7 @@ import javax.enterprise.inject.Specializ
  */
 @ApplicationScoped
 @Specializes
-public class CodiConfig extends DefaultWindowContextConfig
+public class Jsf20ModuleConfigForClientSideWindowHandler extends JsfModuleConfig
 {
     private static final long serialVersionUID = -4094949435815088068L;
 
@@ -37,10 +37,4 @@ public class CodiConfig extends DefaultW
     {
         return false;
     }
-
-    @Override
-    public boolean isAddWindowIdToActionUrlsEnabled()
-    {
-        return false;
-    }
 }

Modified: myfaces/extensions/cdi/trunk/jee-modules/jsf-module/api/src/main/java/org/apache/myfaces/extensions/cdi/jsf/api/config/JsfModuleConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/jsf-module/api/src/main/java/org/apache/myfaces/extensions/cdi/jsf/api/config/JsfModuleConfig.java?rev=1051855&r1=1051854&r2=1051855&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/jsf-module/api/src/main/java/org/apache/myfaces/extensions/cdi/jsf/api/config/JsfModuleConfig.java
(original)
+++ myfaces/extensions/cdi/trunk/jee-modules/jsf-module/api/src/main/java/org/apache/myfaces/extensions/cdi/jsf/api/config/JsfModuleConfig.java
Wed Dec 22 11:40:49 2010
@@ -18,26 +18,38 @@
  */
 package org.apache.myfaces.extensions.cdi.jsf.api.config;
 
+import org.apache.myfaces.extensions.cdi.core.api.config.AbstractAttributeAware;
 import org.apache.myfaces.extensions.cdi.core.api.config.CodiConfig;
 
+import javax.enterprise.context.ApplicationScoped;
+
 /**
  * Config for all JSF specific configurations.
  *
  * @author Gerhard Petracek
  */
-public interface JsfModuleConfig extends CodiConfig
+@ApplicationScoped
+public class JsfModuleConfig extends AbstractAttributeAware implements CodiConfig
 {
+    private static final long serialVersionUID = 595393008764879504L;
+
     /**
      * If the initial redirect is enabled, a redirect will be performed for adding the current
window-id to the url.
      *
      * @return true for activating it, false otherwise
      */
-    boolean isInitialRedirectEnabled();
+    public boolean isInitialRedirectEnabled()
+    {
+        return true;
+    }
 
     /**
      * esp useful for JSF 2.0
      * @return true for creating additional navigation-cases based on view configs for
      * ConfigurableNavigationHandler#getNavigationCases
      */
-    boolean isUseViewConfigsAsNavigationCasesEnabled();
+    public boolean isUseViewConfigsAsNavigationCasesEnabled()
+    {
+        return true;
+    }
 }



Mime
View raw message