1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package com.macvu.tiles;
20
21 import org.apache.struts.tiles.ComponentDefinition;
22 import com.macvu.tiles.xmlDefinition.XmlCacheDefinition;
23
24 public class CacheComponentDefinition extends ComponentDefinition {
25 CacheInformation cacheInformation;
26 protected String inherit;
27
28
29
30
31
32
33 protected String processType;
34
35 public CacheComponentDefinition() {
36 super();
37 }
38
39 public CacheComponentDefinition(XmlCacheDefinition xmlCacheDefinition) {
40 super(xmlCacheDefinition);
41 cacheInformation = new CacheInformation(xmlCacheDefinition.getCacheInformation());
42 cacheInformation.setParent(this);
43 inherit = xmlCacheDefinition.getExtends();
44 }
45
46 public String getProcessType() {
47 return processType;
48 }
49
50 public void setProcessType(String processType) {
51 this.processType = processType;
52 }
53
54 public CacheInformation getCacheInformation() {
55 return cacheInformation;
56 }
57
58 public void setCacheInformation(CacheInformation cacheInformation) {
59 this.cacheInformation = cacheInformation;
60 cacheInformation.setParent(this);
61 }
62
63 /***
64 * Set extends.
65 *
66 * @param name Name of the extended definition.
67 */
68 public void setExtends(String name) {
69 inherit = name;
70 }
71
72 /***
73 * Get extends.
74 *
75 * @return Name of the extended definition.
76 */
77 public String getExtends() {
78 return inherit;
79 }
80
81 /***
82 * Get extends flag.
83 */
84 public boolean isExtending() {
85 return inherit != null;
86 }
87
88 public String toString() {
89 return "{name=" + name +
90 ", path=" + path +
91 ", role=" + role +
92 ", controller=" + controller +
93 ", controllerType=" + controllerType +
94 ", controllerInstance=" + getControllerInstance() +
95 ", attributes=" + attributes +
96 ", cacheAttributes=" + cacheInformation + "}\n";
97 }
98 }