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 private static final long serialVersionUID = -8689874577436806101L;
36
37
38
39
40
41
42
43 protected String factory =
44 "org.apache.struts.util.PropertyMessageResourcesFactory";
45
46
47
48
49
50 protected String key = Globals.MESSAGES_KEY;
51
52
53
54
55 protected boolean nullValue = true;
56
57
58
59
60
61 private boolean escape = true;
62
63
64
65
66
67 protected String parameter = null;
68
69 public String getFactory() {
70 return (this.factory);
71 }
72
73 public void setFactory(String factory) {
74 if (configured) {
75 throw new IllegalStateException("Configuration is frozen");
76 }
77
78 this.factory = factory;
79 }
80
81 public String getKey() {
82 return (this.key);
83 }
84
85 public void setKey(String key) {
86 if (configured) {
87 throw new IllegalStateException("Configuration is frozen");
88 }
89
90 this.key = key;
91 }
92
93 public boolean getNull() {
94 return (this.nullValue);
95 }
96
97 public void setNull(boolean nullValue) {
98 if (configured) {
99 throw new IllegalStateException("Configuration is frozen");
100 }
101
102 this.nullValue = nullValue;
103 }
104
105
106
107
108
109
110
111 public boolean isEscape() {
112 return escape;
113 }
114
115
116
117
118
119
120
121 public void setEscape(boolean escape) {
122 this.escape = escape;
123 }
124
125 public String getParameter() {
126 return (this.parameter);
127 }
128
129 public void setParameter(String parameter) {
130 if (configured) {
131 throw new IllegalStateException("Configuration is frozen");
132 }
133
134 this.parameter = parameter;
135 }
136
137
138
139
140
141
142 public String toString() {
143 StringBuilder sb = new StringBuilder("MessageResourcesConfig[");
144
145 sb.append("factory=");
146 sb.append(this.factory);
147 sb.append(",null=");
148 sb.append(this.nullValue);
149 sb.append(",escape=");
150 sb.append(this.escape);
151 sb.append(",parameter=");
152 sb.append(this.parameter);
153 sb.append("]");
154
155 return (sb.toString());
156 }
157 }