Revision 5846
Added by ben leinfelder about 13 years ago
ConfigurableProperties.java | ||
---|---|---|
517 | 517 |
* @param propertyName |
518 | 518 |
* the name of the property to be checked and set |
519 | 519 |
*/ |
520 |
public void checkAndSetProperty(HttpServletRequest request, String propertyName)
|
|
520 |
public boolean checkAndSetProperty(HttpServletRequest request, String propertyName)
|
|
521 | 521 |
throws GeneralPropertyException { |
522 |
boolean changed = false; |
|
522 | 523 |
String value = getProperty(propertyName); |
523 | 524 |
String newValue = request.getParameter(propertyName); |
524 | 525 |
if (newValue != null && !newValue.trim().equals(value)) { |
525 | 526 |
setPropertyNoPersist(propertyName, newValue.trim()); |
527 |
changed = true; |
|
526 | 528 |
} |
529 |
return changed; |
|
527 | 530 |
} |
528 | 531 |
|
529 | 532 |
} |
Also available in: Unified diff
add boolean return to indicate whether or not a property was modified