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.resource.maven.repository;
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 final 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 file that is the cause of the problem.
41     *
42     * @serial
43     */
44    @MessageParam(":absolutePath")
45    private final File file; // 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 file the key to the configuration that signaled problems.
56     */
57    public FileMessageBean(final MavenResourceCode code, final File file)
58    {
59      this(code, null, file);
60    }
61  
62    /**
63     * Default constructor.
64     *
65     * @param code the error or exception code of the exception.
66     * @param cause the cause to the problem.
67     * @param file the key to the configuration that signaled problems.
68     */
69    public FileMessageBean(final MavenResourceCode code, final Throwable cause,
70        final File file)
71    {
72      super(code, cause);
73      this.file = file;
74    }
75  
76    // ****************************** Inner Classes *****************************
77  
78    // ********************************* Methods ********************************
79  
80    // --- init -----------------------------------------------------------------
81  
82    // --- factory --------------------------------------------------------------
83  
84    // --- get&set --------------------------------------------------------------
85  
86    // --- business -------------------------------------------------------------
87  
88    // --- object basics --------------------------------------------------------
89  
90  }