@Override public PropertyDescriptor getPropertyDescriptor(final String name) { return component.getPropertyDescriptor(name); }
verifyModifiable(); final PropertyDescriptor descriptor = component.getPropertyDescriptor(name); String value = null; if (!descriptor.isRequired() && (value = properties.remove(descriptor)) != null) {
@Override public PropertyValue getPropertyValue(final String propertyName) { final PropertyDescriptor descriptor = component.getPropertyDescriptor(propertyName); if (descriptor == null) { return null; } final String setPropertyValue = getProperty(descriptor); final String propValue = (setPropertyValue == null) ? descriptor.getDefaultValue() : setPropertyValue; return PropertyValueFactory.getInstance(descriptor, propValue, controllerServiceLookup); }
@Override public PropertyValue getPropertyValue(final String propertyName) { final PropertyDescriptor descriptor = component.getPropertyDescriptor(propertyName); if (descriptor == null) { return null; } final String setPropertyValue = getProperty(descriptor); final String propValue = (setPropertyValue == null) ? descriptor.getDefaultValue() : setPropertyValue; return new StandardPropertyValue(propValue); }
@Override public PropertyValue getPropertyValue(final String propertyName) { final PropertyDescriptor descriptor = component.getPropertyDescriptor(propertyName); if (descriptor == null) { return null; } final String setPropertyValue = getProperty(descriptor); final String propValue = (setPropertyValue == null) ? descriptor.getDefaultValue() : setPropertyValue; return PropertyValueFactory.getInstance(descriptor, propValue, controllerServiceLookup); }
@Override public PropertyValue getPropertyValue(final String propertyName) { final PropertyDescriptor descriptor = component.getPropertyDescriptor(propertyName); if (descriptor == null) { return null; } final String setPropertyValue = getProperty(descriptor); final String propValue = (setPropertyValue == null) ? descriptor.getDefaultValue() : setPropertyValue; return new StandardPropertyValue(propValue); }
@Override public ValidationResult setProperty(final String name, final String value) { if (null == name || null == value) { throw new IllegalArgumentException(); } lock.lock(); ValidationResult result =null; try { verifyModifiable(); final PropertyDescriptor descriptor = component.getPropertyDescriptor(name); result = descriptor.validate(value); if (!result.isValid()) { //throw new IllegalArgumentException(result.toString()); logger.warn(result.toString()); } final String oldValue = properties.put(descriptor, value); if (!value.equals(oldValue)) { try { component.onPropertyModified(descriptor, oldValue, value); } catch (final Exception e) { // nothing really to do here... } } } catch (final Exception e) { // nothing really to do here... } finally { lock.unlock(); return result; } }