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.config.domain;
17  
18  import de.smartics.properties.api.config.domain.key.ConfigurationKey;
19  
20  /**
21   * Signals that a configuration with the given key cannot be found.
22   */
23  public class MissingConfigurationException extends ConfigurationException
24  {
25    // ********************************* Fields *********************************
26  
27    // --- constants ------------------------------------------------------------
28  
29    /**
30     * The class version identifier.
31     * <p>
32     * The value of this constant is {@value}.
33     * </p>
34     */
35    private static final long serialVersionUID = 1L;
36  
37    // --- members --------------------------------------------------------------
38  
39    // ****************************** Initializer *******************************
40  
41    // ****************************** Constructors ******************************
42  
43    /**
44     * Convenience constructor without root cause.
45     *
46     * @param key the key to the configuration that signaled problems.
47     */
48    public MissingConfigurationException(final ConfigurationKey<?> key)
49    {
50      this(null, key);
51    }
52  
53    /**
54     * Default Constructor.
55     *
56     * @param cause the cause (which is saved for later retrieval by the
57     *          {@link #getCause()} method). (A <tt>null</tt> value is permitted,
58     *          and indicates that the cause is nonexistent or unknown.)
59     * @param key the key to the configuration that signaled problems.
60     */
61    public MissingConfigurationException(final Throwable cause,
62        final ConfigurationKey<?> key)
63    {
64      super(ConfigurationCode.MISSING_CONFIGURATION, cause, key);
65    }
66  
67    // ****************************** Inner Classes *****************************
68  
69    // ********************************* Methods ********************************
70  
71    // --- init -----------------------------------------------------------------
72  
73    // --- get&set --------------------------------------------------------------
74  
75    // --- business -------------------------------------------------------------
76  
77    // --- object basics --------------------------------------------------------
78  
79  }