[seam-commits] Seam SVN: r12379 - in modules/faces/trunk/src: main/java/org/jboss/seam/faces/event/qualifier and 1 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Sun Apr 4 15:11:06 EDT 2010


Author: nickarls
Date: 2010-04-04 15:11:04 -0400 (Sun, 04 Apr 2010)
New Revision: 12379

Removed:
   modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ComponentSystemEvent.java
   modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ExceptionQueuedEvent.java
   modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PostConstructApplicationEvent.java
   modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PostConstructCustomScopeEvent.java
   modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PreDestroyApplicationEvent.java
   modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PreDestroyCustomScopeEvent.java
Modified:
   modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/SystemEventBridge.java
   modules/faces/trunk/src/test/java/org/jboss/seam/faces/event/SystemEventObserver.java
Log:
Drop extra qualifiers

Modified: modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/SystemEventBridge.java
===================================================================
--- modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/SystemEventBridge.java	2010-04-03 14:41:03 UTC (rev 12378)
+++ modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/SystemEventBridge.java	2010-04-04 19:11:04 UTC (rev 12379)
@@ -1,21 +1,12 @@
 package org.jboss.seam.faces.event;
 
-import java.lang.annotation.Annotation;
-
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.event.Observes;
-import javax.enterprise.util.AnnotationLiteral;
 import javax.faces.event.AbortProcessingException;
-import javax.faces.event.ComponentSystemEvent;
-import javax.faces.event.ExceptionQueuedEvent;
 import javax.faces.event.PostConstructApplicationEvent;
-import javax.faces.event.PostConstructCustomScopeEvent;
-import javax.faces.event.PreDestroyApplicationEvent;
-import javax.faces.event.PreDestroyCustomScopeEvent;
 import javax.faces.event.SystemEvent;
 import javax.faces.event.SystemEventListener;
 
-import org.jboss.seam.faces.SeamFacesException;
 import org.jboss.seam.faces.cdi.BeanManagerAware;
 
 /**
@@ -53,69 +44,8 @@
    public void processEvent(final SystemEvent e) throws AbortProcessingException
    {
       Object payload = e.getClass().cast(e);
-      Annotation qualifier = null;
-
-      if (e instanceof ComponentSystemEvent)
-      {
-         qualifier = COMPONENT_SYSTEM_EVENT;
-      }
-      else if (e instanceof ExceptionQueuedEvent)
-      {
-         qualifier = EXCEPTION_QUEUED_EVENT;
-      }
-      else if (e instanceof PostConstructApplicationEvent)
-      {
-         qualifier = POST_CONSTRUCT_APPLICATION_EVENT;
-      }
-      else if (e instanceof PostConstructCustomScopeEvent)
-      {
-         qualifier = POST_CONSTRUCT_CUSTOM_SCOPE_EVENT;
-      }
-      else if (e instanceof PreDestroyApplicationEvent)
-      {
-         qualifier = PRE_DESTROY_APPLICATION_EVENT;
-      }
-      else if (e instanceof PreDestroyCustomScopeEvent)
-      {
-         qualifier = PRE_DESTROY_CUSTOM_SCOPE_EVENT;
-      }
-      else
-      {
-         throw new SeamFacesException("Unknown JSF System Event detected during CDI event broadcasting");
-      }
-
-      /*
-       * This propagates the event to CDI
-       */
-      getBeanManager().fireEvent(payload, qualifier);
+      getBeanManager().fireEvent(payload);
    }
 
-   /*
-    * System Event Annotations
-    */
-   private static final AnnotationLiteral<org.jboss.seam.faces.event.qualifier.PreDestroyCustomScopeEvent> PRE_DESTROY_CUSTOM_SCOPE_EVENT = new AnnotationLiteral<org.jboss.seam.faces.event.qualifier.PreDestroyCustomScopeEvent>()
-   {
-      private static final long serialVersionUID = -7243409955575081242L;
-   };
-   private static final AnnotationLiteral<org.jboss.seam.faces.event.qualifier.PreDestroyApplicationEvent> PRE_DESTROY_APPLICATION_EVENT = new AnnotationLiteral<org.jboss.seam.faces.event.qualifier.PreDestroyApplicationEvent>()
-   {
-      private static final long serialVersionUID = -7448942843812054204L;
-   };
-   private static final AnnotationLiteral<org.jboss.seam.faces.event.qualifier.PostConstructCustomScopeEvent> POST_CONSTRUCT_CUSTOM_SCOPE_EVENT = new AnnotationLiteral<org.jboss.seam.faces.event.qualifier.PostConstructCustomScopeEvent>()
-   {
-      private static final long serialVersionUID = 6194794712139598271L;
-   };
-   private static final AnnotationLiteral<org.jboss.seam.faces.event.qualifier.PostConstructApplicationEvent> POST_CONSTRUCT_APPLICATION_EVENT = new AnnotationLiteral<org.jboss.seam.faces.event.qualifier.PostConstructApplicationEvent>()
-   {
-      private static final long serialVersionUID = -7119316486394672512L;
-   };
-   private static final AnnotationLiteral<org.jboss.seam.faces.event.qualifier.ExceptionQueuedEvent> EXCEPTION_QUEUED_EVENT = new AnnotationLiteral<org.jboss.seam.faces.event.qualifier.ExceptionQueuedEvent>()
-   {
-      private static final long serialVersionUID = -2694169811275854595L;
-   };
-   private static final AnnotationLiteral<org.jboss.seam.faces.event.qualifier.ComponentSystemEvent> COMPONENT_SYSTEM_EVENT = new AnnotationLiteral<org.jboss.seam.faces.event.qualifier.ComponentSystemEvent>()
-   {
-      private static final long serialVersionUID = -8018221003951485295L;
-   };
 
 }

