Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +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 | <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 Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 41 | <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> |
Guillaume Nodet | 2ce221c | 2009-05-11 10:01:21 +0000 | [diff] [blame] | 42 | <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 Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 50 | </bean> |
| 51 | |
| 52 | <gshell:command-bundle> |
| 53 | <gshell:command name="features/addUrl"> |
Guillaume Nodet | 810fec9 | 2009-05-04 11:26:15 +0000 | [diff] [blame] | 54 | <gshell:action class="org.apache.felix.karaf.gshell.features.commands.AddUrlCommand"> |
| 55 | <property name="bundleContext" ref="bundleContext"/> |
| 56 | </gshell:action> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 57 | </gshell:command> |
| 58 | <gshell:command name="features/listUrl"> |
Guillaume Nodet | 810fec9 | 2009-05-04 11:26:15 +0000 | [diff] [blame] | 59 | <gshell:action class="org.apache.felix.karaf.gshell.features.commands.ListUrlCommand"> |
| 60 | <property name="bundleContext" ref="bundleContext"/> |
| 61 | </gshell:action> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 62 | </gshell:command> |
| 63 | <gshell:command name="features/removeUrl"> |
Guillaume Nodet | 810fec9 | 2009-05-04 11:26:15 +0000 | [diff] [blame] | 64 | <gshell:action class="org.apache.felix.karaf.gshell.features.commands.RemoveUrlCommand"> |
| 65 | <property name="bundleContext" ref="bundleContext"/> |
| 66 | </gshell:action> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 67 | <gshell:completers> |
| 68 | <ref bean="removeUrlCompleter" /> |
| 69 | </gshell:completers> |
| 70 | </gshell:command> |
| 71 | <gshell:command name="features/refreshUrl"> |
Guillaume Nodet | 810fec9 | 2009-05-04 11:26:15 +0000 | [diff] [blame] | 72 | <gshell:action class="org.apache.felix.karaf.gshell.features.commands.RefreshUrlCommand"> |
| 73 | <property name="bundleContext" ref="bundleContext"/> |
| 74 | </gshell:action> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 75 | </gshell:command> |
| 76 | <gshell:command name="features/install"> |
Guillaume Nodet | 810fec9 | 2009-05-04 11:26:15 +0000 | [diff] [blame] | 77 | <gshell:action class="org.apache.felix.karaf.gshell.features.commands.InstallFeatureCommand"> |
| 78 | <property name="bundleContext" ref="bundleContext"/> |
| 79 | </gshell:action> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 80 | <gshell:completers> |
| 81 | <ref bean="installFeatureCompleter" /> |
| 82 | </gshell:completers> |
| 83 | </gshell:command> |
| 84 | <gshell:command name="features/uninstall"> |
Guillaume Nodet | 810fec9 | 2009-05-04 11:26:15 +0000 | [diff] [blame] | 85 | <gshell:action class="org.apache.felix.karaf.gshell.features.commands.UninstallFeatureCommand"> |
| 86 | <property name="bundleContext" ref="bundleContext"/> |
| 87 | </gshell:action> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 88 | <gshell:completers> |
| 89 | <ref bean="uninstallFeatureCompleter" /> |
| 90 | </gshell:completers> |
| 91 | </gshell:command> |
| 92 | <gshell:command name="features/list"> |
Guillaume Nodet | 810fec9 | 2009-05-04 11:26:15 +0000 | [diff] [blame] | 93 | <gshell:action class="org.apache.felix.karaf.gshell.features.commands.ListFeaturesCommand"> |
| 94 | <property name="bundleContext" ref="bundleContext"/> |
| 95 | </gshell:action> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 96 | </gshell:command> |
| 97 | </gshell:command-bundle> |
| 98 | |
Gert Vanthienen | f54a839 | 2009-05-02 19:57:13 +0000 | [diff] [blame] | 99 | <bean id="featuresService" class="org.apache.felix.karaf.gshell.features.internal.FeaturesServiceImpl" init-method="start" destroy-method="stop"> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 100 | <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 Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 107 | <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 Vanthienen | f54a839 | 2009-05-02 19:57:13 +0000 | [diff] [blame] | 111 | <osgi:service ref="featuresService" interface="org.apache.felix.karaf.gshell.features.FeaturesService" /> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 112 | |
Gert Vanthienen | f54a839 | 2009-05-02 19:57:13 +0000 | [diff] [blame] | 113 | <bean id="installFeatureCompleter" class="org.apache.felix.karaf.gshell.features.completers.AvailableFeatureCompleter"> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 114 | <property name="featuresRegistry" ref="featureServiceRegistry" /> |
| 115 | </bean> |
| 116 | |
Gert Vanthienen | f54a839 | 2009-05-02 19:57:13 +0000 | [diff] [blame] | 117 | <bean id="uninstallFeatureCompleter" class="org.apache.felix.karaf.gshell.features.completers.InstalledFeatureCompleter"> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 118 | <property name="featuresRegistry" ref="featureServiceRegistry" /> |
| 119 | </bean> |
| 120 | |
Gert Vanthienen | f54a839 | 2009-05-02 19:57:13 +0000 | [diff] [blame] | 121 | <bean id="removeUrlCompleter" class="org.apache.felix.karaf.gshell.features.completers.FeatureRepositoryCompleter"> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 122 | <property name="featuresRegistry" ref="featureServiceRegistry" /> |
| 123 | </bean> |
| 124 | |
Guillaume Nodet | 2ce221c | 2009-05-11 10:01:21 +0000 | [diff] [blame] | 125 | <!-- 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 Vanthienen | f54a839 | 2009-05-02 19:57:13 +0000 | [diff] [blame] | 147 | </beans> |