Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 96230 invoked from network); 22 Dec 2008 14:23:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Dec 2008 14:23:58 -0000 Received: (qmail 61456 invoked by uid 500); 22 Dec 2008 14:23:57 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 61408 invoked by uid 500); 22 Dec 2008 14:23:57 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 61399 invoked by uid 99); 22 Dec 2008 14:23:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Dec 2008 06:23:57 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jason.dillon@gmail.com designates 64.233.170.189 as permitted sender) Received: from [64.233.170.189] (HELO rn-out-0910.google.com) (64.233.170.189) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Dec 2008 14:23:46 +0000 Received: by rn-out-0910.google.com with SMTP id j71so1499719rne.4 for ; Mon, 22 Dec 2008 06:23:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=52ILGbsR2p90RRBsi1N7To/cUGQL1DyVv4Nm8dVN/QM=; b=ZYoIEVBPZBHfzbTF/fEjbcLptcKd+73I6ypLUCIEo7e4VEFTGlC2rIAxm64h0sv2Qr xJ0cIyAo+Djp/uZK0zYS1URPzIdXUNzT8Al2mpJdULQbt66VZRmGB/Vtu1FrEOp8Su9+ 15cl9QnyYyiHLOgUBbjQL3IrvBR4kaScNcFIU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=DL5Max1ut1ecIPf69XoRhpbypTd2oWpDR7hsyZaBXKGkfdAVHpbPRJhxRw02LapjGJ RxsVJJjDbgs0ehmv9srVknd7JonDEL8kbfOl16ddW1j2/TTKHNq0WXSulgWcNZWh6Es4 8u9wo9n7iOio+1eM5Mod5umroMwFxvTPzK68E= Received: by 10.142.210.4 with SMTP id i4mr2699892wfg.145.1229955804908; Mon, 22 Dec 2008 06:23:24 -0800 (PST) Received: from ?192.168.1.4? ([119.42.64.211]) by mx.google.com with ESMTPS id 20sm22257303wfi.27.2008.12.22.06.23.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 22 Dec 2008 06:23:24 -0800 (PST) Sender: Jason Dillon Message-Id: <5BAC3913-6473-40DE-B405-7072ADA9F891@planet57.com> From: Jason Dillon To: dev@geronimo.apache.org In-Reply-To: <21104706.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: svn commit: r727321 - in /geronimo/gshell/trunk: gshell-api/src/main/java/org/apache/geronimo/gshell/command/ gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/ gshell-wisdom/gshell-wisdom-core/src/main/java/org/a... Date: Mon, 22 Dec 2008 21:23:16 +0700 References: <82A8028D-C534-41C6-91BE-1977D0C90636@planet57.com> <21091483.post@talk.nabble.com> <21104706.post@talk.nabble.com> X-Mailer: Apple Mail (2.929.2) X-Virus-Checked: Checked by ClamAV on apache.org Should be up now. --jason On Dec 20, 2008, at 7:56 PM, Gert Vanthienen wrote: > > L.S., > > Thanks for making new SNAPSHOTs available again! Could we have > another new > SNAPSHOT for > http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/gshell/wisdom/gshell-wisdom-core/1.0-alpha-2-SNAPSHOT/ > as well? > > Regards, > > Gert > > > Gert Vanthienen wrote: >> >> L.S., >> >> Do you have any idea when we will have a -SNAPSHOT available on >> people.apache.org that contains this change? The last gshell-api >> SNAPSHOT >> available at >> http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/gshell/gshell-api/1.0-alpha-2-SNAPSHOT/ >> seems to be over a week old. >> >> Regards, >> >> Gert >> >> >> Jason Dillon wrote: >>> >>> Thx :-) >>> >>> --jason >>> >>> >>> On Dec 17, 2008, at 4:31 PM, gnodet@apache.org wrote: >>> >>>> Author: gnodet >>>> Date: Wed Dec 17 01:31:44 2008 >>>> New Revision: 727321 >>>> >>>> URL: http://svn.apache.org/viewvc?rev=727321&view=rev >>>> Log: >>>> GSHELL-154: Create interfaces to represent links and aliases >>>> >>>> Added: >>>> geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/ >>>> geronimo/gshell/command/Alias.java >>>> geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/ >>>> geronimo/gshell/command/Link.java >>>> geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/ >>>> java/org/apache/geronimo/gshell/wisdom/command/AliasImpl.java >>>> geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/ >>>> java/org/apache/geronimo/gshell/wisdom/command/LinkImpl.java >>>> Modified: >>>> geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/ >>>> java/org/apache/geronimo/gshell/wisdom/config/PluginParser.java >>>> geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/ >>>> java/org/apache/geronimo/gshell/wisdom/plugin/bundle/ >>>> CommandBundle.java >>>> >>>> Added: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/ >>>> geronimo/gshell/command/Alias.java >>>> URL: >>>> http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Alias.java?rev=727321&view=auto >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> =================================================================== >>>> --- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/ >>>> geronimo/gshell/command/Alias.java (added) >>>> +++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/ >>>> geronimo/gshell/command/Alias.java Wed Dec 17 01:31:44 2008 >>>> @@ -0,0 +1,33 @@ >>>> +/* >>>> + * Licensed to the Apache Software Foundation (ASF) under one >>>> + * or more contributor license agreements. See the NOTICE file >>>> + * distributed with this work for additional information >>>> + * regarding copyright ownership. The ASF licenses this file >>>> + * to you under the Apache License, Version 2.0 (the >>>> + * "License"); you may not use this file except in compliance >>>> + * with the License. You may obtain a copy of the License at >>>> + * >>>> + * http://www.apache.org/licenses/LICENSE-2.0 >>>> + * >>>> + * Unless required by applicable law or agreed to in writing, >>>> + * software distributed under the License is distributed on an >>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY >>>> + * KIND, either express or implied. See the License for the >>>> + * specific language governing permissions and limitations >>>> + * under the License. >>>> + */ >>>> + >>>> +package org.apache.geronimo.gshell.command; >>>> + >>>> +/** >>>> + * Convenient way to register an alias. >>>> + * >>>> + * @version $Rev: 705507 $ $Date: 2008-10-17 10:22:12 +0200 (Fri, >>>> 17 Oct 2008) $ >>>> + */ >>>> +public interface Alias { >>>> + >>>> + String getName(); >>>> + >>>> + String getAlias(); >>>> + >>>> +} >>>> >>>> Added: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/ >>>> geronimo/gshell/command/Link.java >>>> URL: >>>> http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Link.java?rev=727321&view=auto >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> =================================================================== >>>> --- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/ >>>> geronimo/gshell/command/Link.java (added) >>>> +++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/ >>>> geronimo/gshell/command/Link.java Wed Dec 17 01:31:44 2008 >>>> @@ -0,0 +1,33 @@ >>>> +/* >>>> + * Licensed to the Apache Software Foundation (ASF) under one >>>> + * or more contributor license agreements. See the NOTICE file >>>> + * distributed with this work for additional information >>>> + * regarding copyright ownership. The ASF licenses this file >>>> + * to you under the Apache License, Version 2.0 (the >>>> + * "License"); you may not use this file except in compliance >>>> + * with the License. You may obtain a copy of the License at >>>> + * >>>> + * http://www.apache.org/licenses/LICENSE-2.0 >>>> + * >>>> + * Unless required by applicable law or agreed to in writing, >>>> + * software distributed under the License is distributed on an >>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY >>>> + * KIND, either express or implied. See the License for the >>>> + * specific language governing permissions and limitations >>>> + * under the License. >>>> + */ >>>> + >>>> +package org.apache.geronimo.gshell.command; >>>> + >>>> +/** >>>> + * Provides a convenient way to register a link >>>> + * >>>> + * @version $Rev: 705507 $ $Date: 2008-10-17 10:22:12 +0200 (Fri, >>>> 17 Oct 2008) $ >>>> + */ >>>> +public interface Link { >>>> + >>>> + String getName(); >>>> + >>>> + String getTarget(); >>>> + >>>> +} >>>> >>>> Added: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/ >>>> main/java/org/apache/geronimo/gshell/wisdom/command/AliasImpl.java >>>> URL: >>>> http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/AliasImpl.java?rev=727321&view=auto >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> =================================================================== >>>> --- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/ >>>> main/ >>>> java/org/apache/geronimo/gshell/wisdom/command/AliasImpl.java >>>> (added) >>>> +++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/ >>>> main/ >>>> java/org/apache/geronimo/gshell/wisdom/command/AliasImpl.java Wed >>>> Dec 17 01:31:44 2008 >>>> @@ -0,0 +1,47 @@ >>>> +/* >>>> + * Licensed to the Apache Software Foundation (ASF) under one >>>> + * or more contributor license agreements. See the NOTICE file >>>> + * distributed with this work for additional information >>>> + * regarding copyright ownership. The ASF licenses this file >>>> + * to you under the Apache License, Version 2.0 (the >>>> + * "License"); you may not use this file except in compliance >>>> + * with the License. You may obtain a copy of the License at >>>> + * >>>> + * http://www.apache.org/licenses/LICENSE-2.0 >>>> + * >>>> + * Unless required by applicable law or agreed to in writing, >>>> + * software distributed under the License is distributed on an >>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY >>>> + * KIND, either express or implied. See the License for the >>>> + * specific language governing permissions and limitations >>>> + * under the License. >>>> + */ >>>> + >>>> + >>>> +package org.apache.geronimo.gshell.wisdom.command; >>>> + >>>> +import org.apache.geronimo.gshell.command.Alias; >>>> + >>>> +/** >>>> + * Simpe implementation of {@link Alias} interface. >>>> + * >>>> + * @version $Rev: 706889 $ $Date: 2008-10-22 10:12:04 +0200 (Wed, >>>> 22 Oct 2008) $ >>>> + */ >>>> +public class AliasImpl implements Alias { >>>> + >>>> + private String name; >>>> + private String alias; >>>> + >>>> + public AliasImpl(String name, String alias) { >>>> + this.name = name; >>>> + this.alias = alias; >>>> + } >>>> + >>>> + public String getName() { >>>> + return name; >>>> + } >>>> + >>>> + public String getAlias() { >>>> + return alias; >>>> + } >>>> +} >>>> >>>> Added: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/ >>>> main/java/org/apache/geronimo/gshell/wisdom/command/LinkImpl.java >>>> URL: >>>> http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/command/LinkImpl.java?rev=727321&view=auto >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> =================================================================== >>>> --- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/ >>>> main/ >>>> java/org/apache/geronimo/gshell/wisdom/command/LinkImpl.java >>>> (added) >>>> +++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/ >>>> main/ >>>> java/org/apache/geronimo/gshell/wisdom/command/LinkImpl.java Wed >>>> Dec >>>> 17 01:31:44 2008 >>>> @@ -0,0 +1,46 @@ >>>> +/* >>>> + * Licensed to the Apache Software Foundation (ASF) under one >>>> + * or more contributor license agreements. See the NOTICE file >>>> + * distributed with this work for additional information >>>> + * regarding copyright ownership. The ASF licenses this file >>>> + * to you under the Apache License, Version 2.0 (the >>>> + * "License"); you may not use this file except in compliance >>>> + * with the License. You may obtain a copy of the License at >>>> + * >>>> + * http://www.apache.org/licenses/LICENSE-2.0 >>>> + * >>>> + * Unless required by applicable law or agreed to in writing, >>>> + * software distributed under the License is distributed on an >>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY >>>> + * KIND, either express or implied. See the License for the >>>> + * specific language governing permissions and limitations >>>> + * under the License. >>>> + */ >>>> + >>>> +package org.apache.geronimo.gshell.wisdom.command; >>>> + >>>> +import org.apache.geronimo.gshell.command.Link; >>>> + >>>> +/** >>>> + * Alias {@link org.apache.geronimo.gshell.command.Command} >>>> component. >>>> + * >>>> + * @version $Rev: 706889 $ $Date: 2008-10-22 10:12:04 +0200 (Wed, >>>> 22 Oct 2008) $ >>>> + */ >>>> +public class LinkImpl implements Link { >>>> + >>>> + private String name; >>>> + private String target; >>>> + >>>> + public LinkImpl(String name, String target) { >>>> + this.name = name; >>>> + this.target = target; >>>> + } >>>> + >>>> + public String getName() { >>>> + return name; >>>> + } >>>> + >>>> + public String getTarget() { >>>> + return target; >>>> + } >>>> +} >>>> >>>> Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/ >>>> src/ >>>> main/java/org/apache/geronimo/gshell/wisdom/config/ >>>> PluginParser.java >>>> URL: >>>> http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/config/PluginParser.java?rev=727321&r1=727320&r2=727321&view=diff >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> =================================================================== >>>> --- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/ >>>> main/ >>>> java/org/apache/geronimo/gshell/wisdom/config/PluginParser.java >>>> (original) >>>> +++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/ >>>> main/ >>>> java/org/apache/geronimo/gshell/wisdom/config/PluginParser.java Wed >>>> Dec 17 01:31:44 2008 >>>> @@ -21,8 +21,12 @@ >>>> >>>> import >>>> org >>>> .apache >>>> .geronimo.gshell.wisdom.command.ConfigurableCommandCompleter; >>>> import org.apache.geronimo.gshell.wisdom.command.LinkCommand; >>>> +import org.apache.geronimo.gshell.wisdom.command.AliasImpl; >>>> +import org.apache.geronimo.gshell.wisdom.command.LinkImpl; >>>> import >>>> org.apache.geronimo.gshell.wisdom.plugin.bundle.CommandBundle; >>>> import >>>> org.apache.geronimo.gshell.wisdom.registry.CommandLocationImpl; >>>> +import org.apache.geronimo.gshell.command.Alias; >>>> +import org.apache.geronimo.gshell.command.Link; >>>> import org.slf4j.Logger; >>>> import org.slf4j.LoggerFactory; >>>> import >>>> org.springframework.beans.factory.BeanDefinitionStoreException; >>>> @@ -103,6 +107,8 @@ >>>> >>>> private static final String LINK = "link"; >>>> >>>> + private static final String LINKS = "links"; >>>> + >>>> private static final String TARGET = "target"; >>>> >>>> @Override >>>> @@ -387,13 +393,16 @@ >>>> ManagedList commands = new ManagedList(); >>>> // noinspection unchecked >>>> commands.addAll(parseCommands(element)); >>>> - // noinspection unchecked >>>> - commands.addAll(parseLinks(element)); >>>> bundle.addPropertyValue(COMMANDS, commands); >>>> >>>> - ManagedMap aliases = new ManagedMap(); >>>> + ManagedList links = new ManagedList(); >>>> // noinspection unchecked >>>> - aliases.putAll(parseAliases(element)); >>>> + links.addAll(parseLinks(element)); >>>> + bundle.addPropertyValue(LINKS, links); >>>> + >>>> + ManagedList aliases = new ManagedList(); >>>> + // noinspection unchecked >>>> + aliases.addAll(parseAliases(element)); >>>> bundle.addPropertyValue(ALIASES, aliases); >>>> >>>> return bundle; >>>> @@ -543,27 +552,20 @@ >>>> // >>>> // >>>> >>>> - private List parseLinks(final Element >>>> element) { >>>> + private List parseLinks(final Element element) { >>>> assert element != null; >>>> >>>> log.trace("Parse links; element; {}", element); >>>> >>>> - List links = new >>>> ArrayList(); >>>> + List links = new ArrayList(); >>>> >>>> List children = getChildElements(element, >>>> LINK); >>>> >>>> for (Element child : children) { >>>> - BeanDefinitionBuilder link = >>>> BeanDefinitionBuilder.rootBeanDefinition(LinkCommand.class); >>>> - >>>> link.addConstructorArgReference("commandRegistry"); >>>> - >>>> link.addConstructorArgValue(child.getAttribute(TARGET)); >>>> - >>>> String name = child.getAttribute(NAME); >>>> - BeanDefinition def = new GenericBeanDefinition(); >>>> - >>>> def.setBeanClassName(CommandLocationImpl.class.getName()); >>>> - >>>> def.getConstructorArgumentValues().addGenericArgumentValue(name); >>>> - link.addPropertyValue(LOCATION, def); >>>> + String target = child.getAttribute(TARGET); >>>> >>>> - links.add(link.getBeanDefinition()); >>>> + links.add(new LinkImpl(name, target)); >>>> } >>>> >>>> return links; >>>> @@ -573,12 +575,12 @@ >>>> // >>>> // >>>> >>>> - private Map parseAliases(final Element >>>> element) { >>>> + private List parseAliases(final Element element) { >>>> assert element != null; >>>> >>>> log.trace("Parse aliases; element; {}", element); >>>> >>>> - Map aliases = new >>>> LinkedHashMap(); >>>> + List aliases = new ArrayList(); >>>> >>>> List children = getChildElements(element, >>>> ALIAS); >>>> >>>> @@ -586,7 +588,7 @@ >>>> String name = child.getAttribute(NAME); >>>> String alias = child.getAttribute(ALIAS); >>>> >>>> - aliases.put(name, alias); >>>> + aliases.add(new AliasImpl(name, alias)); >>>> } >>>> >>>> return aliases; >>>> >>>> Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/ >>>> src/ >>>> main/java/org/apache/geronimo/gshell/wisdom/plugin/bundle/ >>>> CommandBundle.java >>>> URL: >>>> http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/bundle/CommandBundle.java?rev=727321&r1=727320&r2=727321&view=diff >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> = >>>> =================================================================== >>>> --- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/ >>>> main/ >>>> java/org/apache/geronimo/gshell/wisdom/plugin/bundle/ >>>> CommandBundle.java (original) >>>> +++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/ >>>> main/ >>>> java/org/apache/geronimo/gshell/wisdom/plugin/bundle/ >>>> CommandBundle.java Wed Dec 17 01:31:44 2008 >>>> @@ -20,11 +20,16 @@ >>>> package org.apache.geronimo.gshell.wisdom.plugin.bundle; >>>> >>>> import org.apache.geronimo.gshell.command.Command; >>>> +import org.apache.geronimo.gshell.command.Alias; >>>> +import org.apache.geronimo.gshell.command.Link; >>>> import org.apache.geronimo.gshell.registry.AliasRegistry; >>>> import org.apache.geronimo.gshell.registry.CommandRegistry; >>>> +import org.apache.geronimo.gshell.wisdom.command.LinkCommand; >>>> +import >>>> org.apache.geronimo.gshell.wisdom.registry.CommandLocationImpl; >>>> >>>> import java.util.List; >>>> import java.util.Map; >>>> +import java.util.ArrayList; >>>> >>>> /** >>>> * A bundle of {@link Command} instances. >>>> @@ -40,7 +45,11 @@ >>>> >>>> private List commands; >>>> >>>> - private Map aliases; >>>> + private List links; >>>> + >>>> + private List aliases; >>>> + >>>> + private List linkCommands; >>>> >>>> public CommandBundle(final CommandRegistry commandRegistry, >>>> final AliasRegistry aliasRegistry, final String name) { >>>> super(name); >>>> @@ -60,23 +69,47 @@ >>>> this.commands = commands; >>>> } >>>> >>>> - public Map getAliases() { >>>> + public List getLinks() { >>>> + return links; >>>> + } >>>> + >>>> + public void setLinks(List links) { >>>> + assert links != null; >>>> + >>>> + this.links = links; >>>> + } >>>> + >>>> + public List getAliases() { >>>> return aliases; >>>> } >>>> >>>> - public void setAliases(final Map aliases) { >>> >>>> + public void setAliases(final List aliases) { >>>> assert aliases != null; >>>> >>>> this.aliases = aliases; >>>> } >>>> >>>> protected void doEnable() throws Exception { >>>> + // Create links commands >>>> + if (linkCommands == null) { >>>> + linkCommands = new ArrayList(); >>>> + for (Link link : links) { >>>> + LinkCommand cmd = new LinkCommand(commandRegistry, >>>> link.getTarget()); >>>> + cmd.setLocation(new >>>> CommandLocationImpl(link.getName())); >>>> + linkCommands.add(cmd); >>>> + } >>>> + } >>>> + >>>> for (Command command : commands) { >>>> commandRegistry.registerCommand(command); >>>> } >>>> >>>> - for (String name : aliases.keySet()) { >>>> - aliasRegistry.registerAlias(name, aliases.get(name)); >>>> + for (Command command : linkCommands) { >>>> + commandRegistry.registerCommand(command); >>>> + } >>>> + >>>> + for (Alias alias : aliases) { >>>> + aliasRegistry.registerAlias(alias.getName(), >>>> alias.getAlias()); >>>> } >>>> } >>>> >>>> @@ -85,8 +118,12 @@ >>>> commandRegistry.removeCommand(command); >>>> } >>>> >>>> - for (String name : aliases.keySet()) { >>>> - aliasRegistry.removeAlias(name); >>>> + for (Command command : linkCommands) { >>>> + commandRegistry.removeCommand(command); >>>> + } >>>> + >>>> + for (Alias alias : aliases) { >>>> + aliasRegistry.removeAlias(alias.getName()); >>>> } >>>> } >>>> } >>>> \ No newline at end of file >>>> >>>> >>> >>> >>> >> >> > > > ----- > --- > Gert Vanthienen > http://gertvanthienen.blogspot.com > -- > View this message in context: http://www.nabble.com/Re%3A-svn-commit%3A-r727321---in--geronimo-gshell-trunk%3A-gshell-api-src-main-java-org-apache-geronimo-gshell-command--gshell-wisdom-gshell-wisdom-core-src-main-java-org-apache-geronimo-gshell-wisdom-command--gshell-wisdom-gshell-wisdom-core-src-main-java-org-a...-tp21067909s134p21104706.html > Sent from the Apache Geronimo - Dev mailing list archive at > Nabble.com. >