1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.struts.config;
22
23 import org.apache.struts.Globals;
24
25
26
27
28
29
30
31
32
33
34 public class MessageResourcesConfig extends BaseConfig {
35
36
37
38
39
40
41 protected String factory =
42 "org.apache.struts.util.PropertyMessageResourcesFactory";
43
44
45
46
47
48 protected String key = Globals.MESSAGES_KEY;
49
50
51
52
53 protected boolean nullValue = true;
54
55
56
57
58
59 private boolean escape = true;
60
61
62
63
64
65 protected String parameter = null;
66
67 public String getFactory() {
68 return (this.factory);
69 }
70
71 public void setFactory(String factory) {
72 if (configured) {
73 throw new IllegalStateException("Configuration is frozen");
74 }
75
76 this.factory = factory;
77 }
78
79 public String getKey() {
80 return (this.key);
81 }
82
83 public void setKey(String key) {
84 if (configured) {
85 throw new IllegalStateException("Configuration is frozen");
86 }
87
88 this.key = key;
89 }
90
91 public boolean getNull() {
92 return (this.nullValue);
93 }
94
95 public void setNull(boolean nullValue) {
96 if (configured) {
97 throw new IllegalStateException("Configuration is frozen");
98 }
99
100 this.nullValue = nullValue;
101 }
102
103
104
105
106
107
108
109 public boolean isEscape() {
110 return escape;
111 }
112
113
114
115
116
117
118
119 public void setEscape(boolean escape) {
120 this.escape = escape;
121 }
122
123 public String getParameter() {
124 return (this.parameter);
125 }
126
127 public void setParameter(String parameter) {
128 if (configured) {
129 throw new IllegalStateException("Configuration is frozen");
130 }
131
132 this.parameter = parameter;
133 }
134
135
136
137
138
139
140 public String toString() {
141 StringBuffer sb = new StringBuffer("MessageResourcesConfig[");
142
143 sb.append("factory=");
144 sb.append(this.factory);
145 sb.append(",null=");
146 sb.append(this.nullValue);
147 sb.append(",escape=");
148 sb.append(this.escape);
149 sb.append(",parameter=");
150 sb.append(this.parameter);
151 sb.append("]");
152
153 return (sb.toString());
154 }
155 }