/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. */
  17. package mpv5.utils.export;
  18. import java.io.File;
  19. import java.util.HashMap;
  20. import mpv5.db.objects.Template;
  21. /**
  22. *This class specifies export specific methods
  23. */
  24. public abstract class Exportable extends File implements Runnable {
  25. private File target;
  26. private HashMap<String, Object> data;
  27. private Template template;
  28. public Exportable(String pathToFile) {
  29. super(pathToFile);
  30. }
  31. /**
  32. * Define the target file
  33. * @param target
  34. */
  35. public void setTarget(File target) {
  36. this.target = target;
  37. }
  38. /**
  39. * @return the target
  40. */
  41. public File getTarget() {
  42. return target;
  43. }
  44. /**
  45. *
  46. * @param data
  47. */
  48. public void setData(final HashMap<String, Object> data) {
  49. this.data = data;
  50. }
  51. /**
  52. * @return the data
  53. */
  54. public HashMap<String, Object> getData() {
  55. return data;
  56. }
  57. /**
  58. *
  59. * @param t
  60. */
  61. public void setTemplate(Template t) {
  62. template = t;
  63. }
  64. /**
  65. * @return the template
  66. */
  67. public Template getTemplate() {
  68. return template;
  69. }
  70. }