Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 309745
Collapse All | Expand All

(-)dtdsAndSchemas/beans_1_0.xsd (+180 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
   <!--
4
      JBoss, Home of Professional Open Source Copyright 2008, Red Hat
5
      Middleware LLC, and individual contributors by the @authors tag.
6
      See the copyright.txt in the distribution for a full listing of
7
      individual contributors. Licensed under the Apache License,
8
      Version 2.0 (the "License"); you may not use this file except in
9
      compliance with the License. You may obtain a copy of the License
10
      at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
11
      applicable law or agreed to in writing, software distributed under
12
      the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
13
      OR CONDITIONS OF ANY KIND, either express or implied. See the
14
      License for the specific language governing permissions and
15
      limitations under the License.
16
   -->
17
18
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
19
   elementFormDefault="qualified" targetNamespace="http://java.sun.com/xml/ns/javaee"
20
   xmlns:javaee="http://java.sun.com/xml/ns/javaee" version="1.0">
21
22
   <xs:annotation>
23
      <xs:documentation>
24
         Contexts and Dependency Injection (CDI) defines
25
         a set of complementary services that help improve the structure
26
         of application code. beans.xml is used to enable CDI services
27
         for the current bean archive as well as to enable named
28
         interceptors, decorators and alternatives for the current bean
29
         archive.
30
      </xs:documentation>
31
   </xs:annotation>
32
33
   <xs:element name="beans">
34
      <xs:annotation>
35
         <xs:documentation>
36
            Bean classes of enabled beans must be
37
            deployed in bean archives. A library jar, EJB jar,
38
            application client jar or rar archive is a bean archive if
39
            it has a file named beans.xml in the META-INF directory. The
40
            WEB-INF/classes directory of a war is a bean archive if
41
            there is a file named beans.xml in the WEB-INF directory of
42
            the war. A directory in the JVM classpath is a bean archive
43
            if it has a file named beans.xml in the META-INF directory.
44
         </xs:documentation>
45
      </xs:annotation>
46
      <xs:complexType>
47
         <xs:all>
48
            <xs:element ref="javaee:interceptors" minOccurs="0" />
49
            <xs:element ref="javaee:decorators" minOccurs="0" />
50
            <xs:element ref="javaee:alternatives" minOccurs="0" />
51
         </xs:all>
52
      </xs:complexType>
53
   </xs:element>
54
55
   <xs:element name="interceptors">
56
      <xs:annotation>
57
         <xs:documentation>
58
            By default, a bean archive has no enabled
59
            interceptors bound via interceptor bindings. An interceptor
60
            must be explicitly enabled by listing its class under the
61
            &lt;interceptors&gt; element of the beans.xml file of the
62
            bean archive. The order of the interceptor declarations
63
            determines the interceptor ordering. Interceptors which
64
            occur earlier in the list are called first. If the same
65
            class is listed twice under the &lt;interceptors&gt;
66
            element, the container automatically detects the problem and
67
            treats it as a deployment problem.
68
        </xs:documentation>
69
      </xs:annotation>
70
      <xs:complexType>
71
         <xs:choice minOccurs="0" maxOccurs="unbounded">
72
            <xs:element name="class" type="xs:string">
73
               <xs:annotation>
74
                  <xs:documentation>
75
                     Each child &lt;class&gt; element
76
                     must specify the name of an interceptor class. If
77
                     there is no class with the specified name, or if
78
                     the class with the specified name is not an
79
                     interceptor class, the container automatically
80
                     detects the problem and treats it as a deployment
81
                     problem.
82
                  </xs:documentation>
83
               </xs:annotation>
84
            </xs:element>
85
         </xs:choice>
86
      </xs:complexType>
87
   </xs:element>
88
89
   <xs:element name="decorators">
90
      <xs:annotation>
91
         <xs:documentation>
92
            By default, a bean archive has no enabled
93
            decorators. A decorator must be explicitly enabled by
94
            listing its bean class under the &lt;decorators&gt; element
95
            of the beans.xml file of the bean archive. The order of the
96
            decorator declarations determines the decorator ordering.
97
            Decorators which occur earlier in the list are called first.
98
            If the same class is listed twice under the
99
            &lt;decorators&gt; element, the container automatically
100
            detects the problem and treats it as a deployment problem.
101
         </xs:documentation>
102
      </xs:annotation>
103
      <xs:complexType>
104
         <xs:choice minOccurs="0" maxOccurs="unbounded">
105
            <xs:element name="class" type="xs:string">
106
               <xs:annotation>
107
                  <xs:documentation>
108
                     Each child &lt;class&gt; element
109
                     must specify the name of a decorator class. If
110
                     there is no class with the specified name, or if
111
                     the class with the specified name is not a
112
                     decorator class, the container automatically
113
                     detects the problem and treats it as a deployment
114
                     problem.
115
                  </xs:documentation>
116
               </xs:annotation>
117
            </xs:element>
118
         </xs:choice>
119
      </xs:complexType>
120
   </xs:element>
121
122
   <xs:element name="alternatives">
123
      <xs:annotation>
124
         <xs:documentation>
125
            An alternative is a bean that must be
126
            explicitly declared in the beans.xml file if it should be
127
            available for lookup, injection or EL resolution. By
128
            default, a bean archive has no selected alternatives. An
129
            alternative must be explicitly declared using the
130
            &lt;alternatives&gt; element of the beans.xml file of the
131
            bean archive. The &lt;alternatives&gt; element contains a
132
            list of bean classes and stereotypes. An alternative is
133
            selected for the bean archive if either: the alternative is
134
            a managed bean or session bean and the bean class of the
135
            bean is listed, or the alternative is a producer method,
136
            field or resource, and the bean class that declares the
137
            method or field is listed, or any @Alternative stereotype of
138
            the alternative is listed.
139
        </xs:documentation>
140
      </xs:annotation>
141
      <xs:complexType>
142
         <xs:choice minOccurs="0" maxOccurs="unbounded">
143
            <xs:element name="class" type="xs:string">
144
               <xs:annotation>
145
                  <xs:documentation>
146
                     Each child &lt;class&gt; element
147
                     must specify the name of an alternative bean class.
148
                     If there is no class with the specified name, or if
149
                     the class with the specified name is not an
150
                     alternative bean class, the container automatically
151
                     detects the problem and treats it as a deployment
152
                     problem. If the same class is listed twice under
153
                     the &lt;alternatives&gt; element, the container
154
                     automatically detects the problem and treats it as
155
                     a deployment problem.
156
                  </xs:documentation>
157
               </xs:annotation>
158
            </xs:element>
159
160
            <xs:element name="stereotype" type="xs:string">
161
               <xs:annotation>
162
                  <xs:documentation>
163
                     Each child &lt;stereotype&gt;
164
                     element must specify the name of an @Alternative
165
                     stereotype annotation. If there is no annotation
166
                     with the specified name, or the annotation is not
167
                     an @Alternative stereotype, the container
168
                     automatically detects the problem and treats it as
169
                     a deployment problem. If the same stereotype is
170
                     listed twice under the &lt;alternatives&gt;
171
                     element, the container automatically detects the
172
                     problem and treats it as a deployment problem.
173
                  </xs:documentation>
174
               </xs:annotation>
175
            </xs:element>
176
         </xs:choice>
177
      </xs:complexType>
178
   </xs:element>
179
180
</xs:schema>
(-)plugin.xml (+4 lines)
Lines 230-235 Link Here
230
            <uri
230
            <uri
231
                name="http://java.sun.com/xml/ns/javaee/web-partialresponse_2_0.xsd"
231
                name="http://java.sun.com/xml/ns/javaee/web-partialresponse_2_0.xsd"
232
                uri="dtdsAndSchemas/web-partialresponse_2_0.xsd"/>
232
                uri="dtdsAndSchemas/web-partialresponse_2_0.xsd"/>
233
            <uri
234
                  name="http://java.sun.com/xml/ns/javaee/beans_1_0.xsd"
235
                  uri="dtdsAndSchemas/beans_1_0.xsd">
236
            </uri>
233
237
234
238
235
                          
239
                          

Return to bug 309745