PageRenderTime 122ms CodeModel.GetById 60ms app.highlight 4ms RepoModel.GetById 56ms app.codeStats 0ms

/src/mpv5/utils/export/Exportable.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Java | 81 lines | 30 code | 11 blank | 40 comment | 0 complexity | d18b917c6291861918ebc6cf3432dd99 MD5 | raw file
 1/*
 2 *  This file is part of YaBS.
 3 *
 4 *      YaBS is free software: you can redistribute it and/or modify
 5 *      it under the terms of the GNU General Public License as published by
 6 *      the Free Software Foundation, either version 3 of the License, or
 7 *      (at your option) any later version.
 8 *
 9 *      YaBS is distributed in the hope that it will be useful,
10 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
11 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 *      GNU General Public License for more details.
13 *
14 *      You should have received a copy of the GNU General Public License
15 *      along with YaBS.  If not, see <http://www.gnu.org/licenses/>.
16 */
17package mpv5.utils.export;
18
19import java.io.File;
20import java.util.HashMap;
21import mpv5.db.objects.Template;
22
23/**
24 *This class specifies export specific methods
25 */
26public abstract class Exportable extends File implements Runnable {
27
28    private File target;
29    private HashMap<String, Object> data;
30    private Template template;
31
32    public Exportable(String pathToFile) {
33        super(pathToFile);
34    }
35
36    /**
37     * Define the target file
38     * @param target
39     */
40    public void setTarget(File target) {
41        this.target = target;
42    }
43
44    /**
45     * @return the target
46     */
47    public File getTarget() {
48        return target;
49    }
50
51    /**
52     * 
53     * @param data
54     */
55    public void setData(final HashMap<String, Object> data) {
56        this.data = data;
57    }
58
59    /**
60     * @return the data
61     */
62    public HashMap<String, Object> getData() {
63        return data;
64    }
65
66    /**
67     *
68     * @param t
69     */
70    public void setTemplate(Template t) {
71        template = t;
72    }
73
74    /**
75     * @return the template
76     */
77    public Template getTemplate() {
78        return template;
79    }
80}
81