KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > notification > NotifyingCascadingRuntimeException


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.components.notification;
17
18 import org.apache.avalon.framework.CascadingRuntimeException;
19
20 import java.util.Map JavaDoc;
21
22 /**
23  * A CascadingRuntimeException that is also Notifying.
24  *
25  * @author <a HREF="mailto:barozzi@nicolaken.com">Nicola Ken Barozzi</a>
26  * @version CVS $Id: NotifyingCascadingRuntimeException.java 30932 2004-07-29 17:35:38Z vgritsenko $
27  */

28 public class NotifyingCascadingRuntimeException
29   extends CascadingRuntimeException
30     implements Notifying{
31
32   /**
33    * The Notifying Object used internally to keep Notifying fields
34    */

35   Notifying n;
36
37   /**
38    * Construct a new <code>NotifyingCascadingRuntimeException</code> instance.
39    */

40   public NotifyingCascadingRuntimeException(String JavaDoc message) {
41     super(message, null);
42     n = new DefaultNotifyingBuilder().build(this, message);
43   }
44
45   /**
46    * Creates a new <code>ProcessingException</code> instance.
47    *
48    * @param ex an <code>Exception</code> value
49    */

50   public NotifyingCascadingRuntimeException(Exception JavaDoc ex) {
51     super(ex.getMessage(), ex);
52     n = new DefaultNotifyingBuilder().build(this, ex);
53   }
54
55   /**
56    * Construct a new <code>ProcessingException</code> that references
57    * a parent Exception.
58    */

59   public NotifyingCascadingRuntimeException(String JavaDoc message, Throwable JavaDoc t) {
60     super(message, t);
61     n = new DefaultNotifyingBuilder().build(this, t);
62   }
63
64   /**
65    * Gets the Type attribute of the Notifying object
66    */

67   public String JavaDoc getType() {
68     return n.getType();
69   }
70
71   /**
72    * Gets the Title attribute of the Notifying object
73    */

74   public String JavaDoc getTitle() {
75     return n.getTitle();
76   }
77
78   /**
79    * Gets the Source attribute of the Notifying object
80    */

81   public String JavaDoc getSource() {
82     return n.getSource();
83   }
84
85   /**
86    * Gets the Sender attribute of the Notifying object
87    */

88   public String JavaDoc getSender() {
89     return n.getSender();
90   }
91
92   /**
93    * Gets the Message attribute of the Notifying object
94    */

95   public String JavaDoc getMessage() {
96     return n.getMessage();
97   }
98
99   /**
100    * Gets the Description attribute of the Notifying object
101    */

102   public String JavaDoc getDescription() {
103     return n.getDescription();
104   }
105
106   /**
107    * Gets the ExtraDescriptions attribute of the Notifying object
108    */

109   public Map JavaDoc getExtraDescriptions() {
110     return n.getExtraDescriptions();
111   }
112
113 }
114
115
Popular Tags