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-3.0.xsd"/>
20 <xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-3.0.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="name" type="xsd:string">
92 <xsd:documentation><![CDATA[
93 The name of this scripted bean as an alias or replacement for the id.
94 ]]></xsd:documentation>
97 <xsd:attribute name="scope" type="xsd:string">
99 <xsd:documentation><![CDATA[
100 The scope of this scripted bean: typically "singleton" (one shared instance,
101 which will be returned by all calls to getBean with the given id), or
102 "prototype" (independent instance resulting from each call to getBean).
103 Default is "singleton".
105 Singletons are most commonly used, and are ideal for multi-threaded
106 service objects. Further scopes, such as "request" or "session", might
107 be supported by extended bean factories (e.g. in a web environment).
108 ]]></xsd:documentation>
111 <xsd:attribute name="autowire" default="default">
113 <xsd:documentation><![CDATA[
114 The autowire mode for the scripted bean.
115 Analogous to the 'autowire' attribute on a standard bean definition.
116 ]]></xsd:documentation>
119 <xsd:restriction base="xsd:NMTOKEN">
120 <xsd:enumeration value="default"/>
121 <xsd:enumeration value="no"/>
122 <xsd:enumeration value="byName"/>
123 <xsd:enumeration value="byType"/>
127 <xsd:attribute name="depends-on" type="xsd:string">
129 <xsd:documentation><![CDATA[
130 The names of the beans that this bean depends on being initialized.
131 The bean factory will guarantee that these beans get initialized
134 Note that dependencies are normally expressed through bean properties.
135 This property should just be necessary other kinds of dependencies
136 like statics (*ugh*) or database preparation on startup.
137 ]]></xsd:documentation>
140 <xsd:attribute name="init-method" type="xsd:string">
142 <xsd:documentation><![CDATA[
143 The name of an initialization method defined on the scripted bean.
144 Analogous to the 'init-method' attribute on a standard bean definition.
145 ]]></xsd:documentation>
148 <xsd:attribute name="destroy-method" type="xsd:string">
150 <xsd:documentation><![CDATA[
151 The name of a destruction method defined on the scripted bean.
152 Analogous to the 'destroy-method' attribute on a standard bean definition.
153 ]]></xsd:documentation>
157 </xsd:complexContent>
160 <xsd:complexType name="dynamicScriptType">
162 <xsd:extension base="simpleScriptType">
163 <xsd:attribute name="script-interfaces">
165 <xsd:documentation source="java:java.lang.Class"><![CDATA[
166 The Java interfaces that the dynamic language-backed object is to expose; comma-delimited.
167 ]]></xsd:documentation>
171 </xsd:complexContent>
174 <xsd:complexType name="customizableScriptType">
176 <xsd:extension base="simpleScriptType">
177 <xsd:attribute name="customizer-ref">
179 <xsd:documentation><![CDATA[
180 Reference to a GroovyObjectCustomizer or similar customizer bean.
181 ]]></xsd:documentation>
185 </xsd:complexContent>
188 <xsd:attributeGroup name="defaultableAttributes">
189 <xsd:attribute name="refresh-check-delay" type="xsd:long">
191 <xsd:documentation><![CDATA[
192 The delay (in milliseconds) between checks for updated sources when
193 using the refreshable beans feature.
194 ]]></xsd:documentation>
197 </xsd:attributeGroup>