deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject git commit: DELTASPIKE-452 JsfSystemEventBroadcaster
Date Mon, 09 Dec 2013 10:31:24 GMT
Updated Branches:
  refs/heads/master a6b53a71d -> 09d70cbd3


DELTASPIKE-452 JsfSystemEventBroadcaster


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/09d70cbd
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/09d70cbd
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/09d70cbd

Branch: refs/heads/master
Commit: 09d70cbd31195cb83d2cda58136f0c9e1af2c826
Parents: a6b53a7
Author: gpetracek <gpetracek@apache.org>
Authored: Mon Dec 9 11:29:22 2013 +0100
Committer: gpetracek <gpetracek@apache.org>
Committed: Mon Dec 9 11:29:22 2013 +0100

----------------------------------------------------------------------
 .../system/JsfSystemEventBroadcaster.java       | 58 ++++++++++++++++++++
 .../system/JsfToCdiSystemEventBroadcaster.java  | 58 --------------------
 .../main/resources/META-INF/faces-config.xml    |  6 +-
 3 files changed, 61 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/09d70cbd/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfSystemEventBroadcaster.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfSystemEventBroadcaster.java
b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfSystemEventBroadcaster.java
new file mode 100644
index 0000000..9051742
--- /dev/null
+++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfSystemEventBroadcaster.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.jsf.impl.listener.system;
+
+import javax.enterprise.inject.spi.BeanManager;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.SystemEvent;
+import javax.faces.event.SystemEventListener;
+import org.apache.deltaspike.core.api.provider.BeanManagerProvider;
+import org.apache.deltaspike.core.spi.activation.Deactivatable;
+import org.apache.deltaspike.core.util.ClassDeactivationUtils;
+
+/**
+ * Broadcasts JSF events to CDI observers.
+ */
+public class JsfSystemEventBroadcaster implements SystemEventListener, Deactivatable
+{
+    private boolean isActivated = true;
+
+    public JsfSystemEventBroadcaster()
+    {
+        this.isActivated = ClassDeactivationUtils.isActivated(getClass());
+    }
+
+    @Override
+    public boolean isListenerForSource(Object source)
+    {
+        return true;
+    }
+
+    @Override
+    public void processEvent(SystemEvent e) throws AbortProcessingException
+    {
+        if (!this.isActivated)
+        {
+            return;
+        }
+
+        BeanManager beanManager = BeanManagerProvider.getInstance().getBeanManager();
+        beanManager.fireEvent(e);
+    }
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/09d70cbd/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfToCdiSystemEventBroadcaster.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfToCdiSystemEventBroadcaster.java
b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfToCdiSystemEventBroadcaster.java
deleted file mode 100644
index d8c56d0..0000000
--- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfToCdiSystemEventBroadcaster.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.deltaspike.jsf.impl.listener.system;
-
-import javax.enterprise.inject.spi.BeanManager;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.SystemEvent;
-import javax.faces.event.SystemEventListener;
-import org.apache.deltaspike.core.api.provider.BeanManagerProvider;
-import org.apache.deltaspike.core.spi.activation.Deactivatable;
-import org.apache.deltaspike.core.util.ClassDeactivationUtils;
-
-/**
- * Broadcasts JSF events to CDI observers.
- */
-public class JsfToCdiSystemEventBroadcaster implements SystemEventListener, Deactivatable
-{
-    private boolean isActivated = true;
-
-    public JsfToCdiSystemEventBroadcaster()
-    {
-        this.isActivated = ClassDeactivationUtils.isActivated(getClass());
-    }
-
-    @Override
-    public boolean isListenerForSource(Object source)
-    {
-        return true;
-    }
-
-    @Override
-    public void processEvent(SystemEvent e) throws AbortProcessingException
-    {
-        if (!this.isActivated)
-        {
-            return;
-        }
-
-        BeanManager beanManager = BeanManagerProvider.getInstance().getBeanManager();
-        beanManager.fireEvent(e);
-    }
-}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/09d70cbd/deltaspike/modules/jsf/impl/src/main/resources/META-INF/faces-config.xml
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/main/resources/META-INF/faces-config.xml b/deltaspike/modules/jsf/impl/src/main/resources/META-INF/faces-config.xml
index 3c8d349..e13617d 100644
--- a/deltaspike/modules/jsf/impl/src/main/resources/META-INF/faces-config.xml
+++ b/deltaspike/modules/jsf/impl/src/main/resources/META-INF/faces-config.xml
@@ -34,15 +34,15 @@
         <action-listener>org.apache.deltaspike.jsf.impl.listener.action.DeltaSpikeActionListener</action-listener>
 
         <system-event-listener>
-            <system-event-listener-class>org.apache.deltaspike.jsf.impl.listener.system.JsfToCdiSystemEventBroadcaster</system-event-listener-class>
+            <system-event-listener-class>org.apache.deltaspike.jsf.impl.listener.system.JsfSystemEventBroadcaster</system-event-listener-class>
             <system-event-class>javax.faces.event.ExceptionQueuedEvent</system-event-class>
         </system-event-listener>
         <system-event-listener>
-            <system-event-listener-class>org.apache.deltaspike.jsf.impl.listener.system.JsfToCdiSystemEventBroadcaster</system-event-listener-class>
+            <system-event-listener-class>org.apache.deltaspike.jsf.impl.listener.system.JsfSystemEventBroadcaster</system-event-listener-class>
             <system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
         </system-event-listener>
         <system-event-listener>
-            <system-event-listener-class>org.apache.deltaspike.jsf.impl.listener.system.JsfToCdiSystemEventBroadcaster</system-event-listener-class>
+            <system-event-listener-class>org.apache.deltaspike.jsf.impl.listener.system.JsfSystemEventBroadcaster</system-event-listener-class>
             <system-event-class>javax.faces.event.PreDestroyApplicationEvent</system-event-class>
         </system-event-listener>
     </application>


Mime
View raw message