Package org.wildfly.subsystem.resource
Interface ResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>
- Type Parameters:
C- the configurator type
- All Known Subinterfaces:
ResourceDescriptor.Builder
- All Known Implementing Classes:
ResourceDescriptor.AbstractConfigurator,ResourceDescriptor.DefaultBuilder
- Enclosing interface:
- ResourceDescriptor
public static interface ResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>
Configures the characteristics of a
ResourceDescriptor.-
Method Summary
Modifier and TypeMethodDescriptionaddAttribute(org.jboss.as.controller.AttributeDefinition attribute, org.jboss.as.controller.OperationStepHandler writeAttributeHandler) Adds the attribute with the specified custom "write-attribute" operation handler.addAttributes(Collection<org.jboss.as.controller.AttributeDefinition> attributes) Adds the specified attributes to this resource descriptor.default CaddCapabilities(Collection<org.jboss.as.controller.capability.RuntimeCapability<?>> capabilities) Adds the specified runtime capabilities to this resource.addCapabilities(Collection<org.jboss.as.controller.capability.RuntimeCapability<?>> capabilities, BiPredicate<org.jboss.as.controller.OperationContext, org.jboss.as.controller.registry.Resource> filter) Adds the specified runtime capabilities to this resource.default CaddCapability(org.jboss.as.controller.capability.RuntimeCapability<?> capability) Adds the specified runtime capability to this resource.addCapability(org.jboss.as.controller.capability.RuntimeCapability<?> capability, BiPredicate<org.jboss.as.controller.OperationContext, org.jboss.as.controller.registry.Resource> filter) Adds the specified conditionally-registered runtime capability to this resourceaddModelOnlyAttributes(Collection<org.jboss.as.controller.AttributeDefinition> attributes) Adds the specified model-only attributes (i.e. with no runtime handling) to this resource descriptor.addReadOnlyAttributes(Collection<org.jboss.as.controller.AttributeDefinition> attributes) Adds the specified read-only attributes to this resource descriptor.default CaddResourceCapabilityReference(ResourceCapabilityReference<?> reference) Adds a capability reference that records a requirement for this resource.addResourceCapabilityReferences(Collection<? extends ResourceCapabilityReference<?>> references) Adds a number of capability references that records requirements for this resource.provideAttributes(Collection<P> providers) Adds the specified attribute providers to this resource descriptor.provideCapabilities(Collection<P> providers) Adds the specified runtime capability providers to this resource descriptor.provideCapabilities(Collection<P> providers, BiPredicate<org.jboss.as.controller.OperationContext, org.jboss.as.controller.registry.Resource> filter) Adds the specified conditionally-registered runtime capability providers to this resource descriptor.provideModelOnlyAttributes(Collection<P> providers) Adds the specified model-only attribute providers to this resource descriptor.provideReadOnlyAttributes(Collection<P> providers) Adds the specified read-only attribute providers to this resource descriptor.provideRequiredChildren(Collection<P> providers) Deprecated, for removal: This API element is subject to removal in a future version.provideRequiredSingletonChildren(Collection<P> providers) Deprecated, for removal: This API element is subject to removal in a future version.UserequireSingletonChildResources(Set)instead.default CrenameAttribute(org.jboss.as.controller.AttributeDefinition attribute, org.jboss.as.controller.AttributeDefinition targetAttribute) Specifies an attribute alias to another attribute of this resource.default CrequireChild(org.jboss.as.controller.PathElement path) Deprecated, for removal: This API element is subject to removal in a future version.Superseded byrequireChildResource(ResourceRegistration).default CrequireChildren(Set<org.jboss.as.controller.PathElement> paths) Deprecated, for removal: This API element is subject to removal in a future version.Superseded byrequireChildResources(Set).default CrequireChildResource(org.jboss.as.controller.ResourceRegistration child) Defines a required child of this resource.requireChildResources(Set<? extends org.jboss.as.controller.ResourceRegistration> children) Defines a set of required children of this resource.default CrequireSingletonChild(Set<org.jboss.as.controller.PathElement> paths) Deprecated, for removal: This API element is subject to removal in a future version.Superseded byrequireSingletonChildResources(Set).default CrequireSingletonChild(org.jboss.as.controller.PathElement path) Deprecated, for removal: This API element is subject to removal in a future version.Superseded byrequireSingletonChildResource(ResourceRegistration).default CrequireSingletonChildResource(org.jboss.as.controller.ResourceRegistration path) Defines a required singleton child of this resource.requireSingletonChildResources(Set<? extends org.jboss.as.controller.ResourceRegistration> paths) Defines a set of required singleton children of this resource.translateAttribute(org.jboss.as.controller.AttributeDefinition attribute, AttributeTranslation translation) Specifies an attribute alias to another attribute of a potentially different resource.withAddOperationRestartFlag(org.jboss.as.controller.registry.OperationEntry.Flag restartFlag) Overrides the default restart flag for the "add" operation of this resource.default CwithAddResourceOperationTransformation(UnaryOperator<org.jboss.as.controller.OperationStepHandler> transformation) Deprecated, for removal: This API element is subject to removal in a future version.Superseded bywithOperationTransformation(String, UnaryOperator).withDeploymentChainContributor(Consumer<DeploymentProcessorTarget> contributor) Applies the specified deployment chain contributor to this resource's "add" operation.default CwithOperationTransformation(String operationName, UnaryOperator<org.jboss.as.controller.OperationStepHandler> transformation) Applies the specified transformation to the specified operation for this resource.withOperationTransformation(UnaryOperator<org.jboss.as.controller.OperationStepHandler> transformation) Applies the specified transformation to all operations for this resource.withOperationTransformation(Set<String> operationNames, UnaryOperator<org.jboss.as.controller.OperationStepHandler> transformation) Applies the specified transformation to the specified operations for this resource.withRemoveOperationRestartFlag(org.jboss.as.controller.registry.OperationEntry.Flag restartFlag) Overrides the default restart flag for the "remove" operation of this resource.withResourceTransformation(UnaryOperator<org.jboss.as.controller.registry.Resource> transformation) Applies the specified transformation to theResourcecreated by this resource's "add" operation.withRuntimeHandler(ResourceOperationRuntimeHandler runtimeHandler) Applies the specified runtime handler to the operations of this resource.
-
Method Details
-
withRuntimeHandler
Applies the specified runtime handler to the operations of this resource.- Parameters:
runtimeHandler- a runtime handler.- Returns:
- a reference to this configurator
-
withAddOperationRestartFlag
Overrides the default restart flag for the "add" operation of this resource.- Parameters:
restartFlag- a restart flag- Returns:
- a reference to this configurator
-
withRemoveOperationRestartFlag
Overrides the default restart flag for the "remove" operation of this resource.- Parameters:
restartFlag- a restart flag- Returns:
- a reference to this configurator
-
addAttributes
Adds the specified attributes to this resource descriptor.- Parameters:
attributes- a collection of attributes- Returns:
- a reference to this configurator
-
addAttribute
C addAttribute(org.jboss.as.controller.AttributeDefinition attribute, org.jboss.as.controller.OperationStepHandler writeAttributeHandler) Adds the attribute with the specified custom "write-attribute" operation handler.- Parameters:
attribute- an attributewriteAttributeHandler- custom "write-attribute" operation handler- Returns:
- a reference to this configurator
-
addModelOnlyAttributes
Adds the specified model-only attributes (i.e. with no runtime handling) to this resource descriptor.- Parameters:
attributes- a collection of attributes- Returns:
- a reference to this configurator
-
addReadOnlyAttributes
Adds the specified read-only attributes to this resource descriptor.- Parameters:
attributes- a collection of attributes- Returns:
- a reference to this configurator
-
renameAttribute
default C renameAttribute(org.jboss.as.controller.AttributeDefinition attribute, org.jboss.as.controller.AttributeDefinition targetAttribute) Specifies an attribute alias to another attribute of this resource.- Parameters:
attribute- the alias attributetargetAttribute- the target attribute- Returns:
- a reference to this configurator
-
translateAttribute
C translateAttribute(org.jboss.as.controller.AttributeDefinition attribute, AttributeTranslation translation) Specifies an attribute alias to another attribute of a potentially different resource.- Parameters:
attribute- the alias attributetranslation- a description of the attribute translation- Returns:
- a reference to this configurator
-
addCapability
Adds the specified runtime capability to this resource.- Parameters:
capability- a runtime capability- Returns:
- a reference to this configurator
-
addCapability
C addCapability(org.jboss.as.controller.capability.RuntimeCapability<?> capability, BiPredicate<org.jboss.as.controller.OperationContext, org.jboss.as.controller.registry.Resource> filter) Adds the specified conditionally-registered runtime capability to this resource- Parameters:
capability- a runtime capabilityfilter- a predicate used to determine when the specified capability should be registered- Returns:
- a reference to this configurator
-
addCapabilities
default C addCapabilities(Collection<org.jboss.as.controller.capability.RuntimeCapability<?>> capabilities) Adds the specified runtime capabilities to this resource.- Parameters:
capabilities- a collection of runtime capabilities- Returns:
- a reference to this configurator
-
addCapabilities
C addCapabilities(Collection<org.jboss.as.controller.capability.RuntimeCapability<?>> capabilities, BiPredicate<org.jboss.as.controller.OperationContext, org.jboss.as.controller.registry.Resource> filter) Adds the specified runtime capabilities to this resource.- Parameters:
capabilities- a collection of runtime capabilitiesfilter- a predicate used to determine when the specified capability should be registered- Returns:
- a reference to this configurator
-
requireChild
@Deprecated(forRemoval=true, since="26.0.0") default C requireChild(org.jboss.as.controller.PathElement path) Deprecated, for removal: This API element is subject to removal in a future version.Superseded byrequireChildResource(ResourceRegistration).Defines a required child of this resource. Required children will be automatically added, if no child resource exists with the specified path.- Parameters:
path- the path of the required child resource- Returns:
- a reference to this configurator
-
requireChildren
@Deprecated(forRemoval=true, since="26.0.0") default C requireChildren(Set<org.jboss.as.controller.PathElement> paths) Deprecated, for removal: This API element is subject to removal in a future version.Superseded byrequireChildResources(Set).Defines a set of required children of this resource. Required children will be automatically added, if no child resource exists with the specified path.- Parameters:
paths- a set of paths of the required child resources- Returns:
- a reference to this configurator
-
requireChildResource
Defines a required child of this resource. Required children will be automatically added, if no child resource exists with the specified path.- Parameters:
path- the path of the required child resource- Returns:
- a reference to this configurator
-
requireChildResources
Defines a set of required children of this resource. Required children will be automatically added, if no child resource exists with the specified path.- Parameters:
paths- a set of paths of the required child resources- Returns:
- a reference to this configurator
-
requireSingletonChild
@Deprecated(forRemoval=true, since="26.0.0") default C requireSingletonChild(org.jboss.as.controller.PathElement path) Deprecated, for removal: This API element is subject to removal in a future version.Superseded byrequireSingletonChildResource(ResourceRegistration).Defines a required singleton child of this resource. Required singleton children will be automatically added, if no child resource exists with the same path key.- Parameters:
path- the path of the required singleton child resource- Returns:
- a reference to this configurator
-
requireSingletonChild
@Deprecated(forRemoval=true, since="26.0.0") default C requireSingletonChild(Set<org.jboss.as.controller.PathElement> paths) Deprecated, for removal: This API element is subject to removal in a future version.Superseded byrequireSingletonChildResources(Set).Defines a set of required singleton children of this resource. Required singleton children will be automatically added, if no child resource exists with the same path key.- Parameters:
paths- a set of paths of the required singleton child resources- Returns:
- a reference to this configurator
-
requireSingletonChildResource
Defines a required singleton child of this resource. Required singleton children will be automatically added, if no child resource exists with the same path key.- Parameters:
path- the path of the required singleton child resource- Returns:
- a reference to this configurator
-
requireSingletonChildResources
Defines a set of required singleton children of this resource. Required singleton children will be automatically added, if no child resource exists with the same path key.- Parameters:
paths- a set of paths of the required singleton child resources- Returns:
- a reference to this configurator
-
addResourceCapabilityReference
Adds a capability reference that records a requirement for this resource.- Parameters:
reference- a capability reference recorder- Returns:
- a reference to this configurator
-
addResourceCapabilityReferences
Adds a number of capability references that records requirements for this resource.- Parameters:
references- a collection of capability reference recorders- Returns:
- a reference to this configurator
-
withAddResourceOperationTransformation
@Deprecated(forRemoval=true, since="26.0.0") default C withAddResourceOperationTransformation(UnaryOperator<org.jboss.as.controller.OperationStepHandler> transformation) Deprecated, for removal: This API element is subject to removal in a future version.Superseded bywithOperationTransformation(String, UnaryOperator).Applies the specified transformation to the "add" operation of this resource.- Parameters:
transformation- an operation handler transformation- Returns:
- a reference to this configurator
-
withOperationTransformation
C withOperationTransformation(UnaryOperator<org.jboss.as.controller.OperationStepHandler> transformation) Applies the specified transformation to all operations for this resource.- Parameters:
transformation- an operation handler transformation- Returns:
- a reference to this configurator
-
withOperationTransformation
default C withOperationTransformation(String operationName, UnaryOperator<org.jboss.as.controller.OperationStepHandler> transformation) Applies the specified transformation to the specified operation for this resource.- Parameters:
transformation- an operation handler transformation- Returns:
- a reference to this configurator
-
withOperationTransformation
C withOperationTransformation(Set<String> operationNames, UnaryOperator<org.jboss.as.controller.OperationStepHandler> transformation) Applies the specified transformation to the specified operations for this resource.- Parameters:
transformation- an operation handler transformation- Returns:
- a reference to this configurator
-
withResourceTransformation
C withResourceTransformation(UnaryOperator<org.jboss.as.controller.registry.Resource> transformation) Applies the specified transformation to theResourcecreated by this resource's "add" operation.- Parameters:
transformation- an operation handler transformation- Returns:
- a reference to this configurator
-
withDeploymentChainContributor
Applies the specified deployment chain contributor to this resource's "add" operation.- Parameters:
contributor- a deployment chain contribution- Returns:
- a reference to this configurator
-
provideAttributes
<P extends Supplier<org.jboss.as.controller.AttributeDefinition>> C provideAttributes(Collection<P> providers) Adds the specified attribute providers to this resource descriptor.- Parameters:
providers- a collection of attribute providers- Returns:
- a reference to this configurator
-
provideModelOnlyAttributes
<P extends Supplier<org.jboss.as.controller.AttributeDefinition>> C provideModelOnlyAttributes(Collection<P> providers) Adds the specified model-only attribute providers to this resource descriptor.- Parameters:
providers- a collection of attribute providers- Returns:
- a reference to this configurator
-
provideReadOnlyAttributes
<P extends Supplier<org.jboss.as.controller.AttributeDefinition>> C provideReadOnlyAttributes(Collection<P> providers) Adds the specified read-only attribute providers to this resource descriptor.- Parameters:
providers- a collection of attribute providers- Returns:
- a reference to this configurator
-
provideCapabilities
default <P extends Supplier<org.jboss.as.controller.capability.RuntimeCapability<?>>> C provideCapabilities(Collection<P> providers) Adds the specified runtime capability providers to this resource descriptor.- Parameters:
providers- a collection of runtime capability providers- Returns:
- a reference to this configurator
-
provideCapabilities
<P extends Supplier<org.jboss.as.controller.capability.RuntimeCapability<?>>> C provideCapabilities(Collection<P> providers, BiPredicate<org.jboss.as.controller.OperationContext, org.jboss.as.controller.registry.Resource> filter) Adds the specified conditionally-registered runtime capability providers to this resource descriptor.- Parameters:
providers- a collection of runtime capability providersfilter- a predicate used to determine when the specified capability should be registered- Returns:
- a reference to this configurator
-
provideRequiredChildren
@Deprecated(forRemoval=true, since="26.0.0") default <P extends Supplier<org.jboss.as.controller.PathElement>> C provideRequiredChildren(Collection<P> providers) Deprecated, for removal: This API element is subject to removal in a future version.UserequireChildResources(Set)instead.Defines a set of required children of this resource. Required children will be automatically added, if no child resource exists with the specified path.- Parameters:
providers- a set of providers of the required child resource paths- Returns:
- a reference to this configurator
-
provideRequiredSingletonChildren
@Deprecated(forRemoval=true, since="26.0.0") default <P extends Supplier<org.jboss.as.controller.PathElement>> C provideRequiredSingletonChildren(Collection<P> providers) Deprecated, for removal: This API element is subject to removal in a future version.UserequireSingletonChildResources(Set)instead.Defines a set of required singleton children of this resource. Required singleton children will be automatically added, if no child resource exists with the same path key.- Parameters:
providers- a set of providers of the required singleton child resource paths- Returns:
- a reference to this configurator
-
requireChildResources(Set)instead.