View Javadoc

1   /*
2    * Copyright 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.resource.filesystem.heap;
17  
18  import java.io.File;
19  
20  import de.smartics.exceptions.i18n.message.MessageParam;
21  import de.smartics.properties.api.core.app.AbstractBaseMessageBean;
22  
23  /**
24   * Provides context information for transfer problems.
25   */
26  public class FileMessageBean extends AbstractBaseMessageBean
27  {
28    // ********************************* Fields *********************************
29  
30    // --- constants ------------------------------------------------------------
31  
32    /**
33     * The class version identifier.
34     */
35    private static final long serialVersionUID = 1L;
36  
37    // --- members --------------------------------------------------------------
38  
39    /**
40     * The name of the file that is the cause of the problem.
41     *
42     * @serial
43     */
44    @MessageParam(":absolutePath")
45    private final File archiveFile; // NOPMD
46  
47    // ****************************** Initializer *******************************
48  
49    // ****************************** Constructors ******************************
50  
51    /**
52     * Constructor without cause.
53     *
54     * @param code the error or exception code of the exception.
55     * @param archiveFile the key to the configuration that signaled problems.
56     */
57    public FileMessageBean(final FileSystemResourceCode code,
58        final File archiveFile)
59    {
60      this(code, null, archiveFile);
61    }
62  
63    /**
64     * Default constructor.
65     *
66     * @param code the error or exception code of the exception.
67     * @param cause the cause to the problem.
68     * @param archiveFile the key to the configuration that signaled problems.
69     */
70    public FileMessageBean(final FileSystemResourceCode code,
71        final Throwable cause, final File archiveFile)
72    {
73      super(code, cause);
74      this.archiveFile = archiveFile;
75    }
76  
77    // ****************************** Inner Classes *****************************
78  
79    // ********************************* Methods ********************************
80  
81    // --- init -----------------------------------------------------------------
82  
83    // --- factory --------------------------------------------------------------
84  
85    // --- get&set --------------------------------------------------------------
86  
87    // --- business -------------------------------------------------------------
88  
89    // --- object basics --------------------------------------------------------
90  
91  }