Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 7126 invoked from network); 29 Aug 2007 02:18:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Aug 2007 02:18:05 -0000 Received: (qmail 69569 invoked by uid 500); 29 Aug 2007 02:18:01 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 69426 invoked by uid 500); 29 Aug 2007 02:18:00 -0000 Mailing-List: contact scm-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 scm@geronimo.apache.org Received: (qmail 69415 invoked by uid 99); 29 Aug 2007 02:18:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Aug 2007 19:18:00 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Aug 2007 02:18:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2631F1A9846; Tue, 28 Aug 2007 19:17:35 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r570606 [4/5] - in /geronimo/sandbox/gshell/trunk: ./ gshell-api/ gshell-api/src/main/java/org/apache/geronimo/gshell/command/ gshell-api/src/main/java/org/apache/geronimo/gshell/console/ gshell-api/src/main/java/org/apache/geronimo/gshell/... Date: Wed, 29 Aug 2007 02:17:20 -0000 To: scm@geronimo.apache.org From: jdillon@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070829021735.2631F1A9846@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Copied: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/package-info.java (from r568844, geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/package.html) URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/package-info.java?p2=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/package-info.java&p1=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/package.html&r1=568844&r2=570606&rev=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/package.html (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/package-info.java Tue Aug 28 19:17:11 2007 @@ -1,32 +1,25 @@ - - - +/* + * 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. + */ - - - - - - - -Builtin commands. These are commands that are availabe for any GShell application. - - - \ No newline at end of file +/** + * Builtin commands. These are commands that are availabe for any GShell application. + * + * @version $Rev$ $Date$ + */ +package org.apache.geronimo.gshell.builtins; \ No newline at end of file Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/package-info.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/package-info.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/package-info.java ------------------------------------------------------------------------------ svn:mime-type = text/html Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/CommandManagerImpl.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/CommandManagerImpl.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/CommandManagerImpl.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/CommandManagerImpl.java Tue Aug 28 19:17:11 2007 @@ -19,18 +19,16 @@ package org.apache.geronimo.gshell.command; -import org.apache.xbean.finder.ResourceFinder; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.lang.NullArgumentException; - +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; import java.util.Map; import java.util.Properties; -import java.util.HashMap; import java.util.Set; -import java.util.Collections; -import java.util.Collection; + +import org.apache.xbean.finder.ResourceFinder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Manager of command definitions and provides access to command instances. @@ -40,7 +38,7 @@ public class CommandManagerImpl implements CommandManager { - private static final Log log = LogFactory.getLog(CommandManager.class); + private static final Logger log = LoggerFactory.getLogger(CommandManager.class); private Map commandDefMap = new HashMap(); @@ -69,9 +67,7 @@ } public boolean addCommandDefinition(final CommandDefinition def) { - if (def == null) { - throw new IllegalArgumentException("Def is null"); - } + assert def != null; boolean debug = log.isDebugEnabled(); @@ -102,13 +98,9 @@ } public CommandDefinition getCommandDefinition(String name) throws CommandNotFoundException { - if (name == null) { - throw new NullArgumentException("name"); - } - if (name.trim().length() == 0) { - throw new IllegalArgumentException("Name is empty"); - } - + assert name != null; + assert name.trim().length() != 0; + // // TODO: Issue warning if there is whitespace, that is a programming error (for someone) // Investigate auto-trim and complain from the parser too, looks like we are catching Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/MessageSourceImpl.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/MessageSourceImpl.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/MessageSourceImpl.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/MessageSourceImpl.java Tue Aug 28 19:17:11 2007 @@ -19,10 +19,8 @@ package org.apache.geronimo.gshell.command; -import org.apache.commons.lang.NullArgumentException; - -import java.util.ResourceBundle; import java.util.Formatter; +import java.util.ResourceBundle; // // TODO: Move this to util or something, it is generally useful @@ -43,10 +41,8 @@ private final ResourceBundle bundle; public MessageSourceImpl(final String name) { - if (name == null) { - throw new NullArgumentException("name"); - } - + assert name != null; + bundle = ResourceBundle.getBundle(name); } Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/VariablesImpl.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/VariablesImpl.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/VariablesImpl.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/VariablesImpl.java Tue Aug 28 19:17:11 2007 @@ -19,14 +19,11 @@ package org.apache.geronimo.gshell.command; -import org.apache.commons.lang.NullArgumentException; - import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; -import java.util.HashSet; -import java.util.Collections; /** * Variables backed up by a map. @@ -43,30 +40,22 @@ private final Set immutables = new HashSet(); public VariablesImpl(final Map map, final Variables parent) { - if (map == null) { - throw new NullArgumentException("map"); - } - if (parent == null) { - throw new NullArgumentException("parent"); - } + assert map != null; + assert parent != null; this.map = map; this.parent = parent; } public VariablesImpl(final Variables parent) { - if (parent == null) { - throw new NullArgumentException("parent"); - } + assert parent != null; this.map = new HashMap(); this.parent = parent; } public VariablesImpl(final Map map) { - if (map == null) { - throw new NullArgumentException("map"); - } + assert map != null; this.map = map; this.parent = null; Copied: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/package-info.java (from r568844, geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/package.html) URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/package-info.java?p2=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/package-info.java&p1=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/package.html&r1=568844&r2=570606&rev=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/package.html (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/package-info.java Tue Aug 28 19:17:11 2007 @@ -1,32 +1,25 @@ - - - +/* + * 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. + */ - - - - - - - -Provides concreate implemenations for core interfaces in the GShell API. - - - \ No newline at end of file +/** + * Provides concreate implemenations for core interfaces in the GShell API. + * + * @version $Rev$ $Date$ + */ +package org.apache.geronimo.gshell.command; \ No newline at end of file Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/package-info.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/package-info.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/package-info.java ------------------------------------------------------------------------------ svn:mime-type = text/html Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/CommandLineBuilder.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/CommandLineBuilder.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/CommandLineBuilder.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/CommandLineBuilder.java Tue Aug 28 19:17:11 2007 @@ -19,19 +19,16 @@ package org.apache.geronimo.gshell.commandline; -import org.apache.geronimo.gshell.commandline.parser.CommandLineParser; -import org.apache.geronimo.gshell.commandline.parser.ASTCommandLine; -import org.apache.geronimo.gshell.commandline.parser.ParseException; -import org.apache.geronimo.gshell.Shell; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import org.apache.commons.lang.NullArgumentException; - import java.io.Reader; import java.io.StringReader; +import org.apache.geronimo.gshell.Shell; +import org.apache.geronimo.gshell.commandline.parser.ASTCommandLine; +import org.apache.geronimo.gshell.commandline.parser.CommandLineParser; +import org.apache.geronimo.gshell.commandline.parser.ParseException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * Builds {@link CommandLine} instances ready for executing. * @@ -39,16 +36,14 @@ */ public class CommandLineBuilder { - private static final Log log = LogFactory.getLog(CommandLineBuilder.class); + private static final Logger log = LoggerFactory.getLogger(CommandLineBuilder.class); private final Shell shell; private final CommandLineParser parser; public CommandLineBuilder(final Shell shell) { - if (shell == null) { - throw new NullArgumentException("shell"); - } + assert shell != null; this.shell = shell; this.parser = new CommandLineParser(); @@ -70,9 +65,8 @@ } public CommandLine create(final String commandLine) throws ParseException { - if (commandLine == null) { - throw new NullArgumentException("commandLine"); - } + assert commandLine != null; + if (commandLine.trim().length() == 0) { throw new IllegalArgumentException("Command line is empty"); } Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/ExecutingVisitor.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/ExecutingVisitor.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/ExecutingVisitor.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/ExecutingVisitor.java Tue Aug 28 19:17:11 2007 @@ -19,23 +19,21 @@ package org.apache.geronimo.gshell.commandline; -import org.apache.geronimo.gshell.commandline.parser.CommandLineParserVisitor; -import org.apache.geronimo.gshell.commandline.parser.SimpleNode; +import java.util.ArrayList; +import java.util.List; + +import org.apache.geronimo.gshell.ErrorNotification; +import org.apache.geronimo.gshell.Shell; import org.apache.geronimo.gshell.commandline.parser.ASTCommandLine; import org.apache.geronimo.gshell.commandline.parser.ASTExpression; -import org.apache.geronimo.gshell.commandline.parser.ASTQuotedString; import org.apache.geronimo.gshell.commandline.parser.ASTOpaqueString; import org.apache.geronimo.gshell.commandline.parser.ASTPlainString; +import org.apache.geronimo.gshell.commandline.parser.ASTQuotedString; +import org.apache.geronimo.gshell.commandline.parser.CommandLineParserVisitor; +import org.apache.geronimo.gshell.commandline.parser.SimpleNode; import org.apache.geronimo.gshell.util.Arguments; -import org.apache.geronimo.gshell.Shell; -import org.apache.geronimo.gshell.ErrorNotification; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.lang.NullArgumentException; - -import java.util.List; -import java.util.ArrayList; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Visitor which will execute command-lines as parsed. @@ -45,14 +43,12 @@ public class ExecutingVisitor implements CommandLineParserVisitor { - private static final Log log = LogFactory.getLog(ExecutingVisitor.class); + private static final Logger log = LoggerFactory.getLogger(ExecutingVisitor.class); private final Shell shell; public ExecutingVisitor(final Shell shell) { - if (shell == null) { - throw new NullArgumentException("shell"); - } + assert shell != null; this.shell = shell; } Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/LoggingVisitor.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/LoggingVisitor.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/LoggingVisitor.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/LoggingVisitor.java Tue Aug 28 19:17:11 2007 @@ -19,17 +19,15 @@ package org.apache.geronimo.gshell.commandline; -import org.apache.geronimo.gshell.commandline.parser.CommandLineParserVisitor; -import org.apache.geronimo.gshell.commandline.parser.SimpleNode; import org.apache.geronimo.gshell.commandline.parser.ASTCommandLine; import org.apache.geronimo.gshell.commandline.parser.ASTExpression; -import org.apache.geronimo.gshell.commandline.parser.ASTQuotedString; import org.apache.geronimo.gshell.commandline.parser.ASTOpaqueString; import org.apache.geronimo.gshell.commandline.parser.ASTPlainString; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.lang.NullArgumentException; +import org.apache.geronimo.gshell.commandline.parser.ASTQuotedString; +import org.apache.geronimo.gshell.commandline.parser.CommandLineParserVisitor; +import org.apache.geronimo.gshell.commandline.parser.SimpleNode; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Visitor whichs logs nodes in the tree. @@ -44,27 +42,23 @@ DEBUG } - private final Log log; + private final Logger log; private final Level level; private int indent = 0; public LoggingVisitor() { - this(LogFactory.getLog(LoggingVisitor.class)); + this(LoggerFactory.getLogger(LoggingVisitor.class)); } - public LoggingVisitor(final Log log) { + public LoggingVisitor(final Logger log) { this(log, Level.DEBUG); } - public LoggingVisitor(final Log log, final Level level) { - if (log == null) { - throw new NullArgumentException("log"); - } - if (level == null) { - throw new NullArgumentException("level"); - } + public LoggingVisitor(final Logger log, final Level level) { + assert log != null; + assert level != null; this.log = log; this.level = level; @@ -99,11 +93,11 @@ switch (level) { case INFO: - log.info(buff); + log.info(buff.toString()); break; case DEBUG: - log.debug(buff); + log.debug(buff.toString()); break; } Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/VariableExpressionParser.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/VariableExpressionParser.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/VariableExpressionParser.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/VariableExpressionParser.java Tue Aug 28 19:17:11 2007 @@ -19,21 +19,18 @@ package org.apache.geronimo.gshell.commandline; -import java.util.Map; import java.util.HashMap; import java.util.Iterator; +import java.util.Map; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import org.apache.commons.jexl.JexlHelper; -import org.apache.commons.jexl.JexlContext; import org.apache.commons.jexl.Expression; import org.apache.commons.jexl.ExpressionFactory; +import org.apache.commons.jexl.JexlContext; +import org.apache.commons.jexl.JexlHelper; import org.apache.commons.jexl.resolver.FlatResolver; -import org.apache.commons.lang.NullArgumentException; - import org.apache.geronimo.gshell.command.Variables; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Parser to handle ${...} expressions using @@ -51,14 +48,12 @@ // This sub-parser is probably only short-term so we can get soemthing working // - private static final Log log = LogFactory.getLog(VariableExpressionParser.class); + private static final Logger log = LoggerFactory.getLogger(VariableExpressionParser.class); protected JexlContext context; public VariableExpressionParser(final Map vars) { - if (vars == null) { - throw new NullArgumentException("vars"); - } + assert vars != null; context = JexlHelper.createContext(); context.setVars(vars); @@ -69,9 +64,7 @@ } private static Map convertToMap(final Variables vars) { - if (vars == null) { - throw new NullArgumentException("vars"); - } + assert vars != null; Map map = new HashMap(); Iterator iter = vars.names(); @@ -97,33 +90,25 @@ } public Object getVariable(final Object name) { - if (name == null) { - throw new NullArgumentException("name"); - } + assert name != null; return getVariables().get(name); } public Object setVariable(final Object name, final Object value) { - if (name == null) { - throw new NullArgumentException("name"); - } + assert name != null; return getVariables().put(name, value); } public Object unsetVariable(final Object name) { - if (name == null) { - throw new NullArgumentException("name"); - } + assert name != null; return getVariables().remove(name); } public void addVariables(final Map map) { - if (map == null) { - throw new NullArgumentException("map"); - } + assert map != null; getVariables().putAll(map); } @@ -140,9 +125,7 @@ } public Object evaluate(final String expression) throws Exception { - if (expression == null) { - throw new NullArgumentException("expression"); - } + assert expression != null; boolean trace = log.isTraceEnabled(); if (trace) { @@ -159,9 +142,7 @@ } public String parse(final String input) throws SyntaxException { - if (input == null) { - throw new NullArgumentException("input"); - } + assert input != null; boolean trace = log.isTraceEnabled(); if (trace) { Copied: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/package-info.java (from r568844, geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/package.html) URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/package-info.java?p2=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/package-info.java&p1=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/package.html&r1=568844&r2=570606&rev=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/package.html (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/package-info.java Tue Aug 28 19:17:11 2007 @@ -1,32 +1,25 @@ - - - +/* + * 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. + */ - - - - - - - -Provides support for command-line interpretation. - - - \ No newline at end of file +/** + * Provides support for command-line interpretation. + * + * @version $Rev$ $Date$ + */ +package org.apache.geronimo.gshell.commandline; \ No newline at end of file Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/package-info.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/package-info.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/package-info.java ------------------------------------------------------------------------------ svn:mime-type = text/html Copied: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/parser/package-info.java (from r568844, geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/parser/package.html) URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/parser/package-info.java?p2=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/parser/package-info.java&p1=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/parser/package.html&r1=568844&r2=570606&rev=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/parser/package.html (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/parser/package-info.java Tue Aug 28 19:17:11 2007 @@ -1,32 +1,25 @@ - - - +/* + * 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. + */ - - - - - - - -Provides the parsing for command-lines. - - - \ No newline at end of file +/** + * Provides the parsing for command-lines. + * + * @version $Rev$ $Date$ + */ +package org.apache.geronimo.gshell.commandline.parser; \ No newline at end of file Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/parser/package-info.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/parser/package-info.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/parser/package-info.java ------------------------------------------------------------------------------ svn:mime-type = text/html Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/InteractiveConsole.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/InteractiveConsole.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/InteractiveConsole.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/InteractiveConsole.java Tue Aug 28 19:17:11 2007 @@ -19,9 +19,8 @@ package org.apache.geronimo.gshell.console; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.lang.NullArgumentException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Provides the framework to interactivly get input from a console @@ -36,7 +35,7 @@ // TODO: Rename to *Runner, since this is not really a Console impl // - private static final Log log = LogFactory.getLog(InteractiveConsole.class); + private static final Logger log = LoggerFactory.getLogger(InteractiveConsole.class); private final Console console; @@ -49,15 +48,9 @@ private boolean shutdownOnNull = true; public InteractiveConsole(final Console console, final Executor executor, final Prompter prompter) { - if (console == null) { - throw new NullArgumentException("console"); - } - if (executor == null) { - throw new NullArgumentException("executor"); - } - if (prompter == null) { - throw new NullArgumentException("prompter"); - } + assert console != null; + assert executor != null; + assert prompter != null; this.console = console; this.executor = executor; Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/JLineConsole.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/JLineConsole.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/JLineConsole.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/JLineConsole.java Tue Aug 28 19:17:11 2007 @@ -19,13 +19,12 @@ package org.apache.geronimo.gshell.console; -import jline.ConsoleReader; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.lang.NullArgumentException; - import java.io.IOException; +import jline.ConsoleReader; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * A console backed up by JLine. * @@ -34,29 +33,23 @@ public class JLineConsole implements Console { - private static final Log log = LogFactory.getLog(JLineConsole.class); + private static final Logger log = LoggerFactory.getLogger(JLineConsole.class); private final IO io; private final ConsoleReader reader; public JLineConsole(final IO io, final ConsoleReader reader) throws IOException { - if (io == null) { - throw new NullArgumentException("io"); - } - if (reader == null) { - throw new NullArgumentException("reader"); - } + assert io != null; + assert reader != null; this.io = io; this.reader = reader; } public JLineConsole(final IO io) throws IOException { - if (io == null) { - throw new NullArgumentException("io"); - } - + assert io != null; + this.io = io; this.reader = new ConsoleReader(io.inputStream, io.out); } Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/SimpleConsole.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/SimpleConsole.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/SimpleConsole.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/SimpleConsole.java Tue Aug 28 19:17:11 2007 @@ -19,13 +19,12 @@ package org.apache.geronimo.gshell.console; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.lang.NullArgumentException; - import java.io.BufferedReader; import java.io.IOException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * A simple console implementation using a buffered reader. * @@ -34,17 +33,15 @@ public class SimpleConsole implements Console { - private static final Log log = LogFactory.getLog(SimpleConsole.class); + private static final Logger log = LoggerFactory.getLogger(SimpleConsole.class); private final IO io; private final BufferedReader reader; public SimpleConsole(final IO io) { - if (io == null) { - throw new NullArgumentException("io"); - } - + assert io != null; + this.io = io; this.reader = new BufferedReader(io.in); } Copied: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/package-info.java (from r568844, geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/package.html) URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/package-info.java?p2=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/package-info.java&p1=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/package.html&r1=568844&r2=570606&rev=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/package.html (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/package-info.java Tue Aug 28 19:17:11 2007 @@ -1,32 +1,25 @@ - - - +/* + * 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. + */ - - - - - - - -Concreate console implemenations. - - - \ No newline at end of file +/** + * Concrete console implementations. + * + * @version $Rev$ $Date$ + */ +package org.apache.geronimo.gshell.console; \ No newline at end of file Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/package-info.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/package-info.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/package-info.java ------------------------------------------------------------------------------ svn:mime-type = text/html Copied: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/package-info.java (from r568844, geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/package.html) URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/package-info.java?p2=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/package-info.java&p1=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/package.html&r1=568844&r2=570606&rev=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/package.html (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/package-info.java Tue Aug 28 19:17:11 2007 @@ -1,32 +1,25 @@ - - - +/* + * 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. + */ - - - - - - - -GShell Core API. - - - \ No newline at end of file +/** + * GShell Core API. + * + * @version $Rev$ $Date$ + */ +package org.apache.geronimo.gshell; Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/package-info.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/package-info.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/package-info.java ------------------------------------------------------------------------------ svn:mime-type = text/html Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/ShellTest.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/ShellTest.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/ShellTest.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/ShellTest.java Tue Aug 28 19:17:11 2007 @@ -36,7 +36,7 @@ new Shell(null); fail("Accepted null value"); } - catch (IllegalArgumentException expected) { + catch (AssertionError expected) { // ignore } Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/command/VariablesImplTest.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/command/VariablesImplTest.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/command/VariablesImplTest.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/command/VariablesImplTest.java Tue Aug 28 19:17:11 2007 @@ -38,7 +38,7 @@ new VariablesImpl((Map)null); fail("Accepted a null value"); } - catch (IllegalArgumentException expected) { + catch (AssertionError expected) { // ignore } @@ -46,7 +46,7 @@ new VariablesImpl((Variables)null); fail("Accepted a null value"); } - catch (IllegalArgumentException expected) { + catch (AssertionError expected) { // ignore } @@ -54,7 +54,7 @@ new VariablesImpl(new HashMap(), null); fail("Accepted a null value"); } - catch (IllegalArgumentException expected) { + catch (AssertionError expected) { // ignore } Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/CommandLineBuilderTest.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/CommandLineBuilderTest.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/CommandLineBuilderTest.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/CommandLineBuilderTest.java Tue Aug 28 19:17:11 2007 @@ -35,7 +35,7 @@ new CommandLineBuilder(null); fail("Accepted null argument"); } - catch (IllegalArgumentException expected) { + catch (AssertionError expected) { // ignore } } Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/ExecutingVisitorTest.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/ExecutingVisitorTest.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/ExecutingVisitorTest.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/ExecutingVisitorTest.java Tue Aug 28 19:17:11 2007 @@ -36,7 +36,7 @@ new ExecutingVisitor(null); fail("Accepted null value"); } - catch (IllegalArgumentException expected) { + catch (AssertionError expected) { // ignore } Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/InteractiveConsoleTest.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/InteractiveConsoleTest.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/InteractiveConsoleTest.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/InteractiveConsoleTest.java Tue Aug 28 19:17:11 2007 @@ -34,7 +34,7 @@ new InteractiveConsole(null, null, null); fail("Accepted null value"); } - catch (IllegalArgumentException expected) { + catch (AssertionError expected) { // ignore } @@ -42,7 +42,7 @@ new InteractiveConsole(new SimpleConsole(new IO()), null, null); fail("Accepted null value"); } - catch (IllegalArgumentException expected) { + catch (AssertionError expected) { // ignore } Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/JLineConsoleTest.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/JLineConsoleTest.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/JLineConsoleTest.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/JLineConsoleTest.java Tue Aug 28 19:17:11 2007 @@ -34,7 +34,7 @@ new JLineConsole(null); fail("Accepted null value"); } - catch (IllegalArgumentException expected) { + catch (AssertionError expected) { // ignore } Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/SimpleConsoleTest.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/SimpleConsoleTest.java?rev=570606&r1=570605&r2=570606&view=diff ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/SimpleConsoleTest.java (original) +++ geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/SimpleConsoleTest.java Tue Aug 28 19:17:11 2007 @@ -34,7 +34,7 @@ new SimpleConsole(null); fail("Accepted null value"); } - catch (IllegalArgumentException expected) { + catch (AssertionError expected) { // ignore } Added: geronimo/sandbox/gshell/trunk/gshell-prefs/LICENSE.txt URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-prefs/LICENSE.txt?rev=570606&view=auto ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-prefs/LICENSE.txt (added) +++ geronimo/sandbox/gshell/trunk/gshell-prefs/LICENSE.txt Tue Aug 28 19:17:11 2007 @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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. + Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/LICENSE.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/LICENSE.txt ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/LICENSE.txt ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/sandbox/gshell/trunk/gshell-prefs/NOTICE.txt URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-prefs/NOTICE.txt?rev=570606&view=auto ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-prefs/NOTICE.txt (added) +++ geronimo/sandbox/gshell/trunk/gshell-prefs/NOTICE.txt Tue Aug 28 19:17:11 2007 @@ -0,0 +1,11 @@ +========================================================================= +== NOTICE file corresponding to section 4(d) of the Apache License, == +== Version 2.0, in this case for the Apache Geronimo distribution. == +========================================================================= + +Apache Geronimo +Copyright 2007 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/NOTICE.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/NOTICE.txt ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/NOTICE.txt ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/sandbox/gshell/trunk/gshell-prefs/pom.xml URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-prefs/pom.xml?rev=570606&view=auto ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-prefs/pom.xml (added) +++ geronimo/sandbox/gshell/trunk/gshell-prefs/pom.xml Tue Aug 28 19:17:11 2007 @@ -0,0 +1,48 @@ + + + + + + + + 4.0.0 + + + org.apache.geronimo.gshell + gshell + 1.0-alpha-1-SNAPSHOT + + + gshell-prefs + GShell Preferences + + + Annotation-based preferences support. + + + + + junit + junit + test + + + + \ No newline at end of file Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/pom.xml ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/pom.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/IllegalAnnotationError.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/IllegalAnnotationError.java?rev=570606&view=auto ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/IllegalAnnotationError.java (added) +++ geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/IllegalAnnotationError.java Tue Aug 28 19:17:11 2007 @@ -0,0 +1,43 @@ +/* + * 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.prefs; + +/** + * Thrown to indicate that while processing an illegal annotation definition was discovered. + * + * @version $Rev$ $Date$ + */ +public class IllegalAnnotationError + extends Error +{ + private static final long serialVersionUID = 1; + + public IllegalAnnotationError(String message) { + super(message); + } + + public IllegalAnnotationError(String message, Throwable cause) { + super(message, cause); + } + + public IllegalAnnotationError(Throwable cause) { + super(cause); + } +} \ No newline at end of file Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/IllegalAnnotationError.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/IllegalAnnotationError.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/IllegalAnnotationError.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/Preference.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/Preference.java?rev=570606&view=auto ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/Preference.java (added) +++ geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/Preference.java Tue Aug 28 19:17:11 2007 @@ -0,0 +1,37 @@ +/* + * 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.prefs; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Configures a field or method for preference processing. + * + * @version $Rev$ $Date$ + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD, ElementType.METHOD}) +public @interface Preference +{ + String key(); +} \ No newline at end of file Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/Preference.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/Preference.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/Preference.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferenceDescriptor.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferenceDescriptor.java?rev=570606&view=auto ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferenceDescriptor.java (added) +++ geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferenceDescriptor.java Tue Aug 28 19:17:11 2007 @@ -0,0 +1,44 @@ +/* + * 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.prefs; + +/** + * Container for preference descriptor. + * + * @version $Rev$ $Date$ + */ +public class PreferenceDescriptor +{ + private final String key; + + public PreferenceDescriptor(final Preference pref) { + this(pref.key()); + } + + protected PreferenceDescriptor(final String key) { + assert key != null; + + this.key = key; + } + + public String key() { + return key; + } +} \ No newline at end of file Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferenceDescriptor.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferenceDescriptor.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferenceDescriptor.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferencesProcessor.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferencesProcessor.java?rev=570606&view=auto ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferencesProcessor.java (added) +++ geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferencesProcessor.java Tue Aug 28 19:17:11 2007 @@ -0,0 +1,79 @@ +/* + * 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.prefs; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.prefs.Preferences; + +/** + * Processes an object for preference annotations. + * + * @version $Rev$ $Date$ + */ +public class PreferencesProcessor +{ + private final Object bean; + + public PreferencesProcessor(final Object bean) throws IllegalAnnotationError { + assert bean != null; + + this.bean = bean; + + discoverDescriptors(); + } + + public Object getBean() { + return bean; + } + + // + // Discovery + // + + private void discoverDescriptors() { + // Recursively process all the methods/fields. + for (Class type=bean.getClass(); type!=null; type=type.getSuperclass()) { + // Discover methods + for (Method method : type.getDeclaredMethods()) { + Preference pref = method.getAnnotation(Preference.class); + if (pref != null) { + // addOption(new MethodSetter(bean, method), option); + } + } + + // Discover fields + for (Field field : type.getDeclaredFields()) { + Preference pref = field.getAnnotation(Preference.class); + if (pref != null) { + // addOption(createFieldSetter(field), option); + } + } + } + } + + // + // Processing + // + + public void process(final Preferences node) throws ProcessingException { + assert node != null; + } +} \ No newline at end of file Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferencesProcessor.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferencesProcessor.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferencesProcessor.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/ProcessingException.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/ProcessingException.java?rev=570606&view=auto ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/ProcessingException.java (added) +++ geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/ProcessingException.java Tue Aug 28 19:17:11 2007 @@ -0,0 +1,43 @@ +/* + * 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.prefs; + +/** + * Thrown to indicate a problem processing preferences. + * + * @version $Rev$ $Date$ + */ +public class ProcessingException + extends Exception +{ + private static final long serialVersionUID = 1; + + public ProcessingException(String message) { + super(message); + } + + public ProcessingException(String message, Throwable cause) { + super(message, cause); + } + + public ProcessingException(Throwable cause) { + super(cause); + } +} \ No newline at end of file Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/ProcessingException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/ProcessingException.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/ProcessingException.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/package-info.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/package-info.java?rev=570606&view=auto ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/package-info.java (added) +++ geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/package-info.java Tue Aug 28 19:17:11 2007 @@ -0,0 +1,25 @@ +/* + * 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. + */ + +/** + * Annotation-based preference processing support. + * + * @version $Rev$ $Date$ + */ +package org.apache.geronimo.gshell.prefs; Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/package-info.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/package-info.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/package-info.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/sandbox/gshell/trunk/gshell-prefs/src/test/java/org/apache/geronimo/gshell/prefs/PreferencesProcessorTest.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-prefs/src/test/java/org/apache/geronimo/gshell/prefs/PreferencesProcessorTest.java?rev=570606&view=auto ============================================================================== --- geronimo/sandbox/gshell/trunk/gshell-prefs/src/test/java/org/apache/geronimo/gshell/prefs/PreferencesProcessorTest.java (added) +++ geronimo/sandbox/gshell/trunk/gshell-prefs/src/test/java/org/apache/geronimo/gshell/prefs/PreferencesProcessorTest.java Tue Aug 28 19:17:11 2007 @@ -0,0 +1,69 @@ +/* + * 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.prefs; + +import java.util.prefs.Preferences; + +import junit.framework.TestCase; + +/** + * Tests for the {@link PreferencesProcessor} class. + * + * @version $Rev$ $Date$ + */ +public class PreferencesProcessorTest + extends TestCase +{ + TestBean bean; + + PreferencesProcessor pp; + + Preferences node; + + protected void setUp() throws Exception { + bean = new TestBean(); + pp = new PreferencesProcessor(bean); + + // + // TODO: Use a mock prefs node + // + node = Preferences.userNodeForPackage(getClass()); + } + + protected void tearDown() throws Exception { + bean = null; + pp = null; + node = null; + } + + public void test1() throws Exception { + pp.process(node); + + // + // TODO: + // + } + + private static class TestBean + { + @Preference(key="s") + String s; + } +} \ No newline at end of file