Package org.wildfly.subsystem.resource
Class ResourceDescriptor.AbstractConfigurator<C extends ResourceDescriptor.Configurator<C>>
java.lang.Object
org.wildfly.subsystem.resource.ResourceDescriptor.AbstractConfigurator<C>
- All Implemented Interfaces:
ResourceDescriptor.Configurator<C>
- Direct Known Subclasses:
ResourceDescriptor.DefaultBuilder
- Enclosing interface:
- ResourceDescriptor
public abstract static class ResourceDescriptor.AbstractConfigurator<C extends ResourceDescriptor.Configurator<C>>
extends Object
implements ResourceDescriptor.Configurator<C>
An abstract
ResourceDescriptor configurator.-
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.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.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.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, 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.requireChildResources(Set<? extends org.jboss.as.controller.ResourceRegistration> children) Defines a set of required children of this resource.requireSingletonChildResources(Set<? extends org.jboss.as.controller.ResourceRegistration> children) Defines a set of required singleton children of this resource.protected abstract Cself()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.withDeploymentChainContributor(Consumer<DeploymentProcessorTarget> contributor) Applies the specified deployment chain contributor to this resource's "add" operation.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.subsystem.resource.ResourceDescriptor.Configurator
addCapabilities, addCapability, addResourceCapabilityReference, provideCapabilities, provideRequiredChildren, provideRequiredSingletonChildren, renameAttribute, requireChild, requireChildren, requireChildResource, requireSingletonChild, requireSingletonChild, requireSingletonChildResource, withAddResourceOperationTransformation, withOperationTransformation
-
Method Details
-
self
-
withRuntimeHandler
Description copied from interface:ResourceDescriptor.ConfiguratorApplies the specified runtime handler to the operations of this resource.- Specified by:
withRuntimeHandlerin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
runtimeHandler- a runtime handler.- Returns:
- a reference to this configurator
-
withAddOperationRestartFlag
public C withAddOperationRestartFlag(org.jboss.as.controller.registry.OperationEntry.Flag restartFlag) Description copied from interface:ResourceDescriptor.ConfiguratorOverrides the default restart flag for the "add" operation of this resource.- Specified by:
withAddOperationRestartFlagin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
restartFlag- a restart flag- Returns:
- a reference to this configurator
-
withRemoveOperationRestartFlag
public C withRemoveOperationRestartFlag(org.jboss.as.controller.registry.OperationEntry.Flag restartFlag) Description copied from interface:ResourceDescriptor.ConfiguratorOverrides the default restart flag for the "remove" operation of this resource.- Specified by:
withRemoveOperationRestartFlagin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
restartFlag- a restart flag- Returns:
- a reference to this configurator
-
addAttributes
Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified attributes to this resource descriptor.- Specified by:
addAttributesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
attributes- a collection of attributes- Returns:
- a reference to this configurator
-
addAttribute
public C addAttribute(org.jboss.as.controller.AttributeDefinition attribute, org.jboss.as.controller.OperationStepHandler writeAttributeHandler) Description copied from interface:ResourceDescriptor.ConfiguratorAdds the attribute with the specified custom "write-attribute" operation handler.- Specified by:
addAttributein interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
attribute- an attributewriteAttributeHandler- custom "write-attribute" operation handler- Returns:
- a reference to this configurator
-
addModelOnlyAttributes
Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified model-only attributes (i.e. with no runtime handling) to this resource descriptor.- Specified by:
addModelOnlyAttributesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
attributes- a collection of attributes- Returns:
- a reference to this configurator
-
addReadOnlyAttributes
Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified read-only attributes to this resource descriptor.- Specified by:
addReadOnlyAttributesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
attributes- a collection of attributes- Returns:
- a reference to this configurator
-
translateAttribute
public C translateAttribute(org.jboss.as.controller.AttributeDefinition attribute, AttributeTranslation translation) Description copied from interface:ResourceDescriptor.ConfiguratorSpecifies an attribute alias to another attribute of a potentially different resource.- Specified by:
translateAttributein interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
attribute- the alias attributetranslation- a description of the attribute translation- Returns:
- a reference to this configurator
-
addCapability
public C addCapability(org.jboss.as.controller.capability.RuntimeCapability<?> capability, BiPredicate<org.jboss.as.controller.OperationContext, org.jboss.as.controller.registry.Resource> filter) Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified conditionally-registered runtime capability to this resource- Specified by:
addCapabilityin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
capability- a runtime capabilityfilter- a predicate used to determine when the specified capability should be registered- Returns:
- a reference to this configurator
-
addCapabilities
public C addCapabilities(Collection<org.jboss.as.controller.capability.RuntimeCapability<?>> capabilities, BiPredicate<org.jboss.as.controller.OperationContext, org.jboss.as.controller.registry.Resource> filter) Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified runtime capabilities to this resource.- Specified by:
addCapabilitiesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- 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
-
requireChildResources
public C requireChildResources(Set<? extends org.jboss.as.controller.ResourceRegistration> children) Description copied from interface:ResourceDescriptor.ConfiguratorDefines a set of required children of this resource. Required children will be automatically added, if no child resource exists with the specified path.- Specified by:
requireChildResourcesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Returns:
- a reference to this configurator
-
requireSingletonChildResources
public C requireSingletonChildResources(Set<? extends org.jboss.as.controller.ResourceRegistration> children) Description copied from interface:ResourceDescriptor.ConfiguratorDefines 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.- Specified by:
requireSingletonChildResourcesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
children- a set of paths of the required singleton child resources- Returns:
- a reference to this configurator
-
addResourceCapabilityReferences
public C addResourceCapabilityReferences(Collection<? extends ResourceCapabilityReference<?>> references) Description copied from interface:ResourceDescriptor.ConfiguratorAdds a number of capability references that records requirements for this resource.- Specified by:
addResourceCapabilityReferencesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
references- a collection of capability reference recorders- Returns:
- a reference to this configurator
-
withOperationTransformation
public C withOperationTransformation(UnaryOperator<org.jboss.as.controller.OperationStepHandler> transformation) Description copied from interface:ResourceDescriptor.ConfiguratorApplies the specified transformation to all operations for this resource.- Specified by:
withOperationTransformationin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
transformation- an operation handler transformation- Returns:
- a reference to this configurator
-
withOperationTransformation
public C withOperationTransformation(Set<String> operationNames, UnaryOperator<org.jboss.as.controller.OperationStepHandler> transformation) Description copied from interface:ResourceDescriptor.ConfiguratorApplies the specified transformation to the specified operations for this resource.- Specified by:
withOperationTransformationin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>transformation- an operation handler transformation- Returns:
- a reference to this configurator
-
withResourceTransformation
public C withResourceTransformation(UnaryOperator<org.jboss.as.controller.registry.Resource> transformation) Description copied from interface:ResourceDescriptor.ConfiguratorApplies the specified transformation to theResourcecreated by this resource's "add" operation.- Specified by:
withResourceTransformationin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
transformation- an operation handler transformation- Returns:
- a reference to this configurator
-
withDeploymentChainContributor
Description copied from interface:ResourceDescriptor.ConfiguratorApplies the specified deployment chain contributor to this resource's "add" operation.- Specified by:
withDeploymentChainContributorin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
contributor- a deployment chain contribution- Returns:
- a reference to this configurator
-
provideAttributes
public <P extends Supplier<org.jboss.as.controller.AttributeDefinition>> C provideAttributes(Collection<P> providers) Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified attribute providers to this resource descriptor.- Specified by:
provideAttributesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
providers- a collection of attribute providers- Returns:
- a reference to this configurator
-
provideModelOnlyAttributes
public <P extends Supplier<org.jboss.as.controller.AttributeDefinition>> C provideModelOnlyAttributes(Collection<P> providers) Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified model-only attribute providers to this resource descriptor.- Specified by:
provideModelOnlyAttributesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
providers- a collection of attribute providers- Returns:
- a reference to this configurator
-
provideReadOnlyAttributes
public <P extends Supplier<org.jboss.as.controller.AttributeDefinition>> C provideReadOnlyAttributes(Collection<P> providers) Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified read-only attribute providers to this resource descriptor.- Specified by:
provideReadOnlyAttributesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- Parameters:
providers- a collection of attribute providers- Returns:
- a reference to this configurator
-
provideCapabilities
public <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) Description copied from interface:ResourceDescriptor.ConfiguratorAdds the specified conditionally-registered runtime capability providers to this resource descriptor.- Specified by:
provideCapabilitiesin interfaceResourceDescriptor.Configurator<C extends ResourceDescriptor.Configurator<C>>- 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
-