public void updateProperty(ConfigProperty<?> prop) { Object objectValue = properties.get(prop.getName()); if (objectValue == null) { return; } try { prop.setTextValue(objectValue.toString()); } catch (Exception e) { log.error( "Failed to update ConfigProperty '{}' with value '{}'!", prop.getName(), objectValue, e); } }
public void updatePasswordProperty(ConfigProperty<?> prop) { Object objectValue = properties.get(prop.getName()); if (objectValue == null) { return; } String pass = objectValue.toString(); String passKey = this.getPassKey(); if (!StringUtils.isEmpty(passKey)) { try { prop.setTextValue(PassCoder.decode(pass, passKey)); } catch (Exception e) { log.error( "Failed to update ConfigProperty '{}' with value '{}'!", prop.getName(), objectValue, e); } } else { prop.setTextValue(pass); } }