blob: 158e125ddb7e0c8bd320e682c2627644552ca500 [file] [log] [blame]
Guillaume Nodet18c56a12009-04-30 09:10:03 +00001<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Chris Custine45921e62010-02-28 20:18:36 +00002<!--
3
4 Licensed to the Apache Software Foundation (ASF) under one or more
5 contributor license agreements. See the NOTICE file distributed with
6 this work for additional information regarding copyright ownership.
7 The ASF licenses this file to You under the Apache License, Version 2.0
8 (the "License"); you may not use this file except in compliance with
9 the License. You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18
19-->
Guillaume Nodet18c56a12009-04-30 09:10:03 +000020<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
Guillaume Nodetc7f649d2010-02-20 20:23:14 +000021 xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
Guillaume Nodet18c56a12009-04-30 09:10:03 +000022 default-availability="optional">
23
24 <type-converters>
Guillaume Nodetc7f649d2010-02-20 20:23:14 +000025 <bean id="converter1" class="org.apache.aries.blueprint.sample.DateTypeConverter">
Guillaume Nodet18c56a12009-04-30 09:10:03 +000026 <property name="format" value="yyyy.MM.dd"/>
27 </bean>
Guillaume Nodetc7f649d2010-02-20 20:23:14 +000028 <bean id="converter2" class="org.apache.aries.blueprint.sample.CurrencyTypeConverter"/>
Guillaume Nodet18c56a12009-04-30 09:10:03 +000029
30 <cm:property-placeholder id="property-placeholder" persistent-id="blueprint-sample">
31 <cm:default-properties>
32 <cm:property name="key.b" value="-1"/>
33 </cm:default-properties>
34 </cm:property-placeholder>
35 </type-converters>
36
Guillaume Nodetc7f649d2010-02-20 20:23:14 +000037 <bean id="foo" class="org.apache.aries.blueprint.sample.Foo" init-method="init" destroy-method="destroy">
Guillaume Nodet18c56a12009-04-30 09:10:03 +000038 <property name="a" value="5" />
39 <property name="b" value="${key.b}" />
40 <property name="bar" ref="bar" />
41 <property name="currency">
42 <value>PLN</value>
43 </property>
44 <property name="date">
45 <value>2009.04.17</value>
46 </property>
47 </bean>
48
Guillaume Nodetc7f649d2010-02-20 20:23:14 +000049 <bean id="bar" class="org.apache.aries.blueprint.sample.Bar">
Guillaume Nodet18c56a12009-04-30 09:10:03 +000050 <property name="value"><value>Hello FooBar</value></property>
51 <property name="context" ref="bundleContext"/>
52 <property name="list">
53 <list>
54 <value>a list element</value>
55 <value type = "java.lang.Integer">5</value>
56 </list>
57 </property>
58 </bean>
59
60 <service ref="foo" auto-export="all-classes">
61 <service-properties>
62 <entry key="key" value="value"/>
63 </service-properties>
64 <registration-listener ref="fooRegistrationListener"
65 registration-method="serviceRegistered"
66 unregistration-method="serviceUnregistered"/>
67 </service>
68
Guillaume Nodetc7f649d2010-02-20 20:23:14 +000069 <bean id="fooRegistrationListener" class="org.apache.aries.blueprint.sample.FooRegistrationListener"/>
Guillaume Nodet18c56a12009-04-30 09:10:03 +000070
Guillaume Nodetc7f649d2010-02-20 20:23:14 +000071 <reference id="ref" interface="org.apache.aries.blueprint.sample.Foo">
Guillaume Nodet18c56a12009-04-30 09:10:03 +000072 </reference>
73
Guillaume Nodetc7f649d2010-02-20 20:23:14 +000074 <reference id="ref2" interface="org.apache.aries.blueprint.sample.InterfaceA" timeout="100">
Guillaume Nodet508a4e12009-06-18 21:11:51 +000075 <reference-listener bind-method="bind" unbind-method="unbind" ref="bindingListener" />
Guillaume Nodet18c56a12009-04-30 09:10:03 +000076 </reference>
77
Guillaume Nodetc7f649d2010-02-20 20:23:14 +000078 <bean id="bindingListener" class="org.apache.aries.blueprint.sample.BindingListener"/>
Guillaume Nodet18c56a12009-04-30 09:10:03 +000079
Guillaume Nodetc7f649d2010-02-20 20:23:14 +000080 <reference-list id="ref-list" interface="org.apache.aries.blueprint.sample.InterfaceA">
Guillaume Nodet508a4e12009-06-18 21:11:51 +000081 <reference-listener bind-method="bind" unbind-method="unbind" ref="listBindingListener" />
Guillaume Nodet67eeb702009-07-02 07:04:21 +000082 </reference-list>
Guillaume Nodet18c56a12009-04-30 09:10:03 +000083
Guillaume Nodetc7f649d2010-02-20 20:23:14 +000084 <bean id="listBindingListener" class="org.apache.aries.blueprint.sample.BindingListener"/>
Guillaume Nodet18c56a12009-04-30 09:10:03 +000085
86</blueprint>
87