blob: 5121ed5499b3f7fb8f888f34567d9599e19801f4 [file] [log] [blame]
Guillaume Nodet05fac962009-04-27 10:01:58 +00001<?xml version="1.0" encoding="UTF-8"?>
2<!--
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-->
20<beans xmlns="http://www.springframework.org/schema/beans"
21 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22 xmlns:ctx="http://www.springframework.org/schema/context"
23 xmlns:osgi="http://www.springframework.org/schema/osgi"
24 xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
25 xmlns:util="http://www.springframework.org/schema/util"
26 xmlns:gshell="http://servicemix.apache.org/schema/servicemix-gshell"
27 xsi:schemaLocation="
28 http://www.springframework.org/schema/beans
29 http://www.springframework.org/schema/beans/spring-beans.xsd
30 http://www.springframework.org/schema/context
31 http://www.springframework.org/schema/context/spring-context.xsd
32 http://www.springframework.org/schema/osgi
33 http://www.springframework.org/schema/osgi/spring-osgi.xsd
34 http://www.springframework.org/schema/osgi-compendium
35 http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
36 http://www.springframework.org/schema/util
37 http://www.springframework.org/schema/util/spring-util.xsd
38 http://servicemix.apache.org/schema/servicemix-gshell
39 http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd">
40
Guillaume Nodet05fac962009-04-27 10:01:58 +000041 <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
Guillaume Nodet2ce221c2009-05-11 10:01:21 +000042 <property name="location" value="file:${karaf.home}/etc/org.apache.felix.karaf.features.cfg"/>
43 <property name="ignoreResourceNotFound" value="true"/>
44 <property name="properties">
45 <props>
46 <prop key="featuresRepositories"></prop>
47 <prop key="featuresBoot"></prop>
48 </props>
49 </property>
Guillaume Nodet05fac962009-04-27 10:01:58 +000050 </bean>
51
52 <gshell:command-bundle>
53 <gshell:command name="features/addUrl">
Guillaume Nodet810fec92009-05-04 11:26:15 +000054 <gshell:action class="org.apache.felix.karaf.gshell.features.commands.AddUrlCommand">
55 <property name="bundleContext" ref="bundleContext"/>
56 </gshell:action>
Guillaume Nodet05fac962009-04-27 10:01:58 +000057 </gshell:command>
58 <gshell:command name="features/listUrl">
Guillaume Nodet810fec92009-05-04 11:26:15 +000059 <gshell:action class="org.apache.felix.karaf.gshell.features.commands.ListUrlCommand">
60 <property name="bundleContext" ref="bundleContext"/>
61 </gshell:action>
Guillaume Nodet05fac962009-04-27 10:01:58 +000062 </gshell:command>
63 <gshell:command name="features/removeUrl">
Guillaume Nodet810fec92009-05-04 11:26:15 +000064 <gshell:action class="org.apache.felix.karaf.gshell.features.commands.RemoveUrlCommand">
65 <property name="bundleContext" ref="bundleContext"/>
66 </gshell:action>
Guillaume Nodet05fac962009-04-27 10:01:58 +000067 <gshell:completers>
68 <ref bean="removeUrlCompleter" />
69 </gshell:completers>
70 </gshell:command>
71 <gshell:command name="features/refreshUrl">
Guillaume Nodet810fec92009-05-04 11:26:15 +000072 <gshell:action class="org.apache.felix.karaf.gshell.features.commands.RefreshUrlCommand">
73 <property name="bundleContext" ref="bundleContext"/>
74 </gshell:action>
Guillaume Nodet05fac962009-04-27 10:01:58 +000075 </gshell:command>
76 <gshell:command name="features/install">
Guillaume Nodet810fec92009-05-04 11:26:15 +000077 <gshell:action class="org.apache.felix.karaf.gshell.features.commands.InstallFeatureCommand">
78 <property name="bundleContext" ref="bundleContext"/>
79 </gshell:action>
Guillaume Nodet05fac962009-04-27 10:01:58 +000080 <gshell:completers>
81 <ref bean="installFeatureCompleter" />
82 </gshell:completers>
83 </gshell:command>
84 <gshell:command name="features/uninstall">
Guillaume Nodet810fec92009-05-04 11:26:15 +000085 <gshell:action class="org.apache.felix.karaf.gshell.features.commands.UninstallFeatureCommand">
86 <property name="bundleContext" ref="bundleContext"/>
87 </gshell:action>
Guillaume Nodet05fac962009-04-27 10:01:58 +000088 <gshell:completers>
89 <ref bean="uninstallFeatureCompleter" />
90 </gshell:completers>
91 </gshell:command>
92 <gshell:command name="features/list">
Guillaume Nodet810fec92009-05-04 11:26:15 +000093 <gshell:action class="org.apache.felix.karaf.gshell.features.commands.ListFeaturesCommand">
94 <property name="bundleContext" ref="bundleContext"/>
95 </gshell:action>
Guillaume Nodet05fac962009-04-27 10:01:58 +000096 </gshell:command>
97 </gshell:command-bundle>
98
Gert Vanthienenf54a8392009-05-02 19:57:13 +000099 <bean id="featuresService" class="org.apache.felix.karaf.gshell.features.internal.FeaturesServiceImpl" init-method="start" destroy-method="stop">
Guillaume Nodet05fac962009-04-27 10:01:58 +0000100 <property name="urls" value="${featuresRepositories}" />
101 <property name="boot" value="${featuresBoot}" />
102 <property name="configAdmin" ref="configAdmin" />
103 <property name="preferences" ref="preferences" />
104 <property name="featuresServiceRegistry" ref="featureServiceRegistry" />
105 </bean>
106
Guillaume Nodet05fac962009-04-27 10:01:58 +0000107 <osgi:reference id="configAdmin" interface="org.osgi.service.cm.ConfigurationAdmin" />
108
109 <osgi:reference id="preferences" interface="org.osgi.service.prefs.PreferencesService" cardinality="0..1" />
110
Gert Vanthienenf54a8392009-05-02 19:57:13 +0000111 <osgi:service ref="featuresService" interface="org.apache.felix.karaf.gshell.features.FeaturesService" />
Guillaume Nodet05fac962009-04-27 10:01:58 +0000112
Gert Vanthienenf54a8392009-05-02 19:57:13 +0000113 <bean id="installFeatureCompleter" class="org.apache.felix.karaf.gshell.features.completers.AvailableFeatureCompleter">
Guillaume Nodet05fac962009-04-27 10:01:58 +0000114 <property name="featuresRegistry" ref="featureServiceRegistry" />
115 </bean>
116
Gert Vanthienenf54a8392009-05-02 19:57:13 +0000117 <bean id="uninstallFeatureCompleter" class="org.apache.felix.karaf.gshell.features.completers.InstalledFeatureCompleter">
Guillaume Nodet05fac962009-04-27 10:01:58 +0000118 <property name="featuresRegistry" ref="featureServiceRegistry" />
119 </bean>
120
Gert Vanthienenf54a8392009-05-02 19:57:13 +0000121 <bean id="removeUrlCompleter" class="org.apache.felix.karaf.gshell.features.completers.FeatureRepositoryCompleter">
Guillaume Nodet05fac962009-04-27 10:01:58 +0000122 <property name="featuresRegistry" ref="featureServiceRegistry" />
123 </bean>
124
Guillaume Nodet2ce221c2009-05-11 10:01:21 +0000125 <!-- Management -->
126
127 <bean id="namingStrategy" class="org.apache.felix.karaf.gshell.features.management.DefaultNamingStrategy">
128 <property name="jmxDomainName" value="org.apache.felix.karaf" />
129 </bean>
130
131 <bean id="managementAgent" class="org.apache.felix.karaf.gshell.features.management.ManagementAgent" destroy-method="destroy">
132 <property name="mbeanServer" ref="mbeanServer" />
133 </bean>
134
135 <bean id="featureServiceRegistry" class="org.apache.felix.karaf.gshell.features.management.ManagedFeaturesRegistry" init-method="init">
136 <property name="managementAgent" ref="managementAgent" />
137 <property name="namingStrategy" ref="namingStrategy" />
138 </bean>
139
140 <osgi:reference id="mbeanServer"
141 interface="javax.management.MBeanServer"
142 cardinality="0..1" >
143 <osgi:listener ref="featureServiceRegistry" bind-method="registerMBeanServer"/>
144 </osgi:reference>
145
146
Gert Vanthienenf54a8392009-05-02 19:57:13 +0000147</beans>