Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Template |
|
| 1.0;1 |
1 | /* | |
2 | * $Id$ | |
3 | */ | |
4 | ||
5 | package com.javaforge.bobber.archetype.model; | |
6 | ||
7 | //---------------------------------/ | |
8 | //- Imported classes and packages -/ | |
9 | //---------------------------------/ | |
10 | ||
11 | import java.util.Date; | |
12 | ||
13 | /** | |
14 | * | |
15 | * Represents a template in the archetype to be | |
16 | * processed | |
17 | * . | |
18 | * | |
19 | * @version $Revision$ $Date$ | |
20 | */ | |
21 | 0 | public class Template implements java.io.Serializable { |
22 | ||
23 | ||
24 | //--------------------------/ | |
25 | //- Class/Member Variables -/ | |
26 | //--------------------------/ | |
27 | ||
28 | /** | |
29 | * Field file. | |
30 | */ | |
31 | private String file; | |
32 | ||
33 | /** | |
34 | * Field output. | |
35 | */ | |
36 | private String output; | |
37 | ||
38 | /** | |
39 | * If the specified variable is true, the template will be | |
40 | * processed, otherwise skipped. | |
41 | */ | |
42 | private String dependsOnVar; | |
43 | ||
44 | ||
45 | //-----------/ | |
46 | //- Methods -/ | |
47 | //-----------/ | |
48 | ||
49 | /** | |
50 | * Get if the specified variable is true, the template will be | |
51 | * processed, otherwise skipped. | |
52 | * | |
53 | * @return String | |
54 | */ | |
55 | public String getDependsOnVar() | |
56 | { | |
57 | 0 | return this.dependsOnVar; |
58 | } //-- String getDependsOnVar() | |
59 | ||
60 | /** | |
61 | * Get the file field. | |
62 | * | |
63 | * @return String | |
64 | */ | |
65 | public String getFile() | |
66 | { | |
67 | 0 | return this.file; |
68 | } //-- String getFile() | |
69 | ||
70 | /** | |
71 | * Get the output field. | |
72 | * | |
73 | * @return String | |
74 | */ | |
75 | public String getOutput() | |
76 | { | |
77 | 0 | return this.output; |
78 | } //-- String getOutput() | |
79 | ||
80 | /** | |
81 | * Set if the specified variable is true, the template will be | |
82 | * processed, otherwise skipped. | |
83 | * | |
84 | * @param dependsOnVar | |
85 | */ | |
86 | public void setDependsOnVar(String dependsOnVar) | |
87 | { | |
88 | 0 | this.dependsOnVar = dependsOnVar; |
89 | 0 | } //-- void setDependsOnVar(String) |
90 | ||
91 | /** | |
92 | * Set the file field. | |
93 | * | |
94 | * @param file | |
95 | */ | |
96 | public void setFile(String file) | |
97 | { | |
98 | 0 | this.file = file; |
99 | 0 | } //-- void setFile(String) |
100 | ||
101 | /** | |
102 | * Set the output field. | |
103 | * | |
104 | * @param output | |
105 | */ | |
106 | public void setOutput(String output) | |
107 | { | |
108 | 0 | this.output = output; |
109 | 0 | } //-- void setOutput(String) |
110 | ||
111 | ||
112 | 0 | private String modelEncoding = "UTF-8"; |
113 | ||
114 | /** | |
115 | * Set an encoding used for reading/writing the model. | |
116 | * | |
117 | * @param modelEncoding the encoding used when reading/writing the model. | |
118 | */ | |
119 | public void setModelEncoding( String modelEncoding ) | |
120 | { | |
121 | 0 | this.modelEncoding = modelEncoding; |
122 | 0 | } |
123 | ||
124 | /** | |
125 | * @return the current encoding used when reading/writing this model. | |
126 | */ | |
127 | public String getModelEncoding() | |
128 | { | |
129 | 0 | return modelEncoding; |
130 | } | |
131 | } |