| <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" |
| xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0" |
| default-availability="optional"> |
| |
| <type-converters> |
| <bean id="converter1" class="org.apache.aries.blueprint.sample.DateTypeConverter"> |
| <property name="format" value="yyyy.MM.dd"/> |
| </bean> |
| <bean id="converter2" class="org.apache.aries.blueprint.sample.CurrencyTypeConverter"/> |
| |
| <cm:property-placeholder id="property-placeholder" persistent-id="blueprint-sample"> |
| <cm:default-properties> |
| <cm:property name="key.b" value="-1"/> |
| </cm:default-properties> |
| </cm:property-placeholder> |
| </type-converters> |
| |
| <bean id="foo" class="org.apache.aries.blueprint.sample.Foo" init-method="init" destroy-method="destroy"> |
| <property name="a" value="5" /> |
| <property name="b" value="${key.b}" /> |
| <property name="bar" ref="bar" /> |
| <property name="currency"> |
| <value>PLN</value> |
| </property> |
| <property name="date"> |
| <value>2009.04.17</value> |
| </property> |
| </bean> |
| |
| <bean id="bar" class="org.apache.aries.blueprint.sample.Bar"> |
| <property name="value"><value>Hello FooBar</value></property> |
| <property name="context" ref="bundleContext"/> |
| <property name="list"> |
| <list> |
| <value>a list element</value> |
| <value type = "java.lang.Integer">5</value> |
| </list> |
| </property> |
| </bean> |
| |
| <service ref="foo" auto-export="all-classes"> |
| <service-properties> |
| <entry key="key" value="value"/> |
| </service-properties> |
| <registration-listener ref="fooRegistrationListener" |
| registration-method="serviceRegistered" |
| unregistration-method="serviceUnregistered"/> |
| </service> |
| |
| <bean id="fooRegistrationListener" class="org.apache.aries.blueprint.sample.FooRegistrationListener"/> |
| |
| <reference id="ref" interface="org.apache.aries.blueprint.sample.Foo"> |
| </reference> |
| |
| <reference id="ref2" interface="org.apache.aries.blueprint.sample.InterfaceA" timeout="100"> |
| <reference-listener bind-method="bind" unbind-method="unbind" ref="bindingListener" /> |
| </reference> |
| |
| <bean id="bindingListener" class="org.apache.aries.blueprint.sample.BindingListener"/> |
| |
| <reference-list id="ref-list" interface="org.apache.aries.blueprint.sample.InterfaceA"> |
| <reference-listener bind-method="bind" unbind-method="unbind" ref="listBindingListener" /> |
| </reference-list> |
| |
| <bean id="listBindingListener" class="org.apache.aries.blueprint.sample.BindingListener"/> |
| |
| </blueprint> |
| |