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.spi.config.ds;
17  
18  import de.smartics.exceptions.i18n.message.MessageParam;
19  
20  /**
21   * Provides context information for problems accessing a data source to fetch
22   * properties for a given configuration.
23   */
24  public class DataSourceConfigurationMessageBean extends DataSourceMessageBean
25  {
26    // ********************************* Fields *********************************
27  
28    // --- constants ------------------------------------------------------------
29  
30    /**
31     * The class version identifier.
32     * <p>
33     * The value of this constant is {@value}.
34     * </p>
35     */
36    private static final long serialVersionUID = 1L;
37  
38    // --- members --------------------------------------------------------------
39  
40    /**
41     * The the key that identifies the configuration.
42     *
43     * @serial
44     */
45    @MessageParam
46    private final String config; // NOPMD
47  
48    // ****************************** Initializer *******************************
49  
50    // ****************************** Constructors ******************************
51  
52    /**
53     * Constructor without cause.
54     *
55     * @param code the error or exception code of the exception.
56     * @param dataSourceId the identifier of the data source.
57     * @param config the the key that identifies the configuration.
58     */
59    public DataSourceConfigurationMessageBean(final DataSourceCode code,
60        final String dataSourceId, final String config)
61    {
62      this(code, null, dataSourceId, config);
63    }
64  
65    /**
66     * Default constructor.
67     *
68     * @param code the error or exception code of the exception.
69     * @param cause the cause to the problem.
70     * @param dataSourceId the identifier of the data source.
71     * @param config the the key that identifies the configuration.
72     */
73    public DataSourceConfigurationMessageBean(final DataSourceCode code,
74        final Throwable cause, final String dataSourceId, final String config)
75    {
76      super(code, cause, dataSourceId);
77      this.config = config;
78    }
79    // ****************************** Inner Classes *****************************
80  
81    // ********************************* Methods ********************************
82  
83    // --- init -----------------------------------------------------------------
84  
85    // --- factory --------------------------------------------------------------
86  
87    // --- get&set --------------------------------------------------------------
88  
89    // --- business -------------------------------------------------------------
90  
91    // --- object basics --------------------------------------------------------
92  
93  }