blob: 7c784c0ab83a4314a88d011f60aa81a378e7ec59 [file] [log] [blame]
Guillaume Nodet6b2946d2009-06-18 20:57:23 +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<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
Guillaume Nodetc4fc7be2009-07-27 08:00:51 +000021 xmlns:ext="http://geronimo.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
Guillaume Nodet6b2946d2009-06-18 20:57:23 +000022
23 <ext:property-placeholder placeholder-prefix="$(" placeholder-suffix=")"/>
24
25 <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]" ignore-missing-locations="true">
26 <ext:default-properties>
27 <ext:property name="featuresRepositories" value=""/>
28 <ext:property name="featuresBoot" value=""/>
29 </ext:default-properties>
30 <ext:location>file:$(karaf.home)/etc/org.apache.felix.karaf.features.cfg</ext:location>
31 </ext:property-placeholder>
32
33 <command-bundle xmlns="http://felix.apache.org/karaf/xmlns/gshell/v1.0.0">
34 <command name="features/addUrl">
Guillaume Nodet129433d2009-07-09 08:29:14 +000035 <action class="org.apache.felix.karaf.gshell.features.commands.AddUrlCommand"/>
Guillaume Nodet6b2946d2009-06-18 20:57:23 +000036 </command>
37 <command name="features/listUrl">
Guillaume Nodet129433d2009-07-09 08:29:14 +000038 <action class="org.apache.felix.karaf.gshell.features.commands.ListUrlCommand"/>
Guillaume Nodet6b2946d2009-06-18 20:57:23 +000039 </command>
40 <command name="features/removeUrl">
Guillaume Nodet129433d2009-07-09 08:29:14 +000041 <action class="org.apache.felix.karaf.gshell.features.commands.RemoveUrlCommand"/>
Guillaume Nodet6b2946d2009-06-18 20:57:23 +000042 <completers>
43 <ref component-id="removeUrlCompleter" />
44 </completers>
45 </command>
46 <command name="features/refreshUrl">
Guillaume Nodet129433d2009-07-09 08:29:14 +000047 <action class="org.apache.felix.karaf.gshell.features.commands.RefreshUrlCommand"/>
Guillaume Nodet6b2946d2009-06-18 20:57:23 +000048 </command>
49 <command name="features/install">
Guillaume Nodet129433d2009-07-09 08:29:14 +000050 <action class="org.apache.felix.karaf.gshell.features.commands.InstallFeatureCommand"/>
Guillaume Nodet6b2946d2009-06-18 20:57:23 +000051 <completers>
52 <ref component-id="installFeatureCompleter" />
53 </completers>
54 </command>
55 <command name="features/uninstall">
Guillaume Nodet129433d2009-07-09 08:29:14 +000056 <action class="org.apache.felix.karaf.gshell.features.commands.UninstallFeatureCommand"/>
Guillaume Nodet6b2946d2009-06-18 20:57:23 +000057 <completers>
58 <ref component-id="uninstallFeatureCompleter" />
59 </completers>
60 </command>
61 <command name="features/list">
Guillaume Nodet129433d2009-07-09 08:29:14 +000062 <action class="org.apache.felix.karaf.gshell.features.commands.ListFeaturesCommand"/>
Guillaume Nodet6b2946d2009-06-18 20:57:23 +000063 </command>
64 </command-bundle>
65
66 <bean id="featuresService" class="org.apache.felix.karaf.gshell.features.internal.FeaturesServiceImpl" init-method="start" destroy-method="stop">
67 <property name="urls" value="$[featuresRepositories]" />
68 <property name="boot" value="$[featuresBoot]" />
69 <property name="configAdmin" ref="configAdmin" />
70 <property name="preferences" ref="preferences" />
71 <property name="featuresServiceRegistry" ref="featureServiceRegistry" />
72 <property name="bundleContext" ref="blueprintBundleContext" />
73 </bean>
74
75 <reference id="configAdmin" interface="org.osgi.service.cm.ConfigurationAdmin" />
76
77 <reference id="preferences" interface="org.osgi.service.prefs.PreferencesService" availability="optional"/>
78
79 <service ref="featuresService" interface="org.apache.felix.karaf.gshell.features.FeaturesService" />
80
81 <bean id="installFeatureCompleter" class="org.apache.felix.karaf.gshell.features.completers.AvailableFeatureCompleter">
82 <property name="featuresRegistry" ref="featureServiceRegistry" />
83 </bean>
84
85 <bean id="uninstallFeatureCompleter" class="org.apache.felix.karaf.gshell.features.completers.InstalledFeatureCompleter">
86 <property name="featuresRegistry" ref="featureServiceRegistry" />
87 </bean>
88
89 <bean id="removeUrlCompleter" class="org.apache.felix.karaf.gshell.features.completers.FeatureRepositoryCompleter">
90 <property name="featuresRegistry" ref="featureServiceRegistry" />
91 </bean>
92
93 <!-- Management -->
94
95 <bean id="namingStrategy" class="org.apache.felix.karaf.gshell.features.management.DefaultNamingStrategy">
96 <property name="jmxDomainName" value="org.apache.felix.karaf" />
97 </bean>
98
99 <bean id="managementAgent" class="org.apache.felix.karaf.gshell.features.management.ManagementAgent" destroy-method="destroy">
100 <property name="mbeanServer" ref="mbeanServer" />
101 </bean>
102
103 <bean id="featureServiceRegistry" class="org.apache.felix.karaf.gshell.features.management.ManagedFeaturesRegistry" init-method="init">
104 <property name="managementAgent" ref="managementAgent" />
105 <property name="namingStrategy" ref="namingStrategy" />
106 </bean>
107
108 <reference id="mbeanServer" interface="javax.management.MBeanServer" availability="optional">
Guillaume Nodet9d362472009-06-18 21:11:51 +0000109 <reference-listener ref="featureServiceRegistry" bind-method="registerMBeanServer" unbind-method="unregisterMBeanServer"/>
Guillaume Nodet6b2946d2009-06-18 20:57:23 +0000110 </reference>
111
112</blueprint>