Guillaume Nodet | 6b2946d | 2009-06-18 20:57:23 +0000 | [diff] [blame] | 1 | <?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" |
| 21 | xmlns:ext="http://geronimo.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"> |
| 22 | |
| 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 Nodet | 129433d | 2009-07-09 08:29:14 +0000 | [diff] [blame^] | 35 | <action class="org.apache.felix.karaf.gshell.features.commands.AddUrlCommand"/> |
Guillaume Nodet | 6b2946d | 2009-06-18 20:57:23 +0000 | [diff] [blame] | 36 | </command> |
| 37 | <command name="features/listUrl"> |
Guillaume Nodet | 129433d | 2009-07-09 08:29:14 +0000 | [diff] [blame^] | 38 | <action class="org.apache.felix.karaf.gshell.features.commands.ListUrlCommand"/> |
Guillaume Nodet | 6b2946d | 2009-06-18 20:57:23 +0000 | [diff] [blame] | 39 | </command> |
| 40 | <command name="features/removeUrl"> |
Guillaume Nodet | 129433d | 2009-07-09 08:29:14 +0000 | [diff] [blame^] | 41 | <action class="org.apache.felix.karaf.gshell.features.commands.RemoveUrlCommand"/> |
Guillaume Nodet | 6b2946d | 2009-06-18 20:57:23 +0000 | [diff] [blame] | 42 | <completers> |
| 43 | <ref component-id="removeUrlCompleter" /> |
| 44 | </completers> |
| 45 | </command> |
| 46 | <command name="features/refreshUrl"> |
Guillaume Nodet | 129433d | 2009-07-09 08:29:14 +0000 | [diff] [blame^] | 47 | <action class="org.apache.felix.karaf.gshell.features.commands.RefreshUrlCommand"/> |
Guillaume Nodet | 6b2946d | 2009-06-18 20:57:23 +0000 | [diff] [blame] | 48 | </command> |
| 49 | <command name="features/install"> |
Guillaume Nodet | 129433d | 2009-07-09 08:29:14 +0000 | [diff] [blame^] | 50 | <action class="org.apache.felix.karaf.gshell.features.commands.InstallFeatureCommand"/> |
Guillaume Nodet | 6b2946d | 2009-06-18 20:57:23 +0000 | [diff] [blame] | 51 | <completers> |
| 52 | <ref component-id="installFeatureCompleter" /> |
| 53 | </completers> |
| 54 | </command> |
| 55 | <command name="features/uninstall"> |
Guillaume Nodet | 129433d | 2009-07-09 08:29:14 +0000 | [diff] [blame^] | 56 | <action class="org.apache.felix.karaf.gshell.features.commands.UninstallFeatureCommand"/> |
Guillaume Nodet | 6b2946d | 2009-06-18 20:57:23 +0000 | [diff] [blame] | 57 | <completers> |
| 58 | <ref component-id="uninstallFeatureCompleter" /> |
| 59 | </completers> |
| 60 | </command> |
| 61 | <command name="features/list"> |
Guillaume Nodet | 129433d | 2009-07-09 08:29:14 +0000 | [diff] [blame^] | 62 | <action class="org.apache.felix.karaf.gshell.features.commands.ListFeaturesCommand"/> |
Guillaume Nodet | 6b2946d | 2009-06-18 20:57:23 +0000 | [diff] [blame] | 63 | </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 Nodet | 9d36247 | 2009-06-18 21:11:51 +0000 | [diff] [blame] | 109 | <reference-listener ref="featureServiceRegistry" bind-method="registerMBeanServer" unbind-method="unregisterMBeanServer"/> |
Guillaume Nodet | 6b2946d | 2009-06-18 20:57:23 +0000 | [diff] [blame] | 110 | </reference> |
| 111 | |
| 112 | </blueprint> |