Deleted: modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ComponentSystemEvent.java
===================================================================
--- modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ComponentSystemEvent.java	2010-04-03 14:41:03 UTC (rev 12378)
+++ modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ComponentSystemEvent.java	2010-04-04 19:11:04 UTC (rev 12379)
@@ -1,24 +0,0 @@
-package org.jboss.seam.faces.event.qualifier;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Qualifies observer method parameters to select JSF component system events
- * The event parameter is a
- * {@link javax.faces.event.ComponentSystemEvent.ComponentSystemEvent}.
- * 
- * @author Nicklas Karlsson
- */
- at Qualifier
- at Target( { FIELD, PARAMETER })
- at Retention(RUNTIME)
-public @interface ComponentSystemEvent
-{
-}
\ No newline at end of file

Deleted: modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ExceptionQueuedEvent.java
===================================================================
--- modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ExceptionQueuedEvent.java	2010-04-03 14:41:03 UTC (rev 12378)
+++ modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ExceptionQueuedEvent.java	2010-04-04 19:11:04 UTC (rev 12379)
@@ -1,23 +0,0 @@
-package org.jboss.seam.faces.event.qualifier;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Qualifies observer method parameters to select JSF exception queued events
- * The event parameter is a {@link javax.faces.event.ExceptionQueuedEvent}.
- * 
- * @author Nicklas Karlsson
- */
- at Qualifier
- at Target( { FIELD, PARAMETER })
- at Retention(RUNTIME)
-public @interface ExceptionQueuedEvent
-{
-}
\ No newline at end of file

Deleted: modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PostConstructApplicationEvent.java
===================================================================
--- modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PostConstructApplicationEvent.java	2010-04-03 14:41:03 UTC (rev 12378)
+++ modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PostConstructApplicationEvent.java	2010-04-04 19:11:04 UTC (rev 12379)
@@ -1,24 +0,0 @@
-package org.jboss.seam.faces.event.qualifier;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Qualifies observer method parameters to select JSF post-construct application
- * events The event parameter is a
- * {@link javax.faces.event.PostConstructApplicationEvent}.
- * 
- * @author Nicklas Karlsson
- */
- at Qualifier
- at Target( { FIELD, PARAMETER })
- at Retention(RUNTIME)
-public @interface PostConstructApplicationEvent
-{
-}
\ No newline at end of file

Deleted: modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PostConstructCustomScopeEvent.java
===================================================================
--- modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PostConstructCustomScopeEvent.java	2010-04-03 14:41:03 UTC (rev 12378)
+++ modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PostConstructCustomScopeEvent.java	2010-04-04 19:11:04 UTC (rev 12379)
@@ -1,24 +0,0 @@
-package org.jboss.seam.faces.event.qualifier;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Qualifies observer method parameters to select JSF post-construct custom
- * scope events The event parameter is a
- * {@link javax.faces.event.javax.faces.event.PostConstructCustomScopeEvent}.
- * 
- * @author Nicklas Karlsson
- */
- at Qualifier
- at Target( { FIELD, PARAMETER })
- at Retention(RUNTIME)
-public @interface PostConstructCustomScopeEvent
-{
-}
\ No newline at end of file

Deleted: modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PreDestroyApplicationEvent.java
===================================================================
--- modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PreDestroyApplicationEvent.java	2010-04-03 14:41:03 UTC (rev 12378)
+++ modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PreDestroyApplicationEvent.java	2010-04-04 19:11:04 UTC (rev 12379)
@@ -1,24 +0,0 @@
-package org.jboss.seam.faces.event.qualifier;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Qualifies observer method parameters to select JSF pre-destroy application
- * events The event parameter is a
- * {@link javax.faces.event.javax.faces.event.PreDestroyApplicationEvent}.
- * 
- * @author Nicklas Karlsson
- */
- at Qualifier
- at Target( { FIELD, PARAMETER })
- at Retention(RUNTIME)
-public @interface PreDestroyApplicationEvent
-{
-}
\ No newline at end of file

