buildframework/helium/sf/java/core/src/com/nokia/helium/core/TemplateProcessor.java
equal
deleted
inserted
replaced
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 package com.nokia.helium.core; |
18 package com.nokia.helium.core; |
19 |
19 |
|
20 import java.io.File; |
|
21 import java.io.FileWriter; |
|
22 import java.util.HashMap; |
|
23 import java.util.List; |
|
24 import java.util.Map; |
|
25 |
|
26 import org.apache.log4j.Logger; |
|
27 |
|
28 import freemarker.template.Configuration; |
20 import freemarker.template.Template; |
29 import freemarker.template.Template; |
21 import freemarker.template.Configuration; |
|
22 |
|
23 import java.io.FileWriter; |
|
24 import java.io.File; |
|
25 import java.util.List; |
|
26 import java.util.HashMap; |
|
27 import java.util.Map; |
|
28 import org.apache.log4j.Logger; |
|
29 |
30 |
30 /** |
31 /** |
31 * Template processor. |
32 * Template processor. |
32 * |
33 * |
33 */ |
34 */ |
59 } |
60 } |
60 } else if (source instanceof PropertiesSource) { |
61 } else if (source instanceof PropertiesSource) { |
61 PropertiesSource propSource = (PropertiesSource) source; |
62 PropertiesSource propSource = (PropertiesSource) source; |
62 templateMap.put(propSource.getSourceName(), propSource |
63 templateMap.put(propSource.getSourceName(), propSource |
63 .getProperties()); |
64 .getProperties()); |
64 } else if (source instanceof PPInputSource) { |
|
65 PPInputSource ppSource = (PPInputSource) source; |
|
66 templateMap.put(ppSource.getSourceName(), ppSource |
|
67 .getPPHash()); |
|
68 } |
65 } |
69 } |
66 } |
70 } catch (java.io.IOException e) { |
67 } catch (java.io.IOException e) { |
71 throw new TemplateProcessorException( |
68 throw new TemplateProcessorException( |
72 "I/O Error during template conversion: " + e.getMessage()); |
69 "I/O Error during template conversion: " + e.getMessage()); |