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 2008/10/06 06:55:55 UTC
svn commit: r701944 - in
/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification:
FailureNotification.java SuccessNotification.java
Author: jdillon
Date: Sun Oct 5 21:55:55 2008
New Revision: 701944
URL: http://svn.apache.org/viewvc?rev=701944&view=rev
Log:
Add some new notifications to help return normal values as Result.SUCCESS and Result.FAILURE from nested code
Added:
geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/FailureNotification.java (contents, props changed)
- copied, changed from r701826, geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ErrorNotification.java
geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/SuccessNotification.java (with props)
Copied: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/FailureNotification.java (from r701826, geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ErrorNotification.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/FailureNotification.java?p2=geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/FailureNotification.java&p1=geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ErrorNotification.java&r1=701826&r2=701944&rev=701944&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/ErrorNotification.java (original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/FailureNotification.java Sun Oct 5 21:55:55 2008
@@ -19,29 +19,34 @@
package org.apache.geronimo.gshell.notification;
+import org.apache.geronimo.gshell.command.CommandAction.Result;
+
/**
- * Thrown to indicate an error notification state.
+ * Thrown to indicate a command failure state.
+ *
+ * Use of this notification won't cause an error to be propagated
+ * only some details logged and the {@link Result#FAILURE} returned.
*
* @version $Rev$ $Date$
*/
-public final class ErrorNotification
+public final class FailureNotification
extends Notification
{
private static final long serialVersionUID = 1;
- public ErrorNotification(final String msg) {
+ public FailureNotification(final String msg) {
super(msg);
}
- public ErrorNotification(final String msg, final Throwable cause) {
+ public FailureNotification(final String msg, final Throwable cause) {
super(msg, cause);
}
- public ErrorNotification(final Throwable cause) {
+ public FailureNotification(final Throwable cause) {
super(cause);
}
- public ErrorNotification() {
+ public FailureNotification() {
super();
}
-}
+}
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/FailureNotification.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/FailureNotification.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/FailureNotification.java
------------------------------------------------------------------------------
svn:mergeinfo =
Propchange: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/FailureNotification.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/SuccessNotification.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/SuccessNotification.java?rev=701944&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/SuccessNotification.java (added)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/SuccessNotification.java Sun Oct 5 21:55:55 2008
@@ -0,0 +1,52 @@
+/*
+ * 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.notification;
+
+import org.apache.geronimo.gshell.command.CommandAction.Result;
+
+/**
+ * Thrown to indicate a command success state.
+ *
+ * Use of this notification won't cause an error to be propagated
+ * only some details logged and the {@link Result#SUCCESS} returned.
+ *
+ * @version $Rev$ $Date$
+ */
+public final class SuccessNotification
+ extends Notification
+{
+ private static final long serialVersionUID = 1;
+
+ public SuccessNotification(final String msg) {
+ super(msg);
+ }
+
+ public SuccessNotification(final String msg, final Throwable cause) {
+ super(msg, cause);
+ }
+
+ public SuccessNotification(final Throwable cause) {
+ super(cause);
+ }
+
+ public SuccessNotification() {
+ super();
+ }
+}
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/SuccessNotification.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/SuccessNotification.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/notification/SuccessNotification.java
------------------------------------------------------------------------------
svn:mime-type = text/plain