Deleted: modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PreDestroyCustomScopeEvent.java
===================================================================
--- modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PreDestroyCustomScopeEvent.java	2010-04-03 14:41:03 UTC (rev 12378)
+++ modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PreDestroyCustomScopeEvent.java	2010-04-04 19:11:04 UTC (rev 12379)
@@ -1,24 +0,0 @@
-package org.jboss.seam.faces.event.qualifier;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Qualifies observer method parameters to select JSF pre-destroy custom scope
- * events The event parameter is a
- * {@link javax.faces.event.javax.faces.event.PreDestroyCustomScopeEvent}.
- * 
- * @author Nicklas Karlsson
- */
- at Qualifier
- at Target( { FIELD, PARAMETER })
- at Retention(RUNTIME)
-public @interface PreDestroyCustomScopeEvent
-{
-}
\ No newline at end of file

Modified: modules/faces/trunk/src/test/java/org/jboss/seam/faces/event/SystemEventObserver.java
===================================================================
--- modules/faces/trunk/src/test/java/org/jboss/seam/faces/event/SystemEventObserver.java	2010-04-03 14:41:03 UTC (rev 12378)
+++ modules/faces/trunk/src/test/java/org/jboss/seam/faces/event/SystemEventObserver.java	2010-04-04 19:11:04 UTC (rev 12379)
@@ -2,14 +2,13 @@
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.event.Observes;
+import javax.faces.event.ComponentSystemEvent;
+import javax.faces.event.ExceptionQueuedEvent;
+import javax.faces.event.PostConstructApplicationEvent;
+import javax.faces.event.PostConstructCustomScopeEvent;
+import javax.faces.event.PreDestroyApplicationEvent;
+import javax.faces.event.PreDestroyCustomScopeEvent;
 
-import org.jboss.seam.faces.event.qualifier.ComponentSystemEvent;
-import org.jboss.seam.faces.event.qualifier.ExceptionQueuedEvent;
-import org.jboss.seam.faces.event.qualifier.PostConstructApplicationEvent;
-import org.jboss.seam.faces.event.qualifier.PostConstructCustomScopeEvent;
-import org.jboss.seam.faces.event.qualifier.PreDestroyApplicationEvent;
-import org.jboss.seam.faces.event.qualifier.PreDestroyCustomScopeEvent;
-
 @ApplicationScoped
 public class SystemEventObserver
 {
@@ -20,32 +19,32 @@
    public static boolean preDestroyApplicationEvent;
    public static boolean preDestroyCustomScopeEvent;
 
-   public void observeComponentSystemEvent(@Observes @ComponentSystemEvent javax.faces.event.ComponentSystemEvent e) 
+   public void observeComponentSystemEvent(@Observes ComponentSystemEvent e) 
    {
       componentSystemEvent = true;
    }
 
-   public void observeExceptionQueuedEvent(@Observes @ExceptionQueuedEvent javax.faces.event.ExceptionQueuedEvent e) 
+   public void observeExceptionQueuedEvent(@Observes ExceptionQueuedEvent e) 
    {
       excecptionQueuedEvent = true;
    }
 
-   public void observePostConstructApplicationEvent(@Observes @PostConstructApplicationEvent javax.faces.event.PostConstructApplicationEvent e) 
+   public void observePostConstructApplicationEvent(@Observes PostConstructApplicationEvent e) 
    {
       postConstructApplicationEvent = true;
    }
    
-   public void observePreDestroyApplicationEvent(@Observes @PreDestroyApplicationEvent javax.faces.event.PreDestroyApplicationEvent e) 
+   public void observePreDestroyApplicationEvent(@Observes PreDestroyApplicationEvent e) 
    {
       preDestroyApplicationEvent = true;
    }   
    
-   public void observePostConstructCustomScopeEvent(@Observes @PostConstructCustomScopeEvent javax.faces.event.PostConstructCustomScopeEvent e) 
+   public void observePostConstructCustomScopeEvent(@Observes PostConstructCustomScopeEvent e) 
    {
       postConstructCustomScopeEvent = true;
    }
    
-   public void observePreDestroyCustomScopeEvent(@Observes @PreDestroyCustomScopeEvent javax.faces.event.PreDestroyCustomScopeEvent e) 
+   public void observePreDestroyCustomScopeEvent(@Observes PreDestroyCustomScopeEvent e) 
    {
       preDestroyCustomScopeEvent = true;
    }



More information about the seam-commits mailing list