View Javadoc

1   /*
2    * Copyright 2012-2013 smartics, Kronseder & Reiner GmbH
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 de.smartics.properties.api.core.app;
17  
18  import de.smartics.exceptions.i18n.AbstractMessageRuntimeException;
19  import de.smartics.exceptions.i18n.MessageBean;
20  import de.smartics.exceptions.i18n.message.ParentMessageParam;
21  
22  /**
23   * Base exception of the library for signaling an unspecific cause.
24   */
25  @ParentMessageParam("cause=causeMessage:message")
26  public class PropertyRootException extends AbstractMessageRuntimeException
27  {
28    // ********************************* Fields *********************************
29  
30    // --- constants ------------------------------------------------------------
31  
32    /**
33     * The class version identifier.
34     * <p>
35     * The value of this constant is {@value}.
36     * </p>
37     */
38    private static final long serialVersionUID = 1L;
39  
40    // --- members --------------------------------------------------------------
41  
42    // ****************************** Initializer *******************************
43  
44    // ****************************** Constructors ******************************
45  
46    /**
47     * Constructor with error code and no cause for exceptions that do no provide
48     * its context as a message bean.
49     *
50     * @param code the error or exception code of the exception.
51     */
52    public PropertyRootException(final PropertiesCode code)
53    {
54      super(code);
55    }
56  
57    /**
58     * Constructor with cause and code for exceptions that do no provide its
59     * context as a message bean.
60     *
61     * @param cause the cause (which is saved for later retrieval by the
62     *          {@link #getCause()} method). (A <tt>null</tt> value is permitted,
63     *          and indicates that the cause is nonexistent or unknown.)
64     * @param code the error or exception code of the exception.
65     */
66    public PropertyRootException(final Throwable cause, final PropertiesCode code)
67    {
68      super(cause, code);
69    }
70  
71    /**
72     * Default constructor.
73     *
74     * @param messageBean the message information for the exception.
75     */
76    public PropertyRootException(final MessageBean messageBean)
77    {
78      super(messageBean);
79    }
80  
81    // ****************************** Inner Classes *****************************
82  
83    // ********************************* Methods ********************************
84  
85    // --- init -----------------------------------------------------------------
86  
87    // --- get&set --------------------------------------------------------------
88  
89    // --- business -------------------------------------------------------------
90  
91    // --- object basics --------------------------------------------------------
92  
93  }