1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.springframework.extensions.webscripts;
20
21
22
23
24
25
26
27 public class TemplateProcessorRegistrar
28 {
29 private TemplateProcessorRegistry templateProcessorRegistry;
30 private TemplateProcessor templateProcessor;
31 private String name;
32 private String extension;
33
34 public void setTemplateProcessorRegistry(TemplateProcessorRegistry templateProcessorRegistry)
35 {
36 this.templateProcessorRegistry = templateProcessorRegistry;
37 }
38
39 public void setTemplateProcessor(TemplateProcessor templateProcessor)
40 {
41 this.templateProcessor = templateProcessor;
42 }
43
44 public void setName(String name)
45 {
46 this.name = name;
47 }
48
49 public void setExtension(String extension)
50 {
51 this.extension = extension;
52 }
53
54 public void init()
55 {
56 if (this.templateProcessorRegistry != null && this.templateProcessor != null)
57 {
58 this.templateProcessorRegistry.registerTemplateProcessor(this.templateProcessor, this.extension, this.name);
59 }
60 }
61 }