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.config.transfer.templatestream;
17  
18  import java.io.File;
19  
20  import de.smartics.exceptions.i18n.message.MessageParam;
21  import de.smartics.properties.api.config.domain.ConfigurationMessageBean;
22  import de.smartics.properties.spi.config.transfer.TransferMessageBean;
23  
24  /**
25   * Signals that the transfer cannot be run to the specified stream.
26   */
27  public class CannotWriteToStreamTransferMessageBean extends
28      ConfigurationMessageBean implements TransferMessageBean
29  {
30    // ********************************* Fields *********************************
31  
32    // --- constants ------------------------------------------------------------
33  
34    /**
35     * The class version identifier.
36     */
37    private static final long serialVersionUID = 1L;
38  
39    // --- members --------------------------------------------------------------
40  
41    /**
42     * The file to which writing failed.
43     *
44     * @serial
45     */
46    @MessageParam(":absolutePath")
47    private final File file; // NOPMD
48  
49    // ****************************** Initializer *******************************
50  
51    // ****************************** Constructors ******************************
52  
53    /**
54     * Default constructor.
55     *
56     * @param cause the cause to the problem.
57     * @param file the file to which writing failed.
58     */
59    public CannotWriteToStreamTransferMessageBean(final Throwable cause,
60        final File file)
61    {
62      super(TransferStreamCode.CANNOT_WRITE_TO_STREAM, cause, null);
63      this.file = file;
64    }
65  
66    // ****************************** Inner Classes *****************************
67  
68    // ********************************* Methods ********************************
69  
70    // --- init -----------------------------------------------------------------
71  
72    // --- factory --------------------------------------------------------------
73  
74    // --- get&set --------------------------------------------------------------
75  
76    // --- business -------------------------------------------------------------
77  
78    // --- object basics --------------------------------------------------------
79  
80  }