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:util="http://www.springframework.org/schema/util" xmlns:osgi="http://www.springframework.org/schema/osgi" |
| 23 | xsi:schemaLocation="http://www.springframework.org/schema/beans |
| 24 | http://www.springframework.org/schema/beans/spring-beans.xsd |
| 25 | http://www.springframework.org/schema/util |
| 26 | http://www.springframework.org/schema/util/spring-util.xsd |
| 27 | http://servicemix.apache.org/schema/servicemix-gshell |
| 28 | http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd |
| 29 | http://www.springframework.org/schema/osgi |
| 30 | http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd" |
| 31 | default-autowire="no" |
| 32 | default-dependency-check="none" |
| 33 | default-init-method="init" |
| 34 | default-destroy-method="destroy"> |
| 35 | |
| 36 | <bean id="io" class="org.apache.geronimo.gshell.io.IO"> |
| 37 | <property name="verbosity" value="DEBUG"/> |
| 38 | </bean> |
| 39 | |
Chris Custine | 7f02770 | 2009-05-03 03:14:03 +0000 | [diff] [blame] | 40 | <bean id="branding" class="org.apache.felix.karaf.gshell.core.DefaultBranding"> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 41 | <property name="prompt" value="@|bold %{gshell.username}|@%{application.id}:@|bold %{gshell.group}|> " /> |
| 42 | </bean> |
| 43 | |
Guillaume Nodet | 7b1bcf2 | 2009-05-04 07:04:27 +0000 | [diff] [blame] | 44 | <bean id="application" class="org.apache.felix.karaf.gshell.core.ApplicationImpl" init-method="init"> |
Chris Custine | 10fff85 | 2009-05-04 06:11:07 +0000 | [diff] [blame] | 45 | <property name="id" value="${karaf.name}"/> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 46 | <property name="io" ref="io"/> |
| 47 | <property name="model"> |
| 48 | <bean class="org.apache.geronimo.gshell.application.model.ApplicationModel"> |
| 49 | <property name="branding" ref="branding"/> |
| 50 | </bean> |
| 51 | </property> |
| 52 | <property name="variables"> |
| 53 | <bean class="org.apache.geronimo.gshell.command.Variables"/> |
| 54 | </property> |
| 55 | </bean> |
| 56 | |
| 57 | <bean id="eventManager" class="org.apache.geronimo.gshell.event.EventManagerImpl"/> |
| 58 | |
Guillaume Nodet | 810fec9 | 2009-05-04 11:26:15 +0000 | [diff] [blame] | 59 | <bean id="applicationManager" class="org.apache.felix.karaf.gshell.core.ApplicationManagerImpl" init-method="init" destroy-method="destroy"> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 60 | <constructor-arg ref="eventManager" /> |
| 61 | <constructor-arg ref="application" /> |
| 62 | </bean> |
| 63 | |
| 64 | <bean id="commandLineParser" class="org.apache.geronimo.gshell.parser.CommandLineParser"/> |
| 65 | |
| 66 | <bean id="aliasRegistry" class="org.apache.geronimo.gshell.wisdom.registry.AliasRegistryImpl"> |
| 67 | <constructor-arg ref="eventManager"/> |
| 68 | </bean> |
| 69 | |
| 70 | <bean id="aliasMetaMapper" class="org.apache.geronimo.gshell.wisdom.registry.AliasMetaMapper"> |
| 71 | <constructor-arg ref="eventManager"/> |
| 72 | <constructor-arg ref="metaDataRegistry"/> |
| 73 | <constructor-arg ref="aliasRegistry"/> |
| 74 | </bean> |
| 75 | |
| 76 | <bean id="commandRegistry" class="org.apache.geronimo.gshell.wisdom.registry.CommandRegistryImpl"> |
| 77 | <constructor-arg ref="eventManager"/> |
| 78 | </bean> |
| 79 | |
| 80 | <bean id="commandMetaMapper" class="org.apache.geronimo.gshell.wisdom.registry.CommandMetaMapper"> |
| 81 | <constructor-arg ref="eventManager"/> |
| 82 | <constructor-arg ref="metaDataRegistry"/> |
| 83 | <constructor-arg ref="commandRegistry"/> |
| 84 | </bean> |
| 85 | |
| 86 | <bean id="groupDirResolver" class="org.apache.geronimo.gshell.wisdom.registry.GroupDirectoryResolver"> |
| 87 | <constructor-arg ref="fileSystemAccess"/> |
| 88 | </bean> |
| 89 | |
| 90 | <bean id="commandResolver" class="org.apache.geronimo.gshell.wisdom.registry.CommandResolverImpl"> |
| 91 | <constructor-arg ref="fileSystemAccess"/> |
| 92 | <constructor-arg ref="groupDirResolver"/> |
| 93 | </bean> |
| 94 | |
Gert Vanthienen | f54a839 | 2009-05-02 19:57:13 +0000 | [diff] [blame] | 95 | <bean class="org.apache.felix.karaf.gshell.core.WorkAroundAliasCommand" scope="prototype"> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 96 | <constructor-arg ref="commandLineExecutor"/> |
| 97 | </bean> |
| 98 | |
| 99 | <bean class="org.apache.geronimo.gshell.wisdom.command.GroupCommand" scope="prototype"/> |
| 100 | |
| 101 | <bean id="commandLineBuilder" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineBuilderImpl"> |
| 102 | <constructor-arg ref="commandLineParser"/> |
| 103 | </bean> |
| 104 | |
| 105 | <bean id="commandLineExecutor" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl"> |
| 106 | <constructor-arg ref="commandResolver"/> |
| 107 | <constructor-arg ref="commandLineBuilder"/> |
| 108 | </bean> |
| 109 | |
| 110 | <bean id="shell" class="org.apache.geronimo.gshell.wisdom.shell.ShellImpl" scope="prototype" init-method="init" destroy-method="close"> |
| 111 | <constructor-arg ref="application"/> |
| 112 | <constructor-arg ref="commandLineExecutor"/> |
| 113 | |
| 114 | <property name="completers"> |
| 115 | <list> |
| 116 | <ref bean="commandsCompleter"/> |
| 117 | <ref bean="aliasNameCompleter"/> |
| 118 | </list> |
| 119 | </property> |
| 120 | <property name="prompter"> |
| 121 | <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsolePrompterImpl"> |
| 122 | <constructor-arg ref="application"/> |
| 123 | </bean> |
| 124 | </property> |
| 125 | <property name="errorHandler"> |
| 126 | <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsoleErrorHandlerImpl" /> |
| 127 | </property> |
| 128 | <property name="history"> |
| 129 | <bean class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl"> |
| 130 | <constructor-arg ref="application"/> |
| 131 | </bean> |
| 132 | </property> |
| 133 | </bean> |
| 134 | |
| 135 | <bean id="commandNameCompleter" class="org.apache.geronimo.gshell.wisdom.completer.CommandNameCompleter" |
| 136 | lazy-init="true"> |
| 137 | <constructor-arg ref="eventManager"/> |
| 138 | <constructor-arg ref="commandRegistry"/> |
| 139 | </bean> |
| 140 | |
| 141 | <bean id="aliasNameCompleter" class="org.apache.geronimo.gshell.wisdom.completer.AliasNameCompleter" |
| 142 | lazy-init="true"> |
| 143 | <constructor-arg ref="eventManager"/> |
| 144 | <constructor-arg ref="aliasRegistry"/> |
| 145 | </bean> |
| 146 | |
| 147 | <bean id="commandsCompleter" class="org.apache.geronimo.gshell.wisdom.completer.CommandsCompleter" lazy-init="true"> |
| 148 | <constructor-arg ref="eventManager"/> |
| 149 | <constructor-arg ref="commandRegistry"/> |
| 150 | </bean> |
| 151 | |
| 152 | <bean id="variableNameCompleter" class="org.apache.geronimo.gshell.wisdom.completer.VariableNameCompleter" lazy-init="true"> |
| 153 | </bean> |
| 154 | |
Gert Vanthienen | f54a839 | 2009-05-02 19:57:13 +0000 | [diff] [blame] | 155 | </beans> |