Author: shane.bryzak(a)jboss.com
Date: 2009-09-22 10:21:38 -0400 (Tue, 22 Sep 2009)
New Revision: 3723
Modified:
tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
Log:
section 10 assertions
Modified: tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2009-09-22 13:46:48 UTC (rev
3722)
+++ tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2009-09-22 14:21:38 UTC (rev
3723)
@@ -4190,7 +4190,7 @@
</section>
- <section id="10.1" title="Event types and binding types">
+ <section id="10.1" title="Event types and qualifier types">
<assertion id="aa">
<text>An event object is an instance of a concrete Java class with no type
variables.</text>
@@ -4206,23 +4206,23 @@
</assertion>
<assertion id="d">
- <text>An event binding type is a Java annotation defined as |@Target({FIELD,
PARAMETER})| ~or |@Target({METHOD, FIELD, PARAMETER, TYPE})| and
|@Retention(RUNTIME)|~</text>
+ <text>An event qualifier type is a Java annotation defined as
|@Target({FIELD, PARAMETER})| ~or |@Target({METHOD, FIELD, PARAMETER, TYPE})| and
|@Retention(RUNTIME)|~</text>
</assertion>
<assertion id="e">
- <text>An event binding type is a Java annotation defined as ~|@Target({FIELD,
PARAMETER})| or~ |@Target({METHOD, FIELD, PARAMETER, TYPE})| ~and
|@Retention(RUNTIME)|~</text>
+ <text>An event qualifier type is a Java annotation defined as
~|@Target({FIELD, PARAMETER})| or~ |@Target({METHOD, FIELD, PARAMETER, TYPE})| ~and
|@Retention(RUNTIME)|~</text>
</assertion>
<assertion id="f">
- <text>An event binding type is a Java annotation defined as ~|@Target({FIELD,
PARAMETER})| or |@Target({METHOD, FIELD, PARAMETER, TYPE})| and
~|@Retention(RUNTIME)|</text>
+ <text>An event qualifier type is a Java annotation defined as
~|@Target({FIELD, PARAMETER})| or |@Target({METHOD, FIELD, PARAMETER, TYPE})| and
~|@Retention(RUNTIME)|</text>
</assertion>
<assertion id="g">
- <text>All event binding types must specify the
|(a)javax.enterprise.inject.BindingType| meta-annotation</text>
+ <text>All event qualifier types must specify the
|(a)javax.enterprise.inject.BindingType| meta-annotation</text>
</assertion>
<assertion id="i">
- <text>Every event has the binding |(a)javax.enterprise.inject.Any|, even if it
does not explicitly declare this binding.</text>
+ <text>Every event has the qualifier |(a)javax.enterprise.inject.Any|, even if
it does not explicitly declare this qualifier.</text>
</assertion>
<assertion id="j">
@@ -4232,11 +4232,19 @@
<section id="10.2" title="Observer resolution">
<assertion id="h">
- <text>An observer method will be notified of an event if the observed event
type it specifies is one of the event types of the event, and if all the observed event
bindings it specifies are event bindings of the event.</text>
+ <text>An observer method will be notified of an event if the observed event
type it specifies is one of the event types of the event, and if all the observed event
qualifiers it specifies are event qualifiers of the event.</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>When resolving observers of an event, the container identifies the set
of observer methods which satisfy the following conditions: The event object must be
assignable to the observer event type, taking type parameters into considersion, and for
each observed event qualifier, the event qualifiers must contain a matching qualifier with
(a) the same type and (b) the same annotation member value for each member which is not
annotated |(a)javax.enterprise.inject.Nonbinding|.</text>
</assertion>
<assertion id="j">
<text>If the runtime type of the event object contains a type variable, the
container must throw an |IllegalArgumentException|.</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>For a custom implementation of the |ObserverMethod| interface defined
in Section 11.1.3, "The ObserverMethod interface", the container must call
|getObservedType()| and |getObservedQualifiers()| to determine the observed event type and
qualifiers.</text>
</assertion>
</section>
@@ -4256,26 +4264,26 @@
<section id="10.2.2" title="Event binding types with
members">
<assertion id="a">
- <text>The binding type for an |Event| binding may have annotation
members.</text>
+ <text>The qualifier type for an |Event| binding may have annotation
members.</text>
</assertion>
<assertion id="b" testable="false">
- <text>The container uses |equals()| to compare event binding type member
values.</text>
+ <text>The container uses |equals()| to compare event qualifier type member
values.</text>
<note>Since only primitive types are allowed, the call to equals() cannot be
checked</note>
</assertion>
</section>
<section id="10.2.3" title="Multiple event bindings">
<assertion id="a">
- <text>An event parameter may have multiple bindings</text>
+ <text>An event parameter may have multiple qualifiers.</text>
</assertion>
<assertion id="b">
- <text>An observer method will only be notified if all the observed event
bindings are specified when the event is fired</text>
+ <text>An observer method will only be notified if all the observed event
qualifiers are specified when the event is fired.</text>
</assertion>
<assertion id="c">
- <text>Other, less specific, observers will also be notified of events with
multiple event bindings</text>
+ <text>Other, less specific, observers will also be notified of events with
multiple event qualifiers.</text>
</assertion>
</section>
@@ -4289,25 +4297,25 @@
</assertion>
<assertion id="c">
- <text>Any combination of bindings may be specified at the injection
point.</text>
+ <text>Any combination of qualifiers may be specified at the injection
point.</text>
</assertion>
<assertion id="d">
- <text>Or, the application may specify bindings dynamically.</text>
+ <text>Or, the application may specify qualifiers dynamically.</text>
</assertion>
</section>
<section id="10.3.1" title="The Event interface">
<assertion id="ca">
- <text>The |Event| interface provides a method for firing events with a
specified combination of type and bindings.</text>
+ <text>The |Event| interface provides a method for firing events with a
specified combination of type and qualifiers.</text>
</assertion>
- <assertion id="cb">
- <text>For an injected |Event|, the specified type is the type parameter
specified at the injection point, and the specified bindings are the bindings specified at
the injection point.</text>
+ <assertion id="cb">qualifiers
+ <text>For an injected |Event|, the specified type is the type parameter
specified at the injection point, and the specified qualifiers are the bindings specified
at the injection point.</text>
</assertion>
<assertion id="eaa">
- <text>The |select()| method returns a child |Event| for a given specified
type and additional specified bindings. If no specified type is given, the specified type
is the same as the parent.</text>
+ <text>The |select()| method returns a child |Event| for a given specified
type and additional specified qualifiers. If no specified type is given, the specified
type is the same as the parent.</text>
</assertion>
<assertion id="eab">
@@ -4319,11 +4327,11 @@
</assertion>
<assertion id="ec">
- <text>If an instance of an annotation that is not a binding type is passed to
|select()|, an |IllegalArgumentException| is thrown.</text>
+ <text>If an instance of an annotation that is not a qualifier type is passed
to |select()|, an |IllegalArgumentException| is thrown.</text>
</assertion>
<assertion id="eda">
- <text>The method |fire()| fires an event with the specified bindings and
notifies observers, as defined by Section 10.5, "Observer
notification".</text>
+ <text>The method |fire()| fires an event with the specified qualifiers and
notifies observers, as defined by Section 10.5, "Observer
notification".</text>
</assertion>
<assertion id="f">
@@ -4337,7 +4345,7 @@
</assertion>
<assertion id="b">
- <text>The container must provide a built-in bean with every event binding
type in its set of binding types.</text>
+ <text>The container must provide a built-in bean with every event qualifier
type in its set of qualifier types.</text>
</assertion>
<assertion id="d">
@@ -4372,7 +4380,7 @@
</assertion>
<assertion id="e">
- <text>There may be arbitrarily many observer methods with the same event
parameter type and bindings.</text>
+ <text>There may be arbitrarily many observer methods with the same event
parameter type and qualifiers.</text>
</assertion>
<assertion id="f">
@@ -4382,11 +4390,11 @@
<section id="10.4.1" title="Event parameter of an observer
method">
<assertion id="a">
- <text>Each observer method must have exactly one event parameter, of the same
type as the event type it observes. When searching for observer methods for an event, the
container considers the type and bindings of the event parameter</text>
+ <text>Each observer method must have exactly one event parameter, of the same
type as the event type it observes. When searching for observer methods for an event, the
container considers the type and qualifiers of the event parameter</text>
</assertion>
<assertion id="b">
- <text>If the event parameter does not explicitly declare any binding, the
observer method observes events with no binding</text>
+ <text>If the event parameter does not explicitly declare any qualifier, the
observer method observes events with no qualifier.</text>
</assertion>
<assertion id="ca">
@@ -4409,7 +4417,7 @@
</assertion>
<assertion id="c">
- <text>Observed event bindings may be declared by annotating the event
parameter.</text>
+ <text>Observed event qualifiers may be declared by annotating the event
parameter.</text>
</assertion>
<assertion id="d">
@@ -4435,21 +4443,21 @@
<section id="10.4.3" title="Observer method parameters">
<assertion id="a">
- <text>In addition to the event parameter, observer methods may declare
additional parameters, which may declare bindings. These additional parameters are
injection points.</text>
+ <text>In addition to the event parameter, observer methods may declare
additional parameters, which may declare qualifiers. These additional parameters are
injection points.</text>
</assertion>
</section>
<section id="10.4.4" title="Conditional observer methods">
<assertion id="a">
- <text>A conditional observer method may be declared by specifying
|notify=IF_EXISTS|.</text>
+ <text>A conditional observer method may be declared by specifying
|receive=IF_EXISTS|.</text>
</assertion>
<assertion id="b">
- <text>Beans with scope |@Dependent| may not have conditional observer
methods. If a bean with scope |@Dependent| has an observer method declared
|notify=IF_EXISTS|, the container automatically detects the problem and treats it as a
definition error, as defined in Section 12.4, "Problems detected automatically by the
container".</text>
+ <text>Beans with scope |@Dependent| may not have conditional observer
methods. If a bean with scope |@Dependent| has an observer method declared
|receive=IF_EXISTS|, the container automatically detects the problem and treats it as a
definition error, as defined in Section 12.4, "Problems detected automatically by the
container".</text>
</assertion>
<assertion id="c">
- <text>The enumeration |javax.enterprise.event.Notify| identifies the
supported values of |notify|.</text>
+ <text>The enumeration |javax.enterprise.event.Reception| identifies the
supported values of |receive|.</text>
</assertion>
</section>
@@ -4529,7 +4537,7 @@
</assertion>
<assertion id="f">
- <text>For a custom implementation of the |ObserverMethod| interface defined
in Section 11.1.3, "The ObserverMethod interface", the container must call
|getNotify()| and |getTransactionPhase()| to determine is the observer method is a
conditional or transactional observer method, and |notify()| to invoke the
method.</text>
+ <text>For a custom implementation of the |ObserverMethod| interface defined
in Section 11.1.3, "The ObserverMethod interface", the container must call
|getReception()| and |getTransactionPhase()| to determine is the observer method is a
conditional or transactional observer method, and |notify()| to invoke the
method.</text>
</assertion>
</section>