1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
3 <xsd:schema xmlns="http://www.springframework.org/schema/lang"
4 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5 xmlns:beans="http://www.springframework.org/schema/beans"
6 xmlns:tool="http://www.springframework.org/schema/tool"
7 targetNamespace="http://www.springframework.org/schema/lang"
8 elementFormDefault="qualified"
9 attributeFormDefault="unqualified">
12 <xsd:documentation><![CDATA[
13 Defines the elements used in the Spring Framework's dynamic language
14 support, which allows bean definitions that are backed by classes
15 written in a language other than Java.
16 ]]></xsd:documentation>
19 <xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"/>
20 <xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-2.5.xsd"/>
22 <xsd:element name="defaults">
24 <xsd:documentation><![CDATA[
25 Default settings for any scripted beans registered within this context.
26 ]]></xsd:documentation>
29 <xsd:attributeGroup ref="defaultableAttributes"/>
33 <xsd:element name="groovy" type="customizableScriptType">
35 <xsd:documentation><![CDATA[
36 A Spring bean backed by a Groovy class definition.
37 ]]></xsd:documentation>
41 <xsd:element name="jruby" type="dynamicScriptType">
43 <xsd:documentation><![CDATA[
44 A Spring bean backed by a JRuby class definition.
45 ]]></xsd:documentation>
49 <xsd:element name="bsh" type="dynamicScriptType">
51 <xsd:documentation><![CDATA[
52 A Spring bean backed by a BeanShell script.
53 ]]></xsd:documentation>
58 <xsd:complexType name="simpleScriptType">
60 <xsd:extension base="beans:identifiedType">
62 <xsd:element name="inline-script" minOccurs="0" maxOccurs="1">
64 <xsd:documentation><![CDATA[
65 The source code for the dynamic language-backed bean.
66 ]]></xsd:documentation>
69 <xsd:element name="property" type="beans:propertyType" minOccurs="0" maxOccurs="unbounded">
71 <xsd:documentation><![CDATA[
72 Dynamic language-backed bean definitions can have zero or more properties.
73 Property elements correspond to JavaBean setter methods exposed
74 by the bean classes. Spring supports primitives, references to other
75 beans in the same or related factories, lists, maps and properties.
76 ]]></xsd:documentation>
80 <xsd:attributeGroup ref="defaultableAttributes"/>
81 <xsd:attribute name="script-source" type="xsd:string">
83 <xsd:documentation source="java:org.springframework.core.io.Resource"><![CDATA[
84 The resource containing the script for the dynamic language-backed bean.
86 Examples might be '/WEB-INF/scripts/Anais.groovy', 'classpath:Nin.bsh', etc.
87 ]]></xsd:documentation>
90 <xsd:attribute name="scope" type="xsd:string">
92 <xsd:documentation><![CDATA[
93 The scope of this scripted bean: typically "singleton" (one shared instance,
94 which will be returned by all calls to getBean with the given id), or
95 "prototype" (independent instance resulting from each call to getBean).
96 Default is "singleton".
98 Singletons are most commonly used, and are ideal for multi-threaded
99 service objects. Further scopes, such as "request" or "session", might
100 be supported by extended bean factories (e.g. in a web environment).
101 ]]></xsd:documentation>
104 <xsd:attribute name="autowire" default="default">
106 <xsd:documentation><![CDATA[
107 The autowire mode for the scripted bean.
108 Analogous to the 'autowire' attribute on a standard bean definition.
109 ]]></xsd:documentation>
112 <xsd:restriction base="xsd:NMTOKEN">
113 <xsd:enumeration value="default"/>
114 <xsd:enumeration value="no"/>
115 <xsd:enumeration value="byName"/>
116 <xsd:enumeration value="byType"/>
120 <xsd:attribute name="dependency-check" default="default">
122 <xsd:documentation><![CDATA[
123 The dependency check setting for the scripted bean.
124 Analogous to the 'dependency-check' attribute on a standard bean definition.
125 ]]></xsd:documentation>
128 <xsd:restriction base="xsd:NMTOKEN">
129 <xsd:enumeration value="default"/>
130 <xsd:enumeration value="none"/>
131 <xsd:enumeration value="simple"/>
132 <xsd:enumeration value="objects"/>
133 <xsd:enumeration value="all"/>
137 <xsd:attribute name="depends-on" type="xsd:string">
139 <xsd:documentation><![CDATA[
140 The names of the beans that this bean depends on being initialized.
141 The bean factory will guarantee that these beans get initialized
144 Note that dependencies are normally expressed through bean properties.
145 This property should just be necessary other kinds of dependencies
146 like statics (*ugh*) or database preparation on startup.
147 ]]></xsd:documentation>
150 <xsd:attribute name="init-method" type="xsd:string">
152 <xsd:documentation><![CDATA[
153 The name of an initialization method defined on the scripted bean.
154 Analogous to the 'init-method' attribute on a standard bean definition.
155 ]]></xsd:documentation>
158 <xsd:attribute name="destroy-method" type="xsd:string">
160 <xsd:documentation><![CDATA[
161 The name of a destruction method defined on the scripted bean.
162 Analogous to the 'destroy-method' attribute on a standard bean definition.
163 ]]></xsd:documentation>
167 </xsd:complexContent>
170 <xsd:complexType name="dynamicScriptType">
172 <xsd:extension base="simpleScriptType">
173 <xsd:attribute name="script-interfaces">
175 <xsd:documentation source="java:java.lang.Class"><![CDATA[
176 The Java interfaces that the dynamic language-backed object is to expose; comma-delimited.
177 ]]></xsd:documentation>
181 </xsd:complexContent>
184 <xsd:complexType name="customizableScriptType">
186 <xsd:extension base="simpleScriptType">
187 <xsd:attribute name="customizer-ref">
189 <xsd:documentation><![CDATA[
190 Reference to a GroovyObjectCustomizer or similar customizer bean.
191 ]]></xsd:documentation>
195 </xsd:complexContent>
198 <xsd:attributeGroup name="defaultableAttributes">
199 <xsd:attribute name="refresh-check-delay" type="xsd:long">
201 <xsd:documentation><![CDATA[
202 The delay (in milliseconds) between checks for updated sources when
203 using the refreshable beans feature.
204 ]]></xsd:documentation>
207 </xsd:attributeGroup>