You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2007/10/05 10:43:38 UTC

svn commit: r582129 - in /geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry: CommandRegistry.java DuplicateRegistrationException.java NotRegisteredException.java RegistryException.java

Author: jdillon
Date: Fri Oct  5 01:43:37 2007
New Revision: 582129

URL: http://svn.apache.org/viewvc?rev=582129&view=rev
Log:
Add some exceptions

Added:
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/DuplicateRegistrationException.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/NotRegisteredException.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/RegistryException.java
      - copied, changed from r582051, geronimo/sandbox/gshell/trunk/gshell-command-api/src/main/java/org/apache/geronimo/gshell/command/CommandException.java
Modified:
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/CommandRegistry.java

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/CommandRegistry.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/CommandRegistry.java?rev=582129&r1=582128&r2=582129&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/CommandRegistry.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/CommandRegistry.java Fri Oct  5 01:43:37 2007
@@ -19,11 +19,10 @@
 
 package org.apache.geronimo.gshell.registry;
 
-import org.apache.geronimo.gshell.command.Command;
-import org.apache.geronimo.gshell.command.descriptor.CommandDescriptor;
-
 import java.util.Collection;
 
+import org.apache.geronimo.gshell.command.Command;
+
 /**
  * ???
  *
@@ -31,11 +30,11 @@
  */
 public interface CommandRegistry
 {
-    void register(Command command);
+    void register(Command command) throws DuplicateRegistrationException;
+
+    void unregister(Command command) throws NotRegisteredException;
 
-    void unregister(Command command);
+    Command lookup(String id) throws NotRegisteredException;
 
     Collection<Command> commands();
-    
-    Command lookup(String id);
 }

Added: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/DuplicateRegistrationException.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/DuplicateRegistrationException.java?rev=582129&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/DuplicateRegistrationException.java (added)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/DuplicateRegistrationException.java Fri Oct  5 01:43:37 2007
@@ -0,0 +1,35 @@
+/*
+ * 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.registry;
+
+/**
+ * ???
+ *
+ * @version $Rev$ $Date$
+ */
+public class DuplicateRegistrationException
+    extends RegistryException
+{
+    ///CLOVER:OFF
+
+    public DuplicateRegistrationException(final String msg) {
+        super(msg);
+    }
+}
\ No newline at end of file

Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/DuplicateRegistrationException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/DuplicateRegistrationException.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/DuplicateRegistrationException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/NotRegisteredException.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/NotRegisteredException.java?rev=582129&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/NotRegisteredException.java (added)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/NotRegisteredException.java Fri Oct  5 01:43:37 2007
@@ -0,0 +1,35 @@
+/*
+ * 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.registry;
+
+/**
+ * ???
+ *
+ * @version $Rev$ $Date$
+ */
+public class NotRegisteredException
+    extends RegistryException
+{
+    ///CLOVER:OFF
+
+    public NotRegisteredException(final String msg) {
+        super(msg);
+    }
+}
\ No newline at end of file

Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/NotRegisteredException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/NotRegisteredException.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/NotRegisteredException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/RegistryException.java (from r582051, geronimo/sandbox/gshell/trunk/gshell-command-api/src/main/java/org/apache/geronimo/gshell/command/CommandException.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/RegistryException.java?p2=geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/RegistryException.java&p1=geronimo/sandbox/gshell/trunk/gshell-command-api/src/main/java/org/apache/geronimo/gshell/command/CommandException.java&r1=582051&r2=582129&rev=582129&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-command-api/src/main/java/org/apache/geronimo/gshell/command/CommandException.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/RegistryException.java Fri Oct  5 01:43:37 2007
@@ -17,31 +17,31 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.command;
+package org.apache.geronimo.gshell.registry;
 
 /**
- * A command exception.
+ * ???
  *
  * @version $Rev$ $Date$
  */
-public class CommandException
+public class RegistryException
     extends Exception
 {
     ///CLOVER:OFF
-    
-    public CommandException(final String msg) {
+
+    public RegistryException(final String msg) {
         super(msg);
     }
 
-    public CommandException(final String msg, final Throwable cause) {
+    public RegistryException(final String msg, final Throwable cause) {
         super(msg, cause);
     }
 
-    public CommandException(final Throwable cause) {
+    public RegistryException(final Throwable cause) {
         super(cause);
     }
 
-    public CommandException() {
+    public RegistryException() {
         super();
     }
 }