@Override public List<PropertyDescriptor> getPropertyDescriptors() { return component.getPropertyDescriptors(); }
@Override public PropertyDescriptor getPropertyDescriptor(final String name) { return component.getPropertyDescriptor(name); }
@Override public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) { component.onPropertyModified(descriptor, oldValue, newValue); }
verifyModifiable(); final PropertyDescriptor descriptor = component.getPropertyDescriptor(name); String value = null; if (!descriptor.isRequired() && (value = properties.remove(descriptor)) != null) { component.onPropertyModified(descriptor, value, null); } catch (final Exception e) {
@Override public Collection<ValidationResult> validate(final ValidationContext context) { return component.validate(context); }
@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; } }
@Override public Map<PropertyDescriptor, String> getProperties() { final List<PropertyDescriptor> supported = component.getPropertyDescriptors(); if (supported == null || supported.isEmpty()) { return Collections.unmodifiableMap(properties); } else { final Map<PropertyDescriptor, String> props = new LinkedHashMap<>(); for (final PropertyDescriptor descriptor : supported) { props.put(descriptor, null); } props.putAll(properties); return props; } }
@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); }
/** * Indicates whether or not the component contains at least one property that supports Expression Language. * * @param component the component to interogate * @return whether or not the component contains at least one sensitive property. */ private boolean containsExpressionLanguage(final ConfigurableComponent component) { for (PropertyDescriptor descriptor : component.getPropertyDescriptors()) { if (descriptor.isExpressionLanguageSupported()) { return true; } } return false; }
@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); }
/** * Indicates whether or not the component contains at least one sensitive property. * * @param component the component to interogate * @return whether or not the component contains at least one sensitive property. */ private boolean containsSensitiveProperties(final ConfigurableComponent component) { for (PropertyDescriptor descriptor : component.getPropertyDescriptors()) { if (descriptor.isSensitive()) { return true; } } return false; }
@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); }
/** * Indicates whether or not the component contains at least one property that supports Expression Language. * * @param component the component to interogate * @return whether or not the component contains at least one sensitive property. */ private boolean containsExpressionLanguage(final ConfigurableComponent component) { for (PropertyDescriptor descriptor : component.getPropertyDescriptors()) { if (descriptor.isExpressionLanguageSupported()) { return true; } } return false; }
@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); }
/** * Indicates whether or not the component contains at least one property that supports Expression Language. * * @param component the component to interogate * @return whether or not the component contains at least one sensitive property. */ private boolean containsExpressionLanguage(final ConfigurableComponent component) { for (PropertyDescriptor descriptor : component.getPropertyDescriptors()) { if (descriptor.isExpressionLanguageSupported()) { return true; } } return false; }
/** * Indicates whether or not the component contains at least one sensitive property. * * @param component the component to interogate * @return whether or not the component contains at least one sensitive property. */ private boolean containsSensitiveProperties(final ConfigurableComponent component) { for (PropertyDescriptor descriptor : component.getPropertyDescriptors()) { if (descriptor.isSensitive()) { return true; } } return false; }
/** * Indicates whether or not the component contains at least one sensitive property. * * @param component the component to interogate * @return whether or not the component contains at least one sensitive property. */ private boolean containsSensitiveProperties(final ConfigurableComponent component) { for (PropertyDescriptor descriptor : component.getPropertyDescriptors()) { if (descriptor.isSensitive()) { return true; } } return false; }
final JsonGenerator generator) throws IOException { final List<PropertyDescriptor> properties = configurableComponent.getPropertyDescriptors();
final XMLStreamWriter xmlStreamWriter) throws XMLStreamException { final List<PropertyDescriptor> properties = configurableComponent.getPropertyDescriptors(); writeSimpleElement(xmlStreamWriter, "h3", "Properties: ");
final RstPrintWriter rstWriter) { final List<PropertyDescriptor> properties = configurableComponent.getPropertyDescriptors(); rstWriter.writeSectionTitle(3, "Properties");