Revision 5846
Added by ben leinfelder about 13 years ago
SimpleProperties.java | ||
---|---|---|
189 | 189 |
* @param propertyName |
190 | 190 |
* the name of the property to be checked and set |
191 | 191 |
*/ |
192 |
public void checkAndSetProperty(HttpServletRequest request, String propertyName)
|
|
192 |
public boolean checkAndSetProperty(HttpServletRequest request, String propertyName)
|
|
193 | 193 |
throws GeneralPropertyException { |
194 |
boolean changed = false; |
|
194 | 195 |
String value = getProperty(propertyName); |
195 | 196 |
String newValue = request.getParameter(propertyName); |
196 | 197 |
if (newValue != null && !newValue.trim().equals(value)) { |
197 | 198 |
setPropertyNoPersist(propertyName, newValue.trim()); |
199 |
changed = true; |
|
198 | 200 |
} |
201 |
return changed; |
|
199 | 202 |
} |
200 | 203 |
|
201 | 204 |
public SortedProperties getMainBackupProperties() { |
Also available in: Unified diff
add boolean return to indicate whether or not a property was modified