HandlerAddOperationStepHandler(final PropertySorter propertySorter, final Class<? extends Handler> type, final AttributeDefinition[] attributes, final ConfigurationProperty<?>... constructionProperties) { super(attributes); this.type = type; this.attributes = attributes; final List<String> names = new ArrayList<>(); for (ConfigurationProperty<?> prop : constructionProperties) { names.add(prop.getPropertyName()); } this.constructionProperties = names.toArray(new String[0]); this.propertySorter = (propertySorter == null ? PropertySorter.NO_OP : propertySorter); }
@SuppressWarnings("unchecked") final ConfigurationProperty<String> configurationProperty = (ConfigurationProperty<String>) attribute; if (resolveValue) { configurationProperty.setPropertyValue(context, model, configuration); } else { final ModelNodeResolver<String> resolver = configurationProperty.resolver(); configuration.setPropertyValueString(configurationProperty.getPropertyName(), null); configuration.removeProperty(configurationProperty.getPropertyName()); } else { configuration.setPropertyValueString(configurationProperty.getPropertyName(), resolvedValue);
if (attribute instanceof ConfigurationProperty) { final ConfigurationProperty<?> propAttribute = ((ConfigurationProperty<?>) attribute); final String resolvedValue = String.valueOf(propAttribute.resolvePropertyValue(context, model)); final String currentValue = configuration.getPropertyValueString(propAttribute.getPropertyName()); result = (resolvedValue == null ? currentValue == null : resolvedValue.equals(currentValue)); } else {
((ConfigurationProperty<?>) attribute).setPropertyValue(context, model, configuration); } else { LoggingLogger.ROOT_LOGGER.invalidPropertyAttribute(attribute.getName());
@SuppressWarnings("unchecked") final ConfigurationProperty<String> configurationProperty = (ConfigurationProperty<String>) attribute; if (resolveValue) { configurationProperty.setPropertyValue(context, model, configuration); } else { final ModelNodeResolver<String> resolver = configurationProperty.resolver(); configuration.setPropertyValueString(configurationProperty.getPropertyName(), null); configuration.removeProperty(configurationProperty.getPropertyName()); } else { configuration.setPropertyValueString(configurationProperty.getPropertyName(), resolvedValue);
if (attribute instanceof ConfigurationProperty) { final ConfigurationProperty<?> propAttribute = ((ConfigurationProperty<?>) attribute); final String resolvedValue = String.valueOf(propAttribute.resolvePropertyValue(context, model)); final String currentValue = configuration.getPropertyValueString(propAttribute.getPropertyName()); result = (resolvedValue == null ? currentValue == null : resolvedValue.equals(currentValue)); } else {
HandlerAddOperationStepHandler(final PropertySorter propertySorter, final Class<? extends Handler> type, final AttributeDefinition[] attributes, final ConfigurationProperty<?>... constructionProperties) { super(attributes); this.type = type; this.attributes = attributes; final List<String> names = new ArrayList<>(); for (ConfigurationProperty<?> prop : constructionProperties) { names.add(prop.getPropertyName()); } this.constructionProperties = names.toArray(new String[0]); this.propertySorter = (propertySorter == null ? PropertySorter.NO_OP : propertySorter); }
protected HandlerAddOperationStepHandler(final Class<? extends Handler> type, final AttributeDefinition[] attributes, final ConfigurationProperty<?>... constructionProperties) { this.type = type; this.attributes = attributes; final List<String> names = new ArrayList<String>(); for (ConfigurationProperty<?> prop : constructionProperties) { names.add(prop.getPropertyName()); } this.constructionProperties = names.toArray(new String[names.size()]); }