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.0.xsd"/>
20 <xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-2.0.xsd"/>
22 <xsd:element name="groovy" type="customizableScriptType">
24 <xsd:documentation><![CDATA[
25 A Spring bean backed by a Groovy class definition.
26 ]]></xsd:documentation>
30 <xsd:element name="jruby" type="dynamicScriptType">
32 <xsd:documentation><![CDATA[
33 A Spring bean backed by a JRuby class definition.
34 ]]></xsd:documentation>
38 <xsd:element name="bsh" type="dynamicScriptType">
40 <xsd:documentation><![CDATA[
41 A Spring bean backed by a BeanShell script.
42 ]]></xsd:documentation>
47 <xsd:complexType name="simpleScriptType">
49 <xsd:extension base="beans:identifiedType">
51 <xsd:element name="inline-script" minOccurs="0" maxOccurs="1">
53 <xsd:documentation><![CDATA[
54 The source code for the dynamic language-backed bean.
55 ]]></xsd:documentation>
58 <xsd:element name="property" type="beans:propertyType" minOccurs="0" maxOccurs="unbounded">
60 <xsd:documentation><![CDATA[
61 Dynamic language-backed bean definitions can have zero or more properties.
62 Property elements correspond to JavaBean setter methods exposed
63 by the bean classes. Spring supports primitives, references to other
64 beans in the same or related factories, lists, maps and properties.
65 ]]></xsd:documentation>
69 <xsd:attribute name="refresh-check-delay" type="xsd:long">
71 <xsd:documentation><![CDATA[
72 The delay (in milliseconds) between checks for updated sources when
73 using the refreshable beans feature.
74 ]]></xsd:documentation>
77 <xsd:attribute name="script-source" type="xsd:string">
79 <xsd:documentation source="java:org.springframework.core.io.Resource"><![CDATA[
80 The resource containing the script for the dynamic language-backed bean.
82 Examples might be '/WEB-INF/scripts/Anais.groovy', 'classpath:Nin.bsh', etc.
83 ]]></xsd:documentation>
86 <xsd:attribute name="scope" type="xsd:string">
88 <xsd:documentation><![CDATA[
89 The scope of this scripted bean: typically "singleton" (one shared instance,
90 which will be returned by all calls to getBean with the given id), or
91 "prototype" (independent instance resulting from each call to getBean).
92 Default is "singleton".
94 Singletons are most commonly used, and are ideal for multi-threaded
95 service objects. Further scopes, such as "request" or "session", might
96 be supported by extended bean factories (e.g. in a web environment).
97 ]]></xsd:documentation>
100 <xsd:attribute name="init-method" type="xsd:string">
102 <xsd:documentation><![CDATA[
103 The name of an initialization method defined on the scripted bean.
104 Analogous to the 'init-method' attribute on a standard bean definition.
105 ]]></xsd:documentation>
108 <xsd:attribute name="destroy-method" type="xsd:string">
110 <xsd:documentation><![CDATA[
111 The name of a destruction method defined on the scripted bean.
112 Analogous to the 'destroy-method' attribute on a standard bean definition.
113 ]]></xsd:documentation>
117 </xsd:complexContent>
120 <xsd:complexType name="dynamicScriptType">
122 <xsd:extension base="simpleScriptType">
123 <xsd:attribute name="script-interfaces">
125 <xsd:documentation source="java:java.lang.Class"><![CDATA[
126 The Java interfaces that the dynamic language-backed object is to expose; comma-delimited.
127 ]]></xsd:documentation>
131 </xsd:complexContent>
134 <xsd:complexType name="customizableScriptType">
136 <xsd:extension base="simpleScriptType">
137 <xsd:attribute name="customizer-ref">
139 <xsd:documentation><![CDATA[
140 Reference to a GroovyObjectCustomizer or similar customizer bean.
141 ]]></xsd:documentation>
145 </xsd:complexContent>