blob: a4cff41a7bb2a069a1da70e6c1b956f5e6ef1c2b [file] [log] [blame]
<!--
~ 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.
-->
<ipojo
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/SNAPSHOT/core.xsd
org.apache.felix.composite http://felix.apache.org/ipojo/schemas/SNAPSHOT/composite.xsd"
xmlns="org.apache.felix.ipojo"
xmlns:comp="org.apache.felix.ipojo.composite">
<comp:composite name="composite.test.3" architecture="true">
<subservice action="instantiate"
specification="org.apache.felix.ipojo.runtime.core.services.BazService"
aggregate="true" filter="(factory.name=BazProviderType)" />
<comp:provides action="export"
specification="org.apache.felix.ipojo.runtime.core.services.BazService" />
</comp:composite>
<comp:composite name="composite.test.2" architecture="true">
<subservice action="instantiate"
specification="org.apache.felix.ipojo.runtime.core.services.CheckService"
filter="(factory.name=Baz2CheckProvider)" />
<comp:provides action="export"
specification="org.apache.felix.ipojo.runtime.core.services.CheckService" />
<subservice action="import"
specification="org.apache.felix.ipojo.runtime.core.services.BazService"
scope="composite" />
</comp:composite>
<comp:composite name="composite.test.1" architecture="true">
<subservice action="instantiate"
specification="org.apache.felix.ipojo.runtime.core.services.BazService"
filter="(factory.name=composite.test.3)" />
<subservice action="instantiate"
specification="org.apache.felix.ipojo.runtime.core.services.CheckService"
filter="(factory.name=composite.test.2)" />
<comp:provides action="export"
specification="org.apache.felix.ipojo.runtime.core.services.CheckService" />
</comp:composite>
<comp:composite name="composite.instantiator" architecture="true">
<subservice action="instantiate"
specification="org.apache.felix.ipojo.runtime.core.services.BazService"
filter="(factory.name=composite.test.3)" />
<subservice action="instantiate"
specification="org.apache.felix.ipojo.runtime.core.services.FooService" />
<comp:provides action="export"
specification="org.apache.felix.ipojo.runtime.core.services.BazService" />
<comp:provides action="export"
specification="org.apache.felix.ipojo.runtime.core.services.FooService" />
</comp:composite>
<!-- Test composition provides -->
<comp:composite name="comp-0" architecture="true">
<subservice action="instantiate"
specification="org.apache.felix.ipojo.runtime.core.services.Tata" />
<subservice action="import"
specification="org.apache.felix.ipojo.runtime.core.services.Toto" />
<comp:provides action="implement"
specification="org.apache.felix.ipojo.runtime.core.services.Tota" />
</comp:composite>
<comp:composite name="comp-1" architecture="true">
<subservice action="instantiate"
specification="org.apache.felix.ipojo.runtime.core.services.Tata" />
<subservice action="import"
specification="org.apache.felix.ipojo.runtime.core.services.Toto" />
<comp:provides action="implement"
specification="org.apache.felix.ipojo.runtime.core.services.Tota">
<delegation method="tataInt" policy="One" />
<delegation method="toto1" policy="All" />
</comp:provides>
</comp:composite>
<comp:composite name="comp-2" architecture="true">
<subservice action="instantiate"
specification="org.apache.felix.ipojo.runtime.core.services.Tata"
aggregate="true" />
<subservice action="import"
specification="org.apache.felix.ipojo.runtime.core.services.Toto"
aggregate="true" />
<comp:provides action="implement"
specification="org.apache.felix.ipojo.runtime.core.services.Tota">
<delegation method="tataInt" policy="One" />
<delegation method="toto1" policy="All" />
</comp:provides>
</comp:composite>
<comp:composite name="comp-3" architecture="true">
<subservice action="instantiate"
specification="org.apache.felix.ipojo.runtime.core.services.Tata" />
<subservice action="import"
specification="org.apache.felix.ipojo.runtime.core.services.Toto"
optional="true" />
<comp:provides action="implement"
specification="org.apache.felix.ipojo.runtime.core.services.Tota">
</comp:provides>
</comp:composite>
<comp:composite name="comp-4" architecture="true">
<subservice action="instantiate"
specification="org.apache.felix.ipojo.runtime.core.services.Tata" />
<subservice action="import"
specification="org.apache.felix.ipojo.runtime.core.services.Toto"
optional="true" />
<comp:provides action="implement"
specification="org.apache.felix.ipojo.runtime.core.services.Tota">
<delegation method="tataInt" policy="One" />
<delegation method="toto1" policy="All" />
</comp:provides>
</comp:composite>
<comp:composite name="comp-5" architecture="true">
<subservice action="instantiate"
specification="org.apache.felix.ipojo.runtime.core.services.Tata"
aggregate="true" />
<!-- <subservice action="import" specification="org.apache.felix.ipojo.test.comp:composite.service.Toto" aggregate ="true" optional="true"/> -->
<comp:provides action="implement"
specification="org.apache.felix.ipojo.runtime.core.services.Tota">
<delegation method="tataInt" policy="One" />
<delegation method="toto1" policy="All" />
</comp:provides>
</comp:composite>
<comp:composite name="comp-6" architecture="true">
<subservice action="instantiate"
specification="org.apache.felix.ipojo.runtime.core.services.Tata"
aggregate="true" />
<subservice action="import"
specification="org.apache.felix.ipojo.runtime.core.services.Toto"
aggregate="true" optional="true" />
<comp:provides action="implement"
specification="org.apache.felix.ipojo.runtime.core.services.Toto">
<delegation method="toto1" policy="All" />
</comp:provides>
<comp:provides action="implement"
specification="org.apache.felix.ipojo.runtime.core.services.Tata">
<delegation method="tataInt" policy="One" />
</comp:provides>
</comp:composite>
<comp:composite name="comp-7" architecture="true">
<instance component="tata" />
<subservice action="import"
specification="org.apache.felix.ipojo.runtime.core.services.Toto" />
<comp:provides action="implement"
specification="org.apache.felix.ipojo.runtime.core.services.Tota" />
</comp:composite>
<comp:composite name="comp-8" architecture="true">
<instance component="tata" />
<instance component="totoglue" />
<subservice action="import"
specification="org.apache.felix.ipojo.runtime.core.services.Toto" />
<comp:provides action="implement"
specification="org.apache.felix.ipojo.runtime.core.services.Tota" />
</comp:composite>
</ipojo>