Author: nickarls
Date: 2010-03-23 03:59:23 -0400 (Tue, 23 Mar 2010)
New Revision: 12246
Added:
modules/faces/trunk/src/main/resources/META-INF/.faces-config.xml.jsfdia
Modified:
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/PhaseEventBridge.java
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/SystemEventBridge.java
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/After.java
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/AnyPhase.java
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ApplyRequestValues.java
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/Before.java
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/InvokeApplication.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
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ProcessValidations.java
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/RenderResponse.java
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/RestoreView.java
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/UpdateModelValues.java
modules/faces/trunk/src/test/java/org/jboss/seam/faces/event/PhaseEventObserver.java
Log:
javadocs + cleanup
Modified:
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/PhaseEventBridge.java
===================================================================
---
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/PhaseEventBridge.java 2010-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/PhaseEventBridge.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -93,8 +93,10 @@
/*
* This propagates the event to CDI
*/
- getBeanManager().fireEvent(event, new Annotation[] { whenQualifier, phaseQualifier
});
- getBeanManager().fireEvent(event, new Annotation[] { whenQualifier,
PhaseEventBridge.ANY_PHASE });
+ Annotation[] qualifiers = new Annotation[] { whenQualifier, phaseQualifier };
+ log.debug("Fired event #0 with qualifiers #1", event, qualifiers);
+ getBeanManager().fireEvent(event, qualifiers);
+ getBeanManager().fireEvent(event, new Annotation[] { whenQualifier, ANY_PHASE });
}
public void afterPhase(final PhaseEvent e)
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-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/SystemEventBridge.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -39,6 +39,7 @@
* }
* </code>
*
+ * @author Nicklas Karlsson
*/
@ApplicationScoped
public class SystemEventBridge extends BeanManagerAware implements SystemEventListener
Modified:
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/After.java
===================================================================
---
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/After.java 2010-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/After.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -9,6 +9,12 @@
import javax.inject.Qualifier;
+/**
+ * Qualifies observer method parameters to select events that occur in a
"after"
+ * phase in the JSF lifecycle
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/AnyPhase.java
===================================================================
---
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/AnyPhase.java 2010-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/AnyPhase.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -10,6 +10,9 @@
import javax.inject.Qualifier;
/**
+ * Qualifies observer method parameters to select events that occur in a any
+ * phase in the JSF lifecycle
+ *
* @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter,
III</a>
*/
@Qualifier
Modified:
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ApplyRequestValues.java
===================================================================
---
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ApplyRequestValues.java 2010-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ApplyRequestValues.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -7,8 +7,17 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
+import javax.faces.event.PhaseEvent;
import javax.inject.Qualifier;
+/**
+ * Qualifies observer method parameters to select events in one of the "apply
request values"
+ * phase in the JSF lifecycle. The selection can further be refined by combining it with
the
+ * qualifiers {@link @Before} or {@link @After}. The event parameter is a {@link
PhaseEvent}.
+ *
+ * @author Nicklas Karlsson
+ * @see javax.faces.event.PhaseEvent
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/Before.java
===================================================================
---
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/Before.java 2010-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/Before.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -9,6 +9,12 @@
import javax.inject.Qualifier;
+/**
+ * Qualifies observer method parameters to select events that occur in a
"before"
+ * phase in the JSF lifecycle
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
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-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ComponentSystemEvent.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -9,6 +9,12 @@
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
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
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-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ExceptionQueuedEvent.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -9,6 +9,12 @@
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
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/InvokeApplication.java
===================================================================
---
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/InvokeApplication.java 2010-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/InvokeApplication.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -7,8 +7,16 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
+import javax.faces.event.PhaseEvent;
import javax.inject.Qualifier;
+/**
+ * Qualifies observer method parameters to select events in one of the "invoke
application"
+ * phase in the JSF lifecycle. The selection can further be refined by combining it with
the
+ * qualifiers {@link @Before} or {@link @After}. The event parameter is a {@link
PhaseEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
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-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PostConstructApplicationEvent.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -9,6 +9,12 @@
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
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
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-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PostConstructCustomScopeEvent.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -9,6 +9,12 @@
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
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
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-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PreDestroyApplicationEvent.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -9,6 +9,12 @@
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
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
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-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/PreDestroyCustomScopeEvent.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -9,6 +9,12 @@
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
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ProcessValidations.java
===================================================================
---
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ProcessValidations.java 2010-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/ProcessValidations.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -7,8 +7,16 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
+import javax.faces.event.PhaseEvent;
import javax.inject.Qualifier;
+/**
+ * Qualifies observer method parameters to select events in one of the "process
validations"
+ * phase in the JSF lifecycle. The selection can further be refined by combining it with
the
+ * qualifiers {@link @Before} or {@link @After}. The event parameter is a {@link
PhaseEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/RenderResponse.java
===================================================================
---
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/RenderResponse.java 2010-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/RenderResponse.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -7,8 +7,16 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
+import javax.faces.event.PhaseEvent;
import javax.inject.Qualifier;
+/**
+ * Qualifies observer method parameters to select events in one of the "render
response"
+ * phase in the JSF lifecycle. The selection can further be refined by combining it with
the
+ * qualifiers {@link @Before} or {@link @After}. The event parameter is a {@link
PhaseEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/RestoreView.java
===================================================================
---
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/RestoreView.java 2010-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/RestoreView.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -7,8 +7,16 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
+import javax.faces.event.PhaseEvent;
import javax.inject.Qualifier;
+/**
+ * Qualifies observer method parameters to select events in one of the "restore
view"
+ * phase in the JSF lifecycle. The selection can further be refined by combining it with
the
+ * qualifiers {@link @Before} or {@link @After}. The event parameter is a {@link
PhaseEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/UpdateModelValues.java
===================================================================
---
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/UpdateModelValues.java 2010-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/main/java/org/jboss/seam/faces/event/qualifier/UpdateModelValues.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -7,8 +7,16 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
+import javax.faces.event.PhaseEvent;
import javax.inject.Qualifier;
+/**
+ * Qualifies observer method parameters to select events in one of the "update model
values"
+ * phase in the JSF lifecycle. The selection can further be refined by combining it with
the
+ * qualifiers {@link @Before} or {@link @After}. The event parameter is a {@link
PhaseEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Added: modules/faces/trunk/src/main/resources/META-INF/.faces-config.xml.jsfdia
===================================================================
--- modules/faces/trunk/src/main/resources/META-INF/.faces-config.xml.jsfdia
(rev 0)
+++ modules/faces/trunk/src/main/resources/META-INF/.faces-config.xml.jsfdia 2010-03-23
07:59:23 UTC (rev 12246)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS model-entity="JSFProcess"/>
Modified:
modules/faces/trunk/src/test/java/org/jboss/seam/faces/event/PhaseEventObserver.java
===================================================================
---
modules/faces/trunk/src/test/java/org/jboss/seam/faces/event/PhaseEventObserver.java 2010-03-23
01:52:45 UTC (rev 12245)
+++
modules/faces/trunk/src/test/java/org/jboss/seam/faces/event/PhaseEventObserver.java 2010-03-23
07:59:23 UTC (rev 12246)
@@ -44,62 +44,62 @@
public void observeBeforeRenderResponse(@Observes @Before @RenderResponse final
PhaseEvent e)
{
- PhaseEventObserver.observeBeforeRenderResponse = true;
+ observeBeforeRenderResponse = true;
}
public void observeAfterRenderResponse(@Observes @After @RenderResponse final
PhaseEvent e)
{
- PhaseEventObserver.observeAfterRenderResponse = true;
+ observeAfterRenderResponse = true;
}
public void observeBeforeApplyRequestValues(@Observes @Before @ApplyRequestValues
final PhaseEvent e)
{
- PhaseEventObserver.observeBeforeApplyRequestValues = true;
+ observeBeforeApplyRequestValues = true;
}
public void observeAfterApplyRequestValues(@Observes @After @ApplyRequestValues final
PhaseEvent e)
{
- PhaseEventObserver.observeAfterApplyRequestValues = true;
+ observeAfterApplyRequestValues = true;
}
public void observeBeforeInvokeApplication(@Observes @Before @InvokeApplication final
PhaseEvent e)
{
- PhaseEventObserver.observeBeforeInvokeApplication = true;
+ observeBeforeInvokeApplication = true;
}
public void observeAfterInvokeApplication(@Observes @After @InvokeApplication final
PhaseEvent e)
{
- PhaseEventObserver.observeAfterInvokeApplication = true;
+ observeAfterInvokeApplication = true;
}
public void observeBeforeProcessValidations(@Observes @Before @ProcessValidations
final PhaseEvent e)
{
- PhaseEventObserver.observeBeforeProcessValidations = true;
+ observeBeforeProcessValidations = true;
}
public void observeAfterProcessValidations(@Observes @After @ProcessValidations final
PhaseEvent e)
{
- PhaseEventObserver.observeAfterProcessValidations = true;
+ observeAfterProcessValidations = true;
}
public void observeBeforeRestoreView(@Observes @Before @RestoreView final PhaseEvent
e)
{
- PhaseEventObserver.observeBeforeRestoreView = true;
+ observeBeforeRestoreView = true;
}
public void observeAfterRestoreView(@Observes @After @RestoreView final PhaseEvent e)
{
- PhaseEventObserver.observeAfterRestoreView = true;
+ observeAfterRestoreView = true;
}
public void observeBeforeUpdateModelValues(@Observes @Before @UpdateModelValues final
PhaseEvent e)
{
- PhaseEventObserver.observeBeforeUpdateModelValues = true;
+ observeBeforeUpdateModelValues = true;
}
public void observeAfterUpdateModelValues(@Observes @After @UpdateModelValues final
PhaseEvent e)
{
- PhaseEventObserver.observeAfterUpdateModelValues = true;
+ observeAfterUpdateModelValues = true;
}
}