@Override public ResourceDescriptor apply(ResourceDescriptor descriptor) { return this.configurator.apply(descriptor) .addAttributes(Attribute.class) // Translate deprecated DATASOURCE attribute to DATA_SOURCE attribute .addAttributeTranslation(DeprecatedAttribute.DATASOURCE, DATA_SOURCE_TRANSLATION) ; } }
@Override public ManagementResourceRegistration register(ManagementResourceRegistration parent) { ManagementResourceRegistration registration = parent.registerSubModel(this); ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()) .addAttributes(this.prefixAttribute) .addAttributes(Attribute.class) .addAttributes(ColumnAttribute.class) .addAttributeTranslation(DeprecatedAttribute.BATCH_SIZE, BATCH_SIZE_TRANSLATION) ; ResourceServiceHandler handler = new SimpleResourceServiceHandler(address -> new TableServiceConfigurator(this.prefixAttribute, address)); new SimpleResourceRegistration(descriptor, handler).register(registration); return registration; } }
.addAttributes(EnumSet.complementOf(EnumSet.of(Attribute.SSL_CONTEXT))) .addExtraParameters(Attribute.SSL_CONTEXT) .addAttributeTranslation(DeprecatedAttribute.SIMPLE_LOAD_PROVIDER, SIMPLE_LOAD_PROVIDER_TRANSLATION) .addAlias(DeprecatedAttribute.CONNECTOR, Attribute.LISTENER) .addRequiredSingletonChildren(SimpleLoadProviderResourceDefinition.PATH)
@Override public ResourceDescriptor apply(ResourceDescriptor descriptor) { return this.configurator.apply(descriptor) .addAttributes(Attribute.class) // Translate deprecated DATASOURCE attribute to DATA_SOURCE attribute .addAttributeTranslation(DeprecatedAttribute.DATASOURCE, DATA_SOURCE_TRANSLATION) ; } }
@Override public ManagementResourceRegistration register(ManagementResourceRegistration parent) { ManagementResourceRegistration registration = parent.registerSubModel(this); ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()) .addAttributes(this.prefixAttribute) .addAttributes(Attribute.class) .addAttributes(ColumnAttribute.class) .addAttributeTranslation(DeprecatedAttribute.BATCH_SIZE, BATCH_SIZE_TRANSLATION) ; ResourceServiceHandler handler = new SimpleResourceServiceHandler(address -> new TableServiceConfigurator(this.prefixAttribute, address)); new SimpleResourceRegistration(descriptor, handler).register(registration); return registration; } }
.addAttributes(EnumSet.complementOf(EnumSet.of(Attribute.SSL_CONTEXT))) .addExtraParameters(Attribute.SSL_CONTEXT) .addAttributeTranslation(DeprecatedAttribute.SIMPLE_LOAD_PROVIDER, SIMPLE_LOAD_PROVIDER_TRANSLATION) .addAlias(DeprecatedAttribute.CONNECTOR, Attribute.LISTENER) .addRequiredSingletonChildren(SimpleLoadProviderResourceDefinition.PATH)